diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2022-08-28 05:39:44 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2022-08-28 05:39:44 +0200 |
| commit | 70baaeb4e78d12c329a03e929fd30d41730ed2b1 (patch) | |
| tree | 74e0b2998455894762b6910ef4008d43f5dc9366 /content/posts | |
| parent | b1d9aefd2a9fa0074f8d18fa2410cdd53d4c8de6 (diff) | |
| download | mitjafelicijan.com-70baaeb4e78d12c329a03e929fd30d41730ed2b1.tar.gz | |
Moved statis assets and converted all CSS to Tailwind
Diffstat (limited to 'content/posts')
18 files changed, 70 insertions, 70 deletions
diff --git a/content/posts/2017-03-07-golang-profiling-simplified.md b/content/posts/2017-03-07-golang-profiling-simplified.md index d784dcc..92ff881 100644 --- a/content/posts/2017-03-07-golang-profiling-simplified.md +++ b/content/posts/2017-03-07-golang-profiling-simplified.md | |||
| @@ -107,5 +107,5 @@ go tool pprof -pdf ./cpu cpu.pprof > cpu.pdf | |||
| 107 | 107 | ||
| 108 | This will generate PDF document with visualized profile. | 108 | This will generate PDF document with visualized profile. |
| 109 | 109 | ||
| 110 | - [Memory PDF profile example](/go-profiling/golang-profiling-mem.pdf) | 110 | - [Memory PDF profile example](/assets/go-profiling/golang-profiling-mem.pdf) |
| 111 | - [CPU PDF profile example](/go-profiling/golang-profiling-cpu.pdf) | 111 | - [CPU PDF profile example](/assets/go-profiling/golang-profiling-cpu.pdf) |
diff --git a/content/posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md b/content/posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md index 3fe8a9d..466d838 100644 --- a/content/posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md +++ b/content/posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md | |||
| @@ -16,7 +16,7 @@ Before we begin there are some requirements. We will need to: | |||
| 16 | 16 | ||
| 17 | If you are using MacOS you should check out [Profiling Viewer](http://www.profilingviewer.com/) or [MacCallGrind](http://www.maccallgrind.com/). | 17 | If you are using MacOS you should check out [Profiling Viewer](http://www.profilingviewer.com/) or [MacCallGrind](http://www.maccallgrind.com/). |
| 18 | 18 | ||
| 19 |  | 19 |  |
| 20 | 20 | ||
| 21 | We will be dividing this post into two main categories: | 21 | We will be dividing this post into two main categories: |
| 22 | 22 | ||
| @@ -135,7 +135,7 @@ $ pyprof2calltree -i awesome_random_number.prof | |||
| 135 | 135 | ||
| 136 | This file can be opened with visualizing tools listed above. In this case we will be using Profilling Viewer under MacOS. You can open image in new tab. As you can see from this example there is hierarchy of execution order of your code. | 136 | This file can be opened with visualizing tools listed above. In this case we will be using Profilling Viewer under MacOS. You can open image in new tab. As you can see from this example there is hierarchy of execution order of your code. |
| 137 | 137 | ||
| 138 |  | 138 |  |
| 139 | 139 | ||
| 140 | > Make sure you convert output of the cProfile output every time you want to refresh and take a look at your possible optimizations because cProfile updates .prof file every time browser hits the function. | 140 | > Make sure you convert output of the cProfile output every time you want to refresh and take a look at your possible optimizations because cProfile updates .prof file every time browser hits the function. |
| 141 | 141 | ||
| @@ -158,7 +158,7 @@ $ snakeviz awesome_random_number.prof | |||
| 158 | # shows visualized profile | 158 | # shows visualized profile |
| 159 | ``` | 159 | ``` |
| 160 | 160 | ||
| 161 |  | 161 |  |
| 162 | 162 | ||
| 163 | Reddit user [ccharles](https://www.reddit.com/user/ccharles) suggested a better way for installing pip software by targeting user level instead of using sudo. | 163 | Reddit user [ccharles](https://www.reddit.com/user/ccharles) suggested a better way for installing pip software by targeting user level instead of using sudo. |
| 164 | 164 | ||
diff --git a/content/posts/2017-08-11-simple-iot-application.md b/content/posts/2017-08-11-simple-iot-application.md index b48f2fb..b34fe6b 100644 --- a/content/posts/2017-08-11-simple-iot-application.md +++ b/content/posts/2017-08-11-simple-iot-application.md | |||
| @@ -27,7 +27,7 @@ Step 1. and 3. will share the same web application. One route will be dedicated | |||
| 27 | 27 | ||
| 28 | Schema below represents what we will try to achieve and how different parts correlates to each other. | 28 | Schema below represents what we will try to achieve and how different parts correlates to each other. |
| 29 | 29 | ||
| 30 |  | 30 |  |
| 31 | 31 | ||
| 32 | ## Simple Python API | 32 | ## Simple Python API |
| 33 | 33 | ||
| @@ -148,11 +148,11 @@ To run this simply go to folder containing python file and run ```python webapp. | |||
| 148 | 148 | ||
| 149 | After testing the service with Restlet Client you should be able to view your data in a database file ```data.db```. | 149 | After testing the service with Restlet Client you should be able to view your data in a database file ```data.db```. |
| 150 | 150 | ||
| 151 |  | 151 |  |
| 152 | 152 | ||
| 153 | You can also check the contents of new database file by using desktop client for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/). | 153 | You can also check the contents of new database file by using desktop client for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/). |
| 154 | 154 | ||
| 155 |  | 155 |  |
| 156 | 156 | ||
| 157 | Table structure is as simple as it can be. We have ts (timestamp) and value (value from Arduino). As you can see timestamp is generated on API side. If you would happen to have atomic clock on Arduino it would be then better to generate and send timestamp with the value. This would be particularity useful if we would be collecting sensor data at a higher frequency and then sending this data in bulk to API. | 157 | Table structure is as simple as it can be. We have ts (timestamp) and value (value from Arduino). As you can see timestamp is generated on API side. If you would happen to have atomic clock on Arduino it would be then better to generate and send timestamp with the value. This would be particularity useful if we would be collecting sensor data at a higher frequency and then sending this data in bulk to API. |
| 158 | 158 | ||
| @@ -469,9 +469,9 @@ If everything goes well you should be seeing new data-points rendered on chart e | |||
| 469 | 469 | ||
| 470 | If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as shown on picture below. | 470 | If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as shown on picture below. |
| 471 | 471 | ||
| 472 |  | 472 |  |
| 473 | 473 | ||
| 474 | Complete application with all the code is available for [download](/iot-application/simple-iot-application.zip). | 474 | Complete application with all the code is available for [download](/assets/iot-application/simple-iot-application.zip). |
| 475 | 475 | ||
| 476 | ## Conclusion | 476 | ## Conclusion |
| 477 | 477 | ||
diff --git a/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md b/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md index 65cc7b5..504e659 100644 --- a/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md +++ b/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md | |||
| @@ -26,13 +26,13 @@ To make this work you will need DigitalOcean account. If you don't have one you | |||
| 26 | 26 | ||
| 27 | Instuctions on how to use SSH keys and how to setup them are available in article [How To Use SSH Keys with DigitalOcean Droplets](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets). | 27 | Instuctions on how to use SSH keys and how to setup them are available in article [How To Use SSH Keys with DigitalOcean Droplets](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets). |
| 28 | 28 | ||
| 29 |  | 29 |  |
| 30 | 30 | ||
| 31 | After we created Droplet it's time to create new Space. This is done by clicking on a button [Create](https://cloud.digitalocean.com/spaces/new) (right top corner) and selecting Spaces. Choose pronounceable ```Unique name``` because we will use it in examples below. You can either choose Private or Public, it doesn't matter in our case. And you can always change that in the future. | 31 | After we created Droplet it's time to create new Space. This is done by clicking on a button [Create](https://cloud.digitalocean.com/spaces/new) (right top corner) and selecting Spaces. Choose pronounceable ```Unique name``` because we will use it in examples below. You can either choose Private or Public, it doesn't matter in our case. And you can always change that in the future. |
| 32 | 32 | ||
| 33 | When you have created new Space we should [generate Access key](https://cloud.digitalocean.com/settings/api/tokens). This link will guide to the page when you can generate this key. After you create new one, please save provided Key and Secret because Secret will not be shown again. | 33 | When you have created new Space we should [generate Access key](https://cloud.digitalocean.com/settings/api/tokens). This link will guide to the page when you can generate this key. After you create new one, please save provided Key and Secret because Secret will not be shown again. |
| 34 | 34 | ||
| 35 |  | 35 |  |
| 36 | 36 | ||
| 37 | Now that we have new Space and Access key we should SSH into our machine. | 37 | Now that we have new Space and Access key we should SSH into our machine. |
| 38 | 38 | ||
| @@ -102,14 +102,14 @@ As I suspected, object size is not really that important. Sadly I don't have the | |||
| 102 | 102 | ||
| 103 | **Here are plotted results** | 103 | **Here are plotted results** |
| 104 | 104 | ||
| 105 | You can download [raw result here](/do-fuse/copy-benchmarks.tsv). Measurements are in seconds. | 105 | You can download [raw result here](/assets/do-fuse/copy-benchmarks.tsv). Measurements are in seconds. |
| 106 | 106 | ||
| 107 | <script src="//cdn.plot.ly/plotly-latest.min.js"></script> | 107 | <script src="//cdn.plot.ly/plotly-latest.min.js"></script> |
| 108 | <div id="copy-benchmarks"></div> | 108 | <div id="copy-benchmarks"></div> |
| 109 | <script> | 109 | <script> |
| 110 | (function(){ | 110 | (function(){ |
| 111 | var request = new XMLHttpRequest(); | 111 | var request = new XMLHttpRequest(); |
| 112 | request.open("GET", "/do-fuse/copy-benchmarks.tsv", true); | 112 | request.open("GET", "/assets/do-fuse/copy-benchmarks.tsv", true); |
| 113 | request.onload = function() { | 113 | request.onload = function() { |
| 114 | if (request.status >= 200 && request.status < 400) { | 114 | if (request.status >= 200 && request.status < 400) { |
| 115 | var payload = request.responseText.trim(); | 115 | var payload = request.responseText.trim(); |
| @@ -218,13 +218,13 @@ result_time = CLOSE = end_time - start_time | |||
| 218 | print("CLOSE: %g seconds" % (result_time)) | 218 | print("CLOSE: %g seconds" % (result_time)) |
| 219 | ``` | 219 | ``` |
| 220 | 220 | ||
| 221 | You can download [raw result here](/do-fuse/sqlite-benchmarks.tsv). And again, these results are done on a local block storage and do not represent capabilities of object storage. With my current approach and state of the test code these can not be done. I would need to make Python code much more robust and check locking etc. | 221 | You can download [raw result here](/assets/do-fuse/sqlite-benchmarks.tsv). And again, these results are done on a local block storage and do not represent capabilities of object storage. With my current approach and state of the test code these can not be done. I would need to make Python code much more robust and check locking etc. |
| 222 | 222 | ||
| 223 | <div id="sqlite-benchmarks"></div> | 223 | <div id="sqlite-benchmarks"></div> |
| 224 | <script> | 224 | <script> |
| 225 | (function(){ | 225 | (function(){ |
| 226 | var request = new XMLHttpRequest(); | 226 | var request = new XMLHttpRequest(); |
| 227 | request.open("GET", "/do-fuse/sqlite-benchmarks.tsv", true); | 227 | request.open("GET", "/assets/do-fuse/sqlite-benchmarks.tsv", true); |
| 228 | request.onload = function() { | 228 | request.onload = function() { |
| 229 | if (request.status >= 200 && request.status < 400) { | 229 | if (request.status >= 200 && request.status < 400) { |
| 230 | var payload = request.responseText.trim(); | 230 | var payload = request.responseText.trim(); |
diff --git a/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md index ff346d4..a4fd1d7 100644 --- a/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md +++ b/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | |||
| @@ -81,7 +81,7 @@ Deoxyribonucleic acid, a self-replicating material which is **present in nearly | |||
| 81 | 81 | ||
| 82 | The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases (cytosine (C), thymine (T), adenine (A), guanine (G)), and a phosphate. Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine bases. The sugar and the base together are called a nucleoside. | 82 | The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases (cytosine (C), thymine (T), adenine (A), guanine (G)), and a phosphate. Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine bases. The sugar and the base together are called a nucleoside. |
| 83 | 83 | ||
| 84 |  | 84 |  |
| 85 | 85 | ||
| 86 | *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts)* | 86 | *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts)* |
| 87 | 87 | ||
| @@ -246,11 +246,11 @@ Then we encode FASTA file from previous operation to encode this data into PNG. | |||
| 246 | 246 | ||
| 247 | After encoding into PNG format this file looks like this. | 247 | After encoding into PNG format this file looks like this. |
| 248 | 248 | ||
| 249 |  | 249 |  |
| 250 | 250 | ||
| 251 | The larger the input stream is the larger the PNG file would be. | 251 | The larger the input stream is the larger the PNG file would be. |
| 252 | 252 | ||
| 253 | Compiled basic Hello World C program with [GCC](https://www.gnu.org/software/gcc/) would [look like](/dna-sequence/sample.png). | 253 | Compiled basic Hello World C program with [GCC](https://www.gnu.org/software/gcc/) would [look like](/assets/dna-sequence/sample.png). |
| 254 | 254 | ||
| 255 | ```c | 255 | ```c |
| 256 | // gcc -O3 -o sample sample.c | 256 | // gcc -O3 -o sample sample.c |
| @@ -313,7 +313,7 @@ dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count= | |||
| 313 | 313 | ||
| 314 | Our freshly generated 1KB file looks something like this (its full of garbage data as intended). | 314 | Our freshly generated 1KB file looks something like this (its full of garbage data as intended). |
| 315 | 315 | ||
| 316 |  | 316 |  |
| 317 | 317 | ||
| 318 | We create following binary files: | 318 | We create following binary files: |
| 319 | - 1KB.bin | 319 | - 1KB.bin |
diff --git a/content/posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md b/content/posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md index 0f5d994..30b0fd4 100644 --- a/content/posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md +++ b/content/posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md | |||
| @@ -72,11 +72,11 @@ plt.show() | |||
| 72 | 2. Rule-based approach may not be the best way of doing this. By using deep learning we would be able to get better insights. | 72 | 2. Rule-based approach may not be the best way of doing this. By using deep learning we would be able to get better insights. |
| 73 | 3. **Next step would be to** periodically fetch RSS items and store them over a longer period of time and then perform analysis again and use either machine learning or deep learning on top of it. | 73 | 3. **Next step would be to** periodically fetch RSS items and store them over a longer period of time and then perform analysis again and use either machine learning or deep learning on top of it. |
| 74 | 74 | ||
| 75 |  | 75 |  |
| 76 | 76 | ||
| 77 | Figure above displays difference between title and description sentiment for specific RSS feed item. 1 means positive and -1 means negative sentiment. | 77 | Figure above displays difference between title and description sentiment for specific RSS feed item. 1 means positive and -1 means negative sentiment. |
| 78 | 78 | ||
| 79 | [» Download Jupyter Notebook](/sentiment-analysis/sentiment-analysis.ipynb) | 79 | [» Download Jupyter Notebook](/assets/sentiment-analysis/sentiment-analysis.ipynb) |
| 80 | 80 | ||
| 81 | ## Going further | 81 | ## Going further |
| 82 | 82 | ||
diff --git a/content/posts/2020-03-22-simple-sse-based-pubsub-server.md b/content/posts/2020-03-22-simple-sse-based-pubsub-server.md index 0a039e6..939a62d 100644 --- a/content/posts/2020-03-22-simple-sse-based-pubsub-server.md +++ b/content/posts/2020-03-22-simple-sse-based-pubsub-server.md | |||
| @@ -21,7 +21,7 @@ Publisher Subscriber model is nothing new and there are many amazing solutions o | |||
| 21 | 21 | ||
| 22 | The easiest way to explain this is with diagram bellow. Basic function is simple. We have subscribers that receive messages, and we have publishers that create and post messages. Similar model is also well know pattern that works on a premise of consumers and producers, and they take similar roles. | 22 | The easiest way to explain this is with diagram bellow. Basic function is simple. We have subscribers that receive messages, and we have publishers that create and post messages. Similar model is also well know pattern that works on a premise of consumers and producers, and they take similar roles. |
| 23 | 23 | ||
| 24 |  | 24 |  |
| 25 | 25 | ||
| 26 | **These are some naive characteristics we want to achieve:** | 26 | **These are some naive characteristics we want to achieve:** |
| 27 | 27 | ||
| @@ -47,7 +47,7 @@ Read more about it on [official specification page](https://html.spec.whatwg.org | |||
| 47 | 47 | ||
| 48 | ### Current browser support | 48 | ### Current browser support |
| 49 | 49 | ||
| 50 |  | 50 |  |
| 51 | 51 | ||
| 52 | Check [https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource) for latest information about browser support. | 52 | Check [https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource) for latest information about browser support. |
| 53 | 53 | ||
| @@ -105,7 +105,7 @@ Google Chrome provides build-in debugging and exploration tool for [Server-Sent | |||
| 105 | 105 | ||
| 106 | > You can debug only client side events that get received and not the server ones. For debugging server events add `console.log` to `server.js` code and print out events. | 106 | > You can debug only client side events that get received and not the server ones. For debugging server events add `console.log` to `server.js` code and print out events. |
| 107 | 107 | ||
| 108 |  | 108 |  |
| 109 | 109 | ||
| 110 | ## Server implementation | 110 | ## Server implementation |
| 111 | 111 | ||
| @@ -234,7 +234,7 @@ One example would be, that we have index page and we want to receive messages ab | |||
| 234 | 234 | ||
| 235 | ### Publisher and subscriber in action | 235 | ### Publisher and subscriber in action |
| 236 | 236 | ||
| 237 | <video src="/simple-pubsub-server/clients.m4v" controls></video> | 237 | <video src="/assets/simple-pubsub-server/clients.m4v" controls></video> |
| 238 | 238 | ||
| 239 | You can download [the code](../simple-pubsub-server/sse-pubsub-server.zip) and follow along. | 239 | You can download [the code](../simple-pubsub-server/sse-pubsub-server.zip) and follow along. |
| 240 | 240 | ||
diff --git a/content/posts/2020-09-06-esp-and-micropython.md b/content/posts/2020-09-06-esp-and-micropython.md index 4b6e568..75e8295 100644 --- a/content/posts/2020-09-06-esp-and-micropython.md +++ b/content/posts/2020-09-06-esp-and-micropython.md | |||
| @@ -23,7 +23,7 @@ A while ago I bought some [ESP8266](https://www.espressif.com/en/products/socs/e | |||
| 23 | 23 | ||
| 24 | For my project, I used [ESP32](https://www.espressif.com/en/products/socs/esp32) but I could easily choose [ESP8266](https://www.espressif.com/en/products/socs/esp8266). This guide contains which tools I use and how I prepared my workspace to code for [ESP8266](https://www.espressif.com/en/products/socs/esp8266). | 24 | For my project, I used [ESP32](https://www.espressif.com/en/products/socs/esp32) but I could easily choose [ESP8266](https://www.espressif.com/en/products/socs/esp8266). This guide contains which tools I use and how I prepared my workspace to code for [ESP8266](https://www.espressif.com/en/products/socs/esp8266). |
| 25 | 25 | ||
| 26 |  | 26 |  |
| 27 | 27 | ||
| 28 | This guide covers: | 28 | This guide covers: |
| 29 | - flashing SOC | 29 | - flashing SOC |
diff --git a/content/posts/2020-09-08-bind-warning-on-login.md b/content/posts/2020-09-08-bind-warning-on-login.md index 3f276c6..62c421d 100644 --- a/content/posts/2020-09-08-bind-warning-on-login.md +++ b/content/posts/2020-09-08-bind-warning-on-login.md | |||
| @@ -21,7 +21,7 @@ bind '"\e[Z":menu-complete-backward' | |||
| 21 | 21 | ||
| 22 | I haven't noticed anything wrong with this and all was working fine until I restarted my machine and then I got this error. | 22 | I haven't noticed anything wrong with this and all was working fine until I restarted my machine and then I got this error. |
| 23 | 23 | ||
| 24 |  | 24 |  |
| 25 | 25 | ||
| 26 | When I pressed OK, I got into the [Gnome shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but the error was still bugging me. I started looking for the reason why this is happening and found a solution to this error on [Remote SSH Commands - bash bind warning: line editing not enabled](https://superuser.com/a/892682). | 26 | When I pressed OK, I got into the [Gnome shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but the error was still bugging me. I started looking for the reason why this is happening and found a solution to this error on [Remote SSH Commands - bash bind warning: line editing not enabled](https://superuser.com/a/892682). |
| 27 | 27 | ||
diff --git a/content/posts/2021-01-24-replacing-dropbox-with-s3.md b/content/posts/2021-01-24-replacing-dropbox-with-s3.md index 12fb8cf..f44aa63 100644 --- a/content/posts/2021-01-24-replacing-dropbox-with-s3.md +++ b/content/posts/2021-01-24-replacing-dropbox-with-s3.md | |||
| @@ -78,7 +78,7 @@ You can use this script in a combination with [Cron](https://en.wikipedia.org/wi | |||
| 78 | 78 | ||
| 79 | When you start syncing your local stuff with a remote server you can review your items on DigitalOcean. | 79 | When you start syncing your local stuff with a remote server you can review your items on DigitalOcean. |
| 80 | 80 | ||
| 81 |  | 81 |  |
| 82 | 82 | ||
| 83 | I have been using this script now for quite some time, and it's working flawlessly. I also uninstalled Dropbox and stopped using it completely. | 83 | I have been using this script now for quite some time, and it's working flawlessly. I also uninstalled Dropbox and stopped using it completely. |
| 84 | 84 | ||
diff --git a/content/posts/2021-01-25-goaccess.md b/content/posts/2021-01-25-goaccess.md index 2f3d56b..ba1e10c 100644 --- a/content/posts/2021-01-25-goaccess.md +++ b/content/posts/2021-01-25-goaccess.md | |||
| @@ -31,10 +31,10 @@ I found this amazing software [GoAccess](https://goaccess.io/) which provides al | |||
| 31 | 31 | ||
| 32 | GoAccess can be used in two different modes. | 32 | GoAccess can be used in two different modes. |
| 33 | 33 | ||
| 34 |  | 34 |  |
| 35 | <center><i>Running in a terminal</i></center> | 35 | <center><i>Running in a terminal</i></center> |
| 36 | 36 | ||
| 37 |  | 37 |  |
| 38 | <center><i>Running in a browser</i></center> | 38 | <center><i>Running in a browser</i></center> |
| 39 | 39 | ||
| 40 | I, however, need this to run in a browser. So, the second option is the way to go. The Idea is to periodically run cronjob and export this report into a folder that gets then server by Nginx behind a Basic authentication. | 40 | I, however, need this to run in a browser. So, the second option is the way to go. The Idea is to periodically run cronjob and export this report into a folder that gets then server by Nginx behind a Basic authentication. |
diff --git a/content/posts/2021-06-26-simple-world-clock.md b/content/posts/2021-06-26-simple-world-clock.md index e06d534..80d1e32 100644 --- a/content/posts/2021-06-26-simple-world-clock.md +++ b/content/posts/2021-06-26-simple-world-clock.md | |||
| @@ -13,7 +13,7 @@ But I also have a bunch of electronics that I bought through the time, and I am | |||
| 13 | 13 | ||
| 14 | A while ago I bought a small eInk display [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) lying around that I really need to use. | 14 | A while ago I bought a small eInk display [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) lying around that I really need to use. |
| 15 | 15 | ||
| 16 |  | 16 |  |
| 17 | 17 | ||
| 18 | Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) is essentially a HAT, it can easily be added on top of the [Raspberry Pi Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/). | 18 | Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) is essentially a HAT, it can easily be added on top of the [Raspberry Pi Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/). |
| 19 | 19 | ||
| @@ -78,10 +78,10 @@ Then we add a cronjob with `crontab -e`. | |||
| 78 | 78 | ||
| 79 | So, we end up with a result like this. | 79 | So, we end up with a result like this. |
| 80 | 80 | ||
| 81 |  | 81 |  |
| 82 | 82 | ||
| 83 | And for the enclosure that can be 3D printed, but I haven't yet something like this can be used. | 83 | And for the enclosure that can be 3D printed, but I haven't yet something like this can be used. |
| 84 | 84 | ||
| 85 | <iframe id="vs_iframe" src="https://www.viewstl.com/?embedded&url=https%3A%2F%2Fmitjafelicijan.com%2Fassets%2Fworld-clock%2Fenclosure.stl&color=gray&bgcolor=white&edges=no&orientation=front&noborder=no" style="border:0;margin:0;width:100%;height:400px;"></iframe> | 85 | <iframe id="vs_iframe" src="https://www.viewstl.com/?embedded&url=https%3A%2F%2Fmitjafelicijan.com%2Fassets%2Fworld-clock%2Fenclosure.stl&color=gray&bgcolor=white&edges=no&orientation=front&noborder=no" style="border:0;margin:0;width:100%;height:400px;"></iframe> |
| 86 | 86 | ||
| 87 | You can download my [STL file for the enclosure here](/world-clock/enclosure.stl), but make sure that dimensions make sense and also opening for USB port should be added or just use a drill and some hot glue to make it stick in the enclosure. | 87 | You can download my [STL file for the enclosure here](/assets/world-clock/enclosure.stl), but make sure that dimensions make sense and also opening for USB port should be added or just use a drill and some hot glue to make it stick in the enclosure. |
diff --git a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md index 1f5bd89..5981392 100644 --- a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md +++ b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md | |||
| @@ -43,28 +43,28 @@ I didn't want this to just be a set of config files for theming purpose. I wante | |||
| 43 | 43 | ||
| 44 | First, I choose terminal installer and left it to load additional components. Avoid using graphical installer in this case. | 44 | First, I choose terminal installer and left it to load additional components. Avoid using graphical installer in this case. |
| 45 | 45 | ||
| 46 |  | 46 |  |
| 47 | 47 | ||
| 48 | After that I selected hostname and created a normal user and set password for that user and root user and choose guided mode for disk partitioning. | 48 | After that I selected hostname and created a normal user and set password for that user and root user and choose guided mode for disk partitioning. |
| 49 | 49 | ||
| 50 |  | 50 |  |
| 51 | 51 | ||
| 52 | I left it run to install all the things required for the base system and opted out of scanning additional media for use by the package manager. Those will be downloaded from the internet during installation. | 52 | I left it run to install all the things required for the base system and opted out of scanning additional media for use by the package manager. Those will be downloaded from the internet during installation. |
| 53 | 53 | ||
| 54 |  | 54 |  |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | I opted out of the popularity contest, and **now comes the important part**. Uncheck all the boxes in Software selection and only leave 'standard system utilities'. I also left an SSH server, so I was able to log in to the machine from my main PC. | 57 | I opted out of the popularity contest, and **now comes the important part**. Uncheck all the boxes in Software selection and only leave 'standard system utilities'. I also left an SSH server, so I was able to log in to the machine from my main PC. |
| 58 | 58 | ||
| 59 |  | 59 |  |
| 60 | 60 | ||
| 61 | At this point, I installed GRUB bootloader on the disk where I installed the system. | 61 | At this point, I installed GRUB bootloader on the disk where I installed the system. |
| 62 | 62 | ||
| 63 |  | 63 |  |
| 64 | 64 | ||
| 65 | That concluded the installation of base Debian and after restarting the computer I was prompted with the login screen. | 65 | That concluded the installation of base Debian and after restarting the computer I was prompted with the login screen. |
| 66 | 66 | ||
| 67 |  | 67 |  |
| 68 | 68 | ||
| 69 | Now that I had the base installation, it was time to choose what software do I want to include in this so-called distribution. I wanted out of the box developer experience, so I had plenty to choose. | 69 | Now that I had the base installation, it was time to choose what software do I want to include in this so-called distribution. I wanted out of the box developer experience, so I had plenty to choose. |
| 70 | 70 | ||
| @@ -84,7 +84,7 @@ One of the requirements for me was easy custom layouts because I use a really st | |||
| 84 | 84 | ||
| 85 | What I was doing in Gnome was having windows in a layout like the diagram below. This is my common practice. And if you look at it you can clearly see I was replicating tiling window manager setup in Gnome. | 85 | What I was doing in Gnome was having windows in a layout like the diagram below. This is my common practice. And if you look at it you can clearly see I was replicating tiling window manager setup in Gnome. |
| 86 | 86 | ||
| 87 |  | 87 |  |
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | That made me look into a bunch of tiling window managers and then tested them out. Candidates I was looking at were: | 90 | That made me look into a bunch of tiling window managers and then tested them out. Candidates I was looking at were: |
| @@ -144,7 +144,7 @@ Currently, most of these recipes use what Debian and this is totally fine with m | |||
| 144 | 144 | ||
| 145 | This is some of the output from the installation script. | 145 | This is some of the output from the installation script. |
| 146 | 146 | ||
| 147 |  | 147 |  |
| 148 | 148 | ||
| 149 | Let's take a look at some examples in the installation script. | 149 | Let's take a look at some examples in the installation script. |
| 150 | 150 | ||
| @@ -191,4 +191,4 @@ The current version boots in 4s to the login prompt, and after you log in, the d | |||
| 191 | 191 | ||
| 192 | And this is how it looks with two terminals side by side. I really like the simplicity and clean interface. I will polish the colors and stuff like that, but I really do like the results. | 192 | And this is how it looks with two terminals side by side. I really like the simplicity and clean interface. I will polish the colors and stuff like that, but I really do like the results. |
| 193 | 193 | ||
| 194 |  | 194 |  |
diff --git a/content/posts/2021-12-25-running-golang-application-as-pid1.md b/content/posts/2021-12-25-running-golang-application-as-pid1.md index 2f49466..7a62d1c 100644 --- a/content/posts/2021-12-25-running-golang-application-as-pid1.md +++ b/content/posts/2021-12-25-running-golang-application-as-pid1.md | |||
| @@ -28,7 +28,7 @@ I really like the explanation from the article [Unikernels: Rise of the Virtual | |||
| 28 | 28 | ||
| 29 | If we compare a normal operating system to a unikernel side by side, they would look something like this. | 29 | If we compare a normal operating system to a unikernel side by side, they would look something like this. |
| 30 | 30 | ||
| 31 |  | 31 |  |
| 32 | 32 | ||
| 33 | From this image, we can see how the complexity significantly decreases with the use of Unikernels. This comes with a price, of course. Unikernels are hard to get running and require a lot of work since you don't have an actual proper kernel running in the background providing network access and drivers etc. | 33 | From this image, we can see how the complexity significantly decreases with the use of Unikernels. This comes with a price, of course. Unikernels are hard to get running and require a lot of work since you don't have an actual proper kernel running in the background providing network access and drivers etc. |
| 34 | 34 | ||
| @@ -221,7 +221,7 @@ Hello from Golang | |||
| 221 | Hello from Golang | 221 | Hello from Golang |
| 222 | ``` | 222 | ``` |
| 223 | 223 | ||
| 224 | The whole [log file here](/pid1/qemu.log). | 224 | The whole [log file here](/assets/pid1/qemu.log). |
| 225 | 225 | ||
| 226 | ## Size comparison | 226 | ## Size comparison |
| 227 | 227 | ||
| @@ -290,7 +290,7 @@ genisoimage -R \ | |||
| 290 | 290 | ||
| 291 | This will produce `GoAsPID1.iso` which you can use with [Virtualbox](https://www.virtualbox.org/) or [Gnome Boxes](https://apps.gnome.org/app/org.gnome.Boxes/). | 291 | This will produce `GoAsPID1.iso` which you can use with [Virtualbox](https://www.virtualbox.org/) or [Gnome Boxes](https://apps.gnome.org/app/org.gnome.Boxes/). |
| 292 | 292 | ||
| 293 | <video src="/pid1/boxes.mp4" controls></video> | 293 | <video src="/assets/pid1/boxes.mp4" controls></video> |
| 294 | 294 | ||
| 295 | ## Is running applications as PID 1 even worth it? | 295 | ## Is running applications as PID 1 even worth it? |
| 296 | 296 | ||
diff --git a/content/posts/2021-12-30-wap-mobile-web-before-the-web.md b/content/posts/2021-12-30-wap-mobile-web-before-the-web.md index e5f6714..49a7116 100644 --- a/content/posts/2021-12-30-wap-mobile-web-before-the-web.md +++ b/content/posts/2021-12-30-wap-mobile-web-before-the-web.md | |||
| @@ -29,7 +29,7 @@ These phones were rocking: | |||
| 29 | 29 | ||
| 30 | Let's take a look at these beauties. | 30 | Let's take a look at these beauties. |
| 31 | 31 | ||
| 32 |  | 32 |  |
| 33 | 33 | ||
| 34 | ## WAP - Wireless Application Protocol | 34 | ## WAP - Wireless Application Protocol |
| 35 | 35 | ||
| @@ -146,7 +146,7 @@ If you look at the python file, I convert all the images into tiny B&W images. T | |||
| 146 | 146 | ||
| 147 | Because I currently don't have a phone old enough to test it on, I used an emulator. And it was really hard to find one. I found [WAP Proof](http://wap-proof.sharewarejunction.com/) on shareware junction, and it did the job well enough. I will try to find and actual device to test it on. | 147 | Because I currently don't have a phone old enough to test it on, I used an emulator. And it was really hard to find one. I found [WAP Proof](http://wap-proof.sharewarejunction.com/) on shareware junction, and it did the job well enough. I will try to find and actual device to test it on. |
| 148 | 148 | ||
| 149 | <video src="/wap/emulator.mp4" controls></video> | 149 | <video src="/assets/wap/emulator.mp4" controls></video> |
| 150 | 150 | ||
| 151 | If you are using Nginx to serve the contents, add a directive to the hosts file that will automatically server `index.wml` file. | 151 | If you are using Nginx to serve the contents, add a directive to the hosts file that will automatically server `index.wml` file. |
| 152 | 152 | ||
diff --git a/content/posts/2022-06-30-trying-out-helix-editor.md b/content/posts/2022-06-30-trying-out-helix-editor.md index 8286735..5e25980 100644 --- a/content/posts/2022-06-30-trying-out-helix-editor.md +++ b/content/posts/2022-06-30-trying-out-helix-editor.md | |||
| @@ -25,7 +25,7 @@ I am still getting used to the keyboard shortcuts and getting better. What Helix | |||
| 25 | 25 | ||
| 26 | And it comes us packed with many [really good themes](https://github.com/helix-editor/helix/wiki/Themes). | 26 | And it comes us packed with many [really good themes](https://github.com/helix-editor/helix/wiki/Themes). |
| 27 | 27 | ||
| 28 |  | 28 |  |
| 29 | 29 | ||
| 30 | It's still young but has this mature feeling to it. It has sane defaults and mimics Vim (works a bit differently, but the overall idea is similar). | 30 | It's still young but has this mature feeling to it. It has sane defaults and mimics Vim (works a bit differently, but the overall idea is similar). |
| 31 | 31 | ||
diff --git a/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md b/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md index c028ec2..ba5cc4b 100644 --- a/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md +++ b/content/posts/2022-07-05-what-would-dna-sound-if-synthesized.md | |||
| @@ -145,10 +145,10 @@ sox output.wav -n spectrogram -o spectrogram.png | |||
| 145 | An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. | 145 | An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement. |
| 146 | 146 | ||
| 147 | <audio controls> | 147 | <audio controls> |
| 148 | <source src="/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg"> | 148 | <source src="/assets/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg"> |
| 149 | </audio> | 149 | </audio> |
| 150 | 150 | ||
| 151 |  | 151 |  |
| 152 | 152 | ||
| 153 | The other option could also be in combination with [gnuplot](http://www.gnuplot.info/). This would require an intermediary step, however. | 153 | The other option could also be in combination with [gnuplot](http://www.gnuplot.info/). This would require an intermediary step, however. |
| 154 | 154 | ||
| @@ -194,40 +194,40 @@ What I did was take interesting parts from an animal's genome and feed it to a t | |||
| 194 | ### Niels Bohr quote | 194 | ### Niels Bohr quote |
| 195 | 195 | ||
| 196 | <audio controls> | 196 | <audio controls> |
| 197 | <source src="/dna-synthesized/quote/out.mp3" type="audio/mpeg"> | 197 | <source src="/assets/dna-synthesized/quote/out.mp3" type="audio/mpeg"> |
| 198 | </audio> | 198 | </audio> |
| 199 | 199 | ||
| 200 |  | 200 |  |
| 201 | 201 | ||
| 202 | ### Mouse | 202 | ### Mouse |
| 203 | 203 | ||
| 204 | This is part of a mouse genome `Mus_musculus.GRCm39.dna.nonchromosomal`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/). | 204 | This is part of a mouse genome `Mus_musculus.GRCm39.dna.nonchromosomal`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/). |
| 205 | 205 | ||
| 206 | <audio controls> | 206 | <audio controls> |
| 207 | <source src="/dna-synthesized/mouse/out.mp3" type="audio/mpeg"> | 207 | <source src="/assets/dna-synthesized/mouse/out.mp3" type="audio/mpeg"> |
| 208 | </audio> | 208 | </audio> |
| 209 | 209 | ||
| 210 |  | 210 |  |
| 211 | 211 | ||
| 212 | ### Bison | 212 | ### Bison |
| 213 | 213 | ||
| 214 | This is part of a bison genome `Bison_bison_bison.Bison_UMD1.0.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/). | 214 | This is part of a bison genome `Bison_bison_bison.Bison_UMD1.0.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/). |
| 215 | 215 | ||
| 216 | <audio controls> | 216 | <audio controls> |
| 217 | <source src="/dna-synthesized/bison/out.mp3" type="audio/mpeg"> | 217 | <source src="/assets/dna-synthesized/bison/out.mp3" type="audio/mpeg"> |
| 218 | </audio> | 218 | </audio> |
| 219 | 219 | ||
| 220 |  | 220 |  |
| 221 | 221 | ||
| 222 | ### Taurus | 222 | ### Taurus |
| 223 | 223 | ||
| 224 | This is part of a taurus genome `Bos_taurus.ARS-UCD1.2.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/). | 224 | This is part of a taurus genome `Bos_taurus.ARS-UCD1.2.cdna`. You can get [genom data here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/). |
| 225 | 225 | ||
| 226 | <audio controls> | 226 | <audio controls> |
| 227 | <source src="/dna-synthesized/taurus/out.mp3" type="audio/mpeg"> | 227 | <source src="/assets/dna-synthesized/taurus/out.mp3" type="audio/mpeg"> |
| 228 | </audio> | 228 | </audio> |
| 229 | 229 | ||
| 230 |  | 230 |  |
| 231 | 231 | ||
| 232 | ## Making a drummer out of a DNA sequence | 232 | ## Making a drummer out of a DNA sequence |
| 233 | 233 | ||
| @@ -235,17 +235,17 @@ To make things even more interesting, I decided to send this data via MIDI to my | |||
| 235 | 235 | ||
| 236 | Elektron is connected to my MacBook via USB cable and audio out is patched to a Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't have internal speakers. | 236 | Elektron is connected to my MacBook via USB cable and audio out is patched to a Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't have internal speakers. |
| 237 | 237 | ||
| 238 |  | 238 |  |
| 239 | 239 | ||
| 240 |  | 240 |  |
| 241 | 241 | ||
| 242 |  | 242 |  |
| 243 | 243 | ||
| 244 | For communicating with Elektron, I choose `pygame` Python module that has MIDI built in. With this, it was rather simple to send notes to the device. All I did was map MIDI notes to the actual Nucleotides. | 244 | For communicating with Elektron, I choose `pygame` Python module that has MIDI built in. With this, it was rather simple to send notes to the device. All I did was map MIDI notes to the actual Nucleotides. |
| 245 | 245 | ||
| 246 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2. | 246 | Before all of this I also checked Audio MIDI Setup app under MacOS and checked MIDI Studio by pressing ⌘-2. |
| 247 | 247 | ||
| 248 |  | 248 |  |
| 249 | 249 | ||
| 250 | The whole script that parses and send notes to the Elektron looks like this. | 250 | The whole script that parses and send notes to the Elektron looks like this. |
| 251 | 251 | ||
| @@ -287,7 +287,7 @@ del player | |||
| 287 | pygame.midi.quit() | 287 | pygame.midi.quit() |
| 288 | ``` | 288 | ``` |
| 289 | 289 | ||
| 290 | <video src="/dna-synthesized/elektron/elektron.mp4" controls></video> | 290 | <video src="/assets/dna-synthesized/elektron/elektron.mp4" controls></video> |
| 291 | 291 | ||
| 292 | All of this could be made much more interesting if I choose different instruments for different Nucleotides, or doing more funky stuff with Elektron. But for now, this should be enough. It is just a proof of concept. Something to play around with. | 292 | All of this could be made much more interesting if I choose different instruments for different Nucleotides, or doing more funky stuff with Elektron. But for now, this should be enough. It is just a proof of concept. Something to play around with. |
| 293 | 293 | ||
diff --git a/content/posts/2022-08-13-algae-spotted-on-river-sava.md b/content/posts/2022-08-13-algae-spotted-on-river-sava.md index 2a7e6cd..40b960f 100644 --- a/content/posts/2022-08-13-algae-spotted-on-river-sava.md +++ b/content/posts/2022-08-13-algae-spotted-on-river-sava.md | |||
| @@ -9,16 +9,16 @@ This is a bit of a different post than I usually write, but quite interesting on | |||
| 9 | 9 | ||
| 10 | Below are some photographs taken from a DJI drone capturing the event. | 10 | Below are some photographs taken from a DJI drone capturing the event. |
| 11 | 11 | ||
| 12 |  | 12 |  |
| 13 | 13 | ||
| 14 |  | 14 |  |
| 15 | 15 | ||
| 16 |  | 16 |  |
| 17 | 17 | ||
| 18 |  | 18 |  |
| 19 | 19 | ||
| 20 |  | 20 |  |
| 21 | 21 | ||
| 22 |  | 22 |  |
| 23 | 23 | ||
| 24 | I will try to get more photos of this in the future days and if something intriguing shows up will post it again on the blog. | 24 | I will try to get more photos of this in the future days and if something intriguing shows up will post it again on the blog. |
