aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md6
-rw-r--r--_posts/2017-08-11-simple-iot-application.md8
-rw-r--r--_posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md4
-rw-r--r--_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md10
-rw-r--r--_posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md2
-rw-r--r--_posts/2020-03-22-simple-sse-based-pubsub-server.md6
-rw-r--r--_posts/2020-09-06-esp-and-micropython.md2
-rw-r--r--_posts/2020-09-08-bind-warning-on-login.md2
-rw-r--r--_posts/2021-01-24-replacing-dropbox-with-s3.md2
-rw-r--r--_posts/2021-01-25-goaccess.md4
-rw-r--r--_posts/2021-06-26-simple-world-clock.md4
-rw-r--r--_posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md18
-rw-r--r--_posts/2021-12-25-running-golang-application-as-pid1.md2
-rw-r--r--_posts/2021-12-30-wap-mobile-web-before-the-web.md2
-rw-r--r--_posts/2022-06-30-trying-out-helix-editor.md2
-rw-r--r--_posts/2022-07-05-what-would-dna-sound-if-synthesized.md18
-rw-r--r--_posts/2022-08-13-algae-spotted-on-river-sava.md12
-rw-r--r--_posts/2023-05-24-fresh-9front-desktop.md2
-rw-r--r--_posts/2023-05-25-dcss-new-player-guide.md2
-rw-r--r--_posts/2023-05-25-show-xterm-colors.md2
-rw-r--r--_posts/2023-05-27-drawing-pixels-in-plan9.md2
-rw-r--r--_posts/2023-05-29-grep-to-less-maintain-colors.md2
-rw-r--r--_posts/2023-06-25-development-environments-with-nix.md2
-rw-r--r--_posts/2023-08-01-make-b-w-svg-charts-with-matplotlib.md2
-rw-r--r--_posts/2023-08-05-floods-in-slovenia.md4
-rw-r--r--_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md2
-rw-r--r--_posts/2023-11-05-add-lazy-loading-to-jekyll-posts.md34
27 files changed, 96 insertions, 62 deletions
diff --git a/_posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md b/_posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md
index 70e25f9..2e2ec70 100644
--- a/_posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md
+++ b/_posts/2017-04-21-profiling-python-web-applications-with-visual-tools.md
@@ -22,7 +22,7 @@ If you are using MacOS you should check out [Profiling
22Viewer](http://www.profilingviewer.com/) or 22Viewer](http://www.profilingviewer.com/) or
23[MacCallGrind](http://www.maccallgrind.com/). 23[MacCallGrind](http://www.maccallgrind.com/).
24 24
25![KCachegrind](/assets/posts/python-profiling/kcachegrind.png) 25![KCachegrind](/assets/posts/python-profiling/kcachegrind.png){:loading="lazy"}
26 26
27We will be dividing this post into two main categories: 27We will be dividing this post into two main categories:
28 28
@@ -147,7 +147,7 @@ will be using Profilling Viewer under MacOS. You can open image in new tab. As
147you can see from this example there is hierarchy of execution order of your 147you can see from this example there is hierarchy of execution order of your
148code. 148code.
149 149
150![Profilling Viewer](/assets/posts/python-profiling/profiling-viewer.png) 150![Profilling Viewer](/assets/posts/python-profiling/profiling-viewer.png){:loading="lazy"}
151 151
152> Make sure you convert output of the cProfile output every time you want to 152> Make sure you convert output of the cProfile output every time you want to
153refresh and take a look at your possible optimizations because cProfile updates 153refresh and take a look at your possible optimizations because cProfile updates
@@ -178,7 +178,7 @@ $ snakeviz awesome_random_number.prof
178# shows visualized profile 178# shows visualized profile
179``` 179```
180 180
181![SnakeViz](/assets/posts/python-profiling/snakeviz.png) 181![SnakeViz](/assets/posts/python-profiling/snakeviz.png){:loading="lazy"}
182 182
183Reddit user [ccharles](https://www.reddit.com/user/ccharles) suggested a better 183Reddit user [ccharles](https://www.reddit.com/user/ccharles) suggested a better
184way for installing pip software by targeting user level instead of using sudo. 184way for installing pip software by targeting user level instead of using sudo.
diff --git a/_posts/2017-08-11-simple-iot-application.md b/_posts/2017-08-11-simple-iot-application.md
index 3c9b4f9..b552e8f 100644
--- a/_posts/2017-08-11-simple-iot-application.md
+++ b/_posts/2017-08-11-simple-iot-application.md
@@ -51,7 +51,7 @@ to API and another to serving HTML with chart.
51Schema below represents what we will try to achieve and how different parts 51Schema below represents what we will try to achieve and how different parts
52correlates to each other. 52correlates to each other.
53 53
54![Overview](/assets/posts/iot-application/simple-iot-application-overview.svg) 54![Overview](/assets/posts/iot-application/simple-iot-application-overview.svg){:loading="lazy"}
55 55
56## Simple Python API 56## Simple Python API
57 57
@@ -219,12 +219,12 @@ available via POST method on /api route.
219After testing the service with Restlet Client you should be able to view your 219After testing the service with Restlet Client you should be able to view your
220data in a database file ```data.db```. 220data in a database file ```data.db```.
221 221
222![REST settings example](/assets/posts/iot-application/iot-rest-example.png) 222![REST settings example](/assets/posts/iot-application/iot-rest-example.png){:loading="lazy"}
223 223
224You can also check the contents of new database file by using desktop client 224You can also check the contents of new database file by using desktop client
225for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/). 225for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/).
226 226
227![SQLite database example](/assets/posts/iot-application/iot-sqlite-db.png) 227![SQLite database example](/assets/posts/iot-application/iot-sqlite-db.png){:loading="lazy"}
228 228
229Table structure is as simple as it can be. We have ts (timestamp) and value 229Table structure is as simple as it can be. We have ts (timestamp) and value
230(value from Arduino). As you can see timestamp is generated on API side. If you 230(value from Arduino). As you can see timestamp is generated on API side. If you
@@ -586,7 +586,7 @@ every 5 seconds.
586If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as 586If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as
587shown on picture below. 587shown on picture below.
588 588
589![Application output](/assets/posts/iot-application/iot-app-output.png) 589![Application output](/assets/posts/iot-application/iot-app-output.png){:loading="lazy"}
590 590
591Complete application with all the code is available for 591Complete application with all the code is available for
592[download](/assets/posts/iot-application/simple-iot-application.zip). 592[download](/assets/posts/iot-application/simple-iot-application.zip).
diff --git a/_posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md b/_posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md
index 543439f..d29bd09 100644
--- a/_posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md
+++ b/_posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md
@@ -56,7 +56,7 @@ Instuctions on how to use SSH keys and how to setup them are available in
56article [How To Use SSH Keys with DigitalOcean 56article [How To Use SSH Keys with DigitalOcean
57Droplets](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets). 57Droplets](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets).
58 58
59![DigitalOcean Droplets](/assets/posts/do-fuse/fuse-droplets.png) 59![DigitalOcean Droplets](/assets/posts/do-fuse/fuse-droplets.png){:loading="lazy"}
60 60
61After we created Droplet it's time to create new Space. This is done by clicking 61After we created Droplet it's time to create new Space. This is done by clicking
62on a button [Create](https://cloud.digitalocean.com/spaces/new) (right top 62on a button [Create](https://cloud.digitalocean.com/spaces/new) (right top
@@ -69,7 +69,7 @@ key](https://cloud.digitalocean.com/settings/api/tokens). This link will guide
69to the page when you can generate this key. After you create new one, please 69to the page when you can generate this key. After you create new one, please
70save provided Key and Secret because Secret will not be shown again. 70save provided Key and Secret because Secret will not be shown again.
71 71
72![DigitalOcean Spaces](/assets/posts/do-fuse/fuse-spaces.png) 72![DigitalOcean Spaces](/assets/posts/do-fuse/fuse-spaces.png){:loading="lazy"}
73 73
74Now that we have new Space and Access key we should SSH into our machine. 74Now that we have new Space and Access key we should SSH into our machine.
75 75
diff --git a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
index 0bb774e..1de83af 100644
--- a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
+++ b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
@@ -110,7 +110,7 @@ The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases
110Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine 110Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine
111bases. The sugar and the base together are called a nucleoside. 111bases. The sugar and the base together are called a nucleoside.
112 112
113![DNA](/assets/posts/dna-sequence/dna-basics.jpg) 113![DNA](/assets/posts/dna-sequence/dna-basics.jpg){:loading="lazy"}
114*DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and 114*DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and
115cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, 115cytosine pairs with guanine. (credit a: modification of work by Jerome Walker,
116Dennis Myts)* 116Dennis Myts)*
@@ -300,7 +300,7 @@ Then we encode FASTA file from previous operation to encode this data into PNG.
300 300
301After encoding into PNG format this file looks like this. 301After encoding into PNG format this file looks like this.
302 302
303![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png) 303![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png){:loading="lazy"}
304The larger the input stream is the larger the PNG file would be. 304The larger the input stream is the larger the PNG file would be.
305 305
306Compiled basic Hello World C program with 306Compiled basic Hello World C program with
@@ -369,7 +369,7 @@ dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=
369``` 369```
370 370
371 371
372![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png) 372![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png){:loading="lazy"}
373Our freshly generated 1KB file looks something like this (its full of 373Our freshly generated 1KB file looks something like this (its full of
374garbage data as intended). 374garbage data as intended).
375 375
@@ -395,10 +395,10 @@ Then we GZIP all the FASTA files to see how much the can be compressed.
395gzip -9 < 10MB.fa > 10MB.fa.gz 395gzip -9 < 10MB.fa > 10MB.fa.gz
396``` 396```
397 397
398![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg) 398![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg){:loading="lazy"}
399The speed increase that occurs when encoding to FASTA format. 399The speed increase that occurs when encoding to FASTA format.
400 400
401![File sizes](/assets/posts/dna-sequence/chart-size.svg) 401![File sizes](/assets/posts/dna-sequence/chart-size.svg){:loading="lazy"}
402Size of the out file after encoding. 402Size of the out file after encoding.
403 403
404[Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). 404[Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv).
diff --git a/_posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md b/_posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md
index 5aad23c..a1b237b 100644
--- a/_posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md
+++ b/_posts/2019-10-19-using-sentiment-analysis-for-clickbait-detection.md
@@ -93,7 +93,7 @@ plt.show()
93 longer period of time and then perform analysis again and use either machine 93 longer period of time and then perform analysis again and use either machine
94 learning or deep learning on top of it. 94 learning or deep learning on top of it.
95 95
96![Relationship between title and description](/assets/posts/sentiment-analysis/guardian-sa-title-desc-relationship.png) 96![Relationship between title and description](/assets/posts/sentiment-analysis/guardian-sa-title-desc-relationship.png){:loading="lazy"}
97 97
98Figure above displays difference between title and description sentiment for 98Figure above displays difference between title and description sentiment for
99specific RSS feed item. 1 means positive and -1 means negative sentiment. 99specific RSS feed item. 1 means positive and -1 means negative sentiment.
diff --git a/_posts/2020-03-22-simple-sse-based-pubsub-server.md b/_posts/2020-03-22-simple-sse-based-pubsub-server.md
index 23a3640..ffb7285 100644
--- a/_posts/2020-03-22-simple-sse-based-pubsub-server.md
+++ b/_posts/2020-03-22-simple-sse-based-pubsub-server.md
@@ -39,7 +39,7 @@ simple. We have subscribers that receive messages, and we have publishers that
39create and post messages. Similar model is also well know pattern that works on 39create and post messages. Similar model is also well know pattern that works on
40a premise of consumers and producers, and they take similar roles. 40a premise of consumers and producers, and they take similar roles.
41 41
42![How PubSub works](/assets/posts/simple-pubsub-server/pubsub-overview.png) 42![How PubSub works](/assets/posts/simple-pubsub-server/pubsub-overview.png){:loading="lazy"}
43 43
44**These are some naive characteristics we want to achieve:** 44**These are some naive characteristics we want to achieve:**
45 45
@@ -75,7 +75,7 @@ page](https://html.spec.whatwg.org/multipage/server-sent-events.html).
75 75
76### Current browser support 76### Current browser support
77 77
78![Browser support](/assets/posts/simple-pubsub-server/caniuse.png) 78![Browser support](/assets/posts/simple-pubsub-server/caniuse.png){:loading="lazy"}
79 79
80Check 80Check
81[https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource) 81[https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource)
@@ -143,7 +143,7 @@ which is quite nice and available from Developer Tools under Network tab.
143> ones. For debugging server events add `console.log` to `server.js` code and 143> ones. For debugging server events add `console.log` to `server.js` code and
144> print out events. 144> print out events.
145 145
146![Google Chrome Developer Tools EventStream](/assets/posts/simple-pubsub-server/chrome-debugging.png) 146![Google Chrome Developer Tools EventStream](/assets/posts/simple-pubsub-server/chrome-debugging.png){:loading="lazy"}
147 147
148## Server implementation 148## Server implementation
149 149
diff --git a/_posts/2020-09-06-esp-and-micropython.md b/_posts/2020-09-06-esp-and-micropython.md
index 9a005af..bfd05d9 100644
--- a/_posts/2020-09-06-esp-and-micropython.md
+++ b/_posts/2020-09-06-esp-and-micropython.md
@@ -20,7 +20,7 @@ but I could easily choose
20contains which tools I use and how I prepared my workspace to code for 20contains which tools I use and how I prepared my workspace to code for
21[ESP8266](https://www.espressif.com/en/products/socs/esp8266). 21[ESP8266](https://www.espressif.com/en/products/socs/esp8266).
22 22
23![ESP8266 and ESP32 boards](/assets/posts/esp8366-micropython/boards.jpg) 23![ESP8266 and ESP32 boards](/assets/posts/esp8366-micropython/boards.jpg){:loading="lazy"}
24 24
25This guide covers: 25This guide covers:
26 26
diff --git a/_posts/2020-09-08-bind-warning-on-login.md b/_posts/2020-09-08-bind-warning-on-login.md
index 94b5a5f..4b2c983 100644
--- a/_posts/2020-09-08-bind-warning-on-login.md
+++ b/_posts/2020-09-08-bind-warning-on-login.md
@@ -31,7 +31,7 @@ bind '"\e[Z":menu-complete-backward'
31I haven't noticed anything wrong with this and all was working fine until I 31I haven't noticed anything wrong with this and all was working fine until I
32restarted my machine and then I got this error. 32restarted my machine and then I got this error.
33 33
34![Profile bind error](/assets/posts/profile-bind-error/error.jpg) 34![Profile bind error](/assets/posts/profile-bind-error/error.jpg){:loading="lazy"}
35 35
36When I pressed OK, I got into the [Gnome 36When I pressed OK, I got into the [Gnome
37shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but 37shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but
diff --git a/_posts/2021-01-24-replacing-dropbox-with-s3.md b/_posts/2021-01-24-replacing-dropbox-with-s3.md
index fb4ba68..7599949 100644
--- a/_posts/2021-01-24-replacing-dropbox-with-s3.md
+++ b/_posts/2021-01-24-replacing-dropbox-with-s3.md
@@ -106,7 +106,7 @@ You can use this script in a combination with [Cron](https://en.wikipedia.org/wi
106When you start syncing your local stuff with a remote server you can review your 106When you start syncing your local stuff with a remote server you can review your
107items on DigitalOcean. 107items on DigitalOcean.
108 108
109![Dropbox Spaces](/assets/posts/dropbox-sync/dropbox-spaces.png) 109![Dropbox Spaces](/assets/posts/dropbox-sync/dropbox-spaces.png){:loading="lazy"}
110 110
111I have been using this script now for quite some time, and it's working 111I have been using this script now for quite some time, and it's working
112flawlessly. I also uninstalled Dropbox and stopped using it completely. 112flawlessly. I also uninstalled Dropbox and stopped using it completely.
diff --git a/_posts/2021-01-25-goaccess.md b/_posts/2021-01-25-goaccess.md
index 4de65e8..779bce5 100644
--- a/_posts/2021-01-25-goaccess.md
+++ b/_posts/2021-01-25-goaccess.md
@@ -42,11 +42,11 @@ all the functionalities I need, and it's a single binary. Written in Go.
42 42
43GoAccess can be used in two different modes. 43GoAccess can be used in two different modes.
44 44
45![GoAccess Terminal](/assets/posts/goaccess/goaccess-dash-term.png) 45![GoAccess Terminal](/assets/posts/goaccess/goaccess-dash-term.png){:loading="lazy"}
46 46
47*Running in a terminal* 47*Running in a terminal*
48 48
49![GoAccess HTML](/assets/posts/goaccess/goaccess-dash-html.png) 49![GoAccess HTML](/assets/posts/goaccess/goaccess-dash-html.png){:loading="lazy"}
50 50
51*Running in a browser* 51*Running in a browser*
52 52
diff --git a/_posts/2021-06-26-simple-world-clock.md b/_posts/2021-06-26-simple-world-clock.md
index 31692e1..d1b53b4 100644
--- a/_posts/2021-06-26-simple-world-clock.md
+++ b/_posts/2021-06-26-simple-world-clock.md
@@ -24,7 +24,7 @@ have a bunch of [Raspberry Pi's
24Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) lying around that 24Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) lying around that
25I really need to use. 25I really need to use.
26 26
27![Inky pHAT, Raspberry Pi Zero](/assets/posts/world-clock/hardware.jpg) 27![Inky pHAT, Raspberry Pi Zero](/assets/posts/world-clock/hardware.jpg){:loading="lazy"}
28 28
29Since the Inky [Inky 29Since the Inky [Inky
30pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) is 30pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) is
@@ -95,7 +95,7 @@ Then we add a cronjob with `crontab -e`.
95 95
96So, we end up with a result like this. 96So, we end up with a result like this.
97 97
98![World Clock](/assets/posts/world-clock/world-clock.jpg) 98![World Clock](/assets/posts/world-clock/world-clock.jpg){:loading="lazy"}
99 99
100And for the enclosure that can be 3D printed, but I haven't yet something like 100And for the enclosure that can be 3D printed, but I haven't yet something like
101this can be used. 101this can be used.
diff --git a/_posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md b/_posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
index b469a05..4f9bc09 100644
--- a/_posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
+++ b/_posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
@@ -77,35 +77,35 @@ Fonts being applied across the distro and things like that.
77First, I choose terminal installer and left it to load additional components. 77First, I choose terminal installer and left it to load additional components.
78Avoid using graphical installer in this case. 78Avoid using graphical installer in this case.
79 79
80![](/assets/posts/dfd-rice/install-00.png) 80![](/assets/posts/dfd-rice/install-00.png){:loading="lazy"}
81 81
82After that I selected hostname and created a normal user and set password for 82After that I selected hostname and created a normal user and set password for
83that user and root user and choose guided mode for disk partitioning. 83that user and root user and choose guided mode for disk partitioning.
84 84
85![](/assets/posts/dfd-rice/install-01.png) 85![](/assets/posts/dfd-rice/install-01.png){:loading="lazy"}
86 86
87I left it run to install all the things required for the base system and opted 87I left it run to install all the things required for the base system and opted
88out of scanning additional media for use by the package manager. Those will be 88out of scanning additional media for use by the package manager. Those will be
89downloaded from the internet during installation. 89downloaded from the internet during installation.
90 90
91![](/assets/posts/dfd-rice/install-02.png) 91![](/assets/posts/dfd-rice/install-02.png){:loading="lazy"}
92 92
93I opted out of the popularity contest, and **now comes the important part**. 93I opted out of the popularity contest, and **now comes the important part**.
94Uncheck all the boxes in Software selection and only leave 'standard system 94Uncheck all the boxes in Software selection and only leave 'standard system
95utilities'. I also left an SSH server, so I was able to log in to the machine 95utilities'. I also left an SSH server, so I was able to log in to the machine
96from my main PC. 96from my main PC.
97 97
98![](/assets/posts/dfd-rice/install-03.png) 98![](/assets/posts/dfd-rice/install-03.png){:loading="lazy"}
99 99
100At this point, I installed GRUB bootloader on the disk where I installed the 100At this point, I installed GRUB bootloader on the disk where I installed the
101system. 101system.
102 102
103![](/assets/posts/dfd-rice/install-04.png) 103![](/assets/posts/dfd-rice/install-04.png){:loading="lazy"}
104 104
105That concluded the installation of base Debian and after restarting the computer 105That concluded the installation of base Debian and after restarting the computer
106I was prompted with the login screen. 106I was prompted with the login screen.
107 107
108![](/assets/posts/dfd-rice/install-05.png) 108![](/assets/posts/dfd-rice/install-05.png){:loading="lazy"}
109 109
110Now that I had the base installation, it was time to choose what software do I 110Now that I had the base installation, it was time to choose what software do I
111want to include in this so-called distribution. I wanted out of the box 111want to include in this so-called distribution. I wanted out of the box
@@ -142,7 +142,7 @@ What I was doing in Gnome was having windows in a layout like the diagram
142below. This is my common practice. And if you look at it you can clearly see I 142below. This is my common practice. And if you look at it you can clearly see I
143was replicating tiling window manager setup in Gnome. 143was replicating tiling window manager setup in Gnome.
144 144
145![](/assets/posts/dfd-rice/layout.png) 145![](/assets/posts/dfd-rice/layout.png){:loading="lazy"}
146 146
147That made me look into a bunch of tiling window managers and then tested them 147That made me look into a bunch of tiling window managers and then tested them
148out. Candidates I was looking at were: 148out. Candidates I was looking at were:
@@ -212,7 +212,7 @@ something similar.
212 212
213This is some of the output from the installation script. 213This is some of the output from the installation script.
214 214
215![](/assets/posts/dfd-rice/script.png) 215![](/assets/posts/dfd-rice/script.png){:loading="lazy"}
216 216
217Let's take a look at some examples in the installation script. 217Let's take a look at some examples in the installation script.
218 218
@@ -274,4 +274,4 @@ And this is how it looks with two terminals side by side. I really like the
274simplicity and clean interface. I will polish the colors and stuff like that, 274simplicity and clean interface. I will polish the colors and stuff like that,
275but I really do like the results. 275but I really do like the results.
276 276
277![](/assets/posts/dfd-rice/desktop.png) 277![](/assets/posts/dfd-rice/desktop.png){:loading="lazy"}
diff --git a/_posts/2021-12-25-running-golang-application-as-pid1.md b/_posts/2021-12-25-running-golang-application-as-pid1.md
index 1f67ee1..edd5a57 100644
--- a/_posts/2021-12-25-running-golang-application-as-pid1.md
+++ b/_posts/2021-12-25-running-golang-application-as-pid1.md
@@ -24,7 +24,7 @@ Really worth a read.
24If we compare a normal operating system to a unikernel side by side, they would 24If we compare a normal operating system to a unikernel side by side, they would
25look something like this. 25look something like this.
26 26
27![Virtual machines vs Containers vs Unikernels](/assets/posts/pid1/unikernels.webp) 27![Virtual machines vs Containers vs Unikernels](/assets/posts/pid1/unikernels.webp){:loading="lazy"}
28 28
29From this image, we can see how the complexity significantly decreases with 29From this image, we can see how the complexity significantly decreases with
30the use of Unikernels. This comes with a price, of course. Unikernels are hard 30the use of Unikernels. This comes with a price, of course. Unikernels are hard
diff --git a/_posts/2021-12-30-wap-mobile-web-before-the-web.md b/_posts/2021-12-30-wap-mobile-web-before-the-web.md
index 058ad55..665be0f 100644
--- a/_posts/2021-12-30-wap-mobile-web-before-the-web.md
+++ b/_posts/2021-12-30-wap-mobile-web-before-the-web.md
@@ -33,7 +33,7 @@ These phones were rocking:
33 33
34Let's take a look at these beauties. 34Let's take a look at these beauties.
35 35
36![Old phones](/assets/posts/wap/phones.gif) 36![Old phones](/assets/posts/wap/phones.gif){:loading="lazy"}
37 37
38## WAP - Wireless Application Protocol 38## WAP - Wireless Application Protocol
39 39
diff --git a/_posts/2022-06-30-trying-out-helix-editor.md b/_posts/2022-06-30-trying-out-helix-editor.md
index c6ebd6f..61f653a 100644
--- a/_posts/2022-06-30-trying-out-helix-editor.md
+++ b/_posts/2022-06-30-trying-out-helix-editor.md
@@ -48,7 +48,7 @@ popups that show you what the keyboard shortcuts are.
48And it comes us packed with many 48And it comes us packed with many
49[really good themes](https://github.com/helix-editor/helix/wiki/Themes). 49[really good themes](https://github.com/helix-editor/helix/wiki/Themes).
50 50
51![Editor](/assets/posts/helix-editor/editor.png) 51![Editor](/assets/posts/helix-editor/editor.png){:loading="lazy"}
52 52
53It's still young but has this mature feeling to it. It has sane defaults and 53It's still young but has this mature feeling to it. It has sane defaults and
54mimics Vim (works a bit differently, but the overall idea is similar). 54mimics Vim (works a bit differently, but the overall idea is similar).
diff --git a/_posts/2022-07-05-what-would-dna-sound-if-synthesized.md b/_posts/2022-07-05-what-would-dna-sound-if-synthesized.md
index 7aaac68..6efe559 100644
--- a/_posts/2022-07-05-what-would-dna-sound-if-synthesized.md
+++ b/_posts/2022-07-05-what-would-dna-sound-if-synthesized.md
@@ -178,7 +178,7 @@ An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.
178 <source src="/assets/posts/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg"> 178 <source src="/assets/posts/dna-synthesized/symphony-no6-1st-movement.mp3" type="audio/mpeg">
179</audio> 179</audio>
180 180
181![Ludwig van Beethoven Symphony No. 6 First movement](/assets/posts/dna-synthesized/symphony-no6-1st-movement.png) 181![Ludwig van Beethoven Symphony No. 6 First movement](/assets/posts/dna-synthesized/symphony-no6-1st-movement.png){:loading="lazy"}
182 182
183The other option could also be in combination with 183The other option could also be in combination with
184[gnuplot](http://www.gnuplot.info/). This would require an intermediary step, 184[gnuplot](http://www.gnuplot.info/). This would require an intermediary step,
@@ -233,7 +233,7 @@ spectrogram based on a WAV file.
233 <source src="/assets/posts/dna-synthesized/quote/out.mp3" type="audio/mpeg"> 233 <source src="/assets/posts/dna-synthesized/quote/out.mp3" type="audio/mpeg">
234</audio> 234</audio>
235 235
236![Spectogram](/assets/posts/dna-synthesized/quote/spectogram.png) 236![Spectogram](/assets/posts/dna-synthesized/quote/spectogram.png){:loading="lazy"}
237 237
238### Mouse 238### Mouse
239 239
@@ -245,7 +245,7 @@ here](http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/).
245 <source src="/assets/posts/dna-synthesized/mouse/out.mp3" type="audio/mpeg"> 245 <source src="/assets/posts/dna-synthesized/mouse/out.mp3" type="audio/mpeg">
246</audio> 246</audio>
247 247
248![Spectogram](/assets/posts/dna-synthesized/mouse/spectogram.png) 248![Spectogram](/assets/posts/dna-synthesized/mouse/spectogram.png){:loading="lazy"}
249 249
250### Bison 250### Bison
251 251
@@ -257,7 +257,7 @@ here](http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/).
257 <source src="/assets/posts/dna-synthesized/bison/out.mp3" type="audio/mpeg"> 257 <source src="/assets/posts/dna-synthesized/bison/out.mp3" type="audio/mpeg">
258</audio> 258</audio>
259 259
260![Spectogram](/assets/posts/dna-synthesized/bison/spectogram.png) 260![Spectogram](/assets/posts/dna-synthesized/bison/spectogram.png){:loading="lazy"}
261 261
262### Taurus 262### Taurus
263 263
@@ -269,7 +269,7 @@ here](http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/).
269 <source src="/assets/posts/dna-synthesized/taurus/out.mp3" type="audio/mpeg"> 269 <source src="/assets/posts/dna-synthesized/taurus/out.mp3" type="audio/mpeg">
270</audio> 270</audio>
271 271
272![Spectogram](/assets/posts/dna-synthesized/taurus/spectogram.png) 272![Spectogram](/assets/posts/dna-synthesized/taurus/spectogram.png){:loading="lazy"}
273 273
274## Making a drummer out of a DNA sequence 274## Making a drummer out of a DNA sequence
275 275
@@ -282,11 +282,11 @@ Elektron is connected to my MacBook via USB cable and audio out is patched to a
282Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't 282Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't
283have internal speakers. 283have internal speakers.
284 284
285![](/assets/posts/dna-synthesized/elektron/IMG_0619.jpg) 285![](/assets/posts/dna-synthesized/elektron/IMG_0619.jpg){:loading="lazy"}
286 286
287![](/assets/posts/dna-synthesized/elektron/IMG_0620.jpg) 287![](/assets/posts/dna-synthesized/elektron/IMG_0620.jpg){:loading="lazy"}
288 288
289![](/assets/posts/dna-synthesized/elektron/IMG_0622.jpg) 289![](/assets/posts/dna-synthesized/elektron/IMG_0622.jpg){:loading="lazy"}
290 290
291For communicating with Elektron, I choose `pygame` Python module that has MIDI 291For communicating with Elektron, I choose `pygame` Python module that has MIDI
292built in. With this, it was rather simple to send notes to the device. All I did 292built in. With this, it was rather simple to send notes to the device. All I did
@@ -295,7 +295,7 @@ was map MIDI notes to the actual Nucleotides.
295Before all of this I also checked Audio MIDI Setup app under MacOS and checked 295Before all of this I also checked Audio MIDI Setup app under MacOS and checked
296MIDI Studio by pressing ⌘-2. 296MIDI Studio by pressing ⌘-2.
297 297
298![](/assets/posts/dna-synthesized/elektron/midi-studio.jpg) 298![](/assets/posts/dna-synthesized/elektron/midi-studio.jpg){:loading="lazy"}
299 299
300The whole script that parses and send notes to the Elektron looks like this. 300The whole script that parses and send notes to the Elektron looks like this.
301 301
diff --git a/_posts/2022-08-13-algae-spotted-on-river-sava.md b/_posts/2022-08-13-algae-spotted-on-river-sava.md
index 064c112..02314f4 100644
--- a/_posts/2022-08-13-algae-spotted-on-river-sava.md
+++ b/_posts/2022-08-13-algae-spotted-on-river-sava.md
@@ -15,17 +15,17 @@ This is the first time I've seen something like this in my whole life.
15 15
16Below are some photographs taken from a DJI drone capturing the event. 16Below are some photographs taken from a DJI drone capturing the event.
17 17
18![Algae on Sava](/assets/posts/algae-sava/dji-algae-0.jpg) 18![Algae on Sava](/assets/posts/algae-sava/dji-algae-0.jpg){:loading="lazy"}
19 19
20![Algae on Sava](/assets/posts/algae-sava/dji-algae-1.jpg) 20![Algae on Sava](/assets/posts/algae-sava/dji-algae-1.jpg){:loading="lazy"}
21 21
22![Algae on Sava](/assets/posts/algae-sava/dji-algae-2.jpg) 22![Algae on Sava](/assets/posts/algae-sava/dji-algae-2.jpg){:loading="lazy"}
23 23
24![Algae on Sava](/assets/posts/algae-sava/dji-algae-3.jpg) 24![Algae on Sava](/assets/posts/algae-sava/dji-algae-3.jpg){:loading="lazy"}
25 25
26![Algae on Sava](/assets/posts/algae-sava/dji-algae-4.jpg) 26![Algae on Sava](/assets/posts/algae-sava/dji-algae-4.jpg){:loading="lazy"}
27 27
28![Algae on Sava](/assets/posts/algae-sava/dji-algae-5.jpg) 28![Algae on Sava](/assets/posts/algae-sava/dji-algae-5.jpg){:loading="lazy"}
29 29
30I will try to get more photos of this in the future days and if something 30I will try to get more photos of this in the future days and if something
31intriguing shows up will post it again on the blog. 31intriguing shows up will post it again on the blog.
diff --git a/_posts/2023-05-24-fresh-9front-desktop.md b/_posts/2023-05-24-fresh-9front-desktop.md
index bdad44a..5da89e7 100644
--- a/_posts/2023-05-24-fresh-9front-desktop.md
+++ b/_posts/2023-05-24-fresh-9front-desktop.md
@@ -11,5 +11,5 @@ tags: [plan9]
11I have been experimenting with Plan9/9front for a week now. Noice! This is how 11I have been experimenting with Plan9/9front for a week now. Noice! This is how
12my desktop looks like. 12my desktop looks like.
13 13
14![9front desktop](/assets/notes/9front-desktop.png) 14![9front desktop](/assets/notes/9front-desktop.png){:loading="lazy"}
15 15
diff --git a/_posts/2023-05-25-dcss-new-player-guide.md b/_posts/2023-05-25-dcss-new-player-guide.md
index 76242f3..dd63f79 100644
--- a/_posts/2023-05-25-dcss-new-player-guide.md
+++ b/_posts/2023-05-25-dcss-new-player-guide.md
@@ -15,7 +15,7 @@ form on another on [craw's](https://github.com/crawl/crawl) official repository.
15 game 15 game
16- [DCSS Manual](/assets/notes/dcss_manual.pdf) - Extensive manual about the game 16- [DCSS Manual](/assets/notes/dcss_manual.pdf) - Extensive manual about the game
17 17
18![Dungeon Crawl Stone Soup](/assets/notes/dcss.jpg) 18![Dungeon Crawl Stone Soup](/assets/notes/dcss.jpg){:loading="lazy"}
19 19
20**Movement and Exploration** 20**Movement and Exploration**
21 21
diff --git a/_posts/2023-05-25-show-xterm-colors.md b/_posts/2023-05-25-show-xterm-colors.md
index 00a3e76..56050fd 100644
--- a/_posts/2023-05-25-show-xterm-colors.md
+++ b/_posts/2023-05-25-show-xterm-colors.md
@@ -11,7 +11,7 @@ tags: [linux]
11- `bash xterm-palette.sh` - will show you number of max colors available 11- `bash xterm-palette.sh` - will show you number of max colors available
12- `bash xterm-palette.sh -v` - will create a list of all colors with codes 12- `bash xterm-palette.sh -v` - will create a list of all colors with codes
13 13
14![xterm color palette](/assets/notes/xterm-palette.png) 14![xterm color palette](/assets/notes/xterm-palette.png){:loading="lazy"}
15 15
16```sh 16```sh
17#!/usr/bin/env bash 17#!/usr/bin/env bash
diff --git a/_posts/2023-05-27-drawing-pixels-in-plan9.md b/_posts/2023-05-27-drawing-pixels-in-plan9.md
index c1e9335..3d37a2c 100644
--- a/_posts/2023-05-27-drawing-pixels-in-plan9.md
+++ b/_posts/2023-05-27-drawing-pixels-in-plan9.md
@@ -22,7 +22,7 @@ More information:
22- [all man pages](https://9fans.github.io/plan9port/man/man3/) 22- [all man pages](https://9fans.github.io/plan9port/man/man3/)
23 can be a valuable resource for learning about the system 23 can be a valuable resource for learning about the system
24 24
25![Plan9 Howdy World!](/assets/notes/plan9-pixels.png) 25![Plan9 Howdy World!](/assets/notes/plan9-pixels.png){:loading="lazy"}
26 26
27```c 27```c
28// main.c 28// main.c
diff --git a/_posts/2023-05-29-grep-to-less-maintain-colors.md b/_posts/2023-05-29-grep-to-less-maintain-colors.md
index 49baa01..b1421b9 100644
--- a/_posts/2023-05-29-grep-to-less-maintain-colors.md
+++ b/_posts/2023-05-29-grep-to-less-maintain-colors.md
@@ -23,4 +23,4 @@ string.
23grep --color=always -rni "TODO:" | less -R 23grep --color=always -rni "TODO:" | less -R
24``` 24```
25 25
26![Less and grep](/assets/notes/grep-less.png) 26![Less and grep](/assets/notes/grep-less.png){:loading="lazy"}
diff --git a/_posts/2023-06-25-development-environments-with-nix.md b/_posts/2023-06-25-development-environments-with-nix.md
index ddac7e0..a905f10 100644
--- a/_posts/2023-06-25-development-environments-with-nix.md
+++ b/_posts/2023-06-25-development-environments-with-nix.md
@@ -59,7 +59,7 @@ export PS1="[\033[38;5;9m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33
59And this is what it looks like when you are in a Nix shell. Otherwise that part 59And this is what it looks like when you are in a Nix shell. Otherwise that part
60of prompt is omitted 60of prompt is omitted
61 61
62![PS1 Prompt](/assets/notes/ps1-prompt.png) 62![PS1 Prompt](/assets/notes/ps1-prompt.png){:loading="lazy"}
63 63
64More resources: 64More resources:
65 65
diff --git a/_posts/2023-08-01-make-b-w-svg-charts-with-matplotlib.md b/_posts/2023-08-01-make-b-w-svg-charts-with-matplotlib.md
index 6e1fa14..461842d 100644
--- a/_posts/2023-08-01-make-b-w-svg-charts-with-matplotlib.md
+++ b/_posts/2023-08-01-make-b-w-svg-charts-with-matplotlib.md
@@ -66,6 +66,6 @@ legend.get_frame().set_linewidth(0)
66plt.savefig("plot.svg", format="svg") 66plt.savefig("plot.svg", format="svg")
67``` 67```
68 68
69![SVG Chart](/assets/notes/plot.svg) 69![SVG Chart](/assets/notes/plot.svg){:loading="lazy"}
70 70
71The image above is SVG and you can zoom in and out and check that the image is vector. 71The image above is SVG and you can zoom in and out and check that the image is vector.
diff --git a/_posts/2023-08-05-floods-in-slovenia.md b/_posts/2023-08-05-floods-in-slovenia.md
index 5a42781..8b2354a 100644
--- a/_posts/2023-08-05-floods-in-slovenia.md
+++ b/_posts/2023-08-05-floods-in-slovenia.md
@@ -11,9 +11,9 @@ draft: false
11 11
12<video src="/assets/notes/floods/IMG_1474.mp4" controls></video> 12<video src="/assets/notes/floods/IMG_1474.mp4" controls></video>
13 13
14![](/assets/notes/floods/IMG_1469.webp) 14![](/assets/notes/floods/IMG_1469.webp){:loading="lazy"}
15 15
16![](/assets/notes/floods/IMG_1470.webp) 16![](/assets/notes/floods/IMG_1470.webp){:loading="lazy"}
17 17
18<video src="/assets/notes/floods/IMG_1461.mp4" controls></video> 18<video src="/assets/notes/floods/IMG_1461.mp4" controls></video>
19 19
diff --git a/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md b/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md
index 23d14b7..c47a726 100644
--- a/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md
+++ b/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md
@@ -38,4 +38,4 @@ ffmpeg -y \
38- This will also cap frame rate to 6 (refer to `fps=6`) since that is enough and 38- This will also cap frame rate to 6 (refer to `fps=6`) since that is enough and
39 this makes playback of GIFs smoother in a browser. 39 this makes playback of GIFs smoother in a browser.
40 40
41![Result](./assets/notes/trigraphs.gif) 41![Result](./assets/notes/trigraphs.gif){:loading="lazy"}
diff --git a/_posts/2023-11-05-add-lazy-loading-to-jekyll-posts.md b/_posts/2023-11-05-add-lazy-loading-to-jekyll-posts.md
new file mode 100644
index 0000000..8293a4d
--- /dev/null
+++ b/_posts/2023-11-05-add-lazy-loading-to-jekyll-posts.md
@@ -0,0 +1,34 @@
1---
2title: "Add lazy loading of images in Jekyll posts"
3permalink: /add-lazy-loading-to-jekyll-posts.html
4date: 2023-11-05T09:04:28+02:00
5layout: post
6type: note
7draft: false
8---
9
10Normally you define images with `![]()` in markdown files. But jekyll also
11provides a way to adding custom attributes to tags with `{:attr="value"}`.
12
13If you have lots of posts this command will append `{:loading="lazy"}` to all
14images in all your markdown files.
15
16```md
17![image-title](/path/to/your/image.jpg)
18```
19
20will become
21
22```md
23![image-title](/path/to/your/image.jpg){:loading="lazy"}
24```
25
26Shell line bellow. Go into the folder where your posts are (probably `_posts`).
27
28```sh
29find . -type f -name "*.md" -exec sed -i -E 's/(\!\[.*\]\((.*?)\))$/\1{:loading="lazy"}/' {} \;
30```
31
32Under the hood this adds `loading="lazy"` to HTML `img` nodes.
33
34That is about it.