aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpublic/10gui-10-finger-multitouch-user-interface.html15
-rwxr-xr-xpublic/60s-ibm-computers-commercial.html13
-rwxr-xr-xpublic/aerial-photography-of-algae-spotted-on-river-sava.html16
-rwxr-xr-xpublic/alacritty-open-links-with-modifier.html25
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-0.jpgbin145615 -> 0 bytes
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-1.jpgbin154416 -> 0 bytes
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-2.jpgbin114347 -> 0 bytes
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-3.jpgbin128019 -> 0 bytes
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-4.jpgbin217747 -> 0 bytes
-rwxr-xr-xpublic/assets/algae-sava/dji-algae-5.jpgbin264884 -> 0 bytes
-rwxr-xr-xpublic/assets/cv/avatar.gifbin2174 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/desktop.pngbin329498 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-00.pngbin35695 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-01.pngbin28042 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-02.pngbin21638 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-03.pngbin34698 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-04.pngbin28346 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/install-05.pngbin13755 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/installation.svg1388
-rwxr-xr-xpublic/assets/dfd-rice/layout.pngbin9072 -> 0 bytes
-rwxr-xr-xpublic/assets/dfd-rice/layout.svg28
-rwxr-xr-xpublic/assets/dfd-rice/script.pngbin65747 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/benchmarks.odsbin21911 -> 0 bytes
-rw-r--r--public/assets/dna-sequence/chart-1.pngbin64760 -> 0 bytes
-rw-r--r--public/assets/dna-sequence/chart-2.pngbin74241 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/chart-encoding-speed.pngbin14201 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/chart-file-sizes.pngbin12391 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/dna-basics.jpgbin165883 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/quote.pngbin1068 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/sample-binary-file.pngbin66417 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-sequence/sample.pngbin65930 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/bison/in.txt11
-rwxr-xr-xpublic/assets/dna-synthesized/bison/out.mp3bin960469 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/bison/spectogram.pngbin52808 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/elektron/IMG_0619.jpgbin226025 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/elektron/IMG_0620.jpgbin242937 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/elektron/IMG_0622.jpgbin279234 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/elektron/elektron.mp4bin22478213 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/elektron/midi-studio.jpgbin63633 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/mouse/in.txt9
-rwxr-xr-xpublic/assets/dna-synthesized/mouse/out.mp3bin864547 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/mouse/spectogram.pngbin114261 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/quote/in.txt8
-rwxr-xr-xpublic/assets/dna-synthesized/quote/out.mp3bin678973 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/quote/spectogram.pngbin108863 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/symphony-no6-1st-movement.mp3bin11650187 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/symphony-no6-1st-movement.pngbin245694 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/taurus/in.txt11
-rwxr-xr-xpublic/assets/dna-synthesized/taurus/out.mp3bin1056599 -> 0 bytes
-rwxr-xr-xpublic/assets/dna-synthesized/taurus/spectogram.pngbin109064 -> 0 bytes
-rwxr-xr-xpublic/assets/do-fuse/copy-benchmarks.tsv101
-rwxr-xr-xpublic/assets/do-fuse/fuse-droplets.pngbin42891 -> 0 bytes
-rwxr-xr-xpublic/assets/do-fuse/fuse-spaces.pngbin32450 -> 0 bytes
-rwxr-xr-xpublic/assets/do-fuse/sqlite-benchmarks.tsv1001
-rwxr-xr-xpublic/assets/dropbox-sync/dropbox-spaces.pngbin47661 -> 0 bytes
-rwxr-xr-xpublic/assets/esp8366-micropython/boards.jpgbin98162 -> 0 bytes
-rwxr-xr-xpublic/assets/go-profiling/golang-profiling-cpu.pdfbin16518 -> 0 bytes
-rwxr-xr-xpublic/assets/go-profiling/golang-profiling-mem.pdfbin19221 -> 0 bytes
-rwxr-xr-xpublic/assets/goaccess/goaccess-dash-html.pngbin16129 -> 0 bytes
-rwxr-xr-xpublic/assets/goaccess/goaccess-dash-term.pngbin9188 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/2d-player-movement.webmbin975421 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/cellular-automata.pngbin373408 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.apple-touch-icon.pngbin18955 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.audio.worklet.js211
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.html248
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.icon.pngbin3305 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.js796
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.pckbin7056 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.pngbin21443 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/example1/index.wasmbin13789463 -> 0 bytes
-rw-r--r--public/assets/godot-dynamic-tile-loading/village-creator.pngbin97628 -> 0 bytes
-rwxr-xr-xpublic/assets/helix-editor/editor.pngbin159442 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/iot-app-output.pngbin23767 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/iot-rest-example.pngbin33912 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/iot-sqlite-db.pngbin199821 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/kcachegrind.pngbin88486 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/profiling-viewer.pngbin173672 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/simple-iot-application-overview.svg2
-rwxr-xr-xpublic/assets/iot-application/simple-iot-application.zipbin6406 -> 0 bytes
-rwxr-xr-xpublic/assets/iot-application/snakeviz.pngbin59601 -> 0 bytes
-rw-r--r--public/assets/microsoundtrack/cow.m4vbin1113250 -> 0 bytes
-rwxr-xr-xpublic/assets/pid1/boxes.mp4bin443830 -> 0 bytes
-rwxr-xr-xpublic/assets/pid1/qemu.log320
-rwxr-xr-xpublic/assets/pid1/unikernels.pngbin48567 -> 0 bytes
-rwxr-xr-xpublic/assets/pid1/unikernels.svg128
-rwxr-xr-xpublic/assets/profile-bind-error/error.jpgbin57047 -> 0 bytes
-rwxr-xr-xpublic/assets/python-profiling/kcachegrind.pngbin88486 -> 0 bytes
-rwxr-xr-xpublic/assets/python-profiling/profiling-viewer.pngbin173672 -> 0 bytes
-rwxr-xr-xpublic/assets/python-profiling/snakeviz.pngbin59601 -> 0 bytes
-rwxr-xr-xpublic/assets/sentiment-analysis/.ipynb_checkpoints/TF Test-checkpoint.ipynb588
-rwxr-xr-xpublic/assets/sentiment-analysis/.ipynb_checkpoints/sentiment-analysis-checkpoint.ipynb170
-rwxr-xr-xpublic/assets/sentiment-analysis/guardian-sa-title-desc-relationship.pngbin15404 -> 0 bytes
-rwxr-xr-xpublic/assets/sentiment-analysis/sentiment-analysis.ipynb170
-rwxr-xr-xpublic/assets/simple-pubsub-server/caniuse.pngbin56379 -> 0 bytes
-rwxr-xr-xpublic/assets/simple-pubsub-server/chrome-debugging.pngbin151160 -> 0 bytes
-rwxr-xr-xpublic/assets/simple-pubsub-server/clients.m4vbin369179 -> 0 bytes
-rwxr-xr-xpublic/assets/simple-pubsub-server/pubsub-overview.pngbin18471 -> 0 bytes
-rwxr-xr-xpublic/assets/simple-pubsub-server/sse-pubsub-server.zipbin4158 -> 0 bytes
-rwxr-xr-xpublic/assets/state-of-web/2008-vs-2020.pngbin126650 -> 0 bytes
-rwxr-xr-xpublic/assets/state-of-web/compiling-vs-transpiling.pngbin41481 -> 0 bytes
-rwxr-xr-xpublic/assets/wap/emulator.mp4bin892887 -> 0 bytes
-rwxr-xr-xpublic/assets/wap/phones.gifbin348891 -> 0 bytes
-rwxr-xr-xpublic/assets/world-clock/enclosure.stlbin1884 -> 0 bytes
-rwxr-xr-xpublic/assets/world-clock/hardware.jpgbin82279 -> 0 bytes
-rwxr-xr-xpublic/assets/world-clock/world-clock.jpgbin148673 -> 0 bytes
-rwxr-xr-xpublic/assets/yapyap/hello.pngbin25962 -> 0 bytes
-rwxr-xr-xpublic/assets/yapyap/pid1.jpgbin394011 -> 0 bytes
-rwxr-xr-xpublic/assets/zed/zed-1.pngbin450802 -> 0 bytes
-rwxr-xr-xpublic/assets/zed/zed-2.pngbin812483 -> 0 bytes
-rwxr-xr-xpublic/bind-warning-on-login-in-ubuntu.html36
-rwxr-xr-xpublic/bringing-all-of-my-projects-together-under-one-umbrella.html164
-rwxr-xr-xpublic/bulk-make-thumbnails.html19
-rwxr-xr-xpublic/cachebusting-in-hugo.html15
-rwxr-xr-xpublic/catv-weechat-config.html18
-rwxr-xr-xpublic/convert-mkv.html16
-rwxr-xr-xpublic/crafting-stories-in-zed-editor.html44
-rwxr-xr-xpublic/create-placeholder-images-with-sharp.html78
-rwxr-xr-xpublic/cronjobs-github-with-actions.html27
-rwxr-xr-xpublic/curriculum-vitae.html21
-rwxr-xr-xpublic/dcss-new-player-guide.html43
-rwxr-xr-xpublic/dcss-on-4k-display.html22
-rwxr-xr-xpublic/debian-based-riced-up-distribution-for-developers-and-devops-folks.html125
-rwxr-xr-xpublic/development-environments-with-nix.html41
-rwxr-xr-xpublic/digitalocean-spaces-to-sync-between-computers.html65
-rwxr-xr-xpublic/disable-mouse-wake-from-suspend-with-systemd-service.html51
-rwxr-xr-xpublic/download-youtube-videos.html17
-rwxr-xr-xpublic/drawing-pixels-in-plan9.html63
-rwxr-xr-xpublic/easy-time-took-in-bash.html23
-rwxr-xr-xpublic/encoding-binary-data-into-dna-sequence.html186
-rwxr-xr-xpublic/esp8266-and-micropython-guide.html96
-rwxr-xr-xpublic/ewd-manuscripts-ebook.html13
-rwxr-xr-xpublic/extend-lua-with-custom-c.html39
-rwxr-xr-xpublic/extending-dte-editor.html46
-rwxr-xr-xpublic/fix-plan9-bootloader.html17
-rwxr-xr-xpublic/fresh-9front-desktop.html12
-rwxr-xr-xpublic/from-internet-consumer-to-full-hominum-again.html79
-rw-r--r--public/general/9front-cursor.pngbin249 -> 0 bytes
-rw-r--r--public/general/9logo.pngbin39825 -> 0 bytes
-rwxr-xr-xpublic/general/alert-dark.svg99
-rwxr-xr-xpublic/general/alert-light.svg99
-rw-r--r--public/general/index.css1
-rw-r--r--public/general/og-big.jpgbin70575 -> 0 bytes
-rw-r--r--public/general/og-big.xcfbin10025863 -> 0 bytes
-rw-r--r--public/general/og.jpgbin44366 -> 0 bytes
-rw-r--r--public/general/og.xcfbin898329 -> 0 bytes
-rwxr-xr-xpublic/git-push-multiple-origins.html14
-rwxr-xr-xpublic/golang-profiling-simplified.html91
-rwxr-xr-xpublic/grep-to-less-maintain-colors.html16
-rwxr-xr-xpublic/i-was-wrong-about-git-workflows.html51
-rwxr-xr-xpublic/index.html15
-rwxr-xr-xpublic/index.xml6059
-rwxr-xr-xpublic/install-plan9port-linux.html18
-rwxr-xr-xpublic/led-technology-not-so-eco.html23
-rwxr-xr-xpublic/linux-cheatsheet.html111
-rwxr-xr-xpublic/making-cgit-look-nicer.html195
-rwxr-xr-xpublic/mass-set-permission.html13
-rw-r--r--public/mitjafelicijan.pgp.pub.txt52
-rwxr-xr-xpublic/most-likely-to-succeed-in-year-of-2011.html27
-rwxr-xr-xpublic/mount-plan9-over-network.html18
-rwxr-xr-xpublic/my-love-and-hate-relationship-with-nodejs.html77
-rwxr-xr-xpublic/non-blocking-shell-exec-csharp.html36
-rwxr-xr-xpublic/notes.xml1373
-rw-r--r--public/notes/10gui-10-finger-multitouch-user-interface.jpgbin21762 -> 0 bytes
-rw-r--r--public/notes/10gui-10-finger-multitouch-user-interface.mp4bin16587109 -> 0 bytes
-rw-r--r--public/notes/60s-ibm-computers-commercial.jpgbin32372 -> 0 bytes
-rw-r--r--public/notes/60s-ibm-computers-commercial.mp4bin35273598 -> 0 bytes
-rw-r--r--public/notes/9front-desktop.pngbin38054 -> 0 bytes
-rw-r--r--public/notes/dcss-quickstart.pdfbin80328 -> 0 bytes
-rw-r--r--public/notes/dcss.jpgbin855457 -> 0 bytes
-rw-r--r--public/notes/dcss_manual.pdfbin203302 -> 0 bytes
-rw-r--r--public/notes/grep-less.pngbin178000 -> 0 bytes
-rw-r--r--public/notes/plan9-pixels.pngbin12134 -> 0 bytes
-rw-r--r--public/notes/ps1-prompt.pngbin24272 -> 0 bytes
-rw-r--r--public/notes/xterm-palette.pngbin9524 -> 0 bytes
-rwxr-xr-xpublic/parse-rss-with-lua.html35
-rwxr-xr-xpublic/plan9-screenshot.html19
-rwxr-xr-xpublic/presentations-with-markdown.html69
-rwxr-xr-xpublic/preview-troff-man-pages.html17
-rwxr-xr-xpublic/profiling-python-web-applications-with-visual-tools.html143
-rwxr-xr-xpublic/re-inventing-task-runner-that-i-actually-used-daily.html112
-rwxr-xr-xpublic/rekindling-my-love-for-programming.html52
-rwxr-xr-xpublic/remote-work.html45
-rwxr-xr-xpublic/replacing-dropbox-in-favor-of-digitalocean-spaces.html73
-rwxr-xr-xpublic/run-9front-in-qemu.html23
-rwxr-xr-xpublic/running-golang-application-as-pid1.html189
-rwxr-xr-xpublic/simple-iot-application.html439
-rwxr-xr-xpublic/simple-server-sent-events-based-pubsub-server.html310
-rwxr-xr-xpublic/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html71
-rwxr-xr-xpublic/simplifying-and-reducing-clutter.html47
-rwxr-xr-xpublic/software-development-pitfalls.html119
-rwxr-xr-xpublic/state-of-web-technologies-and-web-development-in-year-2022.html188
-rwxr-xr-xpublic/that-sound-that-machine-makes-when-struggling.html31
-rwxr-xr-xpublic/the-strange-case-of-elasticsearch-allocation-failure.html64
-rwxr-xr-xpublic/tmux-sane-defaults.html36
-rwxr-xr-xpublic/trying-to-build-a-new-kind-of-terminal-emulator.html191
-rwxr-xr-xpublic/tying-out-helix-code-editor.html34
-rwxr-xr-xpublic/using-digitalocean-spaces-object-storage-with-fuse.html247
-rwxr-xr-xpublic/using-goaccess-with-nginx-to-replace-google-analytics.html96
-rwxr-xr-xpublic/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html55
-rwxr-xr-xpublic/wap-mobile-web-before-the-web.html120
-rwxr-xr-xpublic/what-i-ve-learned-developing-ad-server.html126
-rwxr-xr-xpublic/what-would-dna-sound-if-synthesized.html204
-rwxr-xr-xpublic/who-knows-what-the-world-will-look-like-tomorrow.html75
-rwxr-xr-xpublic/wireless-sensor-networks.html38
-rwxr-xr-xpublic/write-iso-usb.html12
205 files changed, 0 insertions, 18303 deletions
diff --git a/public/10gui-10-finger-multitouch-user-interface.html b/public/10gui-10-finger-multitouch-user-interface.html
deleted file mode 100755
index c2870fa..0000000
--- a/public/10gui-10-finger-multitouch-user-interface.html
+++ /dev/null
@@ -1,15 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>10/GUI 10 Finger Multitouch User Interface</title><meta name=description content="Message from 10/GUI team (page 10gui."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>10/GUI 10 Finger Multitouch User Interface</h1><p>Jun 29, 2023<div><p>Message from 10/GUI team (page 10gui.com does not exist anymore):<p><em>Over a quarter-century ago, Xerox introduced the modern graphical user
7interface paradigm we today take for granted.</em><p><em>That it has endured is a testament to the genius of its design. But the
8industry is now at a crossroads: New technologies promise higher-bandwidth
9interaction, but have yet to find a truly viable implementation.</em><p><em>10/GUI aims to bridge this gap by rethinking the desktop to leverage technology
10in an intuitive and powerful way.</em><p><video poster=/notes/10gui-10-finger-multitouch-user-interface.jpg src=/notes/10gui-10-finger-multitouch-user-interface.mp4 controls></video></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
11<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
12with me
13<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
14the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
15otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/60s-ibm-computers-commercial.html b/public/60s-ibm-computers-commercial.html
deleted file mode 100755
index aa46a28..0000000
--- a/public/60s-ibm-computers-commercial.html
+++ /dev/null
@@ -1,13 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>60's IBM Computers Commercial</title><meta name=description content="Likely aired during an hour-long program during the 1960s, long commercials suchas this typically aired during hour-long programs."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>60's IBM Computers Commercial</h1><p>Jun 29, 2023<div><p>Likely aired during an hour-long program during the 1960s, long commercials such
7as this typically aired during hour-long programs. They would <em>not</em> have aired
8during a half-hour program.<p><video poster=/notes/60s-ibm-computers-commercial.jpg src=/notes/60s-ibm-computers-commercial.mp4 controls></video></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
9<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
10with me
11<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
12the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
13otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/aerial-photography-of-algae-spotted-on-river-sava.html b/public/aerial-photography-of-algae-spotted-on-river-sava.html
deleted file mode 100755
index 9a3b6c5..0000000
--- a/public/aerial-photography-of-algae-spotted-on-river-sava.html
+++ /dev/null
@@ -1,16 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Aerial photography of algae spotted on river Sava</title><meta name=description content="This is a bit of a different post than I usually write, but quite interestingone to me."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Aerial photography of algae spotted on river Sava</h1><p>Aug 13, 2022<div><p>This is a bit of a different post than I usually write, but quite interesting
7one to me. River Sava has plenty of hydropower plants located down the stream.
8This makes regulating the strength of a current easier than normally. Because of
9lower stream strength and high temperatures, algae has formed on the river.
10This is the first time I've seen something like this in my whole life.<p>Below are some photographs taken from a DJI drone capturing the event.<p><img src=/assets/algae-sava/dji-algae-0.jpg alt="Algae on Sava"><p><img src=/assets/algae-sava/dji-algae-1.jpg alt="Algae on Sava"><p><img src=/assets/algae-sava/dji-algae-2.jpg alt="Algae on Sava"><p><img src=/assets/algae-sava/dji-algae-3.jpg alt="Algae on Sava"><p><img src=/assets/algae-sava/dji-algae-4.jpg alt="Algae on Sava"><p><img src=/assets/algae-sava/dji-algae-5.jpg alt="Algae on Sava"><p>I will try to get more photos of this in the future days and if something
11intriguing shows up will post it again on the blog.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
12<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
13with me
14<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
15the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
16otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/alacritty-open-links-with-modifier.html b/public/alacritty-open-links-with-modifier.html
deleted file mode 100755
index e71f797..0000000
--- a/public/alacritty-open-links-with-modifier.html
+++ /dev/null
@@ -1,25 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Alacritty open links with modifier</title><meta name=description content="Alacritty by default makes all links in the terminal output clickable and thisgets annoying rather quickly."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Alacritty open links with modifier</h1><p>Jun 25, 2023<div><p>Alacritty by default makes all links in the terminal output clickable and this
7gets annoying rather quickly. I liked the default behavior of Gnome terminal
8where you needed to hold Control key and then you could click and open links.<p>To achieve this in Alacritty you need to provide a <code>hint</code> in the configuration
9file. Config file is located at <code>~/.config/alacritty/alacritty.yml</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>hints:
10</span></span><span style=display:flex><span> enabled:
11</span></span><span style=display:flex><span> - regex: <span style=color:#a31515>&#34;(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
12</span></span></span><span style=display:flex><span><span style=color:#a31515> [^\u0000-\u001F\u007F-\u009F&lt;&gt;\&#34;\\s{-}\\^⟨⟩`]+&#34;</span>
13</span></span><span style=display:flex><span> command: xdg-open
14</span></span><span style=display:flex><span> post_processing: <span style=color:#00f>true</span>
15</span></span><span style=display:flex><span> mouse:
16</span></span><span style=display:flex><span> enabled: <span style=color:#00f>true</span>
17</span></span><span style=display:flex><span> mods: Control
18</span></span></code></pre><p>The following should work under any Linux system. For macOS, you will need to
19change <code>command: xdg-open</code> to something else.<p>Now the links will be visible and clickable only when Control key is being
20pressed.<p>Source: <a href=https://github.com/alacritty/alacritty/issues/5246>https://github.com/alacritty/alacritty/issues/5246</a></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
21<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
22with me
23<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
24the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
25otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/assets/algae-sava/dji-algae-0.jpg b/public/assets/algae-sava/dji-algae-0.jpg
deleted file mode 100755
index d444c80..0000000
--- a/public/assets/algae-sava/dji-algae-0.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/algae-sava/dji-algae-1.jpg b/public/assets/algae-sava/dji-algae-1.jpg
deleted file mode 100755
index 26ee43c..0000000
--- a/public/assets/algae-sava/dji-algae-1.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/algae-sava/dji-algae-2.jpg b/public/assets/algae-sava/dji-algae-2.jpg
deleted file mode 100755
index d38f8cd..0000000
--- a/public/assets/algae-sava/dji-algae-2.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/algae-sava/dji-algae-3.jpg b/public/assets/algae-sava/dji-algae-3.jpg
deleted file mode 100755
index 9706fa0..0000000
--- a/public/assets/algae-sava/dji-algae-3.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/algae-sava/dji-algae-4.jpg b/public/assets/algae-sava/dji-algae-4.jpg
deleted file mode 100755
index b0db4a2..0000000
--- a/public/assets/algae-sava/dji-algae-4.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/algae-sava/dji-algae-5.jpg b/public/assets/algae-sava/dji-algae-5.jpg
deleted file mode 100755
index f3c1b3b..0000000
--- a/public/assets/algae-sava/dji-algae-5.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/cv/avatar.gif b/public/assets/cv/avatar.gif
deleted file mode 100755
index 82e5f39..0000000
--- a/public/assets/cv/avatar.gif
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/desktop.png b/public/assets/dfd-rice/desktop.png
deleted file mode 100755
index 8dcfd51..0000000
--- a/public/assets/dfd-rice/desktop.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-00.png b/public/assets/dfd-rice/install-00.png
deleted file mode 100755
index 2660f90..0000000
--- a/public/assets/dfd-rice/install-00.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-01.png b/public/assets/dfd-rice/install-01.png
deleted file mode 100755
index 1281be1..0000000
--- a/public/assets/dfd-rice/install-01.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-02.png b/public/assets/dfd-rice/install-02.png
deleted file mode 100755
index 9cac5e3..0000000
--- a/public/assets/dfd-rice/install-02.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-03.png b/public/assets/dfd-rice/install-03.png
deleted file mode 100755
index dc7cbd1..0000000
--- a/public/assets/dfd-rice/install-03.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-04.png b/public/assets/dfd-rice/install-04.png
deleted file mode 100755
index 675a78f..0000000
--- a/public/assets/dfd-rice/install-04.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/install-05.png b/public/assets/dfd-rice/install-05.png
deleted file mode 100755
index 8b580b9..0000000
--- a/public/assets/dfd-rice/install-05.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/installation.svg b/public/assets/dfd-rice/installation.svg
deleted file mode 100755
index bb9560b..0000000
--- a/public/assets/dfd-rice/installation.svg
+++ /dev/null
@@ -1,1388 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg width="210mm" height="297mm" viewBox="0 0 210 297" version="1.1" id="svg5" inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" sodipodi:docname="installation.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
5 <sodipodi:namedview id="namedview7" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" inkscape:zoom="0.093984989" inkscape:cx="-883.11975" inkscape:cy="1877.9595" inkscape:window-width="1462" inkscape:window-height="940" inkscape:window-x="1725" inkscape:window-y="74" inkscape:window-maximized="0" inkscape:current-layer="layer1" />
6 <defs id="defs2" />
7 <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
8 <g id="g368" transform="translate(76.329351,109.97993)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-01.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75">
9 <image width="169.33334" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAd
10X0lEQVR4nO3dvbqjOKIFUNf9KujHm9CP6HAeb4IJbnCm3RQ/sgQbI2CtrwMXxpIQAvYR2P3r8Xg9
11AADI+b+jGwAAcDUCFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
12ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
13ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
14ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
15ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
16ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
17ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
18ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
19ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
20ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
21ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
22ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
23ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
24ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUA
25ECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQ9jtV0OuVKgnO7fl8vhwP9Mr4
26hB/P577lm8ECAAgTsAA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fwW4dtwDnb0
110HdTZ14+6B7MKX09dV/6wnUYnwH0sXaceC9eXR/UDxO9PzT6+MvsLDkslFF4PC3H9ejwevx6P1PcO
111/nmtZwGA3tR9HS0TYG5xixAA4JsELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
112wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
113wgQsAIAwAQsAIEzAAgAI+71Tuc/nc6eSAQA6t0vAer1eexQLAHAKbhECAIQJWAAAYQIWAECYgAUA
114ECZgAQCECVgAAGECFgBA2K/HY+/frPKLowDAWWRykRksAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
115ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAI+/V4vI5uAwDApZjB
116AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
117AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
118AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
119AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
120AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
121AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
122AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
123AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
124AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
125AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
126AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
127AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAICw30c3AADg
128vJ6zS81gAQCECVgAAGHJgPWf//4rWBoQ0fmB2XnzANYpPYM1e+L76/e/d2vMdQy77mI99rNp2zfq
129P//915d7Zjqeaxrw/Xaus3c7e+uHpfb01k7gtmYC1vsM9T5PbTxn3eSU997M0fZ+bfO/U9Ffv/99
130rimHYbccMg4PH/93OPoAejMOWJUXg8IMzfut4VWt6RozLGE0XzJbbyHQLLXzY/tbr0k1G/izzrR/
131VrRzdnlrP6+oN1LOe+G0q7vaL63tXCpn7/1SaOdS45uOlxX7a8UM7mz/z7ZzqT2p/bWu/QAjfwSs
132+nRVOEHPvm69xoymgt6nwqaZocIJOjvDVC7hY1+1trPQ/qZ+TvVPazmz766o96N1XbGlnZHxn+rP
133YdVb6m3thxX7canfZi21J7W/4uMQuKd/Alb9eaQyTEzf6vNUNXuarjd7ol+ablm6BK5oZ2G1df28
134965pLT++Xx7LMxOpbY+M/+x4qLfTAAhuclzPbQPO7n8Ba8stjHo7ZaxhsdO/PpfWf+z5pPbwXkbl
135pGBrvYV3K/u50A/Z9lT62n7ZrmZ7Z+N1/STxypZVaD1eCvY+vg5x9vYDnfhfwNp4C6Oysu/PYC1V
1361xqACuUXNqp87+ZtRX82FfixnGk/bJxtWu07+2W7dSWvvgW/oq4VguMwtR+Pcvb2Az3453ew6p/V
137WKfD+4N//f73dKv/899/NfXDbAmZ9q2yop9n++FAO+2XY3U4/vfW27hqdfb2A8f644dGV5xNKrPF
1383leXn5aXa3m37eP9tXW116z5cbXCCoW+Hb6ub3+qzZXrb9n2x877ZYuaKlaP/xXjocbH42VF4ZXH
13917rqvplyJCogYvwzDTX3VobXrdE1bPTWz4tUuprWtW791nLq2/bX39+6KjxMPe2fpf5sbX9rP6/o
140n9FFtLy95X6ePumy9355TK6dNVVsb+eW/VIzHpba+VjYX631LpUfPL6ajovC9ja1s6Yxle0HmPr1
141eLyObkNf9ptsu+FNoiC9B0CXnrNL/c+ex1zF+2S/AAAAAAAAAAAAAAAAAAAAAAAAAAAU/T9NrMo+
142adlPnAAAAABJRU5ErkJggg==
143" id="image41" x="-234.20293" y="-199.01341" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-01.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
144 <image width="169.33334" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg
145AElEQVR4nO3dzZKjuLYGUPJGDfrxeuhH9PA83hn04A582kUBkiWxBQKvFR0dLieWNuLvS8DkzzQ9
146JwAA4vzf2QUAANyNgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzA
147AgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADB
148BCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUA
149EEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglY
150AADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCY
151gAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAA
152gglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAEL
153ACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQT
154sAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBA
155MAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmAB
156AAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGAC
157FgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAI
158JmABAAQTsAAAgglYAADBBCwAgGC/aj/wfPYoA77X4/F42q74xHoCx3g8YtpxBgsAIJiABQAQTMCC
159q3k8/vffKR/vp7akY2Zh3cuAQweMR8CCC3o+N26HTB34F+9vfjbjHchCYtmYKaqH61YORKi+yR34
160OvNA9nj0+qpLbbNn3fHtTnOggIAFtJqfpHnHjlcCe/9o/v78xSKmrN+snb62nozMxOX9LibYnLXC
161eoAL2hWwHs6Bw9dah4ZFplm8fv0/dQJsnoHe71RNX1tPyXytd3FV/ZZMUHNG0C4X+gl/DMreM1ie
162ywI7XeCouXnGJbPtj7ZbaK5nHadq+/qYn2pqs7+FTnrsh10iBD5JHddLdkm3zwTvELZ5PXH9ZmZ6
1634EYELKBJ5r6ib/O+mjn9GZteWWozY21OD9yIxzTAXaQO1Q7hx3g9/2J9J1kqem5OD9yFgAV3Ufgc
164rCO7vrqS+fo4zSJF3XWsgD+5RAg0WTz7oDA3bN6BlHkiQ/n0ixpCbmxPZaPafufXCqPqBMb2M011
165m/efezl/3R32qt6Oqh7pFP5xTmJ/C/3Mt6+os8zOYMHV7DzKOkgD9CdgwcmclqCE9QSOkjqFVbcN
166uskdACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCY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K+zC+jr8Xi8Xz+fz/2N7Gyn+bMA
278wIXcMGC9c8wi0OzJN1HtbBK8AOBm7hawCsNKyJmtTDsf25/X+Xw+ZSwAuJNbBax8THn/KOrMVqqd
279j+2v35GxAOBO7hOwugaUzTNShd19TFfvyWQsALiHmwSsfDR5x6Pwe7AW979/9PEcm4wFADdwk8c0
280vKJJ5qc9UssrDL2VfCRfp3QFAPdwk4A1fcou40jVKV0BwG3cJ2BN2YzVO3vlz0st3lnXKV0BwJ3c
2815B6st/ltTPMck3o9ld2YlbrJvbn9eZ3SFQDczM801R3a50lAMgAArq7s62t1gedWlwgBAEYgYAEA
282BBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIW
283AEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQ7NfOzz8e
284j5A6AABuY1fAej6fUXUAANyGS4QAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABPuZpqhn
285WXniKABwV3V5yRksAIBgAhYAQDABCwAgmIAFABBMwAIACCZgAQAEE7AAAIIJWAAAwQQsAIBgAhYA
286QDABCwAgmIAFABBMwAIACCZgAQAEE7AAAIL9TNPz7BoAAG7FGSwAgGACFgBAMAELACCYgAUAEEzA
287AgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADB
288BCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFjjIp80AAAS+SURB
289VABAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAI
290JmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwA
291gGACFgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzA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
306/e9ttPWq1tXrB871x4NGG/Ymhdmi99HlVXm+l3dtH6+vtfVeMuXHyTITZMZ2/rq8/qiaC6ffM+9T
3075+WyR0kXzet/w/pQ4uP20tB44fbV1t2RKUeiAkIsH9NQcm1lftxaHMMWP3q9iEpX677apq9tp7y2
308v/791lXmZur1+KTGs7b+2nFuGJ/FQTQ/v/lxXt/p0nu5TKtjZ0kX++vcs1xK1odUnVNiedX2m2o/
309cPuq2i4y81tVZ0kxhfUDrP1M0/PsGsbS72TbF14kCmT0ABjSY/Ndf+x5yVF8TJYLAAAAAAAAAAAA
310AAAAAAAAAAAAAEDW/wMXMWZMdK+KTQAAAABJRU5ErkJggg==
311" id="image69" x="-64.869583" y="-199.01341" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-01.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
312 </g>
313 <g id="g372" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-02.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" transform="translate(407.41482,-79.959051)">
314 <image width="169.33334" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAO
315fElEQVR4nO3dwXaqZgNAUdOVQR+vQx6RYR+vgw7+Qbr8jQqCHoWYvVcHXoJ8BJPLuR9oPw6H8QAA
316QOePrXcAAODdCCwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
317gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
318AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
319CSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
320gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
321AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
322CSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
323gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
324AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
325CSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
326gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
327AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
328CSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
329gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
330AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
331CSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwA
332gJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjA
333AgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCICSwAgJjAAgCI
334CS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GABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
363TGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGAB
364AMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQE
365FgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
366TGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGAB
367AMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQE
368FgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
369TGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGAB
370AMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQE
371FgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
372TGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGAB
373AMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQE
374FgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
375TGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGAB
376AMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQE
377FgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBATGABAMQEFgBA
378TGABAMQEFgBATGABAMQEFgBA7HPrHQAA+LmGq0vNYAEAxAQWAEBMYAEAxAQWAEBMYAEAxAQWAEBM
379YAEAxAQWAEBMYAEAxAQWAEBMYAEAxAQWAEBMYAEAxAQWAEBMYAEAAAAAAAAAAAAAAAAAAAAAAAAA
380wBv4H+xMBAXacnSYAAAAAElFTkSuQmCC
381" id="image81" x="-565.28839" y="184.09018" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-02.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
382 <image width="169.33333" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg
383AElEQVR4nO3dwbKjOLYFUOeLHPTn9dCf6GF/Xg968Aa3ykUaJEuwAWGvFR0dTl8sHQSIbbBdv263
384xw0AgJz/O7sAAIBPI2ABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
385AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
386AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
387AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
388AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
389AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
390AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
391AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
392AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
393AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
394AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
395AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
396AABhv/fu4PHYuwfoc7/fH/ZL2Ifji6u43/dt3xUsAIAwAQsAIEzAgnfu97/+F1lsP6XeTyypxeDl
397Aayy+2ew4BMsfqbkfv/j+Z/HXXFhuvDGj628FDOs8escv0LgClzBgpP8nMif/9vvQk49LriAlHWV
3988bxKnXBZrmDBeBavbP0EsuefGq+y/Cz/svBiIy9Xbp7/rPTbdQXuuXBXSV3t99b5tv35mNTbKa1U
399qf3FhZ9rMd3083a2rG9Lnev2N+Bvhwasu/dMUPJyYnua/nPxcT24zK+NlRqsKPVbyWdzi68Ktt/b
400ztv26wsstlMZ25b6Xxp8Rpze/SFV54pd5a9lTfWM67CfETn6CpbfR+F0F579Fw+fSnDZtd8B26+M
401T+9r5+N51txV6XfL+m7s+s3rzPMM6sj53y1CoEfpVtQeUu33tlNKqyvaidi735blZSboJGDBlwl+
402sOYSV7Yqn6Oq9Ntyx3C68PPxSzvb9dZ/Vp3AnwQsWCt7Wjr41wGcU+sWM1Z9+Uu4Sp1wfX6mAda6
4037me5bu9+FnXFqo1wu7Dl6k77nyq/nTF/vj6eLbW12H7v75g6AVew4DQv5+/npYXS8yssfsGw9K2x
404l1tIb0+06+qc/wZBsP3Fu2Cl9Wppf3odq/TalvFsrL9lpbq2y5F1An/6dbvtezj9eUT7r6xzvu79
405sPETS1f5xaAVPx9wCWetyFXG86g6zfOMbLp/7n251hUseGfd9/yH5YpF1lXG8yp1wqcQsPg63l5/
4065sn1xJW6yngeUqfji+soXcLK7MM+5A4AECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYA
407QJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYC+73+9kl
4087MJ6HWleVarO+/2+2NS69uOjd9bmGHM3AL7WoAHrPnF2Lfyhd4tU0kBXU/aEH/f7/fF4PB6Pswv5
409y97bZe9JwCQD7GTEgPU8hfw4fvpbd/Yaf5o+5axc6jRYzDhpo27vOq8yDl0MGnBRv88uoM80xExn
410xsXnf4La809vn5829dJ4aflSI6Xi582+rX++fL3+Su8r1uulnkpT8+VX6O23/uS8na5xmy750svb
411/XDeeHud60T22656WrZLqd+W9lu63q/fxZUCaHeBgNUYOObPr3h8m5xNpxaXrzTSpVJ/y0sau163
412XtN/Lv51Xf1vV6ql39J6rdgfSl66fkaWt/vhfKi76lxUDzSr99vV9VS2S9d+1at3+6b6Begy4i3C
413n1PF2ztuz1myMl2m7k+NNiOn6mlMZuMUM34X7R2t2AmfibPxtVu23Zax2nWcd6p53tRoRz1wLYNe
414wXq+9by1TZrjf/5pP/HTwPyO2Fup8b/KdvzI9V2x3XudNW5DjTPwJQYNWD/q94ae5rcAdq/sdrv9
415eVPmw97sdgXc1PiftR1XiGzuAde3943NuvY3WjFuH3Z4Apcw4i3CEc407bru17x8jGZwP6t2iVIJ
416st1vfr4B2GzEgNVocfo7fk68/61l4efHy3rfUh+5Xlv6+sh7Z3WR/fCs9X35kPtZXacaaWnzQrsW
417cGkj3iJ8efc8/TD72+c3vvOuf1FrvvCKbyfNlxltvUr1vPy1pc5Sv4vP19d38RNCb9t5u7IrrNhe
418K9a3y+rtW6mh97psywfqe9vvHbfFu/aVfivj5q4isNGv223feWQ6TX3YF6Q3fv37w0YDAAZ3r/6e
419zt8yp+YRr2BdxZZ35I3LAwBXJGBtsuKnjHaqBAAYx4U/5A4AMCYBC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gObLPwrfGNrDxu3Yu9jPqtVX
4346lOn79694vhOg/1+g72P01L7Lf1uqad3vY6crxjcoLcIK59qmv5z8U+V++7Pt5jThVfPoS3tVJZp
435OfDmUePl+ZaPU6TWt9JvVz0rlk99Vmxx/Cvj07W+pe1b3+7zNVqxn0QE++0an5blG7fLot79v7T8
436HtulfpFp+3G0U/2lOkvHae88Vnq+1P7bfhtXtrffUsup+Yqr+3W79X465J/HrhUzoFLSPb6SLm+P
437jouuF8A4pjNt+e1WZl4d9AoWrHahzNF1ReFC6wWAgAWnkZkAxpO5sjX6h9wBAC5HwAIACBOwAADC
438BCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADC
439BCwAgDABCwAgTMACAAgTsPLu9/vZJfxhtHqezirsfr8POyZT5xZZ6n3+fG+dlxj8t7aPQ6XlKw7R
4403jVfcUz4ciMGrP1mrm8w2lgNWM/j8Xg8HmcX8uGk53Xsnz/G34jjV8jpRgxYfAlnkbp143P8vN9b
441567b/cSdyv5Mu6vks6vUOabfZxew4PF4/LyN+/nny+PpYvMF5v+c+1ng2dTLa9+239LFtKne9t+u
44279sefx7Ma26sp6WLef3z9lvqKRXZ0n5vnSuU2ul6vjI+lfWaj0/Lftu4sm/rb9l5KnWW/lR/8qWL
4433uO017Tll6p6x+fWs15bSr1tOC5WzDMr6i/t56UyKi3sNI+t2K/etj9fx3o7W/aT3v12y/ruND9/
444jxEDVknvgdrY1PPx2/bbe1zXfqWRluUXezmmnsXHlXpuk9lhdfu9ddYn7q52up5f8fi2ND6l5bsG
445p7H+adel50t17r3dg/PAS4PPU0XX+KxYr0Wl/TN1XFT67d2fW5paXc/e81hvO73nhcb9Z3UAvXXu
446t1vWt7HOyHb/SIPeInzOVjttrb33gNKpZddOK05Z39Hafzwez+S3osHSS57PV9p8+9qNNcQbSRW8
4470WjHUVcNKzZu7/452tx4iXmg1M66MZ+foc7aP3vnn2CdIxySYxr3CtY8kn+A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ptd4p8dJ6fGt7YNZla/drmt/Wqd0BTCOlnuFpXm+9PwQ83zp
518XuE0e73ksOfCX5+ubrfbr9R/Nbrkz5EfYI8BAOb2jkQDBIC2r51l6vzqW4QAAHv49luEAMDtNsQV
519pk/iChYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
520AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABD2++D+7vf7
521wT0CABzs0ID1eDyO7A4A4BRuEQIAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAEDYr9vtrN+m
5228oujAMBoMrnIFSwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBM
523wAIACBOwAADCBCwAgDABCwAgTMACAAj7dbs9zq4BAOCjuIIFABAmYAEAhAlYAABhAhYAQJiABQAQ
524JmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQ
525JmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQ
526JmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAPEh2noAAAUSSURB
527VABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
528AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
529AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
530AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
531AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
532AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
533AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
534AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
535AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGG/zy4AAOC67ovPuoIFABAm
536YAEAhCUD1n//9+9ga0DE4Afm4OUBrFP7DNbixPev3//ZrZjPMR26Dxuxn1XbvlL//d+/Dx6Z+f7c
537UsDxda6zd52jjUOpntHqBL7WQsB6zlDPeWrjnPUlU95zNV/W97DVP6ajf/3+z7UuOUyH5ZT98PT9
538/xuOPoDRvAasxpNB5QrN80/Ts1rXOWbawsv1ksV+K4GmVOfb+nvPSS0r+LPMfHxW1Ln4fO84r+g3
5390s7zyflQD7VdeusstbP3dqnUWSq+63hZsb1WXMFdHP/FOkv1pLbXuvoBXvwRsNrTVWWCXnzce455
540uRT0nAq7rgxVJujsFaZ6C2/HqrfOSv1d45wan952Fv+6ot+31g3Fljoj+39qPKddb+m3dxxWbMfS
541uC0q1ZPaXvH9EPhO/wSs9nmkMUzM/zTmVLU4TbdbnOhLl1tKp8AVdVYWWzfOe2+a3vbj2+VWvjKR
542WvfI/p/dH9rttAMEVzlu5NqAq/srYG25hdFup4w1bXb+7rO0/G3PT2pP72U0XhTs7bfy18ZxroxD
543tp5Gh22X7VrWdzFet18kXllZg97jpWLv4+sUV68fGMRfAWvjLYzGzo6/glXqrjcAVdqvrFT93s3T
544ivHsavBtO/Nx2Hi1abVjtst261pefQt+RV8rBPfD1HY8y9XrB0bwz+9gtX9WY50B7w/+6/d/5mv9
5453//9u2scFlvI1LfKinFeHIcT7bRdzjXg/r+30farXlevHzjXHz80umI2acwWe59dfiqv9/Ks7e39
546tXW9tyz5drHKApWxnT5urz9Vc+PyW9b9tvN22aKli9X7/4r9ocXb42VF443H17rujkw5EhUQ8foz
547DS33VqbnrZdz2Muffh6k0tW8r3XL97bTXtu//v7WVeXD1PPxKY1nb/2947xifF5OovX1rY/z/JMu
548e2+X2+zc2dLF9jq3bJeW/aFU562wvXr7LbUfPL66jovK+nbV2VJMY/0Ac79ut8fZNYxlv4ttX3iT
549KMjoATCk++Kz/mPPr5zFx2S7AAAAAAAAAAAAAAAAAAAAAAAAAABU/T+x9xtLJOr2IAAAAABJRU5E
550rkJggg==
551" id="image93" x="-395.95505" y="184.09018" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-02.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
552 </g>
553 <g id="g364" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-00.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" transform="translate(456.74601,90.184622)">
554 <image width="169.33333" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAIAAAC6s0uzAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg AElEQVR4nO2dd9gkR3Xu3+qe8IXdlVa7LELSLgIktAoEgUVYAQZhkgkm2GCiBNjgAPc64XSxTboX uDbGBmwTbEuYiwk2GGzAYGwBRrsIRBAiCSEJpRXKu9r4hZmu+0fN1FTH6Z5O1T3v79Gzmq+np/t0 qrfPqVN1hFg4CwHWhxh6wYXzhQBkMVvqdyDEaJPTd5pqmY/FHnqdmJ9M32VZuA5OvVfSCoMhvnIV 1odVGUQIIdbhRCzruehELZ8bihSu1QG8grQ8kqNrFsqYWOhNWeP6Oyw0mxBCqiRGaLsuum61llhE wYK5Vr4G2xaxWOgmfbs6wE13VGUKIYRYSryn23HmWIOL1su1QYkaKSWOrEKWqfEZkYuJAvzjWzG0 yFpCCKmFxFBzx0VvbjW4aNbK7Fn3JA6tFv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hQhrE68aWGtBDToa/8WSRzkRAouFfzvXAAABf0lEQVS9uo1oCRRg QqxD2CoRjay10HEmqu9JDOj+5mOpx1kni4ICTIh12Km+aOCgI+E6PrXgrJM56bgseVQgFGBCSPnU M+jIkeZ+WfIoJwJYZvC5SCjAhJCScZ3qJ9Kc1FpQeBz4m5vFXj2dCO2FZ5MQUiauqKGZCagvGHzO TcdFn8HngqEAE2IF1qa1iDxd0vXWWtCss+RRbpZ6Ft+kTYUCTEj92D3oaNZm16llzg2BjutTXylZ 8igncqHHkkdlwHNKSM1Yq77IMxqqrkFHgbRnMPicG9cRCww+lwIFmJCasVV9kSvkWEvileMEHbWB h6HFJ7gRLPU462RJUIAJIUXjilrUV3b8jpoEg895YcmjMqEAE0KKpnqHSTiy4wSjCWsDm8MLDcDh rJPlQgEmhPgoQDyr1l8HHSe416FkyaO8LC0w+FwqFGBCasDaVq2AjLCqj02g6wR1QjL3Kje9Lkse lQ0FmJCqsTbt2VrDkuhE1TdkyaOcCIElBp9L5/8DVQnRDPkysQUAAAAASUVORK5CYII= " id="image17-3" x="-614.61957" y="-372.38272" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-00.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
555 <image width="169.33334" height="127" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAP jElEQVR4nO3dwZai2gFAUTurBvm8DP1Eh/m8DDLIoFZ8PgQK8KBo7b0yqK5GuIIt513Q/DmdLicA ADr/ePUAAAA+jcACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMAC AIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJ LACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA mMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACAmMACAIgJLACA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AAAMYEFABATWAAAMYEFABAT WAAAMYEFABD7evDx5/M5GQcAwMd4KLAul0s1DgCAj+ESIQBATGABAMQEFgBATGABAMQEFgBATGAB AMQEFgBA7M/pVH2XlW8cBQA+1bpeMoMFABATWAAAMYEFABATWAAAMYEFABATWAAAMYEFABATWAAA MYEFABATWAAAMYEFABATWAAAMYEFABATWAAAMYEFABD7czpdXj0GAICPYgYLACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgIL ACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgIL ACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgIL ACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgIL ACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgIL ACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAm sAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAAYgILACAmsAAA YgILACD29eoBAAC8r/Pob81gAQDEBBYAQExgAQDEBBYAQExgAQDEBBYAQExgAQDEBBYAQExgAQDE BBYAQExgAQDEBBYAQExgAQDEBBYAQExgAQAAAAAAAAAAAAAAAAAAAAAAAADAB/gfm8Fj1ALsE0sA AAAASUVORK5CYII= " id="image29-6" x="-445.28625" y="-372.38272" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-00.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" />
556 </g>
557 <g id="g513" transform="translate(1043.4871,32.342183)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-03.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75">
558 <image width="169.38" height="127.035" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg
559AElEQVR4nO3dsbarOJcuUNcdFfyP16Ef0WE/Xgcd3GB3uXwMkiXxAcJ7zlGBy1uWloQQy4A5f91u
560jxsAADn/7+wAAAC+jQQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBM
561ggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAA
562wiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQL
563ACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJ
564sAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBA
565mAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2AB
566AIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJ
567FgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAI
568k2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwA
569gDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbB
570AgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABh
571EiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUA
572ECbBAgAIk2ABAIRJsAAAwiRYAABhf6cqejxSNUHG/X5/mJdwLPsdV3G/71u/M1gAAGESLACAMAkW
573/ON+/7//IsX2U2p975BO7PJUjAPQQIIFLx6PldsJ3w6oq2XqnjnZ9mPz/T4SAHvnxLNlXal4ZusX
574XIcEC3b2TIl+/tvviFXPura3O5bVTXKEDqakslugQexXhEC31+Tjedj+Scief2o8nP+Ufyu8WslP
575/cv/rbe7rL9Sviv4lnpuDeNT6le96fb6Xz+yGuTbn1Lx9MZZimeg/lI9QINdEqz7JN9ZYUItB+DV
5761/UD3vLcWKnCispHVs+9leKMtNs7Pr3G6l+Ow2q0wXh64yzF01v/hn45BDCzwx4jstcZLM9B4XQX
577XuVXd5/Ugby33WD5qdqtVDLD8tUSwx5xJuq0/jO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RvZvqesJ29/Gm63N/7l97TVUCPbpSWeSzv5DNbP4D6333OKr07E0vur
606fx3Q225pD2lsoqv+5f9+LFCK8+MO/7HdSqfam1uqbMdKPctv9sH4u8qX4q/Uvzr/K0332nXcSvWU
6072i0lOgPzp2vdqI9t1zh0zedS/aV66olgu974t6x7y/+tx/M6FGP1987b7dv3rPWk8rqrnrH9erVk
608aj0Z2I8u6sI3ue+9VbrqbyxcWuIHPruclzsNyJZqUyEdGcPe5Y901rYrzfNnxrNlf4kUHrPrfB4Y
609n0i7A2WGyw/068j98fTxeSt/2DEo28THz868ZmZd6R6sx55XUur1N56gGtZbfynrH6hn+ebe47y3
6103vj3Ln/bf/5ETL7dW6K6xDgfIDUOe68PkThPPC6cEk/FV67nl3alBOv2crb/ts90KdW/69Rcnkr9
611+JHH4oJIpZ5H+YaPUr/2Hue99cZ/TPn5XXq7D+xH32rvM8epeZKN8/jjwlnxrKrM/0vv15d2yUuE
612P6fQ91tA964/ojfCgesOlxiHit7438q/vi59Nbz0+JR8a7/Imm2ezHZc+G3jw9KVEqw9ZsbbTZfD
613YWz5bGOB5Z8qe8vqfbU/PtZ/9T0wcp30x88IZ0+NtE+VgzfE1bf7q2/qS4uudWOsqsj6MBDnljUz
614IrietJSJdGfguLa3ScI42IyXCN/yhuexrfT+218/nqcpnaXobbfy2camx+JZVvj4597Y0tmXt/xg
615Wb6lvy2dainfWFtLPW+Lfr1fH1tcLb/8eO88zI5PRGTcSvX0So1PfX9cnVepcSiJjE9LnL3rxqst
616615v/VvW21v/9jpgfWgvn9peLe1G5kP7Urz3fnRdf91C/2r06+jdv/qHl8POGpZSgkUX4wZwdfc/
617HxJRKJVZ6mc8g0WWbxLDjBsAYyRYxznxCC05GGPcABhzpZvcAQAuQYIFABAmwTqOX92PiXek9ASE
618c0ds2frBvz/fY5yzFQJcyDckWL9zHT/+OUnHOCCr+Hng3n7171Szdl8bfaq/CXCWb0iwNrrochxP
619ES46DkGz3dK+dzwXrf+ZIv94+6Xn8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PgZZKT8Qf33cluXr/WqMv64+sJF5e2vbv1rGs/R++/7bvr/X5/OSdbWxnkf1fsd6
662E737UUuolf391jw+j8XNaql59fxUaY9o0JcvnZxgTWXgwAMczI4JDDsywZriHqxJPP58YodFHAAY
663I8H6g6QKJmcnBS5hogeNAgB8BwkWAEDYNyRY0/5E87t9HPbtBQDgor4hwaorHcUPO7qfHgARthcA
6647b4/wWJac96tLJECYLuTf0XY+yDBlqqWj7goPbVs9UGRvQ9eqz+QsOVRYWMPTuyKMzXOpcIfx6f0
665fks9W+JsrOdj5Z69BECXMxOs+pOOWx7EXP/s6vNtK++X6hl+AGn7g1h72+0qnxrn0vPZxup/e+rY
666TnG21POxctkVAL0mvUTYezxLHf9a6lmma9tb36O/qTJbPthVf6XwkdsXALbzoNHPlv80Uosv+3eE
6676lL3LR15/9PG05AAUCHBavK8lnRzFmRNZEyWl/a219li4IY/AKiTYHUo3dJ0W7tZ+/ecvvoOthcA
668QZPeg3WW1bMmvadSBrKrgSYiZeofr9TQ+KfhGNo/WI+zq8W3qurZVapdAL7SmWew3n5HttOpgtId
669VKvvr14tqscZCbu33a7yqXF+a3T1dUuct8KTMip1Dsd5a+jv8K9EAaDkr9ut9/dr/77+sgthZ4Xd
6702+5Fh3daEiyAX6L0vKE2fYcG92Dx2x1zJhWAX0WC9a+zjqxnPfSLJ0MKQJab3AEAwiRYAABhEiwA
671gDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbB
672AgAIk2ABAIRJsAAAwiRYwMXc7/fV18B29q+UGROsj1t0p00+XO1Fp+BFw97bclhKA3W/31f/NDaw
673Z037/Zwb8OWGa1h2HmLcSPn7xLZX5/Hj8Tg+Erb72Zrtm+9+v196W189fr5jC35HL7brXX8G6p9q
674nFPxzNavL3PmGazHP95et3xw59D6zBbPKb54EHq79sVD0WVsHGY7fzBbPO3q43/dfq0K7nT2X1LO
675PINV99z/36b76jeV18WiZfeolF9t92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AgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbB
718AgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABh
719EiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUA
720ECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRY
721AABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBM
722ggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAA
723wiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQL
724ACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJ
725sAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBA
726mAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2AB
727AIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJ
728FgBAmAQLACBMggUAECbBAgAIk2ABAIRJsAAAwiRYAABhEiwAgDAJFgBAmAQLACBMggUAECbBAgAI
729k2ABAIRJsAAAwv4+OwAAgOu6r77rDBYAQJgECwAgLJlg/c///lewNiBi8h1z8vAAxtTuwVpd+P7z
73093/vFsz3eB26Lxuxn65t79T//O9/HTwyy/ncEsDxcY7ZO87ZxqEUz2xxAr/WSoL1XKGe69TGNeuX
731LHnPbr7197DuH9PQf/7+72udcngdllPm4enz/zfsfQCzeU+wGg8GlTM0zz+9HtW6jjGvNbydL1lt
732t5LQlOL8GH/vMamlgz9lluMzEOfq+73jPNBupJ7nm8uhnmq79MZZqmfv7VKJsxR81/4ysL0GzuCu
733jv9qnKV4UttrLH6AN38kWO3ZVWWBXn3de4x5OxX0XAq7zgxVFujsGaZ6DR/HqjfOSvxd45wan956
734Vv860O5HY0OxJc7I/E+N52vTW9rtHYeB7Vgat1WleFLbKz4Pgd/p3wSrfR1pTCaWf5pzqVpdptut
735LvSl0y2lQ+BAnJViY+O896bprT++XW7lMxOpvkfmf3Y+tNtpAgS7HDdzbMDV/V+CteUSRrudcqzX
736apffPkvlb3veqf16LaPxpGBvu5W/No5zZRyy8TQ6bLts19Lf1fS6/STxYGQNeveXir33r1NcPX5g
737Ev+XYG28hNHY2PFnsErN9SZAlfornapfu3kaGM+uCj/WsxyHjWebhh2zXbYbq3n4EvxAWwOC8zC1
738Hc9y9fiBGfz7HKz2ezXGTHh98D9///ey1//zv//VNQ6rNWTiGzIwzqvjcKKdtsu5Jpz/e5ttXvW6
739evzAuf540OjAatKYW+x9dPmJvN7KM7aP19fGWm8p+bFYpUBlbF9ft8efirmx/Ja+33beLlu0NDE8
740/wfmQ4uP+8tA5Y3711hzR2Y5Miog4v0xDS3XVl6PW2/HsLc//bxIZVfLtsbK99bTHtt//vnVVeVm
7416uX4lMazN/7ecR4Yn7eDaL2/9XFe3umy93a5LY6dLU1sj3PLdmmZD6U4b4Xt1dtuqf7g/tW1X1T6
7422xVnSzCN8QMs/XW7Pc6OYS77nWz7hReJgoweAFO6r77rH3t+5yg+J9sFAAAAAAAAAAAAAAAAAAAA
743AAAAAKDq/wP4EB/RpJmzCAAAAABJRU5ErkJggg==
744" id="image382" x="-1201.4072" y="264.93607" />
745 <image width="169.3797" height="127.03477" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw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y+gDADV3cgnXEJ2hUmZvlbAap/Rt6
802SsIoTGb7Cyn3lEMHwCtd30W439imsnOkeaaco5XUM9WVdlsNx/MR+wUAm94QsLpJY1L38+O8Niql
803yjnUsmts8yVPaZ6pOp4NxwEA7umCebCO++CM+paibzvGuuR4mr4BgAu9YSb3ws/RzdXu8HncUIc7
804VHvVnorddqcAoMQZXYSz1ouSwc6r60ctj9puYWnLcmZPzeY42MwW4fUpLyczw0JtPfP1mb02M/NF
805qj5P6UUF4JV+dV3tKKW/j32RHgB4utlkQ4m16gLPG7oIAQBuRcACAAgmYAEABBOwAACCCVgAAMEE
806LACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQ
8077PfVFYA36PurawBxhuHqGsDzacECAAgmYAEABBOwINgw/PkvZLU91di5wjnVeD1HAL6TgAXx+n57
808VFbJOlNjIPuSD+z8bn7JQTiN4wnhDHKHxxgD2TAEDKs3MP8cjjN8JwELnqfvf2SsafPD7ON8fGp1
809eWrlbhHmUuWsym90+VSm/tM6zFZe7kJ4/UvKmYXd5T+XlUzVp3a745LZVtrKWT0lgGYCFjxb5gM+
8109bjrfnzW7iknX5/pJlLl5wPKas1LVgup/55yxtoue99Wy2nY7uyFY4SqKid1PIGdjMGC16r6yMys
8113PzR2/DCfGw6rRq3Kudu9QdKaMGCx4saoXz0SOfV8pc9XNP1L8kEVcdh2mjUUOEjdtCIdbgDAQse
812L+RDenXwUKxUPcd0Mltn2eF1jqe39Dy9/vAOugiBW/jMWzELdqtjmADuT8CC58m068zGlTeXHyJT
813zuzLaxn7M9ael5e89lPDe44TF0/hKroI4TFWv9s/yx+pp1a7/6a9crOVmz+YU+Wk6pmp/6zM1V0r
814KadqmoaS+hSqmgEhartt5WRGwgFtfnVd3X3056XbD/4+gkR82ZwOoGQ1drpnw9LNua/zbaZ5pk/e
815MuouDC1YEKy8zQCAtzIGC3gzQRa4hIAFABBMwAIACGYMFgQzyB0AAQvi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gW0gQiYoygZHo0M5N4JtpwQI2PL2ZJx+htGMBRxCwgA1PjyBVfYgAIXQRAts2u9Ie2tEm
872XQEHEbCAIg8arpSp5/Qp6Qo4ji5CoNS0r3CWt2ZfzVsuLym5W8zIMH2QL2o2d8Pq4y79bUeAWL+6
873ru4WM70juUMBAE+Xmjnvp7rAo4sQACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBA
874MAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEEzAAgAIJmAB
875AAQTsAAAgglYAADBBCwAgGACFgBAsN87X9/3fUg9AABeY1fAGoYhqh4AAK+hixAAIJiABQAQTMAC
876AAgmYAEABBOwAACCCVgAAMEELACAYL+6LmouKzOOAgBvVZeXtGABAAQTsAAAgglYAADBBCwAgGAC
877FgBAMAELACCYgAUAEEzAAgAIJmABAAQTsAAAgglYAADBBCwAgGACFgBAMAELACCYgAUAEOxX1w1X
8781wEA4FW0YAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgA
879AMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiA
880BQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACC
881CVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsA
882IJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOw
883AACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAw
884AQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEA
885BBOwAACCCVgAAMEELACAYAIWAEAwAQsAIJiABQAQTMACAAgmYAEABBOwAACCCVgAAMEELACAYAIW
886AEAwAQsAIJiABQAQ7PfVFQAAeK5+dakWLACAYAIWAECwyID1n//+K7A0IMTNL8ybVw+gTW4M1uqN
88775/f/z6sMu8xPXQvO2KfXdu/U//5779OPjLL87mkAufXs83R9bzbcUjV5271BL7WSsAa71DjfWrn
888PetLbnnjbs7297TdP2dD//z+97OaHKaH5ZLz8PLz/xuuPoC7mQeswg+DTAvN+NT0U63qM2Zawqy9
889ZHW7mUCTqudm/Ws/k0p28LPO8vg01HN1ee1xbthuSDnjwuWhvtX7UlvPVDlHv59d7LgAAAJbSURB
890VC+ZeqYqX3W9NLxfDS24q8d/tZ6p+kS9X231B5j5EbDK01XmBr36uPYzZtYUNN4Kq1qGMjfo2Bam
891fAmbx6q2npn6Vx3nqONTW87qsw3b3dR2KPbUM+T8jzqe003v2W7tcWh4H1PHbVWqPlHvV/h5CHyn
892vwGr/D5SGCaWT93zVrV6my63eqNPNbekPgIb6plZre04H/3W1JYf/r506ZaJqH0POf9jz4dyB50A
893gbsc7s51A57uT8Da04VR7qCMNS12+ddnav3uyJHa076MwkbB2u1mni08zpnjEFufQqe9L/uV7O9q
894vC5vJG6sWYHa6yXj6OvrEk+vP3ATfwLWzi6Mwo2d34KV2lxtAMqUn9mpfN/NqOF4VhW4Wc7yOOxs
895bWp2zvuyX1vJzV3wDdtqEHgeRr2PV3l6/YE7+DsPVvlYjTY37B/85/e/l3v9n//+q+o4rJYQU78m
896Dcd59Thc6KD35Vo3PP+PdrfzqtbT6w9c68dEow13k8JscfSny6fm+a2MddvsX2vbesmam6tlVsgc
8972+nj8vpH1blw/T373h38vuxRsonm87/hfCixeb00FF54fbVt7syUI1EBIebTNJT0rUw/t2afYbOn
898Pg+i0tVyW23r15ZTXrd//vetq8xg6uXxSR3P2vrXHueG4zP7EM3vb/44L0e6HP2+dIvPzpJN7K/n
899nvel5HxI1bNLvF+1202VH3h9VV0Xmf2tqmdJZQrrD7D0q+uGq+twL8c1tn1hJ1EgRw+AW+pXl/qx
9005zmf4vfkfQEAAAAAAAAAAAAAAAAAAAAAAAAAyPp/bzD23bYiiR0AAAAASUVORK5CYII=
901" id="image394" x="-1032.0272" y="264.93607" />
902 </g>
903 <g id="g557" transform="translate(1003.0351,-73.34192)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-04.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75">
904 <image width="169.38" height="127.035" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg
905AElEQVR4nO3dO5bjOLYFUOVbadTw2tQQZfbw2mjjGdGlUvIDAeAhCUp7rzKiFBRwCfBzgpSYv263
906xw0AgJz/O7sAAIBPI2ABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
907AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
908AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
909AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
910AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
911AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
912AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
913AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
914AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
915AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
916AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
917AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
918AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
919AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlY
920AABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGG/Uw09HqmWYF/3+/1he4Vt
9217Edc3f2+b/uuYAEAhAlYAABhAha8c7//77/IYh/v6iNw9fonPmx14Dpin8GCT7b4WZP7/Y/Xf35u
922Op9NFt7yiZZJMZVdz9+y9nqq3yav4/PsZW3QJpU8/zc4yB1S8wJcjYAF53kmgONPqI/HchZce/14
923a4Hpdlt9fU3r8icaZ/yBbQQsGMxPAnieZSfh4Gl+RWd+8WNx+WCda/2+/vawerKa6m+dl+5iWutZ
924m5Tb7Mrf2luAXrsErLu/wGCL16ssr7e6Fq/ErF0GK1wBiihcfmuqv6m7YzTV3zovW4ppref1UFwY
925/7Wf35fmUM/1HPZ4kb2uYHk+CsO6wFmhZvdpui92sL27br0S1rr8JQ5flStSs7X3rq/jPJdz5PHf
926LUK4iOfJsukT6EPpq2d+96r14tCFPoPVpHU89wxbwISABdfx+rW4tyfC+S2h0/WdvNe+nvmTOL82
927EHTM79eOFZzBc7Cg11mnq8fDd80ABidgQa+DI86W7gZMY1seGPa0U9AccLjK1gourMjl1hGuxi1C
928OE/TN/knYWKy8PwTWpPv3k++ULbYb8eTBeo/GVauv7x8TZAqtN/xIffFD34tttM6LwWL41/Tb+vP
929lfUAG/y63TK72Z9HM//KOuNq3j4rHxHkSUJ8E8d5ruh1u937Mq4rWPBOx1fVAPhuAhZfx5/dsJ39
930iOtbu4SV2bZ9yB0AIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgT
931sAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwjnO/38fs96zCWl2lzlZ7r9dO
9327X/qdJzOwO7qY46HV3G/3792SE8OWPc/TX51VlURqfpb27n6uO2tYzwX39J61Lj6vIxW/9WP2pcu
933/nad+q9SZ8op61s+jz8ej8fjcXxVIzg5YD2H/pvn4HRXGflT6lzrNFjM3ut1lflt8pEr9aNv1b4t
934SezngzetnTiPr/l9dgELnkeKnx9qJuz14PK6fNPrzxcfj8ek67V2Oup/7aWynspx6Oj37cKV/T5H
9357Fa3XvPuKtdu0nhrv4Wm5st36JjH+vEvrO/bkjbOb01TW8Yzsr6Trah+o6rvN7X86w9vt4ea9ps2
936hsX6J9311d96XO2os2l7WKvztj502/eXwvJN47O2vmvz1TEvHceTXbWex8c3YsB63bxqli9scE2v
937z7t+boJNB+5C/ZODV7me1nFo7ff5rsWLumv/u6hpvZpaLtTZ2u/a+HSs76K+eWwa/8I8rtk+v6nt
938eU12feu19ptavnV7qGm/dSeteUtwP1o8rnbU2bTKZx0PU+ed1PqeuH+9/tC9faaOz6cYMWBttPfo
939b2l/7ZC6oZz+foPvPWuLj9SWKn7wedyjzZH3tSP73Xu/HmHeRzirjbCrHjlul96/asL027df3ScE
940rMf6lef534Ll11vbT2mqZ2/B9T1lvTrqT9U51Dyu+bbtOahmvSZ/be9ZTpvWeT9xPxrKAfvL3lq3
94121N8wDjPfULAur2E5duf07M2VX1/hew0/fNLoNn2O6TW99wrEN2Xpvs6HXAe1+y6Pe/U5gia1mvv
9427eHR/gGa1nnvW/7z7L2/7O0qNV99nOc+6jlYj8djfgf9Qu2P5urre/X69/Zh4/O6Lh+zUm/9TGLH
943W17DWXncP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sAIEzAAgAIE7AAAMIELACAMAELACBMwAIACPuKgHW/388u4Q/3+320kr7B1cf86vV3
972+9oVLztrWOL9ftv8th7/s+PzbaN9rjMD1mSmP2ni73+a/OrxeDwej7NqG9wnbQZbfNs4XH19964/
9731X5rO1eZl471WnzL3n/9po7/B9S5X+Pf4yuuYPVtzVu2sOcuJEvBRsfvvxzplCPkWqcDHq4XSxqw
974TuZ+n13AsteD43NL+sn+z1+9ff21qdcXC8uvNbLYzt5+6lz838L4zJcvj89a1/P2C/0+X3kdpfJ8
975Ldb52mBNv63rdVuZ4qb1rWm8ss7yeC5uck3tROa9o/74+m7ff1vXd9JdX/1N+8vbIrdvD4V29uu3
976ppfW+b1tGP8OweNPffuvv9qyPd8a94sDxvN7jBiwyge4pp9vL0extS4mQWSxkdR6vf7Q3X5hfGre
9778nb5clBbXGyyQN+QLvZS7rd1yt7Oe+X6vm28ps615dfGobWdws+71h9c39ue+29qfju228JuMpfa
978Hmr62qPft710zG/NevXVMxfcv15/WHtjzfmrqc5JkW/b2Xs8v8r5AWueNt4ea+pfb20n+5bFFk7Z
979Lrf0eNZ792h/7RQe6atju211wHa+X7/BjWGP7eqssd1i73Fu6vfg9rfsjylNXawd/4/ckOrjGhHn
980B6xF9UGbVlcct723h8X2H3V3cN62c4Cz9pfWfoc6uLfO74dtD5fr98TxP+X4c2I7pJwcsF4vY85f
981fP7vMcU8QjfUidt1Ogrb2+vG2XHLKVzourM216Z+9x6fjv23aX67lz/YB2+HZ+2PZx1/WjltjeYr
982vkXY5PF4LG6m9/v94L8PXk8Y/jQ50c8mYQouYW3/ffuW13BW3u9sD+cy/lzFyQHreShcOyYevxfd
983/3Zwv4t+jiMdH9sK1r+lqbfv7Wh816mZXEmNtHOwPbquabOp3/3Gp37/LSyzuN9trPmUTeKTtsNB
9849sfDjj97NDXIee17jPgZrLW/JjusfXFjbeHytzl26rds/t7JmLyG1Mi41bS/WFi5qco655+06Oi3
985yVo9rf22jn+5/fpPnKTGp9DO23lsrb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lic34Lu/bS+
1027zvrp6Gg/eJwBqPTrdmv9/tH7Zb75g0HQ57C9ZvDdc/DygEsrPOelQtuh6WIfcodP4krJD+MAfJ7m
1028gLUW+BwVodUpYWLABDNgSQAbXelD7gAAlyBgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYA
1029QJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGG/zy4AAC7lfj+n38fjnH6/TmacXcEC
1030AAgTsAAAwgQsAICwL/0M1v3lDvqj9672/c/b8Fva6X4vAAN5PKaf0Jq/ckGT85TTVo0vuoL1zEM/
1031W8bTfcOmn2pnUbxBAHYRTxtjxJfX01DTKcn56/Y9V7Aq43bkylahnbftv9b5E9r8lQAwtNdrVPf7
1032H/87+fnpNX8svj5p5wxbzpvOX7cvCVjlaX7+KnUJdK2dt+3PX7GNAgytMgZNFnv+79rrt5MzVuX5
1033qHBec/76/FuEu07w/cXrVlXz3rfp6rmYa60AI1oMQD/BaO23ZZPln00dK3Xe/PLz14dfwSpvJc+J
1034796S1pJ76yb19hrbl/8dADCcQn5avPi0eAx/RqimpvZUON10nIy++fz14QGrPLXPO3fZTueXTN++
1035pVzn126dAONqjT6FCHW7rcasw+8SZiPRN5+/Pv8W4VUuUa7V+c1bJ8DQgrfw7veF1k76DFbhvNl0
1036Sv3y89fnB6xbcYPYO3sV2p//al7nl2+dAKPry1jPtxTee+q3CLdfm3D++vBbhE+v1zxft5u1n291
1037H8wqfD21r/3XOm2dABdQc69wksMmXxWcv372Mxpu6/cKa85rzl+32+1X6l+N/nMLMbIAfKizoo8T
103862Z1X0fLjPNX3CIEADjSt9wiBIAMV5Ko4AoWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1039hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1040hAlYAABhAhYAQJiABQAQ9nundu/3+04tAwAMbpeA9Xg89mgWAOAS3CIEAAgTsAAAwgQsAIAwAQsA
1041IEzAAgAIE7AAAMIELACAsF+3297PrPLEUQDgKjK5yBUsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1042ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAI+3W7Pc6uAQDgo7iC
1043BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiA
1044BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiA
1045BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiA
1046BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiA
1047BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiA
1048BQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhGh1u2IAAAR7SURB
1049VAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1050hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1051hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1052hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1053hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1054hAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEA
1055hAlY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AAAAAAAAAAAAAAAA
1069oOj/AZvLm3jv9XPLAAAAAElFTkSuQmCC
1070" id="image539" x="-1160.9553" y="563.78479" />
1071 <image width="169.38" height="127.035" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAg
1072AElEQVR4nO3dzbajOJoFUEevGOTj1dCP6GE9Xg1q0IOb5SQAyRIcfr336tXrlgNLH0KGY8Dkr8fj
10739QAAIOf/ji4AAOBuBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1074ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1075ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1076ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1077ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1078ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1079ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1080ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1081ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1082ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1083ACBMwAIACBOwAADCBCwAgD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
1111BWv+Gc9l7337hvnc3mPXkK7paP3CGwXWsx2GPlpwT87l1rHLkZcIR5NyeGF79tv2Fu2v73d6Z0Op
1112/TX1l+oZnp1e1m/7nRlbrNdjbtymJY2+2Q+77iqj0k57ndNqp8uP3lvqd/b11Pz8WH9wfWcbbDd7
1113Vaj389tS5/S9s1ejurbLbMsL1nf2f9ZdYj731jnN/S1jst1+LPi56/28bPq5qIjsl1r+bqznun49
1114Hr2/Lfrn742+acECZuMyxi0lO5Jfu12WBSxY6Vl4rsSf+qbizW9y596+55tQlnGLi+QA2+XxZWc4
1115uDcBiwuz813GuMVFhtR2+WEcuIez3+QOAHA5AhYAQNidA9ZRv//cud/13Z3kh7InKYMf8c3xscFU
1116j2ebSGerh3M65zxZ//CRb+YerFapH7O0/1b2rkrPm9i/kjXOth3P9mOrs9XT62z199ZTmp9d83b2
1117ZvPR53f4+uyv/0rLf+z6VOMPCwhYe+t6Xs4+dt6RlfbI13LC7Xh1qclwtkl1SD2l+dk+byuPS+h9
1118jILHLrS4+rBcvf4t7BSwSt+EKg/ca2+n8S0tD3yrf2Obfvmr1LPpepUar4zzcJnpKrS0s6DOBbq2
1119V6mF0vr2jk9kfadHlNkv943ba7b94R9rtlfXvFpQz8cu1vSbaic4nqVGSvu94P7nulLrm9oP9B6n
1120SsvX26ms7PQZoV3H0wXPFStNzt76N92vXsIeAas+0O3nM5ZNlGn79Q/S9PXZfz1wvUozdcH4POa+
11210faOT1DX9lrTeEs78fX9mHSXtb9gfn4sb828KtUz7WK4QPs8rFvfTmo8S/U8Oud5tp7FdjsQbr2+
1122qePIguW75v9jMhTviBM57jQW37Jepfo/tr+mzks4+BJh18gu2AxH7XH23Bk1Tus1XWza/mn72rqY
1123M+9WNppXa1Y5NVxnGPbGZLa+kY30noG4+hmL3ppLy0fWfc/jzstDX9e52D1YW4eJXql6Nm1n+KVn
11245deFo8Y/0u+r57/GFez3wPYvbcH22rSdrZ1wfo56eRfWuzO50xmLMwT9lu1++PfDynHne/Z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lp9ustn93vCPj0Fnzf6hZfne/V5lfSv77dn5/LH9
1139rsLa26kfX2h30oDV+w24VynidC1/oN56jqo/vo16l2nfbXV5x5099z47dBQZ85WNr9leqTmzuICV
1140tj6TFBGP9bPtTz9ZC77gHb6ffF3zPwtzlTrP76QBq7SBt97wLTv3k0++037hKAXlLdrfwc7p6see
1141J+TeXpMrlR+V6rx6/VnTqzC9GWLPM21Dh2zHit799hnqb/xyWDrrtm1xf5axW1/3c9KAdYgDJ/G3
11428aFd4PCdbHtMmV3mKvXvVuewqtHrp/2a9DjlfvLwM1U7u3r938ODRm/lzPtlNjK8DLHp0e71em10
1143yXUfV68fuJb9Atapdm0fKzlPqe0q6erMq7Pp5aT6fdCj13cYpVQXo3Z+PlwbxeuVNc++fc9riGva
11443HpKlNo/1d6yorfIE37ENi1pZeMtn+vGLq4yo27myEuElRsAp8ePelOlH5i0dD28AWL4Yu/Ena1/
1145+k/tywdvkPy4vi2vV+pfXMz6eurt77lbaal/TT31dro2R9fnpXc+9I7DgvHZrf7Re0v9Lq6nZX0b
114695Ptt201bq8t6m8czy5r6m/vtH2/d+x8bhc8vlDy6/HovXr9z98LvjGf4RrWGWrgEN+w6b9hHYEF
11477Bwqnn8+nKKwVN/o7X0Gy9blQHedfr6JAh/ZOezsG39FaJJxM6Y0wNn4FSEAQJiABQAQdquAtf8P
1148dP3wdQcnH+TZJ0EcUgkA53G9gHWqx5yc8OEiZ6tna/s8vwoAulwvYFV8238wgccpN+IJSwJgZ3v8
1149ivDn8RLTB10+Cj8vLy1ffxpb19M+6y821vP+n+sfLrKg30ojlaFobKd3e71fKT2Acbpeo+4+1tk+
1150DvV2Kgs31l8vpn1eAXBjOz2mYXQQfRX+C+Gzx+D337Pveis927p9+d56UlL9lta30n5LSS3ba7TA
1151O6J19ZsahwXr21V//Xl0XfMKgLva6RJhKeJ0LX+go+r5qn4vNB/eWgo7bfEAbOfgB4223J7s+PTj
1152DGErcjv58OTQ9OzO+vZv3A4AV3FkwNro4M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
1194AIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQJmAB
1195AIQJWAAAYQIWAEDY75Xvfz6fkToAAG5jVcB6vV6pOgAAbsMlQgCAMAELACBMwAIACBOwAADCBCwA
1196gDABCwAgTMACAAj79XiknmXliaMAwF315SVnsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAEL
1197ACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIOzX4/E6ugYAgFtxBgsAIEzA
1198AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1199AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1200AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1201AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1202AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1203AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1204AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1205AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1206AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1207AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1208AgAIE7AAAMIELACAMAELACBM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afjUxrP
12223vp7x3nB+IwOovX1rY/z9E6XrbfLY3LsbOlifZ1rtkvLfCjV+Shsr95+S+0HP19dn4vK+nbV2VJM
1223Y/0AU78ej9fRNZzLdifbvvAiUZDRA+CUnrOv+o89jzmKn5PtAgAAAAAAAAAAAAAAAAAAAAAAAABQ
12249f+dHPt315dAmAAAAABJRU5ErkJggg==
1225" id="image551" x="-991.57532" y="563.78479" />
1226 </g>
1227 <g inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/install-05.png" inkscape:export-xdpi="75" inkscape:export-ydpi="75" id="g658" transform="translate(-4.0751145)">
1228 <image width="169.38" height="127.035" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAZ
12293klEQVR4nO3du7ajRrsFUPUZHfjx/lCPqNCP58DBCWTLbC6lqmIhQMw5HMgSqvoobmsDon/dbo8b
1230AAA5/7d3AQAA30bAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1231wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1232wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1233wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1234wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1235wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1236wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1237wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1238wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1239wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1240wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1241wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1242wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1243wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1244wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1245wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1246wgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAA
1247wgQsAIAwAQsAIEzAAgAIE7AAAMJ+pxp6PFItwbHc7/eH9ZtvZz3nau73bdt3BgsAIEzAAgAIE7Ag
12487X7/579dvj7b4BbTpyqMn6bf+rz/Xr51vuBLCViwgcdj5rbEpQPk6P3Z7xa8Alk8mW3h4OW9dKTS
12492a+0LpGzjA/wTuwmd2A35UDWeufy2e903qX+x2M+Gy2939cFcB4CFny159F9eGy+338c9UeH7en0
1250t5+nVZY+env4f01Z7mJU6lK/5V4q53e2/UKdHfUUiqzvt/zmtJ3C8gU+ZZOAdXeWGw5i9gzK8xg8
1251fT07/WiCpe+OJputZGmy2XYK/ZZ7qZ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c+mvzEK/s+8X2pntt6ad
1293tzPbYan91nGonN9IPbfqcehbDyuXV7m1Qvu3unGuLLW+/WlhTfPVtN0ttf/J5Vjffn07w0oi+5/W
12946SPjWS+1XWTrTG3X66W2u746648jS6b5vm+7fjvl63/fNn58v2631t9H/Pd6aYg7/iKHl2uuP9ec
1295a1pZT9hFX8A6oPvPh0Q0frttlvc/gwVD591uO3zfX2xswXrC7r7yDNPWBCyO5VLb7aVmlm7WE47A
1296etjqxDe5AwAck4AFABB2iID1HT/InPrW+QIAyg4RsCI6nsC09CSnpqakKABg5BABa5db55Y6DRbj
1297lkAAuKb9f0U4+/Sz2Qck3hZ+rlx4WlrqZ6Wt/ZbfnLazNL8AwBntH7Bmn0U7ehTY499/C3P2QWez
1298nxamb9Xa79J8FepZeg0AnNEhLhFOVT6Df30jqWKO3wUA8DH7n8Gq1/qvvN0O8A+4AgAXdKaAdRtc
1299lbtVxKzpJbm+TlPtAAAXcdBLhGWPx2OLf+0cACDiTAFrTaI677XC1udyAQC72/kSYflJByPlf817
1300eofW6NkHw+8u9Tv7fqGd2X5r2nk7swDAef263doO88NUsPRAAQ8aAACOZvRQpMZvtwWbM10iBAA4
1301BQELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACA
1302MAELACBMwAIACBOwAADCBCwAgLDfexcAAJd0v+9dwWc9HntX8FHOYAEAhAlYAABhAhYAXNXFLtt9
13030kXvwboPrnw/elev+8/L52va6f4uAN9peFxYebfW43G5+70O4EIB65VjRoFmTb5JtTNL8AK4llcS
1304GkWi7RLSRs2KdNcJWJVhJXJmq9DO2/aHdT4eDxkL4CoqQ8nsma3nd18fDd8fvhi1P32z0M5S4Jut
130559nItTPWJQJWOaa8Pkqd2Vpq523703dkLIBLKMeRyqAzfT17PmzY7PT4stRmTdnD/718xvr+gLVp
1306QJk9I1XZ3dt09ZpMxgL4ZpEgkooywUh07Yz15QGrHE1e8Sh+D9a9cX16e45NxgL4TmePIOVj04Uz
13071pcHrHI0eV25y3Y6vRT49ivlOqUrgK919gjSdA3xSr7/OVjP7LJ3Fe8t1SldAXy52Xuhhk56FLhw
1308urpdIWDdihlr6+xVaH/60bRO6QrgEt5mrOMo1Dn86Nrp6vb1lwhfhtfghjlm6fWt7saspZvcu9sf
13091ildAVzI8FrhKG+Nfpo3fb+m5dH05Sc4LLVQeD1s5PLp6na7/brd2g7hP0dyPgFIBgDwxtUiyAGC
1310wZqfo7XmpUtcIgQA+KSrXCIEgGM5wBkdtuMMFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQtvYx
1311DcPHlK8uBgDgG6wKWEIVAMCUS4QAAGECFgBAmIAFABAmYAEAhAlYAABhAhYAQJiABQAQ1vwcrH8f
1312LDrmkVgAAE/OYAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYc2Paah0X3qcAwDAt9skYD08FAsA
1313uDCXCAEAwgQsAIAwAQsAIEzAAgAIE7AAAMIELACAMAELACDs1+229TOrPHEUADiLTC5yBgsAIEzA
1314AgAIE7AAAMIELACAMAELACBMwAIACBOwAADCBCwAgDABCwAgTMACAAgTsAAAwgQsAIAwAQsAIEzA
1315AgAIE7AAAMJ+3W6PvWsAAPgqzmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1316YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1317YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1318YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1319YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1320YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1321YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1322YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1323YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1324YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1325YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1326YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1327YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1328YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1329YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1330YAEAhAlYAABhAhYAQJiABQAQJmABAIQJWAAAYQIWAECYgAUAECZgAQCECVgAAGECFgBAmIAFABAm
1331YAEAhAlYAABhAhYAQNjvvQsAADiv++y7zmABAIQJWAAAYcmA9dff/wu2BkQcfMM8eHkAfUr3YM3u
1332+P74/edmxXyP4dB92Yg9Z239TP319/8+PDLT9bmmgM/X2WfrOo82Dkv1HK1O4LJmAtZrD/XaT63c
1333Z11kl/eazdH8fmz2P9PRH7//PNcph+Gw7LIe7r7+X2HrAziaccCqPBgUztC8Phoe1ZqOMcMWRudL
1334ZvstBJqlOt/W33pMqpnB5zTT8emoc/b91nHu6DfSzuvN6VAfarm01rnUztbLpVDnUvFN20vH8uo4
1335gzs7/rN1LtWTWl599QOM/AhY9emqsIOefd16jBmdCnrtCpvODBV20NkzTOUW3o5Va52F+pvGOTU+
1336re3MftrR71t9Q7Gmzsj6nxrPYddr+m0dh47luDRus5bqSS2v+HoIXNN/Aat+P1IZJqYfHXNXNbub
1337rje7o1863bJ0COyoszBZ3zhvvWha248vl9vymYnUvEfW/+z6UG+jFSA4y3FHrg04u38C1ppLGPU2
1338yljDZqd/fS5Nf9vyTu3htYzKk4Kt/RY+rRznwjhk66n0seWyXs38zsbr+pPEnZVVaN1eCrbevnZx
13399vqBg/gnYK28hFHZ2efPYC111xqACu0XZqp87ealYzybGnzbznQcVp5t6vaZ5bJeX8vdl+A7+uoQ
1340XA9Ty3EvZ68fOIL/noNVf69GnwNeH/zj95/Tuf7r7/81jcNsC5n6unSM8+w47Gij5bKvA67/Wzva
1341etXq7PUD+/rxoNGOvUllttj66PKsvNzLq7a319f6eq+Z8u1khQkKYzt8XV9/qubK6dfM+23j5bJG
1342TRfd63/H+lDj7fbS0Xjl9tXX3SdTjkQFRIwf01BzbWV43Bodw0YfPV+k0tW0r77pW9upr+2Pf391
1343VbiZejo+S+PZWn/rOHeMz+ggWp7f8jhP73TZerncJsfOmi7W17lmudSsD0t13haWV2u/S+0Ht6+m
13447aIwv0111hRTWT/A1K/b7bF3Dcey3cm2C14kCjJ6ABzSffZd/9jzmKP4MVkuAAAAAAAAAAAAAAAA
1345AAAAAAAAAABF/w+B/c/UXnPWXgAAAABJRU5ErkJggg==
1346" id="image640" x="-153.84512" y="683.60748" />
1347 <image width="169.38" height="127.035" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAI
1348CUlEQVR4nO3c0ZKjKhAAUHcq3+hH8pX7kHtTLGgLaoJmznlJVGxbmap0AeM0AQAAAAAAAAAAAAAA
1349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1378AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1379AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1380AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1381AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1382AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1384AAAAYJC/HlulbQuPF2AAAAAASUVORK5CYII=
1385" id="image652" x="15.534883" y="683.60748" />
1386 </g>
1387 </g>
1388</svg>
diff --git a/public/assets/dfd-rice/layout.png b/public/assets/dfd-rice/layout.png
deleted file mode 100755
index a44d2cd..0000000
--- a/public/assets/dfd-rice/layout.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dfd-rice/layout.svg b/public/assets/dfd-rice/layout.svg
deleted file mode 100755
index 5a9031c..0000000
--- a/public/assets/dfd-rice/layout.svg
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg width="210mm" height="297mm" viewBox="0 0 210 297" version="1.1" id="svg5" inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" sodipodi:docname="layout.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
5 <sodipodi:namedview id="namedview7" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" inkscape:zoom="0.08" inkscape:cx="1143.75" inkscape:cy="1893.75" inkscape:window-width="2305" inkscape:window-height="752" inkscape:window-x="873" inkscape:window-y="136" inkscape:window-maximized="0" inkscape:current-layer="layer1" />
6 <defs id="defs2" />
7 <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
8 <g id="g2012" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/dfd-rice/layout.png" inkscape:export-xdpi="6.6072011" inkscape:export-ydpi="6.6072011">
9 <rect style="fill:#e6e6e6;stroke:#303030;stroke-width:0.447874;stroke-linecap:round;stroke-linejoin:miter;paint-order:stroke fill markers" id="rect1454" width="1360.1339" height="1074.3162" x="-360.50458" y="-265.69751" ry="0" />
10 <rect style="fill:#e6e6e6;stroke:#303030;stroke-width:0.261189;stroke-linecap:round;stroke-linejoin:miter;paint-order:stroke fill markers" id="rect1456" width="1058.4567" height="469.50305" x="1025.9943" y="-265.79086" ry="0" />
11 <text xml:space="preserve" style="font-style:normal;font-weight:normal;font-size:51.606px;line-height:1.25;font-family:sans-serif;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:1.29015" x="1407.4224" y="-12.228849" id="text7667-3">
12 <tspan sodipodi:role="line" id="tspan7665-6" style="font-weight:bold;stroke-width:1.29015;fill:#4d4d4d" x="1407.4224" y="-12.228849">TERMINAL</tspan>
13 </text>
14 <rect style="fill:#e6e6e6;stroke:#303030;stroke-width:0.289748;stroke-linecap:round;stroke-linejoin:miter;paint-order:stroke fill markers" id="rect1458" width="1058.4564" height="577.78894" x="1028.7416" y="230.8085" ry="0" />
15 <rect style="fill:#e6e6e6;stroke:#303030;stroke-width:0.447874;stroke-linecap:round;stroke-linejoin:miter;paint-order:stroke fill markers" id="rect135" width="1360.1339" height="1074.3162" x="-1747.0968" y="-265.69751" ry="0" />
16 <text xml:space="preserve" style="font-style:normal;font-weight:normal;font-size:51.606px;line-height:1.25;font-family:sans-serif;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:1.29015" x="-1214.8931" y="290.24585" id="text3280">
17 <tspan sodipodi:role="line" id="tspan3278" style="font-weight:bold;stroke-width:1.29015;fill:#4d4d4d" x="-1214.8931" y="290.24585">BROWSER</tspan>
18 </text>
19 <rect style="fill:none;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" id="rect31" width="3834.2903" height="1074.2903" x="-1747.0922" y="-265.69287" ry="0" />
20 <text xml:space="preserve" style="font-style:normal;font-weight:normal;font-size:51.606px;line-height:1.25;font-family:sans-serif;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:1.29015" x="121.84438" y="290.24585" id="text7667">
21 <tspan sodipodi:role="line" id="tspan7665" style="font-weight:bold;stroke-width:1.29015;fill:#4d4d4d" x="121.84438" y="290.24585">CODE EDITOR</tspan>
22 </text>
23 <text xml:space="preserve" style="font-style:normal;font-weight:normal;font-size:51.606px;line-height:1.25;font-family:sans-serif;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:1.29015" x="1410.1696" y="538.51349" id="text12264">
24 <tspan sodipodi:role="line" id="tspan12262" style="font-weight:bold;stroke-width:1.29015;fill:#4d4d4d" x="1410.1696" y="538.51349">TERMINAL</tspan>
25 </text>
26 </g>
27 </g>
28</svg>
diff --git a/public/assets/dfd-rice/script.png b/public/assets/dfd-rice/script.png
deleted file mode 100755
index 09be37a..0000000
--- a/public/assets/dfd-rice/script.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/benchmarks.ods b/public/assets/dna-sequence/benchmarks.ods
deleted file mode 100755
index 62a8e30..0000000
--- a/public/assets/dna-sequence/benchmarks.ods
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/chart-1.png b/public/assets/dna-sequence/chart-1.png
deleted file mode 100644
index c017e43..0000000
--- a/public/assets/dna-sequence/chart-1.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/chart-2.png b/public/assets/dna-sequence/chart-2.png
deleted file mode 100644
index 80b922b..0000000
--- a/public/assets/dna-sequence/chart-2.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/chart-encoding-speed.png b/public/assets/dna-sequence/chart-encoding-speed.png
deleted file mode 100755
index 7fb106d..0000000
--- a/public/assets/dna-sequence/chart-encoding-speed.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/chart-file-sizes.png b/public/assets/dna-sequence/chart-file-sizes.png
deleted file mode 100755
index 31bfa66..0000000
--- a/public/assets/dna-sequence/chart-file-sizes.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/dna-basics.jpg b/public/assets/dna-sequence/dna-basics.jpg
deleted file mode 100755
index c2e7f52..0000000
--- a/public/assets/dna-sequence/dna-basics.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/quote.png b/public/assets/dna-sequence/quote.png
deleted file mode 100755
index 09fb01c..0000000
--- a/public/assets/dna-sequence/quote.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/sample-binary-file.png b/public/assets/dna-sequence/sample-binary-file.png
deleted file mode 100755
index 1e4622a..0000000
--- a/public/assets/dna-sequence/sample-binary-file.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-sequence/sample.png b/public/assets/dna-sequence/sample.png
deleted file mode 100755
index 30f12da..0000000
--- a/public/assets/dna-sequence/sample.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/bison/in.txt b/public/assets/dna-synthesized/bison/in.txt
deleted file mode 100755
index fd1eea6..0000000
--- a/public/assets/dna-synthesized/bison/in.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1GGTCAGCCCAAATCCGCACCCTCGGTCACCCTGTTTCCGCCCTCCACGGAGGAGCTCACT
2GCCAACAAGGCCACCCTGGTGTGTCTCATCAGCGACTTCTACCCGGGTAGCGTGACCGTG
3GCCTGGAAGGCAGACGGCAGCACCATCACCCGCAACGTGGAGACCACCCGGGCCTCCAAA
4CAGAGCAACAGCAAGTACGCGAAAAGCGGTTACAGCTGCGAGGTCACGCACGAGGGGAGC
5ACCGTGACGAAGACAGTGAAGCCCTCAGCGTGTCAGCCCAAGTCCGCACCCTTGGTCACC
6CTGTTCCCGCCCTCCAAGGAGGAGCTCAGCGCCAACAAGGCCACCCTGGTGTGTCTCATC
7AGCGACTTCTACCCGGGTAGCGTGACCGTGGTCTGGAAGGCAGACGGCAGCACCATCACC
8CGCAACGTGGAGACCACCCGGGCCTCCAAACAGAGCAACAGCAAGTACGCGGCCAGCAGC
9TACCTGAGCCTGACGGGCAGCGACTGGAAATCGAAAGGCAGTTACAGCTGCGAGGTCACG
10CACGAGGGGAGCACCGTGACGAAGACAGTGAAGGTCTCAGAGTGTCAGCCCAAGTCCGCA
11
diff --git a/public/assets/dna-synthesized/bison/out.mp3 b/public/assets/dna-synthesized/bison/out.mp3
deleted file mode 100755
index d6408ca..0000000
--- a/public/assets/dna-synthesized/bison/out.mp3
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/bison/spectogram.png b/public/assets/dna-synthesized/bison/spectogram.png
deleted file mode 100755
index 959902b..0000000
--- a/public/assets/dna-synthesized/bison/spectogram.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/elektron/IMG_0619.jpg b/public/assets/dna-synthesized/elektron/IMG_0619.jpg
deleted file mode 100755
index ebf60b0..0000000
--- a/public/assets/dna-synthesized/elektron/IMG_0619.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/elektron/IMG_0620.jpg b/public/assets/dna-synthesized/elektron/IMG_0620.jpg
deleted file mode 100755
index c9aa398..0000000
--- a/public/assets/dna-synthesized/elektron/IMG_0620.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/elektron/IMG_0622.jpg b/public/assets/dna-synthesized/elektron/IMG_0622.jpg
deleted file mode 100755
index 98acee4..0000000
--- a/public/assets/dna-synthesized/elektron/IMG_0622.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/elektron/elektron.mp4 b/public/assets/dna-synthesized/elektron/elektron.mp4
deleted file mode 100755
index f8e39b9..0000000
--- a/public/assets/dna-synthesized/elektron/elektron.mp4
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/elektron/midi-studio.jpg b/public/assets/dna-synthesized/elektron/midi-studio.jpg
deleted file mode 100755
index 59075cd..0000000
--- a/public/assets/dna-synthesized/elektron/midi-studio.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/mouse/in.txt b/public/assets/dna-synthesized/mouse/in.txt
deleted file mode 100755
index abd34a2..0000000
--- a/public/assets/dna-synthesized/mouse/in.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1GAATTCTCAGGGCCTGTGATGGTCTATACTGCATGGCATATCAGTGTAGAGAAAATAAAT
2AGACACAAGCTCCAATCCCAAACCCAGAAACTATTAATAACAAACGAAAAATTAGTTCTC
3TCAAATGAAGTCTCCCTGAGGATACAGATCCCATTCAGATGGGCAGGTCTGCAGGCCAAC
4ACAAAATGAACTCAGGGGCCTCTTTGGAGGTCTTAGGTCTCATAATGTTTTGTCAGGCCT
5TTTATCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTGCTTATTTATCTTAAAACCCACTA
6GCTGTTCTCTCCAGGGTCACACCCTAGCACACTCCGTCTAGGTGCCTTCTTACCATCTCC
7TCTAAGTGAGTGGAGGCTCCCTGTGTATTTCCACACCCTTGTACTTTAAGTATTTTCAAG
8GCAGGGCATATCCTCTCTCACTGAGTCCAGACAAAGCAGCTCAAATAGAAGAACATGTCC
9CACATACAGGCAACAGATTTTGAAGGAGGCCTCCACTCCAGCTGTTAGGGGACCCACATG
diff --git a/public/assets/dna-synthesized/mouse/out.mp3 b/public/assets/dna-synthesized/mouse/out.mp3
deleted file mode 100755
index e66e87b..0000000
--- a/public/assets/dna-synthesized/mouse/out.mp3
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/mouse/spectogram.png b/public/assets/dna-synthesized/mouse/spectogram.png
deleted file mode 100755
index 8b7f63f..0000000
--- a/public/assets/dna-synthesized/mouse/spectogram.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/quote/in.txt b/public/assets/dna-synthesized/quote/in.txt
deleted file mode 100755
index 81e8eb9..0000000
--- a/public/assets/dna-synthesized/quote/in.txt
+++ /dev/null
@@ -1,8 +0,0 @@
1GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA
2GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA
3ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA
4ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT
5GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT
6GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC
7AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC
8AACC \ No newline at end of file
diff --git a/public/assets/dna-synthesized/quote/out.mp3 b/public/assets/dna-synthesized/quote/out.mp3
deleted file mode 100755
index 985871d..0000000
--- a/public/assets/dna-synthesized/quote/out.mp3
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/quote/spectogram.png b/public/assets/dna-synthesized/quote/spectogram.png
deleted file mode 100755
index c460ffd..0000000
--- a/public/assets/dna-synthesized/quote/spectogram.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/symphony-no6-1st-movement.mp3 b/public/assets/dna-synthesized/symphony-no6-1st-movement.mp3
deleted file mode 100755
index 8c5a609..0000000
--- a/public/assets/dna-synthesized/symphony-no6-1st-movement.mp3
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/symphony-no6-1st-movement.png b/public/assets/dna-synthesized/symphony-no6-1st-movement.png
deleted file mode 100755
index 8269f08..0000000
--- a/public/assets/dna-synthesized/symphony-no6-1st-movement.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/taurus/in.txt b/public/assets/dna-synthesized/taurus/in.txt
deleted file mode 100755
index 8c5bddb..0000000
--- a/public/assets/dna-synthesized/taurus/in.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1GGTCAGCCCAAGTCCCCACCCTCGGTCACCCTGTTCCCGCCCTCCAAGGAGGAGCTCAGC
2GCCAACAAGGCCACCCTGGTGTGTCTCATCAGCGACTTCTACCCGGGTAGCGTGACCGTG
3GCCTGGAAGGCAGACGGCAGCACCATCACCCGCAACGTGGAGACCACCCGGGCCTCCAAA
4CAGAGCAACAGCAAGTACGCGGCCAGCAGCTACCTGAGCCTGACGAGCAGCGACTGGAAA
5TCGAAAGGCAGTTACAGCTGCGAGGTCACGCACGAGGGGAGCACCGTGACGAAGACAGTG
6AAGACCTCAGCGTGTCAGCCCAAGTCCCCACCCTCGGTCACCCTGTTCCCGCCCTCCACG
7GAGGAGCTCAACGGCAACAAGGCCACCCTGGTGTGTCTCATCAGCGACTTCTACCCGGGT
8AGCGTGACCGTGGTCTGGAAGGCAGACGGCAGCACCATCACCCGCAACGTGGAGACCACC
9CGGGCCTCCAAACAGAGCAACAGCAAGTACGCGGCCAGCAGCTACCTGAGCCTGACGAGC
10AGCGACTGGAAATCGAAAGGCAGTTACAGCTGCGAGGTCACGCACGAGGGGAGCACCGTG
11ACGAAGACAGTGAAGCCCTCAGAGTGGCCCTGGGCCCCCACCGCCGTCCCCACCCTCGTC
diff --git a/public/assets/dna-synthesized/taurus/out.mp3 b/public/assets/dna-synthesized/taurus/out.mp3
deleted file mode 100755
index ea7ae1a..0000000
--- a/public/assets/dna-synthesized/taurus/out.mp3
+++ /dev/null
Binary files differ
diff --git a/public/assets/dna-synthesized/taurus/spectogram.png b/public/assets/dna-synthesized/taurus/spectogram.png
deleted file mode 100755
index 3be9b58..0000000
--- a/public/assets/dna-synthesized/taurus/spectogram.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/do-fuse/copy-benchmarks.tsv b/public/assets/do-fuse/copy-benchmarks.tsv
deleted file mode 100755
index c7a7af4..0000000
--- a/public/assets/do-fuse/copy-benchmarks.tsv
+++ /dev/null
@@ -1,101 +0,0 @@
110KB 100KB 1MB 10MB
20.15 0.187 0.317 0.653
30.158 0.237 0.192 0.659
40.134 0.359 0.236 0.604
50.136 0.292 0.196 0.501
64.411 4.479 4.376 0.649
70.134 0.481 0.265 0.608
80.146 0.266 0.28 0.516
94.282 0.307 4.549 0.562
100.152 0.28 0.229 0.512
110.162 0.37 0.315 0.652
120.13 4.735 0.222 5.171
134.29 8.767 0.283 5.076
144.555 4.682 0.318 4.941
154.658 4.691 0.177 9.624
164.778 4.791 4.415 5.114
178.794 8.604 0.311 5.223
184.582 4.727 0.234 9.28
194.596 4.638 0.212 5.064
204.7 4.65 4.458 5.221
218.822 9.159 0.191 5.032
224.628 4.641 0.324 9.226
234.6 4.921 0.197 5.22
248.85 4.58 4.405 5.245
254.65 9.142 0.215 5.168
264.884 6.67 0.248 9.273
274.581 4.594 0.248 5.082
288.864 4.844 4.502 5.121
294.704 4.656 0.177 5.173
304.616 8.883 0.209 9.334
314.729 4.962 4.366 4.966
328.918 4.682 0.186 6.702
334.686 4.58 0.168 5.111
345.123 8.84 4.747 5.084
354.846 4.732 8.85 5.065
368.887 4.639 4.824 9.286
374.681 8.897 4.791 5.104
384.649 4.682 4.835 5.194
398.847 4.663 8.929 5.271
404.568 4.604 4.762 9.444
414.657 8.74 4.772 5.076
424.636 4.724 4.838 5.168
438.778 4.846 9.065 5.057
444.995 4.571 5.074 9.314
452.343 9.222 4.818 5.732
464.742 4.646 8.909 5.32
474.82 4.842 4.778 5.167
488.791 4.66 4.759 5.157
494.835 8.944 4.804 9.323
504.599 5.594 8.952 5.299
514.809 4.628 1.567 5.294
528.744 4.771 5.59 5.018
534.71 8.919 4.771 9.257
544.704 4.7 9.003 5.064
554.765 4.605 4.781 5.185
568.866 4.669 4.844 5.392
574.897 8.925 4.786 9.279
584.568 5.168 8.893 5.1
594.679 4.757 5.41 5.232
608.922 4.702 4.7 1.984
614.669 8.721 4.906 5.366
624.707 4.555 8.96 5.245
638.938 4.615 4.89 5.216
644.608 4.621 4.677 9.237
654.58 8.954 4.908 5.194
664.707 4.575 8.968 5.017
678.822 4.781 4.882 9.714
684.674 8.833 4.834 5.02
695.005 4.689 4.762 5.312
704.732 4.799 9.111 5.286
718.894 4.675 4.936 5.185
724.747 8.764 4.739 9.312
734.785 4.749 4.845 5.34
744.656 4.705 9.181 5.256
758.899 4.601 4.739 5.261
764.594 8.813 4.576 9.329
774.585 4.716 8.813 5.343
788.718 4.723 4.819 5.092
794.725 4.757 4.83 5.061
804.737 8.899 4.772 9.488
814.692 4.717 8.831 5.13
828.841 4.951 4.787 5.309
834.66 8.895 4.746 5.228
844.749 4.595 4.833 5.26
854.715 4.615 8.928 9.381
868.849 4.651 4.826 5.289
874.66 8.897 4.802 5.197
884.588 4.844 4.883 9.311
894.753 4.888 9.053 5.072
908.841 4.737 4.75 5.157
914.794 8.976 5.063 5.196
924.544 4.673 9.036 9.335
938.74 4.654 6.377 5.29
944.729 4.752 5.001 5.048
954.654 8.98 4.873 5.544
964.9 4.606 4.723 5.192
978.757 4.802 5.427 9.056
984.859 8.969 4.816 5.3
994.701 4.662 9.002 5.138
1004.943 4.813 4.894 5.15
1018.772 4.721 4.785 9.168
diff --git a/public/assets/do-fuse/fuse-droplets.png b/public/assets/do-fuse/fuse-droplets.png
deleted file mode 100755
index d7ce243..0000000
--- a/public/assets/do-fuse/fuse-droplets.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/do-fuse/fuse-spaces.png b/public/assets/do-fuse/fuse-spaces.png
deleted file mode 100755
index 4dcc1c5..0000000
--- a/public/assets/do-fuse/fuse-spaces.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/do-fuse/sqlite-benchmarks.tsv b/public/assets/do-fuse/sqlite-benchmarks.tsv
deleted file mode 100755
index daa2c21..0000000
--- a/public/assets/do-fuse/sqlite-benchmarks.tsv
+++ /dev/null
@@ -1,1001 +0,0 @@
1DROPTABLE CREATETABLE INSERTMANY FETCHALL COMMIT
20.000732 0.000400 0.008133 0.000065 0.000166
30.000200 0.000214 0.003105 0.000043 0.000171
40.000246 0.000170 0.006594 0.000044 0.000101
50.000182 0.000166 0.003892 0.000043 0.000112
60.000248 0.000654 0.002308 0.000041 0.000090
70.000240 0.000184 0.002253 0.000053 0.000110
80.000698 0.000483 0.003737 0.000041 0.000165
90.000217 0.000179 0.002470 0.000049 0.000107
100.000243 0.000160 0.002668 0.000054 0.000340
110.000196 0.000169 0.002247 0.000040 0.000096
120.000191 0.000162 0.003522 0.000260 0.000102
130.000195 0.000188 0.002325 0.000041 0.000132
140.000194 0.000202 0.002291 0.000039 0.000091
150.000195 0.000196 0.004114 0.000042 0.000108
160.000204 0.000200 0.002971 0.000040 0.000106
170.000227 0.000159 0.002208 0.000039 0.000117
180.000207 0.000176 0.003558 0.000040 0.000124
190.000255 0.000179 0.002870 0.000040 0.000125
200.000209 0.000176 0.002248 0.000040 0.000176
210.000211 0.000174 0.002661 0.000039 0.000180
220.000208 0.000219 0.002321 0.000039 0.000151
230.000212 0.000178 0.002609 0.000040 0.000132
240.000205 0.000209 0.002666 0.000039 0.000126
250.000205 0.000176 0.002501 0.000041 0.000133
260.000243 0.000183 0.002220 0.000037 0.000117
270.000504 0.000173 0.002230 0.000121 0.000414
280.000270 0.000200 0.002325 0.000040 0.000154
290.000208 0.000176 0.002386 0.000038 0.000123
300.000229 0.000182 0.002245 0.000039 0.000127
310.000211 0.000176 0.002544 0.000039 0.000136
320.000204 0.000180 0.002133 0.000037 0.000129
330.000205 0.000178 0.002330 0.000048 0.000146
340.000210 0.000178 0.002242 0.000039 0.000109
350.000210 0.000259 0.002766 0.000039 0.000118
360.000317 0.000495 0.002237 0.000039 0.000195
370.000454 0.000246 0.002447 0.000040 0.000172
380.000936 0.000200 0.002305 0.000057 0.000173
390.000263 0.000178 0.002251 0.000038 0.000166
400.000240 0.000183 0.002169 0.000068 0.000176
410.000251 0.000189 0.002221 0.000038 0.000141
420.000268 0.000215 0.002322 0.000039 0.000226
430.000287 0.000223 0.002696 0.000045 0.000247
440.000362 0.000229 0.002551 0.000043 0.000133
450.000239 0.000200 0.002621 0.000045 0.000133
460.000634 0.000208 0.002619 0.000046 0.000138
470.000236 0.000205 0.002589 0.000046 0.000137
480.000262 0.000205 0.002607 0.000045 0.000142
490.000239 0.000198 0.002754 0.000044 0.000185
500.000238 0.000198 0.002593 0.000057 0.000160
510.000242 0.000221 0.003784 0.000122 0.000174
520.000242 0.000201 0.002625 0.000054 0.000148
530.000296 0.000225 0.002934 0.000044 0.000134
540.000239 0.000245 0.003428 0.000046 0.000158
550.000261 0.000251 0.002569 0.000046 0.000139
560.000260 0.000230 0.002603 0.000045 0.000145
570.000302 0.000212 0.002580 0.000045 0.000176
580.000794 0.000197 0.002856 0.000046 0.000141
590.000273 0.000209 0.003173 0.000045 0.000217
600.000240 0.000201 0.002844 0.000043 0.000167
610.000389 0.000175 0.004315 0.000055 0.000091
620.000275 0.000534 0.004991 0.000053 0.000092
630.000229 0.000215 0.004084 0.000045 0.000074
640.000172 0.000474 0.002611 0.000043 0.000069
650.000201 0.000174 0.002485 0.000043 0.000069
660.000173 0.000220 0.002541 0.000045 0.000068
670.000167 0.000161 0.002827 0.000043 0.000071
680.000168 0.000160 0.003512 0.000068 0.000075
690.000211 0.000167 0.002530 0.000044 0.000069
700.000193 0.000230 0.003664 0.000046 0.000074
710.000171 0.000161 0.002575 0.000076 0.000075
720.000169 0.000161 0.002595 0.000044 0.000076
730.000981 0.000174 0.002556 0.000045 0.000072
740.000168 0.000163 0.002568 0.000043 0.000072
750.000163 0.000158 0.002579 0.000043 0.000386
760.000168 0.000160 0.002579 0.000059 0.000088
770.000176 0.000163 0.002559 0.000044 0.000075
780.000167 0.000161 0.002558 0.000043 0.000075
790.000169 0.000161 0.002599 0.000043 0.000095
800.000174 0.000163 0.002633 0.000046 0.000076
810.000170 0.000165 0.002576 0.000858 0.000079
820.000169 0.000162 0.002611 0.000044 0.000075
830.000170 0.000199 0.002621 0.000043 0.000074
840.000170 0.000167 0.003611 0.000043 0.000073
850.000171 0.000159 0.002764 0.000046 0.000076
860.000171 0.000165 0.002639 0.000044 0.000073
870.000168 0.000162 0.003131 0.000046 0.000075
880.000170 0.000162 0.002858 0.000044 0.000074
890.000171 0.000164 0.002841 0.000043 0.000075
900.000167 0.000161 0.002971 0.000043 0.000074
910.000170 0.000226 0.002842 0.000044 0.000074
920.000171 0.000165 0.002822 0.000044 0.000075
930.000173 0.000160 0.002895 0.000045 0.000073
940.000167 0.000217 0.002697 0.000044 0.000076
950.000170 0.000197 0.002699 0.000044 0.000075
960.000171 0.000163 0.003230 0.000045 0.000097
970.000170 0.000164 0.003167 0.000046 0.000082
980.000172 0.000196 0.002559 0.000043 0.000075
990.000168 0.000165 0.003006 0.000045 0.000075
1000.000176 0.000160 0.002567 0.000043 0.000075
1010.000167 0.000163 0.002757 0.000045 0.000076
1020.000171 0.000162 0.002802 0.000045 0.000076
1030.000169 0.000162 0.003102 0.000043 0.000072
1040.000167 0.000162 0.002624 0.000043 0.000075
1050.000170 0.000161 0.002589 0.000043 0.000072
1060.000222 0.000253 0.002657 0.000045 0.000075
1070.000172 0.000162 0.002586 0.000044 0.000084
1080.000172 0.000165 0.002933 0.000044 0.000075
1090.000169 0.000192 0.002609 0.000044 0.000074
1100.000194 0.000162 0.003020 0.000045 0.000081
1110.000170 0.000164 0.002908 0.000045 0.000076
1120.000169 0.000163 0.002567 0.000042 0.000073
1130.000167 0.000159 0.003071 0.000042 0.000074
1140.000222 0.000163 0.003175 0.000043 0.000076
1150.000167 0.000160 0.002641 0.000046 0.000099
1160.000171 0.000168 0.002586 0.000057 0.000075
1170.000170 0.000168 0.003148 0.000046 0.000075
1180.000171 0.000159 0.002770 0.000041 0.000074
1190.000173 0.000158 0.002643 0.000055 0.000077
1200.000313 0.000174 0.002920 0.000045 0.000075
1210.000170 0.000163 0.002551 0.000044 0.000072
1220.000173 0.000161 0.002599 0.000045 0.000073
1230.000167 0.000160 0.003505 0.000046 0.000075
1240.000171 0.000161 0.002894 0.000045 0.000074
1250.000171 0.000166 0.002572 0.000042 0.000073
1260.000166 0.000160 0.004099 0.000044 0.000102
1270.000181 0.000160 0.002499 0.000046 0.000071
1280.000174 0.000175 0.002560 0.000043 0.000068
1290.000165 0.000168 0.003083 0.000044 0.000070
1300.000210 0.000163 0.002535 0.000040 0.000068
1310.000164 0.000177 0.002906 0.000044 0.000075
1320.000175 0.000227 0.002971 0.000043 0.000073
1330.000167 0.000175 0.003409 0.000046 0.000078
1340.000172 0.000166 0.002640 0.000046 0.000074
1350.000177 0.000164 0.002574 0.000046 0.000076
1360.000170 0.000163 0.002631 0.000046 0.000075
1370.000216 0.000168 0.002596 0.000046 0.000076
1380.000170 0.000163 0.002659 0.000045 0.000074
1390.000172 0.000162 0.002677 0.000046 0.000075
1400.000170 0.000159 0.002604 0.000044 0.000081
1410.000171 0.000161 0.003163 0.000046 0.000076
1420.000171 0.000162 0.002574 0.000313 0.000075
1430.000170 0.000186 0.002988 0.000046 0.000074
1440.000171 0.000162 0.002596 0.000043 0.000077
1450.000168 0.000160 0.002640 0.000055 0.000074
1460.000169 0.000161 0.002567 0.000043 0.000371
1470.000170 0.000162 0.002704 0.000057 0.000078
1480.000255 0.000185 0.002453 0.000293 0.000066
1490.000148 0.000143 0.002169 0.000037 0.000066
1500.000173 0.000141 0.002238 0.000039 0.000085
1510.000154 0.000174 0.002679 0.000041 0.000065
1520.000149 0.000144 0.002187 0.000037 0.000065
1530.000146 0.000140 0.002760 0.000039 0.000071
1540.000147 0.000151 0.002193 0.000039 0.000065
1550.000150 0.000172 0.002207 0.000039 0.000067
1560.000147 0.000141 0.002126 0.000037 0.000060
1570.000191 0.000141 0.002119 0.000036 0.000086
1580.000149 0.000144 0.002440 0.000039 0.000065
1590.000148 0.000143 0.003287 0.000041 0.000068
1600.000152 0.000149 0.002555 0.000040 0.000069
1610.000148 0.000141 0.002203 0.000038 0.000065
1620.000147 0.000139 0.002371 0.000052 0.000075
1630.000148 0.000143 0.002201 0.000037 0.000066
1640.000149 0.000140 0.002186 0.000038 0.000062
1650.000152 0.000154 0.002215 0.000038 0.000062
1660.000149 0.000144 0.002505 0.000039 0.000067
1670.000148 0.000140 0.002216 0.000038 0.000101
1680.000160 0.000144 0.002574 0.000039 0.000067
1690.000150 0.000144 0.002266 0.000040 0.000068
1700.000151 0.000142 0.003640 0.000040 0.000068
1710.000150 0.000142 0.002207 0.000038 0.000066
1720.000148 0.000140 0.002337 0.000041 0.000068
1730.000151 0.000144 0.002138 0.000038 0.000063
1740.000146 0.000178 0.002369 0.000039 0.000060
1750.000150 0.000141 0.002290 0.000039 0.000067
1760.000149 0.000143 0.002569 0.000050 0.000070
1770.000149 0.000143 0.002797 0.000040 0.000068
1780.000149 0.000143 0.002720 0.000039 0.000066
1790.000273 0.000154 0.002255 0.000039 0.000066
1800.000147 0.000141 0.002180 0.000037 0.000065
1810.000884 0.000142 0.002164 0.000036 0.000060
1820.000188 0.000143 0.002248 0.000039 0.000062
1830.000148 0.000142 0.002178 0.000038 0.000064
1840.000151 0.000140 0.002705 0.000038 0.000063
1850.000145 0.000144 0.002588 0.000039 0.000064
1860.000147 0.000142 0.002196 0.000037 0.000064
1870.000147 0.000139 0.002169 0.000035 0.000060
1880.000151 0.000894 0.002267 0.000039 0.000061
1890.000152 0.000145 0.002178 0.000038 0.000061
1900.000185 0.000142 0.002148 0.000036 0.000062
1910.000147 0.000141 0.002845 0.000040 0.000065
1920.000159 0.000178 0.002193 0.000039 0.000063
1930.000145 0.000141 0.002571 0.000039 0.000066
1940.000149 0.000141 0.003380 0.000038 0.000065
1950.000200 0.000149 0.002439 0.000039 0.000066
1960.000152 0.000140 0.002193 0.000037 0.000065
1970.000147 0.000139 0.002239 0.000037 0.000066
1980.000200 0.000143 0.002190 0.000039 0.000066
1990.000147 0.000139 0.002243 0.000038 0.000062
2000.000421 0.000144 0.002229 0.000038 0.000062
2010.000147 0.000149 0.002715 0.000038 0.000063
2020.000151 0.000176 0.002144 0.000036 0.000060
2030.000145 0.000138 0.002184 0.000038 0.000064
2040.000146 0.000207 0.002526 0.000040 0.000067
2050.000163 0.000142 0.002366 0.000038 0.000070
2060.000149 0.000143 0.002143 0.000038 0.000065
2070.000150 0.000142 0.002146 0.000035 0.000059
2080.000162 0.000147 0.002736 0.000038 0.000067
2090.000149 0.000146 0.002383 0.000040 0.000071
2100.000147 0.000139 0.002485 0.000038 0.000065
2110.000147 0.000143 0.002811 0.000039 0.000098
2120.000181 0.000142 0.002503 0.000039 0.000066
2130.000150 0.000143 0.002227 0.000039 0.000065
2140.000149 0.000143 0.002182 0.000036 0.000061
2150.000148 0.000387 0.002159 0.000036 0.000059
2160.000147 0.000173 0.002267 0.000039 0.000063
2170.000147 0.000143 0.002729 0.000039 0.000066
2180.000149 0.000142 0.002574 0.000040 0.000069
2190.000149 0.000143 0.002560 0.000040 0.000068
2200.000152 0.000141 0.002203 0.000038 0.000066
2210.000151 0.000139 0.002234 0.000038 0.000087
2220.000148 0.000140 0.002152 0.000036 0.000060
2230.000185 0.000140 0.002274 0.000039 0.000063
2240.000148 0.000144 0.002211 0.000038 0.000066
2250.000149 0.000141 0.002692 0.000039 0.000066
2260.000148 0.000145 0.002519 0.000039 0.000066
2270.000147 0.000143 0.002188 0.000038 0.000066
2280.000149 0.000171 0.002171 0.000038 0.000093
2290.000150 0.000182 0.002185 0.000038 0.000068
2300.000191 0.000154 0.002172 0.000037 0.000061
2310.000145 0.000140 0.002253 0.000043 0.000065
2320.000147 0.000139 0.002673 0.000038 0.000066
2330.000191 0.000144 0.002740 0.000038 0.000066
2340.000147 0.000142 0.002187 0.000038 0.000064
2350.000146 0.000181 0.002180 0.000038 0.000066
2360.000176 0.000142 0.002152 0.000039 0.000061
2370.000149 0.000142 0.002164 0.000037 0.000064
2380.000245 0.000150 0.002771 0.000055 0.000084
2390.000149 0.000145 0.003006 0.000040 0.000069
2400.000153 0.000144 0.002701 0.000040 0.000067
2410.000149 0.000144 0.002192 0.000038 0.000065
2420.000148 0.000143 0.002220 0.000038 0.000063
2430.000146 0.000140 0.002210 0.000038 0.000062
2440.000157 0.000144 0.002174 0.000038 0.000060
2450.000148 0.000171 0.002208 0.000039 0.000061
2460.000146 0.000141 0.002685 0.000039 0.000064
2470.000146 0.000139 0.002811 0.000038 0.000064
2480.000147 0.000140 0.002234 0.000037 0.000063
2490.000143 0.000143 0.002209 0.000040 0.000066
2500.000149 0.000144 0.002162 0.000037 0.000091
2510.000408 0.000141 0.002140 0.000036 0.000060
2520.000142 0.000149 0.002208 0.000132 0.000061
2530.000148 0.000142 0.002706 0.000040 0.000066
2540.000148 0.000142 0.002502 0.000039 0.000065
2550.000176 0.000144 0.002265 0.000039 0.000066
2560.000150 0.000142 0.002199 0.000039 0.000065
2570.000147 0.000154 0.002201 0.000040 0.000067
2580.000150 0.000142 0.002164 0.000036 0.000094
2590.000183 0.000177 0.002253 0.000039 0.000063
2600.000189 0.000143 0.002480 0.000039 0.000066
2610.000148 0.000141 0.002212 0.000037 0.000064
2620.000150 0.000137 0.002192 0.000037 0.000065
2630.000144 0.000140 0.002271 0.000039 0.000062
2640.000190 0.000171 0.002145 0.000037 0.000061
2650.000146 0.000141 0.005865 0.000099 0.000083
2660.000178 0.000165 0.002792 0.000040 0.000066
2670.000148 0.000233 0.002742 0.000039 0.000079
2680.000157 0.000151 0.002225 0.000039 0.000066
2690.000149 0.000142 0.002215 0.000039 0.000081
2700.000165 0.000141 0.002239 0.000039 0.000081
2710.000150 0.000154 0.002154 0.000036 0.000060
2720.000152 0.000151 0.002216 0.000039 0.000075
2730.000172 0.000141 0.004471 0.000060 0.000092
2740.000250 0.000210 0.002881 0.000040 0.000066
2750.000176 0.000152 0.002262 0.000038 0.000337
2760.000164 0.000154 0.002485 0.000039 0.000074
2770.000149 0.000180 0.002148 0.000039 0.000078
2780.000194 0.000145 0.002345 0.000044 0.000064
2790.000164 0.000201 0.002483 0.000040 0.000062
2800.000148 0.000140 0.002249 0.000038 0.000076
2810.000155 0.000144 0.002504 0.000039 0.000067
2820.000166 0.000150 0.002780 0.000040 0.000079
2830.000150 0.000142 0.002194 0.000038 0.000086
2840.000178 0.000153 0.002360 0.000039 0.000079
2850.000160 0.000154 0.002159 0.000036 0.000079
2860.000195 0.000445 0.002203 0.000038 0.000074
2870.000171 0.000161 0.002220 0.000038 0.000087
2880.000165 0.000151 0.002231 0.000038 0.000088
2890.000149 0.000141 0.003445 0.000040 0.000068
2900.000148 0.000143 0.002465 0.000039 0.000081
2910.000165 0.000150 0.002228 0.000038 0.000067
2920.000160 0.000142 0.003231 0.000039 0.000066
2930.000149 0.000141 0.002215 0.000038 0.000078
2940.000146 0.000152 0.002152 0.000038 0.000077
2950.000168 0.000140 0.002258 0.000040 0.000076
2960.000193 0.000142 0.002266 0.000039 0.000085
2970.000261 0.000164 0.002160 0.000037 0.000061
2980.000151 0.000419 0.002217 0.000037 0.000073
2990.000163 0.000148 0.002856 0.000038 0.000106
3000.000258 0.000204 0.002267 0.000040 0.000075
3010.000178 0.000159 0.002266 0.000038 0.000070
3020.000158 0.000149 0.002665 0.000039 0.000085
3030.000164 0.000154 0.002478 0.000039 0.000077
3040.000148 0.000140 0.002459 0.000038 0.000066
3050.000161 0.000142 0.002206 0.000038 0.000074
3060.000155 0.000151 0.002230 0.000039 0.000083
3070.000161 0.000142 0.002225 0.000037 0.000072
3080.000161 0.000187 0.002450 0.000038 0.000063
3090.000145 0.000155 0.002438 0.000039 0.000079
3100.000166 0.000138 0.002296 0.000039 0.000076
3110.000170 0.000156 0.002446 0.000038 0.000078
3120.000160 0.000159 0.002211 0.000038 0.000078
3130.000159 0.000142 0.002190 0.000036 0.000110
3140.000157 0.000150 0.002336 0.000039 0.000073
3150.000165 0.000182 0.002132 0.000038 0.000072
3160.000160 0.000140 0.002641 0.000066 0.000066
3170.000147 0.000153 0.002153 0.000039 0.000080
3180.000148 0.000156 0.002165 0.000037 0.000077
3190.000147 0.000151 0.002201 0.000038 0.000067
3200.000162 0.000143 0.002216 0.000040 0.000080
3210.000165 0.000148 0.002223 0.000055 0.000080
3220.000193 0.000143 0.002155 0.000037 0.000078
3230.000165 0.000143 0.003005 0.000040 0.000067
3240.000151 0.000145 0.002511 0.000039 0.000070
3250.000149 0.000173 0.002246 0.000039 0.000066
3260.000148 0.000143 0.002808 0.000040 0.000067
3270.000148 0.000142 0.002513 0.000038 0.000066
3280.000148 0.000143 0.002203 0.000037 0.000065
3290.000146 0.000138 0.002123 0.000038 0.000061
3300.000170 0.000149 0.002165 0.000036 0.000062
3310.000144 0.000145 0.002186 0.000037 0.000059
3320.000144 0.000139 0.002520 0.000037 0.000065
3330.000146 0.000139 0.002559 0.000038 0.000066
3340.000153 0.000142 0.002537 0.000038 0.000067
3350.000168 0.000144 0.002217 0.000048 0.000066
3360.000147 0.000141 0.002120 0.000037 0.000063
3370.000188 0.001725 0.002541 0.000040 0.000067
3380.000149 0.000143 0.002229 0.000038 0.000076
3390.000147 0.000143 0.002233 0.000037 0.000062
3400.000182 0.000142 0.002150 0.000037 0.000061
3410.000148 0.000140 0.002196 0.000037 0.000065
3420.000145 0.000140 0.002473 0.000037 0.000065
3430.000147 0.000139 0.002725 0.000040 0.000067
3440.000149 0.000142 0.002217 0.000039 0.000065
3450.000146 0.000140 0.002167 0.000037 0.000061
3460.000176 0.000144 0.002415 0.000039 0.000064
3470.000171 0.000144 0.002925 0.000040 0.000068
3480.000152 0.000167 0.002190 0.000039 0.000066
3490.000149 0.000142 0.002530 0.000039 0.000067
3500.000150 0.000142 0.003059 0.000040 0.000068
3510.000149 0.000142 0.002417 0.000038 0.000072
3520.000149 0.000143 0.002569 0.000038 0.000068
3530.000148 0.000141 0.002262 0.000040 0.000068
3540.000152 0.000144 0.002253 0.000038 0.000066
3550.000149 0.000142 0.002134 0.000037 0.000061
3560.000277 0.000427 0.002186 0.000036 0.000060
3570.000145 0.000139 0.002791 0.000039 0.000065
3580.000149 0.000144 0.002238 0.000039 0.000066
3590.000147 0.000144 0.002514 0.000039 0.000066
3600.000148 0.000143 0.002683 0.000038 0.000063
3610.000147 0.000139 0.002214 0.000037 0.000068
3620.000145 0.000139 0.002149 0.000036 0.000059
3630.000185 0.000139 0.002214 0.000037 0.000060
3640.000145 0.000140 0.003549 0.000039 0.000066
3650.000187 0.000142 0.002160 0.000037 0.000059
3660.000147 0.000158 0.002212 0.000038 0.000065
3670.000148 0.000140 0.002483 0.000039 0.000067
3680.000147 0.000142 0.003034 0.000039 0.000066
3690.000148 0.000142 0.002228 0.000039 0.000066
3700.000145 0.000151 0.002225 0.000040 0.000067
3710.000149 0.000142 0.002858 0.000048 0.000083
3720.000203 0.000185 0.004022 0.000049 0.000086
3730.000212 0.000188 0.005086 0.000056 0.000093
3740.000220 0.000203 0.004209 0.000051 0.000085
3750.000208 0.000247 0.009261 0.000098 0.000089
3760.000211 0.000262 0.002546 0.000041 0.000066
3770.000198 0.000150 0.002534 0.000039 0.000079
3780.000159 0.000143 0.002207 0.000038 0.000094
3790.000157 0.000143 0.002173 0.000038 0.000062
3800.000198 0.000505 0.002157 0.000039 0.000079
3810.000164 0.000143 0.002172 0.000038 0.000076
3820.000156 0.000148 0.002259 0.000039 0.000080
3830.000161 0.000142 0.002219 0.000039 0.000076
3840.000161 0.000143 0.002266 0.000039 0.000085
3850.000161 0.000141 0.002150 0.000036 0.000077
3860.000179 0.000140 0.002140 0.000036 0.000071
3870.000157 0.000151 0.002316 0.000040 0.000079
3880.000149 0.000143 0.002269 0.000039 0.000066
3890.000161 0.000142 0.002206 0.000040 0.000091
3900.000172 0.000143 0.002244 0.000039 0.000067
3910.000168 0.000142 0.002189 0.000039 0.000083
3920.000163 0.000188 0.002156 0.000037 0.000077
3930.000168 0.000143 0.002266 0.000039 0.000084
3940.000166 0.000147 0.002205 0.000325 0.000078
3950.000175 0.000140 0.002173 0.000037 0.000106
3960.000170 0.000153 0.002158 0.000036 0.000083
3970.000168 0.000147 0.002825 0.000039 0.000108
3980.000172 0.000151 0.002483 0.000038 0.000085
3990.000160 0.000143 0.002163 0.000038 0.000066
4000.000161 0.000154 0.002493 0.000039 0.000084
4010.000167 0.000153 0.002564 0.000040 0.000082
4020.000159 0.000151 0.002185 0.000046 0.000088
4030.000157 0.000156 0.002175 0.000039 0.000076
4040.000150 0.000144 0.002151 0.000038 0.000063
4050.000160 0.000140 0.002429 0.000038 0.000064
4060.000160 0.000154 0.002184 0.000048 0.000077
4070.000168 0.000142 0.002686 0.000040 0.000119
4080.000164 0.000152 0.002279 0.000039 0.000075
4090.000161 0.000143 0.002192 0.000068 0.000067
4100.000161 0.000154 0.002190 0.000040 0.000092
4110.000246 0.000146 0.003064 0.000038 0.000072
4120.000163 0.000158 0.002171 0.000037 0.000073
4130.000216 0.000144 0.002209 0.000039 0.000115
4140.000159 0.000141 0.003338 0.000039 0.000079
4150.000277 0.000158 0.002464 0.000039 0.000082
4160.000168 0.000150 0.002227 0.000037 0.000079
4170.000168 0.000146 0.002775 0.000038 0.000077
4180.000146 0.000147 0.002694 0.000042 0.000084
4190.000160 0.000145 0.002807 0.000039 0.000066
4200.000162 0.000177 0.002187 0.000063 0.000066
4210.000147 0.000141 0.002220 0.000038 0.000085
4220.000160 0.000142 0.002216 0.000037 0.000077
4230.000166 0.000159 0.002224 0.000039 0.000108
4240.000147 0.000141 0.002746 0.000039 0.000078
4250.000159 0.000141 0.002194 0.000037 0.000063
4260.000164 0.000143 0.002164 0.000039 0.000067
4270.000169 0.000152 0.002278 0.000074 0.000088
4280.000157 0.000157 0.002155 0.000068 0.000076
4290.000159 0.000140 0.002170 0.000035 0.000078
4300.000156 0.000141 0.002299 0.000040 0.000066
4310.000192 0.000160 0.002241 0.000039 0.000082
4320.000149 0.000143 0.002288 0.000039 0.000079
4330.000161 0.000142 0.002185 0.000049 0.000077
4340.000147 0.000149 0.002284 0.000039 0.000063
4350.000456 0.000144 0.002203 0.000046 0.000064
4360.000187 0.000144 0.002147 0.000037 0.000061
4370.000147 0.000140 0.002238 0.000040 0.000067
4380.000147 0.000140 0.003077 0.000041 0.000068
4390.000151 0.000142 0.002226 0.000038 0.000065
4400.000146 0.000142 0.002188 0.000039 0.000065
4410.000145 0.000141 0.002156 0.000036 0.000061
4420.000143 0.000172 0.002379 0.000037 0.000060
4430.000152 0.000231 0.002172 0.000038 0.000065
4440.000153 0.000142 0.002181 0.000039 0.000065
4450.000148 0.000142 0.002567 0.000039 0.000067
4460.000150 0.000142 0.002177 0.000038 0.000072
4470.000147 0.000146 0.002328 0.000038 0.000063
4480.000146 0.000150 0.002211 0.000038 0.000063
4490.000149 0.000143 0.002222 0.000040 0.000072
4500.000150 0.000144 0.002455 0.000039 0.000065
4510.000147 0.000144 0.002206 0.000039 0.000066
4520.000145 0.000141 0.002153 0.000055 0.000070
4530.000443 0.000144 0.002139 0.000036 0.000069
4540.000147 0.000182 0.002188 0.000037 0.000061
4550.000146 0.000138 0.002248 0.000038 0.000067
4560.000147 0.000142 0.002817 0.000039 0.000067
4570.000148 0.000144 0.002230 0.000038 0.000066
4580.000148 0.000142 0.002239 0.000039 0.000067
4590.000149 0.000142 0.002197 0.000038 0.000063
4600.000181 0.000674 0.002170 0.000038 0.000061
4610.000146 0.000195 0.002204 0.000037 0.000061
4620.000146 0.000141 0.002260 0.000039 0.000067
4630.000150 0.000142 0.002193 0.000045 0.000065
4640.000147 0.000140 0.002229 0.000036 0.000066
4650.000146 0.000137 0.002197 0.000037 0.000062
4660.000152 0.000159 0.002187 0.000036 0.000060
4670.000145 0.000139 0.002224 0.000037 0.000064
4680.000149 0.000144 0.002175 0.000038 0.000066
4690.000150 0.000143 0.002187 0.000038 0.000066
4700.000148 0.000141 0.002152 0.000036 0.000061
4710.000185 0.000141 0.002176 0.000036 0.000064
4720.000169 0.000145 0.002483 0.000038 0.000067
4730.000149 0.000141 0.002225 0.000036 0.000064
4740.000244 0.000149 0.002538 0.000038 0.000065
4750.000156 0.000143 0.002317 0.000039 0.000297
4760.000228 0.000172 0.002222 0.000039 0.000300
4770.000149 0.000145 0.002173 0.000040 0.000066
4780.000154 0.000145 0.002155 0.000038 0.000093
4790.000161 0.000145 0.002178 0.000039 0.000063
4800.000147 0.000170 0.002299 0.000039 0.000066
4810.000149 0.000142 0.003494 0.000040 0.000066
4820.000149 0.000178 0.002237 0.000038 0.000062
4830.000148 0.000143 0.002150 0.000037 0.000064
4840.000146 0.000139 0.002315 0.000038 0.000065
4850.000147 0.000141 0.002269 0.000039 0.000067
4860.000173 0.000145 0.002191 0.000037 0.000065
4870.000166 0.000144 0.002247 0.000038 0.000061
4880.000146 0.000140 0.002551 0.000038 0.000065
4890.000148 0.000175 0.002202 0.000037 0.000064
4900.000145 0.000141 0.002217 0.000038 0.000063
4910.000146 0.000138 0.002164 0.000132 0.000547
4920.000148 0.000144 0.008140 0.000160 0.000893
4930.000311 0.000221 0.004526 0.000058 0.000109
4940.000238 0.000225 0.003475 0.000044 0.000094
4950.000178 0.000177 0.002537 0.000041 0.000087
4960.000172 0.000161 0.002194 0.000048 0.000084
4970.000172 0.000163 0.002177 0.000040 0.000084
4980.001177 0.000156 0.002351 0.000041 0.000325
4990.000167 0.000163 0.002273 0.000040 0.000088
5000.000170 0.000151 0.002245 0.000040 0.000077
5010.000172 0.000896 0.002181 0.000038 0.000080
5020.000202 0.000164 0.002449 0.000038 0.000076
5030.000162 0.000161 0.002188 0.000037 0.000078
5040.000165 0.000154 0.002440 0.000074 0.000091
5050.000167 0.000149 0.002185 0.000039 0.000081
5060.000176 0.000154 0.002427 0.000040 0.000093
5070.000168 0.000154 0.002304 0.000038 0.000105
5080.000672 0.000160 0.002260 0.000038 0.000088
5090.000686 0.000159 0.002207 0.000038 0.000084
5100.000163 0.000154 0.002186 0.000037 0.000077
5110.000173 0.000153 0.002399 0.000038 0.000082
5120.000166 0.000157 0.002709 0.000039 0.000077
5130.000155 0.000149 0.002143 0.000038 0.000097
5140.000166 0.000154 0.003454 0.000051 0.000106
5150.000166 0.000160 0.002539 0.000039 0.000128
5160.000169 0.000149 0.002307 0.000039 0.000085
5170.000170 0.000158 0.002225 0.000040 0.000088
5180.000170 0.000180 0.002165 0.000036 0.000103
5190.000203 0.000160 0.002345 0.000039 0.000075
5200.000173 0.000191 0.002160 0.000038 0.000074
5210.000165 0.000156 0.002243 0.000039 0.000085
5220.000172 0.000154 0.002260 0.000040 0.000090
5230.000163 0.000164 0.002258 0.000040 0.000085
5240.000168 0.000143 0.002755 0.000039 0.000086
5250.000178 0.000155 0.002202 0.000039 0.000075
5260.000164 0.000153 0.002267 0.000038 0.000081
5270.000161 0.000154 0.002158 0.000036 0.000090
5280.000169 0.000158 0.002454 0.000037 0.000061
5290.000162 0.000154 0.002543 0.000038 0.000091
5300.000170 0.000154 0.002168 0.000037 0.000085
5310.000166 0.000151 0.002852 0.000038 0.000087
5320.000167 0.000165 0.002484 0.000039 0.000089
5330.000374 0.000197 0.002217 0.000038 0.000082
5340.000156 0.000150 0.002213 0.000038 0.000112
5350.000683 0.000155 0.002131 0.000038 0.000077
5360.000162 0.000164 0.002199 0.000038 0.000076
5370.000176 0.000154 0.002345 0.000038 0.000089
5380.000175 0.000150 0.002928 0.000039 0.000082
5390.000161 0.000140 0.002528 0.000039 0.000066
5400.000159 0.000151 0.002256 0.000039 0.000075
5410.000155 0.000156 0.002233 0.000040 0.000066
5420.000171 0.000156 0.002149 0.000066 0.000084
5430.000182 0.000154 0.002233 0.000037 0.000117
5440.000166 0.000160 0.002460 0.000037 0.000088
5450.000159 0.000165 0.002891 0.000043 0.000075
5460.000169 0.000143 0.002383 0.000038 0.000084
5470.000162 0.000149 0.002313 0.000039 0.000078
5480.000166 0.000161 0.003837 0.000041 0.000092
5490.000166 0.000144 0.002389 0.000038 0.000078
5500.000185 0.000153 0.002548 0.000040 0.000090
5510.000166 0.000152 0.002943 0.000037 0.000063
5520.000147 0.000140 0.002284 0.000038 0.000066
5530.000145 0.000141 0.002555 0.000038 0.000071
5540.000189 0.000143 0.002235 0.000038 0.000359
5550.000149 0.000140 0.002779 0.000053 0.000089
5560.000211 0.000206 0.002744 0.000040 0.000067
5570.000150 0.000144 0.002471 0.000039 0.000065
5580.000151 0.000140 0.002563 0.000040 0.000064
5590.000148 0.000138 0.002305 0.000039 0.000066
5600.000148 0.000141 0.002162 0.000036 0.000060
5610.000182 0.000145 0.002403 0.000042 0.000063
5620.000152 0.000141 0.002311 0.000039 0.000065
5630.000148 0.000180 0.002192 0.000038 0.000065
5640.000149 0.000141 0.002516 0.000039 0.000066
5650.000147 0.000142 0.002193 0.000040 0.000064
5660.000146 0.000138 0.002194 0.000036 0.000060
5670.000197 0.000142 0.002291 0.000038 0.000063
5680.000148 0.000142 0.002440 0.000039 0.000066
5690.000148 0.000143 0.002228 0.000039 0.000066
5700.000149 0.000140 0.002216 0.000038 0.000067
5710.000148 0.000145 0.002196 0.000038 0.000066
5720.000148 0.000141 0.002157 0.000036 0.000061
5730.000144 0.000175 0.002491 0.000039 0.000063
5740.000147 0.000141 0.002290 0.000039 0.000066
5750.000149 0.000143 0.002508 0.000039 0.000067
5760.000149 0.000142 0.002536 0.000039 0.000067
5770.000150 0.000141 0.003132 0.000046 0.000070
5780.000153 0.000145 0.002202 0.000039 0.000067
5790.000149 0.000143 0.002102 0.000037 0.000067
5800.000989 0.000142 0.002188 0.000063 0.000068
5810.000151 0.000142 0.002229 0.000038 0.000068
5820.001481 0.000141 0.002238 0.000039 0.000070
5830.000148 0.000142 0.002204 0.000037 0.000093
5840.000160 0.000141 0.002138 0.000038 0.000062
5850.000145 0.000141 0.002708 0.000039 0.000065
5860.000147 0.000142 0.002218 0.000039 0.000067
5870.000148 0.000140 0.002759 0.000038 0.000066
5880.000148 0.000139 0.003156 0.000037 0.000067
5890.000185 0.000141 0.002259 0.000040 0.000066
5900.000148 0.000142 0.002226 0.000047 0.000068
5910.000148 0.000142 0.002305 0.000040 0.000090
5920.001000 0.000155 0.002217 0.000064 0.000068
5930.000154 0.000144 0.002554 0.000038 0.000065
5940.000148 0.000141 0.002151 0.000038 0.000066
5950.000146 0.000181 0.003031 0.000039 0.000062
5960.000146 0.000180 0.002254 0.000039 0.000061
5970.000147 0.000143 0.002188 0.000039 0.000065
5980.000147 0.000140 0.002259 0.000039 0.000063
5990.000146 0.000141 0.002238 0.000038 0.000076
6000.000148 0.000141 0.002163 0.000038 0.000061
6010.000153 0.000143 0.002195 0.000043 0.000072
6020.000149 0.000177 0.003291 0.000039 0.000063
6030.000258 0.000153 0.002150 0.000039 0.000066
6040.000157 0.000144 0.002155 0.000037 0.000060
6050.000160 0.001194 0.002269 0.000040 0.000100
6060.000164 0.000151 0.002162 0.000038 0.000078
6070.000163 0.000424 0.002178 0.000036 0.000069
6080.001333 0.000389 0.002249 0.000039 0.000066
6090.000175 0.000142 0.002208 0.000037 0.000102
6100.000443 0.000156 0.002249 0.000040 0.000062
6110.000244 0.001562 0.003049 0.000041 0.000083
6120.000208 0.000183 0.002483 0.000040 0.000068
6130.000164 0.000156 0.002220 0.000040 0.000078
6140.000169 0.000142 0.002694 0.000040 0.000083
6150.000162 0.000152 0.002453 0.000038 0.000077
6160.000157 0.000189 0.002306 0.000040 0.000077
6170.000162 0.000151 0.002200 0.000039 0.000325
6180.000150 0.000142 0.002251 0.000039 0.000066
6190.000172 0.000157 0.002184 0.000039 0.000073
6200.000160 0.000150 0.002678 0.000038 0.000326
6210.000165 0.000151 0.002292 0.000038 0.000094
6220.000162 0.000156 0.002203 0.000037 0.000083
6230.000170 0.000141 0.002175 0.000037 0.000074
6240.000149 0.000166 0.002235 0.000039 0.000071
6250.000161 0.000143 0.002423 0.000036 0.000180
6260.000164 0.000152 0.003095 0.000039 0.000076
6270.000172 0.000153 0.002466 0.000039 0.000115
6280.000151 0.000153 0.002274 0.000039 0.000066
6290.000150 0.000142 0.003179 0.000040 0.000080
6300.000172 0.000159 0.002421 0.000039 0.000083
6310.000159 0.000142 0.002165 0.000037 0.000068
6320.000155 0.000150 0.002233 0.000041 0.000123
6330.000153 0.000158 0.002253 0.000039 0.000571
6340.000203 0.000145 0.002269 0.000041 0.000077
6350.000164 0.000158 0.002176 0.000038 0.000086
6360.000197 0.000144 0.002220 0.000041 0.000080
6370.000174 0.000403 0.002224 0.000039 0.000063
6380.000218 0.000144 0.002150 0.000036 0.000069
6390.000149 0.000141 0.002479 0.000040 0.000079
6400.000163 0.000145 0.002664 0.000039 0.000082
6410.000150 0.000152 0.002446 0.000040 0.000069
6420.000203 0.000154 0.002205 0.000043 0.000077
6430.000160 0.000143 0.002210 0.000039 0.000087
6440.000194 0.000145 0.002167 0.000038 0.000069
6450.000151 0.000154 0.002137 0.000036 0.000079
6460.000162 0.000140 0.002697 0.000037 0.000085
6470.000162 0.000143 0.002233 0.000039 0.000076
6480.000148 0.000144 0.002210 0.000039 0.000065
6490.000151 0.000152 0.003015 0.000041 0.000084
6500.000158 0.000156 0.002730 0.000039 0.000079
6510.000312 0.000165 0.002207 0.000038 0.000076
6520.000167 0.000139 0.002297 0.000040 0.000065
6530.000172 0.000154 0.002205 0.000037 0.000080
6540.000146 0.000149 0.002286 0.000039 0.000076
6550.000164 0.000151 0.002214 0.000038 0.000073
6560.000162 0.000169 0.003110 0.000038 0.000067
6570.000293 0.000144 0.002182 0.000038 0.000060
6580.000157 0.000153 0.003778 0.000049 0.000095
6590.001735 0.000210 0.004360 0.000050 0.000083
6600.000297 0.000198 0.002532 0.000039 0.000072
6610.000185 0.000163 0.002173 0.000039 0.000070
6620.000183 0.000142 0.002122 0.000038 0.000062
6630.000147 0.000145 0.002443 0.000039 0.000066
6640.000149 0.000144 0.002473 0.000040 0.000066
6650.000147 0.000139 0.002949 0.000038 0.000063
6660.000147 0.000139 0.002737 0.000039 0.000066
6670.000199 0.000142 0.002927 0.000038 0.000066
6680.000149 0.000141 0.002188 0.000038 0.000065
6690.000147 0.000144 0.002203 0.000038 0.000066
6700.000149 0.000141 0.002154 0.000037 0.000062
6710.000144 0.000137 0.003526 0.000037 0.000066
6720.000151 0.000153 0.002150 0.000036 0.000060
6730.000145 0.000138 0.002202 0.000037 0.000065
6740.000272 0.000187 0.002477 0.000038 0.000306
6750.000148 0.000141 0.002421 0.000038 0.000067
6760.000147 0.000141 0.002252 0.000039 0.000065
6770.000150 0.000140 0.002144 0.000037 0.000061
6780.000191 0.000144 0.002229 0.000038 0.000060
6790.000145 0.000145 0.002202 0.000038 0.000061
6800.000146 0.000142 0.002418 0.000038 0.000065
6810.000189 0.000171 0.002568 0.000040 0.000066
6820.000150 0.000141 0.002300 0.000039 0.000067
6830.000151 0.000141 0.002199 0.000038 0.000347
6840.000147 0.000140 0.002165 0.000035 0.000061
6850.000151 0.000646 0.002310 0.000040 0.000062
6860.000161 0.000410 0.002195 0.000038 0.000061
6870.000147 0.000141 0.002466 0.000039 0.000066
6880.000147 0.000141 0.003026 0.000038 0.000066
6890.000148 0.000142 0.002223 0.000038 0.000065
6900.000147 0.000142 0.002196 0.000038 0.000067
6910.000147 0.000141 0.002155 0.000044 0.000064
6920.000146 0.000140 0.002354 0.000039 0.000067
6930.000149 0.000143 0.002186 0.000037 0.000062
6940.000150 0.000144 0.002498 0.000040 0.000063
6950.000178 0.000212 0.002453 0.000039 0.000062
6960.000149 0.000177 0.002463 0.000038 0.000063
6970.000147 0.000142 0.002507 0.000038 0.000067
6980.000149 0.000142 0.002717 0.000038 0.000066
6990.000148 0.000141 0.002452 0.000037 0.000065
7000.000147 0.000140 0.002266 0.000039 0.000066
7010.000149 0.000141 0.002183 0.000037 0.000066
7020.000153 0.000142 0.002203 0.000039 0.000067
7030.000152 0.000419 0.002245 0.000040 0.000062
7040.000149 0.000181 0.002181 0.000038 0.000063
7050.000147 0.000142 0.002224 0.000039 0.000066
7060.000147 0.000142 0.002204 0.000038 0.000066
7070.000146 0.000141 0.002250 0.000038 0.000065
7080.000148 0.000141 0.002142 0.000038 0.000063
7090.000156 0.000139 0.002176 0.000036 0.000060
7100.000243 0.000148 0.002768 0.000039 0.000069
7110.000146 0.000204 0.002194 0.000037 0.000065
7120.000147 0.000143 0.003071 0.000039 0.000066
7130.000148 0.000144 0.003489 0.000042 0.000073
7140.000151 0.000151 0.002173 0.000039 0.000064
7150.000146 0.000140 0.003509 0.000038 0.000067
7160.000148 0.000142 0.002191 0.000038 0.000064
7170.000146 0.000139 0.002441 0.000039 0.000117
7180.000174 0.000141 0.002133 0.000038 0.000065
7190.000151 0.000142 0.002257 0.000039 0.000073
7200.000163 0.000147 0.002187 0.000038 0.000061
7210.000146 0.000222 0.002193 0.000038 0.000062
7220.000145 0.000143 0.002434 0.000037 0.000064
7230.000145 0.000139 0.002933 0.000041 0.000066
7240.000146 0.000140 0.002680 0.000037 0.000065
7250.000143 0.000139 0.002217 0.001029 0.000065
7260.000145 0.000139 0.002361 0.000039 0.000067
7270.000150 0.000143 0.002186 0.000068 0.000066
7280.000148 0.000142 0.002149 0.000037 0.000061
7290.000147 0.000181 0.002183 0.000037 0.000061
7300.000146 0.000455 0.002305 0.000038 0.000074
7310.000148 0.000143 0.002223 0.000038 0.000066
7320.000148 0.000141 0.002547 0.000038 0.000066
7330.000148 0.000143 0.002180 0.000038 0.000336
7340.000146 0.000141 0.002102 0.000037 0.000063
7350.000150 0.000145 0.002170 0.000037 0.000067
7360.000152 0.000138 0.002982 0.000038 0.000067
7370.000149 0.000143 0.002419 0.000037 0.000064
7380.000145 0.000195 0.002228 0.000040 0.000067
7390.000148 0.000143 0.002193 0.000038 0.000064
7400.000155 0.000141 0.002166 0.000067 0.000066
7410.000454 0.000176 0.002193 0.000038 0.000063
7420.000186 0.000142 0.002165 0.000035 0.000066
7430.000144 0.000138 0.002542 0.000038 0.000066
7440.000148 0.000143 0.002733 0.000039 0.000066
7450.000147 0.000141 0.002227 0.000038 0.000067
7460.000145 0.000142 0.002764 0.000037 0.000064
7470.000144 0.000138 0.002207 0.000037 0.000065
7480.000147 0.000185 0.002262 0.000038 0.000062
7490.000154 0.000160 0.002163 0.000038 0.000063
7500.000150 0.000145 0.002719 0.000038 0.000065
7510.000145 0.000139 0.002226 0.000037 0.000074
7520.000148 0.000140 0.002517 0.000038 0.000067
7530.000148 0.000142 0.003734 0.000039 0.000067
7540.000147 0.000143 0.002508 0.000039 0.000067
7550.000146 0.000143 0.002288 0.000038 0.000067
7560.000149 0.000143 0.002899 0.000039 0.000067
7570.000150 0.000145 0.002232 0.000037 0.000065
7580.000148 0.000142 0.002169 0.000039 0.000067
7590.000161 0.000141 0.002196 0.000036 0.000060
7600.000145 0.000137 0.002467 0.000040 0.000064
7610.000147 0.000141 0.002168 0.000037 0.000063
7620.000147 0.000139 0.002165 0.000037 0.000064
7630.000146 0.000138 0.002167 0.000036 0.000060
7640.000150 0.000141 0.002326 0.000039 0.000063
7650.000149 0.000179 0.002197 0.000039 0.000063
7660.000148 0.000142 0.002538 0.000039 0.000067
7670.000148 0.000148 0.002555 0.000039 0.000067
7680.000150 0.000144 0.002180 0.000038 0.000066
7690.000245 0.000152 0.002203 0.000038 0.000065
7700.000146 0.000142 0.002118 0.000036 0.000091
7710.000648 0.000141 0.002173 0.000035 0.000058
7720.000142 0.000149 0.002137 0.000037 0.000059
7730.000144 0.000138 0.002191 0.000037 0.000063
7740.000143 0.000137 0.002795 0.000039 0.000065
7750.000147 0.000256 0.002250 0.000038 0.000064
7760.000148 0.000142 0.002231 0.000040 0.000075
7770.000149 0.000143 0.002174 0.000038 0.000061
7780.000182 0.000708 0.002255 0.000038 0.000061
7790.000181 0.000170 0.002222 0.000038 0.000060
7800.000148 0.000141 0.002177 0.000038 0.000065
7810.000147 0.000141 0.002478 0.000039 0.000065
7820.000148 0.000141 0.002191 0.000039 0.000065
7830.000146 0.000139 0.002161 0.000067 0.000063
7840.000157 0.000138 0.002174 0.000036 0.000059
7850.000143 0.000165 0.002396 0.000040 0.000067
7860.000148 0.000141 0.002302 0.000044 0.000067
7870.000148 0.000142 0.002226 0.000043 0.000065
7880.000149 0.000142 0.002198 0.000038 0.000087
7890.000147 0.000143 0.002221 0.000039 0.000066
7900.000146 0.000142 0.002376 0.000065 0.000063
7910.000152 0.000154 0.002201 0.000038 0.000062
7920.000150 0.000142 0.002705 0.000039 0.000067
7930.000149 0.000142 0.002267 0.000039 0.000067
7940.000194 0.000149 0.002347 0.000039 0.000066
7950.000155 0.000141 0.002594 0.000038 0.000066
7960.000148 0.000141 0.002189 0.000038 0.000064
7970.000202 0.000142 0.002155 0.000039 0.000062
7980.000182 0.000146 0.002204 0.000037 0.000061
7990.000146 0.000139 0.002466 0.000037 0.000065
8000.000146 0.000140 0.002463 0.000036 0.000065
8010.000146 0.000139 0.002209 0.000037 0.000063
8020.000145 0.000138 0.002146 0.000036 0.000060
8030.000181 0.000142 0.003356 0.000038 0.000068
8040.000161 0.000142 0.002169 0.000038 0.000062
8050.000146 0.000175 0.002538 0.000039 0.000061
8060.000148 0.000141 0.002482 0.000039 0.000067
8070.000148 0.000144 0.002450 0.000040 0.000066
8080.000149 0.000143 0.002466 0.000043 0.000068
8090.000148 0.000144 0.003551 0.000038 0.000068
8100.000149 0.000142 0.002482 0.000039 0.000066
8110.000149 0.000142 0.002220 0.000039 0.000066
8120.000151 0.000140 0.002199 0.000038 0.000064
8130.000148 0.000184 0.002185 0.000038 0.000066
8140.000145 0.000140 0.002158 0.000036 0.000092
8150.000158 0.000140 0.002262 0.000038 0.000062
8160.000148 0.000143 0.002674 0.000039 0.000066
8170.000148 0.000140 0.002421 0.000039 0.000066
8180.000149 0.000149 0.002433 0.000038 0.000065
8190.000146 0.000172 0.002187 0.000038 0.000065
8200.000146 0.000140 0.002311 0.000039 0.000323
8210.000149 0.000142 0.002180 0.000038 0.000091
8220.000420 0.000143 0.002483 0.000038 0.000063
8230.000685 0.000145 0.002136 0.000035 0.000064
8240.000146 0.000145 0.002433 0.000038 0.000062
8250.000146 0.000139 0.002496 0.000039 0.000066
8260.000149 0.000139 0.003626 0.000041 0.000068
8270.000153 0.000147 0.002272 0.000042 0.000067
8280.000248 0.000155 0.002208 0.000038 0.000063
8290.000146 0.000138 0.002524 0.000038 0.000068
8300.000147 0.000140 0.002176 0.000210 0.000065
8310.000147 0.000140 0.002166 0.000036 0.000060
8320.000144 0.000146 0.002169 0.000036 0.000057
8330.000144 0.000138 0.002207 0.000037 0.000063
8340.000145 0.000138 0.002183 0.000037 0.000062
8350.000145 0.000137 0.002167 0.000036 0.000059
8360.000148 0.000453 0.002310 0.000038 0.000061
8370.000183 0.000855 0.002326 0.000037 0.000061
8380.000146 0.000175 0.002672 0.000036 0.000060
8390.000143 0.000140 0.002238 0.000039 0.000065
8400.000146 0.000139 0.002473 0.000037 0.000064
8410.000146 0.000139 0.002196 0.000039 0.000065
8420.000145 0.000139 0.002141 0.000036 0.000061
8430.000174 0.000397 0.002175 0.000036 0.000059
8440.000143 0.000139 0.002647 0.000037 0.000065
8450.000147 0.000138 0.002196 0.000037 0.000064
8460.000146 0.000138 0.002199 0.000037 0.000063
8470.000146 0.000138 0.002167 0.000036 0.000066
8480.000169 0.000141 0.002156 0.000036 0.000060
8490.000143 0.000139 0.002180 0.000037 0.000065
8500.000144 0.000136 0.002756 0.000039 0.000066
8510.000150 0.000141 0.002919 0.000039 0.000066
8520.000147 0.000140 0.002184 0.000036 0.000065
8530.000145 0.000138 0.002168 0.000036 0.000091
8540.000156 0.000139 0.002169 0.000036 0.000059
8550.000143 0.000139 0.002741 0.000038 0.000065
8560.000147 0.000140 0.002429 0.000037 0.000063
8570.000145 0.000139 0.002226 0.000037 0.000064
8580.000145 0.000139 0.003381 0.000040 0.000066
8590.000153 0.000141 0.002262 0.000038 0.000064
8600.000145 0.000140 0.002137 0.000036 0.000062
8610.000154 0.000650 0.002217 0.000038 0.000063
8620.000184 0.000143 0.002209 0.000038 0.000062
8630.000153 0.000142 0.002907 0.000039 0.000066
8640.000147 0.000142 0.002158 0.000038 0.000064
8650.000146 0.000140 0.002953 0.000039 0.000068
8660.000148 0.000143 0.002208 0.000039 0.000065
8670.000149 0.000139 0.002187 0.000036 0.000065
8680.000144 0.000139 0.002157 0.000036 0.000061
8690.000154 0.000926 0.002139 0.000036 0.000059
8700.000183 0.000140 0.002526 0.000038 0.000062
8710.000148 0.000142 0.002207 0.000038 0.000066
8720.000147 0.000139 0.002790 0.000039 0.000069
8730.000149 0.000144 0.002251 0.000038 0.000066
8740.000151 0.000140 0.002220 0.000039 0.000066
8750.000148 0.000142 0.002523 0.000038 0.000064
8760.000151 0.000138 0.002151 0.000037 0.000065
8770.000147 0.000140 0.002251 0.000037 0.000062
8780.000149 0.000139 0.002607 0.000037 0.000065
8790.000147 0.000141 0.003380 0.000037 0.000066
8800.000147 0.000139 0.002285 0.000069 0.000066
8810.000149 0.000142 0.002566 0.000038 0.000067
8820.000147 0.000142 0.002523 0.000038 0.000067
8830.000152 0.000143 0.002215 0.000038 0.000067
8840.000150 0.000144 0.002243 0.000038 0.000075
8850.000149 0.000141 0.002148 0.000036 0.000063
8860.000182 0.000144 0.002167 0.000036 0.000062
8870.000278 0.000155 0.002631 0.000036 0.000061
8880.000149 0.000139 0.003175 0.000040 0.000066
8890.000156 0.000140 0.002660 0.000038 0.000065
8900.000148 0.000141 0.006171 0.000067 0.000069
8910.000164 0.000142 0.002713 0.000038 0.000064
8920.000161 0.000150 0.002270 0.000038 0.000081
8930.000160 0.000283 0.002276 0.000038 0.000083
8940.000168 0.000150 0.002207 0.000037 0.000072
8950.000151 0.000669 0.002160 0.000038 0.000062
8960.000196 0.000156 0.002363 0.000036 0.000061
8970.000162 0.000141 0.002160 0.000037 0.000077
8980.000147 0.000141 0.002676 0.000038 0.000096
8990.000162 0.000143 0.002263 0.000037 0.000065
9000.000162 0.000141 0.002206 0.000036 0.000080
9010.000146 0.000139 0.002149 0.000036 0.000060
9020.000169 0.000884 0.002163 0.000036 0.000076
9030.000187 0.000140 0.002222 0.000036 0.000061
9040.000145 0.000140 0.002192 0.000037 0.000084
9050.000145 0.000138 0.002619 0.000039 0.000116
9060.000158 0.000149 0.002213 0.000038 0.000089
9070.000145 0.000183 0.002154 0.000038 0.000089
9080.000162 0.000142 0.002142 0.000037 0.000061
9090.000146 0.000178 0.002401 0.000038 0.000062
9100.000145 0.000150 0.002741 0.000037 0.000081
9110.000147 0.000139 0.002360 0.000040 0.000067
9120.000151 0.000153 0.002459 0.000039 0.000075
9130.000148 0.000155 0.002459 0.000037 0.000091
9140.000153 0.000152 0.002174 0.000036 0.000064
9150.000424 0.000149 0.002116 0.000036 0.000068
9160.000166 0.000168 0.002625 0.000038 0.000076
9170.000146 0.000141 0.002957 0.000038 0.000067
9180.000160 0.000142 0.002501 0.000039 0.000079
9190.000147 0.000143 0.002219 0.000038 0.000066
9200.000160 0.000143 0.002771 0.000040 0.000079
9210.000148 0.000150 0.002426 0.000037 0.000082
9220.000146 0.000138 0.002134 0.000036 0.000103
9230.000659 0.000143 0.002197 0.000036 0.000073
9240.000179 0.000153 0.002301 0.000038 0.000074
9250.000147 0.000142 0.002258 0.000038 0.000066
9260.000146 0.000141 0.002210 0.000038 0.000066
9270.000161 0.000141 0.002235 0.000038 0.000084
9280.000145 0.000138 0.002131 0.000036 0.000060
9290.000151 0.000211 0.002265 0.000038 0.000062
9300.000147 0.000142 0.002254 0.000038 0.000067
9310.000148 0.000143 0.002217 0.000038 0.000079
9320.000160 0.000155 0.002229 0.000038 0.000066
9330.000145 0.000142 0.002129 0.000038 0.000065
9340.000165 0.000140 0.002140 0.000036 0.000076
9350.000162 0.000142 0.002452 0.000039 0.000079
9360.000148 0.000143 0.002253 0.000059 0.000068
9370.000164 0.000142 0.003378 0.000039 0.000096
9380.000150 0.000194 0.002192 0.000039 0.000067
9390.000161 0.000152 0.002202 0.000037 0.000077
9400.000160 0.000141 0.002258 0.000039 0.000067
9410.000167 0.000143 0.002706 0.000039 0.000067
9420.000149 0.000155 0.002280 0.000037 0.000100
9430.000174 0.000144 0.002134 0.000037 0.000090
9440.001167 0.000154 0.002224 0.000038 0.000067
9450.000162 0.000155 0.002181 0.000035 0.000065
9460.000773 0.000153 0.002145 0.000036 0.000060
9470.000149 0.000161 0.002160 0.000036 0.000071
9480.000208 0.000144 0.002164 0.000035 0.000060
9490.000143 0.000138 0.002156 0.000036 0.000064
9500.000143 0.000138 0.002225 0.000055 0.000066
9510.000147 0.000141 0.002734 0.000038 0.000065
9520.000145 0.000147 0.002173 0.000037 0.000064
9530.000146 0.000139 0.002112 0.000037 0.000060
9540.000144 0.000137 0.002708 0.000038 0.000064
9550.000144 0.000139 0.002421 0.000037 0.000064
9560.000145 0.000140 0.002449 0.000037 0.000063
9570.000143 0.000138 0.002278 0.000038 0.000064
9580.000145 0.000140 0.002427 0.000040 0.000130
9590.000151 0.000142 0.002155 0.000036 0.000064
9600.000181 0.000139 0.002435 0.000036 0.000060
9610.000145 0.000138 0.003527 0.000038 0.000065
9620.000146 0.000178 0.002178 0.000036 0.000060
9630.000145 0.000138 0.002139 0.000037 0.000065
9640.000145 0.000137 0.003006 0.000037 0.000064
9650.000146 0.000139 0.002204 0.000037 0.000065
9660.000145 0.000139 0.002211 0.000038 0.000062
9670.000182 0.000140 0.002221 0.000036 0.000061
9680.000145 0.000139 0.003169 0.000038 0.000068
9690.000149 0.000174 0.002414 0.000038 0.000066
9700.000147 0.000142 0.002234 0.000038 0.000066
9710.000149 0.000143 0.002678 0.000038 0.000065
9720.000148 0.000141 0.002886 0.000038 0.000066
9730.000145 0.000140 0.002250 0.000038 0.000065
9740.000148 0.000139 0.002181 0.000035 0.000065
9750.000718 0.000142 0.002141 0.000035 0.000059
9760.000189 0.000140 0.002383 0.000036 0.000059
9770.000145 0.000139 0.002206 0.000039 0.000065
9780.000154 0.000186 0.002457 0.000038 0.000066
9790.000190 0.000141 0.002224 0.000038 0.000066
9800.000149 0.000141 0.002151 0.000037 0.000066
9810.000215 0.000143 0.002151 0.000035 0.000061
9820.000144 0.000138 0.002822 0.000039 0.000065
9830.000147 0.000139 0.002275 0.000038 0.000065
9840.000148 0.000141 0.002211 0.000036 0.000064
9850.000146 0.000138 0.002201 0.000037 0.000066
9860.000148 0.000140 0.002273 0.000038 0.000068
9870.000150 0.000144 0.002188 0.000037 0.000063
9880.000152 0.000151 0.002190 0.000037 0.000062
9890.000146 0.000142 0.003145 0.000039 0.000067
9900.000151 0.000139 0.002218 0.000037 0.000065
9910.000145 0.000138 0.002264 0.000037 0.000066
9920.000148 0.000142 0.003011 0.000039 0.000067
9930.000149 0.000141 0.002196 0.000038 0.000065
9940.000146 0.000141 0.002188 0.000036 0.000060
9950.000149 0.000140 0.002190 0.000035 0.000060
9960.000144 0.000137 0.002641 0.000038 0.000064
9970.000146 0.000138 0.002182 0.000043 0.000065
9980.000146 0.000141 0.002216 0.000036 0.000064
9990.000147 0.000139 0.002294 0.000039 0.000068
10000.000657 0.000145 0.002143 0.000037 0.000062
10010.000154 0.000415 0.002237 0.000040 0.000084
diff --git a/public/assets/dropbox-sync/dropbox-spaces.png b/public/assets/dropbox-sync/dropbox-spaces.png
deleted file mode 100755
index c90f99f..0000000
--- a/public/assets/dropbox-sync/dropbox-spaces.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/esp8366-micropython/boards.jpg b/public/assets/esp8366-micropython/boards.jpg
deleted file mode 100755
index 89e2b30..0000000
--- a/public/assets/esp8366-micropython/boards.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/go-profiling/golang-profiling-cpu.pdf b/public/assets/go-profiling/golang-profiling-cpu.pdf
deleted file mode 100755
index 15241cb..0000000
--- a/public/assets/go-profiling/golang-profiling-cpu.pdf
+++ /dev/null
Binary files differ
diff --git a/public/assets/go-profiling/golang-profiling-mem.pdf b/public/assets/go-profiling/golang-profiling-mem.pdf
deleted file mode 100755
index 822e445..0000000
--- a/public/assets/go-profiling/golang-profiling-mem.pdf
+++ /dev/null
Binary files differ
diff --git a/public/assets/goaccess/goaccess-dash-html.png b/public/assets/goaccess/goaccess-dash-html.png
deleted file mode 100755
index 917d959..0000000
--- a/public/assets/goaccess/goaccess-dash-html.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/goaccess/goaccess-dash-term.png b/public/assets/goaccess/goaccess-dash-term.png
deleted file mode 100755
index e3f6357..0000000
--- a/public/assets/goaccess/goaccess-dash-term.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/2d-player-movement.webm b/public/assets/godot-dynamic-tile-loading/2d-player-movement.webm
deleted file mode 100644
index 579f2f3..0000000
--- a/public/assets/godot-dynamic-tile-loading/2d-player-movement.webm
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/cellular-automata.png b/public/assets/godot-dynamic-tile-loading/cellular-automata.png
deleted file mode 100644
index 1b28242..0000000
--- a/public/assets/godot-dynamic-tile-loading/cellular-automata.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.apple-touch-icon.png b/public/assets/godot-dynamic-tile-loading/example1/index.apple-touch-icon.png
deleted file mode 100644
index 880ae2d..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.apple-touch-icon.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.audio.worklet.js b/public/assets/godot-dynamic-tile-loading/example1/index.audio.worklet.js
deleted file mode 100644
index ea4d8cb..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.audio.worklet.js
+++ /dev/null
@@ -1,211 +0,0 @@
1/*************************************************************************/
2/* audio.worklet.js */
3/*************************************************************************/
4/* This file is part of: */
5/* GODOT ENGINE */
6/* https://godotengine.org */
7/*************************************************************************/
8/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
9/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
10/* */
11/* Permission is hereby granted, free of charge, to any person obtaining */
12/* a copy of this software and associated documentation files (the */
13/* "Software"), to deal in the Software without restriction, including */
14/* without limitation the rights to use, copy, modify, merge, publish, */
15/* distribute, sublicense, and/or sell copies of the Software, and to */
16/* permit persons to whom the Software is furnished to do so, subject to */
17/* the following conditions: */
18/* */
19/* The above copyright notice and this permission notice shall be */
20/* included in all copies or substantial portions of the Software. */
21/* */
22/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
25/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29/*************************************************************************/
30
31class RingBuffer {
32 constructor(p_buffer, p_state, p_threads) {
33 this.buffer = p_buffer;
34 this.avail = p_state;
35 this.threads = p_threads;
36 this.rpos = 0;
37 this.wpos = 0;
38 }
39
40 data_left() {
41 return this.threads ? Atomics.load(this.avail, 0) : this.avail;
42 }
43
44 space_left() {
45 return this.buffer.length - this.data_left();
46 }
47
48 read(output) {
49 const size = this.buffer.length;
50 let from = 0;
51 let to_write = output.length;
52 if (this.rpos + to_write > size) {
53 const high = size - this.rpos;
54 output.set(this.buffer.subarray(this.rpos, size));
55 from = high;
56 to_write -= high;
57 this.rpos = 0;
58 }
59 if (to_write) {
60 output.set(this.buffer.subarray(this.rpos, this.rpos + to_write), from);
61 }
62 this.rpos += to_write;
63 if (this.threads) {
64 Atomics.add(this.avail, 0, -output.length);
65 Atomics.notify(this.avail, 0);
66 } else {
67 this.avail -= output.length;
68 }
69 }
70
71 write(p_buffer) {
72 const to_write = p_buffer.length;
73 const mw = this.buffer.length - this.wpos;
74 if (mw >= to_write) {
75 this.buffer.set(p_buffer, this.wpos);
76 this.wpos += to_write;
77 if (mw === to_write) {
78 this.wpos = 0;
79 }
80 } else {
81 const high = p_buffer.subarray(0, mw);
82 const low = p_buffer.subarray(mw);
83 this.buffer.set(high, this.wpos);
84 this.buffer.set(low);
85 this.wpos = low.length;
86 }
87 if (this.threads) {
88 Atomics.add(this.avail, 0, to_write);
89 Atomics.notify(this.avail, 0);
90 } else {
91 this.avail += to_write;
92 }
93 }
94}
95
96class GodotProcessor extends AudioWorkletProcessor {
97 constructor() {
98 super();
99 this.threads = false;
100 this.running = true;
101 this.lock = null;
102 this.notifier = null;
103 this.output = null;
104 this.output_buffer = new Float32Array();
105 this.input = null;
106 this.input_buffer = new Float32Array();
107 this.port.onmessage = (event) => {
108 const cmd = event.data['cmd'];
109 const data = event.data['data'];
110 this.parse_message(cmd, data);
111 };
112 }
113
114 process_notify() {
115 if (this.notifier) {
116 Atomics.add(this.notifier, 0, 1);
117 Atomics.notify(this.notifier, 0);
118 }
119 }
120
121 parse_message(p_cmd, p_data) {
122 if (p_cmd === 'start' && p_data) {
123 const state = p_data[0];
124 let idx = 0;
125 this.threads = true;
126 this.lock = state.subarray(idx, ++idx);
127 this.notifier = state.subarray(idx, ++idx);
128 const avail_in = state.subarray(idx, ++idx);
129 const avail_out = state.subarray(idx, ++idx);
130 this.input = new RingBuffer(p_data[1], avail_in, true);
131 this.output = new RingBuffer(p_data[2], avail_out, true);
132 } else if (p_cmd === 'stop') {
133 this.running = false;
134 this.output = null;
135 this.input = null;
136 } else if (p_cmd === 'start_nothreads') {
137 this.output = new RingBuffer(p_data[0], p_data[0].length, false);
138 } else if (p_cmd === 'chunk') {
139 this.output.write(p_data);
140 }
141 }
142
143 static array_has_data(arr) {
144 return arr.length && arr[0].length && arr[0][0].length;
145 }
146
147 process(inputs, outputs, parameters) {
148 if (!this.running) {
149 return false; // Stop processing.
150 }
151 if (this.output === null) {
152 return true; // Not ready yet, keep processing.
153 }
154 const process_input = GodotProcessor.array_has_data(inputs);
155 if (process_input) {
156 const input = inputs[0];
157 const chunk = input[0].length * input.length;
158 if (this.input_buffer.length !== chunk) {
159 this.input_buffer = new Float32Array(chunk);
160 }
161 if (!this.threads) {
162 GodotProcessor.write_input(this.input_buffer, input);
163 this.port.postMessage({ 'cmd': 'input', 'data': this.input_buffer });
164 } else if (this.input.space_left() >= chunk) {
165 GodotProcessor.write_input(this.input_buffer, input);
166 this.input.write(this.input_buffer);
167 } else {
168 this.port.postMessage('Input buffer is full! Skipping input frame.');
169 }
170 }
171 const process_output = GodotProcessor.array_has_data(outputs);
172 if (process_output) {
173 const output = outputs[0];
174 const chunk = output[0].length * output.length;
175 if (this.output_buffer.length !== chunk) {
176 this.output_buffer = new Float32Array(chunk);
177 }
178 if (this.output.data_left() >= chunk) {
179 this.output.read(this.output_buffer);
180 GodotProcessor.write_output(output, this.output_buffer);
181 if (!this.threads) {
182 this.port.postMessage({ 'cmd': 'read', 'data': chunk });
183 }
184 } else {
185 this.port.postMessage('Output buffer has not enough frames! Skipping output frame.');
186 }
187 }
188 this.process_notify();
189 return true;
190 }
191
192 static write_output(dest, source) {
193 const channels = dest.length;
194 for (let ch = 0; ch < channels; ch++) {
195 for (let sample = 0; sample < dest[ch].length; sample++) {
196 dest[ch][sample] = source[sample * channels + ch];
197 }
198 }
199 }
200
201 static write_input(dest, source) {
202 const channels = source.length;
203 for (let ch = 0; ch < channels; ch++) {
204 for (let sample = 0; sample < source[ch].length; sample++) {
205 dest[sample * channels + ch] = source[ch][sample];
206 }
207 }
208 }
209}
210
211registerProcessor('godot-processor', GodotProcessor);
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.html b/public/assets/godot-dynamic-tile-loading/example1/index.html
deleted file mode 100644
index e96af24..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.html
+++ /dev/null
@@ -1,248 +0,0 @@
1<!DOCTYPE html>
2<html xmlns='http://www.w3.org/1999/xhtml' lang='' xml:lang=''>
3<head>
4 <meta charset='utf-8' />
5 <meta name='viewport' content='width=device-width, user-scalable=no' />
6 <title>html1</title>
7 <style type='text/css'>
8
9 body {
10 touch-action: none;
11 margin: 0;
12 border: 0 none;
13 padding: 0;
14 text-align: center;
15 background-color: black;
16 }
17
18 #canvas {
19 display: block;
20 margin: 0;
21 color: white;
22 }
23
24 #canvas:focus {
25 outline: none;
26 }
27
28 .godot {
29 font-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;
30 color: #e0e0e0;
31 background-color: #3b3943;
32 background-image: linear-gradient(to bottom, #403e48, #35333c);
33 border: 1px solid #45434e;
34 box-shadow: 0 0 1px 1px #2f2d35;
35 }
36
37
38 /* Status display
39 * ============== */
40
41 #status {
42 position: absolute;
43 left: 0;
44 top: 0;
45 right: 0;
46 bottom: 0;
47 display: flex;
48 justify-content: center;
49 align-items: center;
50 /* don't consume click events - make children visible explicitly */
51 visibility: hidden;
52 }
53
54 #status-progress {
55 width: 366px;
56 height: 7px;
57 background-color: #38363A;
58 border: 1px solid #444246;
59 padding: 1px;
60 box-shadow: 0 0 2px 1px #1B1C22;
61 border-radius: 2px;
62 visibility: visible;
63 }
64
65 @media only screen and (orientation:portrait) {
66 #status-progress {
67 width: 61.8%;
68 }
69 }
70
71 #status-progress-inner {
72 height: 100%;
73 width: 0;
74 box-sizing: border-box;
75 transition: width 0.5s linear;
76 background-color: #202020;
77 border: 1px solid #222223;
78 box-shadow: 0 0 1px 1px #27282E;
79 border-radius: 3px;
80 }
81
82 #status-indeterminate {
83 height: 42px;
84 visibility: visible;
85 position: relative;
86 }
87
88 #status-indeterminate > div {
89 width: 4.5px;
90 height: 0;
91 border-style: solid;
92 border-width: 9px 3px 0 3px;
93 border-color: #2b2b2b transparent transparent transparent;
94 transform-origin: center 21px;
95 position: absolute;
96 }
97
98 #status-indeterminate > div:nth-child(1) { transform: rotate( 22.5deg); }
99 #status-indeterminate > div:nth-child(2) { transform: rotate( 67.5deg); }
100 #status-indeterminate > div:nth-child(3) { transform: rotate(112.5deg); }
101 #status-indeterminate > div:nth-child(4) { transform: rotate(157.5deg); }
102 #status-indeterminate > div:nth-child(5) { transform: rotate(202.5deg); }
103 #status-indeterminate > div:nth-child(6) { transform: rotate(247.5deg); }
104 #status-indeterminate > div:nth-child(7) { transform: rotate(292.5deg); }
105 #status-indeterminate > div:nth-child(8) { transform: rotate(337.5deg); }
106
107 #status-notice {
108 margin: 0 100px;
109 line-height: 1.3;
110 visibility: visible;
111 padding: 4px 6px;
112 visibility: visible;
113 }
114 </style>
115<link id='-gd-engine-icon' rel='icon' type='image/png' href='index.icon.png' />
116<link rel='apple-touch-icon' href='index.apple-touch-icon.png'/>
117
118</head>
119<body>
120 <canvas id='canvas'>
121 HTML5 canvas appears to be unsupported in the current browser.<br />
122 Please try updating or use a different browser.
123 </canvas>
124 <div id='status'>
125 <div id='status-progress' style='display: none;' oncontextmenu='event.preventDefault();'><div id ='status-progress-inner'></div></div>
126 <div id='status-indeterminate' style='display: none;' oncontextmenu='event.preventDefault();'>
127 <div></div>
128 <div></div>
129 <div></div>
130 <div></div>
131 <div></div>
132 <div></div>
133 <div></div>
134 <div></div>
135 </div>
136 <div id='status-notice' class='godot' style='display: none;'></div>
137 </div>
138
139 <script type='text/javascript' src='index.js'></script>
140 <script type='text/javascript'>//<![CDATA[
141
142 const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":7056,"index.wasm":13789463},"focusCanvas":true,"gdnativeLibs":[]};
143 var engine = new Engine(GODOT_CONFIG);
144
145 (function() {
146 const INDETERMINATE_STATUS_STEP_MS = 100;
147 var statusProgress = document.getElementById('status-progress');
148 var statusProgressInner = document.getElementById('status-progress-inner');
149 var statusIndeterminate = document.getElementById('status-indeterminate');
150 var statusNotice = document.getElementById('status-notice');
151
152 var initializing = true;
153 var statusMode = 'hidden';
154
155 var animationCallbacks = [];
156 function animate(time) {
157 animationCallbacks.forEach(callback => callback(time));
158 requestAnimationFrame(animate);
159 }
160 requestAnimationFrame(animate);
161
162 function setStatusMode(mode) {
163
164 if (statusMode === mode || !initializing)
165 return;
166 [statusProgress, statusIndeterminate, statusNotice].forEach(elem => {
167 elem.style.display = 'none';
168 });
169 animationCallbacks = animationCallbacks.filter(function(value) {
170 return (value != animateStatusIndeterminate);
171 });
172 switch (mode) {
173 case 'progress':
174 statusProgress.style.display = 'block';
175 break;
176 case 'indeterminate':
177 statusIndeterminate.style.display = 'block';
178 animationCallbacks.push(animateStatusIndeterminate);
179 break;
180 case 'notice':
181 statusNotice.style.display = 'block';
182 break;
183 case 'hidden':
184 break;
185 default:
186 throw new Error('Invalid status mode');
187 }
188 statusMode = mode;
189 }
190
191 function animateStatusIndeterminate(ms) {
192 var i = Math.floor(ms / INDETERMINATE_STATUS_STEP_MS % 8);
193 if (statusIndeterminate.children[i].style.borderTopColor == '') {
194 Array.prototype.slice.call(statusIndeterminate.children).forEach(child => {
195 child.style.borderTopColor = '';
196 });
197 statusIndeterminate.children[i].style.borderTopColor = '#dfdfdf';
198 }
199 }
200
201 function setStatusNotice(text) {
202 while (statusNotice.lastChild) {
203 statusNotice.removeChild(statusNotice.lastChild);
204 }
205 var lines = text.split('\n');
206 lines.forEach((line) => {
207 statusNotice.appendChild(document.createTextNode(line));
208 statusNotice.appendChild(document.createElement('br'));
209 });
210 };
211
212 function displayFailureNotice(err) {
213 var msg = err.message || err;
214 console.error(msg);
215 setStatusNotice(msg);
216 setStatusMode('notice');
217 initializing = false;
218 };
219
220 if (!Engine.isWebGLAvailable()) {
221 displayFailureNotice('WebGL not available');
222 } else {
223 setStatusMode('indeterminate');
224 engine.startGame({
225 'onProgress': function (current, total) {
226 if (total > 0) {
227 statusProgressInner.style.width = current/total * 100 + '%';
228 setStatusMode('progress');
229 if (current === total) {
230 // wait for progress bar animation
231 setTimeout(() => {
232 setStatusMode('indeterminate');
233 }, 500);
234 }
235 } else {
236 setStatusMode('indeterminate');
237 }
238 },
239 }).then(() => {
240 setStatusMode('hidden');
241 initializing = false;
242 }, displayFailureNotice);
243 }
244 })();
245 //]]></script>
246</body>
247</html>
248
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.icon.png b/public/assets/godot-dynamic-tile-loading/example1/index.icon.png
deleted file mode 100644
index c98fbb6..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.icon.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.js b/public/assets/godot-dynamic-tile-loading/example1/index.js
deleted file mode 100644
index 1c18e52..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.js
+++ /dev/null
@@ -1,796 +0,0 @@
1
2var Godot = (() => {
3 var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
4
5 return (
6function(Godot) {
7 Godot = Godot || {};
8
9var Module=typeof Godot!="undefined"?Godot:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var tempRet0=0;var setTempRet0=value=>{tempRet0=value};var getTempRet0=()=>tempRet0;var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||false;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}function getCFunc(ident){var func=Module["_"+ident];return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(function(type){return type==="number"});var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}else{var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||33554432;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){___funcs_on_exit();callRuntimeCallbacks(__ATEXIT__);FS.quit();TTY.shutdown();IDBFS.quit();runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){{if(Module["onAbort"]){Module["onAbort"](what)}}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;wasmBinaryFile="godot.javascript.opt.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["dk"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["rk"];addOnInit(Module["asm"]["ek"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func=="number"){if(callback.arg===undefined){getWasmTableEntry(func)()}else{getWasmTableEntry(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function getValue(ptr,type="i8"){if(type.endsWith("*"))type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return Number(HEAPF64[ptr>>3]);default:abort("invalid type for getValue: "+type)}return null}function getWasmTableEntry(funcPtr){return wasmTable.get(funcPtr)}function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)}function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}function ___call_sighandler(fp,sig){getWasmTableEntry(fp)(sig)}var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else return function(){abort("randomDevice")}}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")}};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.flush(stream.tty)},flush:function(stream){stream.tty.ops.flush(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.timestamp=Date.now()}return i}},default_tty_ops:{get_char:function(tty){if(!tty.input.length){var result=null;if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function mmapAlloc(size){abort()}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity<CAPACITY_DOUBLING_MAX?2:1.125)>>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size},write:function(stream,buffer,offset,length,position,canOwn){if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray){node.contents.set(buffer.subarray(offset,offset+length),position)}else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},allocate:function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)},mmap:function(stream,length,position,prot,flags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===buffer){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}HEAP8.set(contents,ptr)}return{ptr:ptr,allocated:allocated}},msync:function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var IDBFS={dbs:{},indexedDB:()=>{if(typeof indexedDB!="undefined")return indexedDB;var ret=null;if(typeof window=="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;assert(ret,"IDBFS used, but indexedDB not supported");return ret},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount){return MEMFS.mount.apply(null,arguments)},syncfs:(mount,populate,callback)=>{IDBFS.getLocalSet(mount,(err,local)=>{if(err)return callback(err);IDBFS.getRemoteSet(mount,(err,remote)=>{if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)})})},quit:()=>{Object.values(IDBFS.dbs).forEach(value=>value.close());IDBFS.dbs={}},getDB:(name,callback)=>{var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}if(!req){return callback("Unable to connect to IndexedDB")}req.onupgradeneeded=e=>{var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}};req.onsuccess=()=>{db=req.result;IDBFS.dbs[name]=db;callback(null,db)};req.onerror=e=>{callback(this.error);e.preventDefault()}},getLocalSet:(mount,callback)=>{var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return p=>{return PATH.join2(root,p)}}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push.apply(check,FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={"timestamp":stat.mtime}}return callback(null,{type:"local",entries:entries})},getRemoteSet:(mount,callback)=>{var entries={};IDBFS.getDB(mount.mountpoint,(err,db)=>{if(err)return callback(err);try{var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=e=>{callback(this.error);e.preventDefault()};var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=event=>{var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db:db,entries:entries})}entries[cursor.primaryKey]={"timestamp":cursor.key};cursor.continue()}}catch(e){return callback(e)}})},loadLocalEntry:(path,callback)=>{var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{"timestamp":stat.mtime,"mode":stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{"timestamp":stat.mtime,"mode":stat.mode,"contents":node.contents})}else{return callback(new Error("node type not supported"))}},storeLocalEntry:(path,entry,callback)=>{try{if(FS.isDir(entry["mode"])){FS.mkdirTree(path,entry["mode"])}else if(FS.isFile(entry["mode"])){FS.writeFile(path,entry["contents"],{canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry["mode"]);FS.utime(path,entry["timestamp"],entry["timestamp"])}catch(e){return callback(e)}callback(null)},removeLocalEntry:(path,callback)=>{try{var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)},loadRemoteEntry:(store,path,callback)=>{var req=store.get(path);req.onsuccess=event=>{callback(null,event.target.result)};req.onerror=e=>{callback(this.error);e.preventDefault()}},storeRemoteEntry:(store,path,entry,callback)=>{try{var req=store.put(entry,path)}catch(e){callback(e);return}req.onsuccess=()=>{callback(null)};req.onerror=e=>{callback(this.error);e.preventDefault()}},removeRemoteEntry:(store,path,callback)=>{var req=store.delete(path);req.onsuccess=()=>{callback(null)};req.onerror=e=>{callback(this.error);e.preventDefault()}},reconcile:(src,dst,callback)=>{var total=0;var create=[];Object.keys(src.entries).forEach(function(key){var e=src.entries[key];var e2=dst.entries[key];if(!e2||e["timestamp"].getTime()!=e2["timestamp"].getTime()){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){if(!src.entries[key]){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=e=>{done(this.error);e.preventDefault()};transaction.oncomplete=e=>{if(!errored){callback(null)}};create.sort().forEach(path=>{if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(err,entry)=>{if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,(err,entry)=>{if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(path=>{if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(FS.cwd(),path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(p=>!!p),false);var current=FS.root;var current_path="/";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH_FS.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count+1});current=lookup.node;if(count++>40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i<dirs.length;++i){if(!dirs[i])continue;d+="/"+dirs[i];try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev:(path,mode,dev)=>{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="<generic error, no stack>"})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"IDBFS":IDBFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;_fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}},getMode:(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node},createDevice:(parent,name,input,output)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead},write:(stream,buffer,offset,length,pos)=>{for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.timestamp=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile:obj=>{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size}stream_ops.read=(stream,buffer,offset,length,position)=>{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall__newselect(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd<nfds;fd++){var mask=1<<fd%32;if(!check(fd,allLow,allHigh,mask)){continue}var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var flags=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){flags=stream.stream_ops.poll(stream)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}else{data=new Uint8Array(data)}}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i<peers.length;i++){var peer=sock.peers[peers[i]];try{peer.socket.close()}catch(e){}SOCKFS.websocket_sock_ops.removePeer(sock,peer)}return 0},bind:function(sock,addr,port){if(typeof sock.saddr!="undefined"||typeof sock.sport!="undefined"){throw new FS.ErrnoError(28)}sock.saddr=addr;sock.sport=port;if(sock.type===2){if(sock.server){sock.server.close();sock.server=null}try{sock.sock_ops.listen(sock,0)}catch(e){if(!(e instanceof FS.ErrnoError))throw e;if(e.errno!==138)throw e}}},connect:function(sock,addr,port){if(sock.server){throw new FS.ErrnoError(138)}if(typeof sock.daddr!="undefined"&&typeof sock.dport!="undefined"){var dest=SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport);if(dest){if(dest.socket.readyState===dest.socket.CONNECTING){throw new FS.ErrnoError(7)}else{throw new FS.ErrnoError(30)}}}var peer=SOCKFS.websocket_sock_ops.createPeer(sock,addr,port);sock.daddr=peer.addr;sock.dport=peer.port;throw new FS.ErrnoError(26)},listen:function(sock,backlog){if(!ENVIRONMENT_IS_NODE){throw new FS.ErrnoError(138)}},accept:function(listensock){if(!listensock.server||!listensock.pending.length){throw new FS.ErrnoError(28)}var newsock=listensock.pending.shift();newsock.stream.flags=listensock.stream.flags;return newsock},getname:function(sock,peer){var addr,port;if(peer){if(sock.daddr===undefined||sock.dport===undefined){throw new FS.ErrnoError(53)}addr=sock.daddr;port=sock.dport}else{addr=sock.saddr||0;port=sock.sport||0}return{addr:addr,port:port}},sendmsg:function(sock,buffer,offset,length,addr,port){if(sock.type===2){if(addr===undefined||port===undefined){addr=sock.daddr;port=sock.dport}if(addr===undefined||port===undefined){throw new FS.ErrnoError(17)}}else{addr=sock.daddr;port=sock.dport}var dest=SOCKFS.websocket_sock_ops.getPeer(sock,addr,port);if(sock.type===1){if(!dest||dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){throw new FS.ErrnoError(53)}else if(dest.socket.readyState===dest.socket.CONNECTING){throw new FS.ErrnoError(6)}}if(ArrayBuffer.isView(buffer)){offset+=buffer.byteOffset;buffer=buffer.buffer}var data;data=buffer.slice(offset,offset+length);if(sock.type===2){if(!dest||dest.socket.readyState!==dest.socket.OPEN){if(!dest||dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){dest=SOCKFS.websocket_sock_ops.createPeer(sock,addr,port)}dest.dgram_send_queue.push(data);return length}}try{dest.socket.send(data);return length}catch(e){throw new FS.ErrnoError(28)}},recvmsg:function(sock,length){if(sock.type===1&&sock.server){throw new FS.ErrnoError(53)}var queued=sock.recv_queue.shift();if(!queued){if(sock.type===1){var dest=SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport);if(!dest){throw new FS.ErrnoError(53)}else if(dest.socket.readyState===dest.socket.CLOSING||dest.socket.readyState===dest.socket.CLOSED){return null}else{throw new FS.ErrnoError(6)}}else{throw new FS.ErrnoError(6)}}var queuedLength=queued.data.byteLength||queued.data.length;var queuedOffset=queued.data.byteOffset||0;var queuedBuffer=queued.data.buffer||queued.data;var bytesRead=Math.min(length,queuedLength);var res={buffer:new Uint8Array(queuedBuffer,queuedOffset,bytesRead),addr:queued.addr,port:queued.port};if(sock.type===1&&bytesRead<queuedLength){var bytesRemaining=queuedLength-bytesRead;queued.data=new Uint8Array(queuedBuffer,queuedOffset+bytesRead,bytesRemaining);sock.recv_queue.unshift(queued)}return res}}};function getSocketFromFD(fd){var socket=SOCKFS.getSocket(fd);if(!socket)throw new FS.ErrnoError(8);return socket}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w<words.length;w++){if(typeof words[w]=="string"){if(words[w]==="Z"){for(z=0;z<8-words.length+1;z++){parts[w+z]=0}offset=z-1}else{parts[w+offset]=_htons(parseInt(words[w],16))}}else{parts[w+offset]=words[w]}}return[parts[1]<<16|parts[0],parts[3]<<16|parts[2],parts[5]<<16|parts[4],parts[7]<<16|parts[6]]}function writeSockaddr(sa,family,addr,port,addrlen){switch(family){case 2:addr=inetPton4(addr);zeroMemory(sa,16);if(addrlen){HEAP32[addrlen>>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);break;default:return 5}return 0}var DNS={address_map:{id:1,addrs:{},names:{}},lookup_name:function(name){var res=inetPton4(name);if(res!==null){return name}res=inetPton6(name);if(res!==null){return name}var addr;if(DNS.address_map.addrs[name]){addr=DNS.address_map.addrs[name]}else{var id=DNS.address_map.id++;assert(id<65535,"exceeded max address mappings of 65535");addr="172.29."+(id&255)+"."+(id&65280);DNS.address_map.names[addr]=name;DNS.address_map.addrs[name]=addr}return addr},lookup_addr:function(addr){if(DNS.address_map.names[addr]){return DNS.address_map.names[addr]}return null}};function ___syscall_accept4(fd,addr,addrlen,flags){try{var sock=getSocketFromFD(fd);var newsock=sock.sock_ops.accept(sock);if(addr){var errno=writeSockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word<zstart+longest){if(word===zstart){str+=":";if(zstart===0)str+=":"}continue}}str+=Number(_ntohs(parts[word]&65535)).toString(16);str+=word<7?":":""}return str}function readSockaddr(sa,salen){var family=HEAP16[sa>>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function getSocketAddress(addrp,addrlen,allowNull){if(allowNull&&addrp===0)return null;var info=readSockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info}function ___syscall_bind(fd,addr,addrlen){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.bind(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_chdir(path){try{path=SYSCALLS.getStr(path);FS.chdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_chmod(path,mode){try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_connect(fd,addr,addrlen){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getcwd(buf,size){try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size<cwdLengthInBytes)return-68;stringToUTF8(cwd,buf,size);return cwdLengthInBytes}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getdents64(fd,dirp,count){try{var stream=SYSCALLS.getStreamFromFD(fd);if(!stream.getdents){stream.getdents=FS.readdir(stream.path)}var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var idx=Math.floor(off/struct_size);while(idx<stream.getdents.length&&pos+struct_size<=count){var id;var type;var name=stream.getdents[idx];if(name==="."){id=stream.node.id;type=4}else if(name===".."){var lookup=FS.lookupPath(stream.path,{parent:true});id=lookup.node.id;type=4}else{var child=FS.lookupNode(stream.node,name);id=child.id;type=FS.isChrdev(child.mode)?2:FS.isDir(child.mode)?4:FS.isLink(child.mode)?10:8}tempI64=[id>>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getsockname(fd,addr,addrlen){try{err("__syscall_getsockname "+fd);var sock=getSocketFromFD(fd);var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getsockopt(fd,level,optname,optval,optlen){try{var sock=getSocketFromFD(fd);if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_listen(fd,backlog){try{var sock=getSocketFromFD(fd);sock.sock_ops.listen(sock,backlog);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~4352;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_poll(fds,nfds,timeout){try{var nonzero=0;for(var i=0;i<nfds;i++){var pollfd=fds+8*i;var fd=HEAP32[pollfd>>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_readlinkat(dirfd,path,buf,bufsize){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_sendto(fd,message,length,flags,addr,addr_len){try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}else{return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_statfs64(path,size,buf){try{path=SYSCALLS.getStr(path);HEAP32[buf+4>>2]=4096;HEAP32[buf+40>>2]=4096;HEAP32[buf+8>>2]=1e6;HEAP32[buf+12>>2]=5e5;HEAP32[buf+16>>2]=5e5;HEAP32[buf+20>>2]=FS.nextInode;HEAP32[buf+24>>2]=1e6;HEAP32[buf+28>>2]=42;HEAP32[buf+44>>2]=2;HEAP32[buf+36>>2]=255;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_symlink(target,linkpath){try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function __dlinit(main_dso_handle){}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function __dlopen_js(filename,flag){abort(dlopenMissingError)}function __dlsym_js(handle,symbol){abort(dlopenMissingError)}function __emscripten_date_now(){return Date.now()}var nowIsMonotonic=true;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function __emscripten_throw_longjmp(){throw Infinity}function __gmtime_js(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __localtime_js(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function _tzset_impl(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAP32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset<winterOffset){HEAPU32[tzname>>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function __tzset_js(timezone,daylight,tzname){if(__tzset_js.called)return;__tzset_js.called=true;_tzset_impl(timezone,daylight,tzname)}function _abort(){abort("")}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(!Browser.mainLoop.running){runtimeKeepalivePush();Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate=="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}var _emscripten_get_now;_emscripten_get_now=()=>performance.now();function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(GL.currentContext.defaultFbo){GL.blitOffscreenFramebuffer(GL.currentContext);return 0}if(!GL.currentContext.attributes.explicitSwapControl){return-3}return 0}function _emscripten_webgl_commit_frame(){return _emscripten_webgl_do_commit_frame()}function runtimeKeepalivePush(){runtimeKeepaliveCounter+=1}function _exit(status){exit(status)}function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop){runtimeKeepalivePop();maybeExit();return false}return true}Browser.mainLoop.running=false;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(!checkIsRunning())return;if(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}function callUserCallback(func,synchronous){if(runtimeExited||ABORT){return}if(synchronous){func();return}try{func();maybeExit()}catch(e){handleException(e)}}function runtimeKeepalivePop(){runtimeKeepaliveCounter-=1}function safeSetTimeout(func,timeout){runtimeKeepalivePush();return setTimeout(function(){runtimeKeepalivePop();callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module["setStatus"](message+" ("+(expected-remaining)+"/"+expected+")")}else{Module["setStatus"](message)}}else{Module["setStatus"]("")}}},runIter:function(func){if(ABORT)return;if(Module["preMainLoop"]){var preRet=Module["preMainLoop"]();if(preRet===false){return}}callUserCallback(func);if(Module["postMainLoop"])Module["postMainLoop"]()}},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(!Module["preloadPlugins"])Module["preloadPlugins"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;out("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder!="undefined"?MozBlobBuilder:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:!Browser.hasBlobConstructor?out("warning: no BlobBuilder"):null;Browser.URLObject=typeof window!="undefined"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject=="undefined"){out("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");Module.noImageDecoding=true}var imagePlugin={};imagePlugin["canHandle"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin["handle"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([new Uint8Array(byteArray).buffer],{type:Browser.getMimetype(name)})}}catch(e){warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}}if(!b){var bb=new Browser.BlobBuilder;bb.append(new Uint8Array(byteArray).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);var img=new Image;img.onload=()=>{assert(img.complete,"Image "+name+" could not be decoded");var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);preloadedImages[name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=event=>{out("Image "+url+" could not be decoded");if(onerror)onerror()};img.src=url};Module["preloadPlugins"].push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;preloadedAudios[name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;preloadedAudios[name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",function(){finish(audio)},false);audio.onerror=function audio_onerror(event){if(done)return;out("warning: browser could not fully decode audio "+name+", trying slower base64 approach");function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},handledByPreloadPlugin:function(byteArray,fullname,finish,onerror){Browser.init();var handled=false;Module["preloadPlugins"].forEach(function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func){return safeSetTimeout(func)},safeRequestAnimationFrame:function(func){runtimeKeepalivePush();return Browser.requestAnimationFrame(function(){runtimeKeepalivePop();callUserCallback(func)})},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h<Module["forcedAspectRatio"]){w=Math.round(h*Module["forcedAspectRatio"])}else{h=Math.round(w/Module["forcedAspectRatio"])}}if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvas.parentNode&&typeof screen!="undefined"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!="undefined"){canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!="undefined"){if(w!=wNative||h!=hNative){canvas.style.setProperty("width",w+"px","important");canvas.style.setProperty("height",h+"px","important")}else{canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}}}};function _emscripten_cancel_main_loop(){Browser.mainLoop.pause();Browser.mainLoop.func=null}function _emscripten_force_exit(status){noExitRuntime=false;runtimeKeepaliveCounter=0;exit(status)}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){ext["drawBuffersWEBGL"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"))}var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i<ret;i++){table[i]=null}return ret},getSource:function(shader,count,string,length){var source="";for(var i=0;i<count;++i){var len=length?HEAP32[length+i*4>>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){if(webGLContextAttributes.renderViaOffscreenBackBuffer)webGLContextAttributes["preserveDrawingBuffer"]=true;if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;function fixedGetContext(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver=="webgl"==gl instanceof WebGLRenderingContext?gl:null}canvas.getContext=fixedGetContext}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},enableOffscreenFramebufferAttributes:function(webGLContextAttributes){webGLContextAttributes.renderViaOffscreenBackBuffer=true;webGLContextAttributes.preserveDrawingBuffer=true},createOffscreenFramebuffer:function(context){var gl=context.GLctx;var fbo=gl.createFramebuffer();gl.bindFramebuffer(36160,fbo);context.defaultFbo=fbo;context.defaultFboForbidBlitFramebuffer=false;if(gl.getContextAttributes().antialias){context.defaultFboForbidBlitFramebuffer=true}else{var firefoxMatch=navigator.userAgent.toLowerCase().match(/firefox\/(\d\d)/);if(firefoxMatch!=null){var firefoxVersion=firefoxMatch[1];context.defaultFboForbidBlitFramebuffer=firefoxVersion<67}}context.defaultColorTarget=gl.createTexture();context.defaultDepthTarget=gl.createRenderbuffer();GL.resizeOffscreenFramebuffer(context);gl.bindTexture(3553,context.defaultColorTarget);gl.texParameteri(3553,10241,9728);gl.texParameteri(3553,10240,9728);gl.texParameteri(3553,10242,33071);gl.texParameteri(3553,10243,33071);gl.texImage2D(3553,0,6408,gl.canvas.width,gl.canvas.height,0,6408,5121,null);gl.framebufferTexture2D(36160,36064,3553,context.defaultColorTarget,0);gl.bindTexture(3553,null);var depthTarget=gl.createRenderbuffer();gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.canvas.width,gl.canvas.height);gl.framebufferRenderbuffer(36160,36096,36161,context.defaultDepthTarget);gl.bindRenderbuffer(36161,null);var vertices=[-1,-1,-1,1,1,-1,1,1];var vb=gl.createBuffer();gl.bindBuffer(34962,vb);gl.bufferData(34962,new Float32Array(vertices),35044);gl.bindBuffer(34962,null);context.blitVB=vb;var vsCode="attribute vec2 pos;"+"varying lowp vec2 tex;"+"void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }";var vs=gl.createShader(35633);gl.shaderSource(vs,vsCode);gl.compileShader(vs);var fsCode="varying lowp vec2 tex;"+"uniform sampler2D sampler;"+"void main() { gl_FragColor = texture2D(sampler, tex); }";var fs=gl.createShader(35632);gl.shaderSource(fs,fsCode);gl.compileShader(fs);var blitProgram=gl.createProgram();gl.attachShader(blitProgram,vs);gl.attachShader(blitProgram,fs);gl.linkProgram(blitProgram);context.blitProgram=blitProgram;context.blitPosLoc=gl.getAttribLocation(blitProgram,"pos");gl.useProgram(blitProgram);gl.uniform1i(gl.getUniformLocation(blitProgram,"sampler"),0);gl.useProgram(null);context.defaultVao=undefined;if(gl.createVertexArray){context.defaultVao=gl.createVertexArray();gl.bindVertexArray(context.defaultVao);gl.enableVertexAttribArray(context.blitPosLoc);gl.bindVertexArray(null)}},resizeOffscreenFramebuffer:function(context){var gl=context.GLctx;if(context.defaultColorTarget){var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);gl.texImage2D(3553,0,6408,gl.drawingBufferWidth,gl.drawingBufferHeight,0,6408,5121,null);gl.bindTexture(3553,prevTextureBinding)}if(context.defaultDepthTarget){var prevRenderBufferBinding=gl.getParameter(36007);gl.bindRenderbuffer(36161,context.defaultDepthTarget);gl.renderbufferStorage(36161,33189,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.bindRenderbuffer(36161,prevRenderBufferBinding)}},blitOffscreenFramebuffer:function(context){var gl=context.GLctx;var prevScissorTest=gl.getParameter(3089);if(prevScissorTest)gl.disable(3089);var prevFbo=gl.getParameter(36006);if(gl.blitFramebuffer&&!context.defaultFboForbidBlitFramebuffer){gl.bindFramebuffer(36008,context.defaultFbo);gl.bindFramebuffer(36009,null);gl.blitFramebuffer(0,0,gl.canvas.width,gl.canvas.height,0,0,gl.canvas.width,gl.canvas.height,16384,9728)}else{gl.bindFramebuffer(36160,null);var prevProgram=gl.getParameter(35725);gl.useProgram(context.blitProgram);var prevVB=gl.getParameter(34964);gl.bindBuffer(34962,context.blitVB);var prevActiveTexture=gl.getParameter(34016);gl.activeTexture(33984);var prevTextureBinding=gl.getParameter(32873);gl.bindTexture(3553,context.defaultColorTarget);var prevBlend=gl.getParameter(3042);if(prevBlend)gl.disable(3042);var prevCullFace=gl.getParameter(2884);if(prevCullFace)gl.disable(2884);var prevDepthTest=gl.getParameter(2929);if(prevDepthTest)gl.disable(2929);var prevStencilTest=gl.getParameter(2960);if(prevStencilTest)gl.disable(2960);function draw(){gl.vertexAttribPointer(context.blitPosLoc,2,5126,false,0,0);gl.drawArrays(5,0,4)}if(context.defaultVao){var prevVAO=gl.getParameter(34229);gl.bindVertexArray(context.defaultVao);draw();gl.bindVertexArray(prevVAO)}else{var prevVertexAttribPointer={buffer:gl.getVertexAttrib(context.blitPosLoc,34975),size:gl.getVertexAttrib(context.blitPosLoc,34339),stride:gl.getVertexAttrib(context.blitPosLoc,34340),type:gl.getVertexAttrib(context.blitPosLoc,34341),normalized:gl.getVertexAttrib(context.blitPosLoc,34922),pointer:gl.getVertexAttribOffset(context.blitPosLoc,34373)};var maxVertexAttribs=gl.getParameter(34921);var prevVertexAttribEnables=[];for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=gl.getVertexAttrib(i,34338);var wantEnabled=i==context.blitPosLoc;if(prevEnabled&&!wantEnabled){gl.disableVertexAttribArray(i)}if(!prevEnabled&&wantEnabled){gl.enableVertexAttribArray(i)}prevVertexAttribEnables[i]=prevEnabled}draw();for(var i=0;i<maxVertexAttribs;++i){var prevEnabled=prevVertexAttribEnables[i];var nowEnabled=i==context.blitPosLoc;if(prevEnabled&&!nowEnabled){gl.enableVertexAttribArray(i)}if(!prevEnabled&&nowEnabled){gl.disableVertexAttribArray(i)}}gl.bindBuffer(34962,prevVertexAttribPointer.buffer);gl.vertexAttribPointer(context.blitPosLoc,prevVertexAttribPointer.size,prevVertexAttribPointer.type,prevVertexAttribPointer.normalized,prevVertexAttribPointer.stride,prevVertexAttribPointer.offset)}if(prevStencilTest)gl.enable(2960);if(prevDepthTest)gl.enable(2929);if(prevCullFace)gl.enable(2884);if(prevBlend)gl.enable(3042);gl.bindTexture(3553,prevTextureBinding);gl.activeTexture(prevActiveTexture);gl.bindBuffer(34962,prevVB);gl.useProgram(prevProgram)}gl.bindFramebuffer(36160,prevFbo);if(prevScissorTest)gl.enable(3089)},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault=="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}if(webGLContextAttributes.renderViaOffscreenBackBuffer)GL.createOffscreenFramebuffer(context);return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents=="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query_webgl2")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes("lose_context")&&!ext.includes("debug")){GLctx.getExtension(ext)}})}};function _emscripten_glActiveTexture(x0){GLctx["activeTexture"](x0)}function _emscripten_glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glBeginQuery(target,id){GLctx["beginQuery"](target,GL.queries[id])}function _emscripten_glBeginQueryEXT(target,id){GLctx.disjointTimerQueryExt["beginQueryEXT"](target,GL.queries[id])}function _emscripten_glBeginTransformFeedback(x0){GLctx["beginTransformFeedback"](x0)}function _emscripten_glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _emscripten_glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _emscripten_glBindBufferBase(target,index,buffer){GLctx["bindBufferBase"](target,index,GL.buffers[buffer])}function _emscripten_glBindBufferRange(target,index,buffer,offset,ptrsize){GLctx["bindBufferRange"](target,index,GL.buffers[buffer],offset,ptrsize)}function _emscripten_glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _emscripten_glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _emscripten_glBindSampler(unit,sampler){GLctx["bindSampler"](unit,GL.samplers[sampler])}function _emscripten_glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _emscripten_glBindTransformFeedback(target,id){GLctx["bindTransformFeedback"](target,GL.transformFeedbacks[id])}function _emscripten_glBindVertexArray(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _emscripten_glBindVertexArrayOES(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _emscripten_glBlendColor(x0,x1,x2,x3){GLctx["blendColor"](x0,x1,x2,x3)}function _emscripten_glBlendEquation(x0){GLctx["blendEquation"](x0)}function _emscripten_glBlendEquationSeparate(x0,x1){GLctx["blendEquationSeparate"](x0,x1)}function _emscripten_glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _emscripten_glBlendFuncSeparate(x0,x1,x2,x3){GLctx["blendFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){GLctx["blitFramebuffer"](x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)}function _emscripten_glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data&&size){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _emscripten_glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){size&&GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _emscripten_glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _emscripten_glClear(x0){GLctx["clear"](x0)}function _emscripten_glClearBufferfi(x0,x1,x2,x3){GLctx["clearBufferfi"](x0,x1,x2,x3)}function _emscripten_glClearBufferfv(buffer,drawbuffer,value){GLctx["clearBufferfv"](buffer,drawbuffer,HEAPF32,value>>2)}function _emscripten_glClearBufferiv(buffer,drawbuffer,value){GLctx["clearBufferiv"](buffer,drawbuffer,HEAP32,value>>2)}function _emscripten_glClearBufferuiv(buffer,drawbuffer,value){GLctx["clearBufferuiv"](buffer,drawbuffer,HEAPU32,value>>2)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearDepthf(x0){GLctx["clearDepth"](x0)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296}function _emscripten_glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _emscripten_glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _emscripten_glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){GLctx["copyTexSubImage3D"](x0,x1,x2,x3,x4,x5,x6,x7,x8)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _emscripten_glDeleteQueries(n,ids){for(var i=0;i<n;i++){var id=HEAP32[ids+i*4>>2];var query=GL.queries[id];if(!query)continue;GLctx["deleteQuery"](query);GL.queries[id]=null}}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i<n;i++){var id=HEAP32[ids+i*4>>2];var query=GL.queries[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.queries[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i<n;i++){var id=HEAP32[renderbuffers+i*4>>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteSamplers(n,samplers){for(var i=0;i<n;i++){var id=HEAP32[samplers+i*4>>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx["deleteSampler"](sampler);sampler.name=0;GL.samplers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteTransformFeedbacks(n,ids){for(var i=0;i<n;i++){var id=HEAP32[ids+i*4>>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx["deleteTransformFeedback"](transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedARB(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedEXT(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedNV(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersEXT(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedARB(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedEXT(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedNV(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQuery(x0){GLctx["endQuery"](x0)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _emscripten_glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i<n;i++){var buffer=GLctx[createFunction]();var id=buffer&&GL.getNewId(objectTable);if(buffer){buffer.name=id;objectTable[id]=buffer}else{GL.recordError(1282)}HEAP32[buffers+i*4>>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueries(n,ids){__glGenObject(n,ids,"createQuery",GL.queries)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i<n;i++){var query=GLctx.disjointTimerQueryExt["createQueryEXT"]();if(!query){GL.recordError(1282);while(i<n)HEAP32[ids+i++*4>>2]=0;return}var id=GL.getNewId(GL.queries);query.name=id;GL.queries[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenTransformFeedbacks(n,ids){__glGenObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];if(pname==35393){var name=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return}var result=GLctx["getActiveUniformBlockParameter"](program,uniformBlockIndex,pname);if(result===null)return;if(pname==35395){for(var i=0;i<result.length;i++){HEAP32[params+i*4>>2]=result[i]}}else{HEAP32[params>>2]=result}}function _emscripten_glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i<uniformCount;i++){ids.push(HEAP32[uniformIndices+i*4>>2])}var result=GLctx["getActiveUniforms"](program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i<len;i++){HEAP32[params+i*4>>2]=result[i]}}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i<len;++i){var id=GL.shaders.indexOf(result[i]);HEAP32[shaders+i*4>>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i<result.length;++i){switch(type){case 0:HEAP32[p+i*4>>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}writeI53ToI64(data,GLctx.getBufferParameter(target,value))}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFragDataLocation(program,name){return GLctx["getFragDataLocation"](GL.programs[program],UTF8ToString(name))}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx["getIndexedParameter"](target,index);var ret;switch(typeof result){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:writeI53ToI64(data,ret);break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data>>0]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}}function _emscripten_glGetInteger64i_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,1)}function _emscripten_glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)}function _emscripten_glGetIntegeri_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,0)}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx["getInternalformatParameter"](target,internalformat,pname);if(ret===null)return;for(var i=0;i<ret.length&&i<bufSize;++i){HEAP32[params+i*4>>2]=ret[i]}}function _emscripten_glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i<GLctx.getProgramParameter(program,35718);++i){program.maxUniformLength=Math.max(program.maxUniformLength,GLctx.getActiveUniform(program,i).name.length+1)}}HEAP32[p>>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i<GLctx.getProgramParameter(program,35721);++i){program.maxAttributeLength=Math.max(program.maxAttributeLength,GLctx.getActiveAttrib(program,i).name.length+1)}}HEAP32[p>>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i<GLctx.getProgramParameter(program,35382);++i){program.maxUniformBlockNameLength=Math.max(program.maxUniformBlockNameLength,GLctx.getActiveUniformBlockName(program,i).length+1)}}HEAP32[p>>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param;if(GL.currentContext.version<2){param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname)}else{param=GLctx["getQueryParameter"](query,pname)}var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param;if(GL.currentContext.version<2){param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname)}else{param=GLctx["getQueryParameter"](query,pname)}var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx["getQueryParameter"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx["getQuery"](target,pname)}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx["getSamplerParameter"](GL.samplers[sampler],pname)}function _emscripten_glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx["getSamplerParameter"](GL.samplers[sampler],pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _emscripten_glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _emscripten_glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);if(ret!==null){HEAP32[values>>2]=ret;if(length)HEAP32[length>>2]=1}}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx["getTransformFeedbackVarying"](program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _emscripten_glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i<uniformCount;i++)names.push(UTF8ToString(HEAP32[uniformNames+i*4>>2]));var result=GLctx["getUniformIndices"](program,names);if(!result)return;var len=result.length;for(var i=0;i<len;i++){HEAP32[uniformIndices+i*4>>2]=result[i]}}function webglGetLeftBracePos(name){return name.slice(-1)=="]"&&name.lastIndexOf("[")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i<GLctx.getProgramParameter(program,35718);++i){var u=GLctx.getActiveUniform(program,i);var nm=u.name;var sz=u.size;var lb=webglGetLeftBracePos(nm);var arrayName=lb>0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j<sz;++j){uniformLocsById[id]=j;program.uniformArrayNamesById[id++]=arrayName}}}}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc=="number"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?"["+webglLoc+"]":""))}return webglLoc}else{GL.recordError(1282)}}function emscriptenWebGLGetUniform(program,location,params,type){if(!params){GL.recordError(1281);return}program=GL.programs[program];webglPrepareUniformLocationsBeforeFirstUse(program);var data=GLctx.getUniform(program,webglGetUniformLocation(location));if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i<data.length;i++){switch(type){case 0:HEAP32[params+i*4>>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetUniformuiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i<data.length;i++){switch(type){case 0:HEAP32[params+i*4>>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}}function _emscripten_glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribIuiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i<numAttachments;i++){list[i]=HEAP32[attachments+i*4>>2]}GLctx["invalidateFramebuffer"](target,list)}function _emscripten_glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i<numAttachments;i++){list[i]=HEAP32[attachments+i*4>>2]}GLctx["invalidateSubFramebuffer"](target,list,x,y,width,height)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx["isQuery"](query)}function _emscripten_glIsQueryEXT(id){var query=GL.queries[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx["isSampler"](sampler)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsSync(sync){return GLctx.isSync(GL.syncs[sync])}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsTransformFeedback(id){return GLctx["isTransformFeedback"](GL.transformFeedbacks[id])}function _emscripten_glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _emscripten_glPauseTransformFeedback(){GLctx["pauseTransformFeedback"]()}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}function _emscripten_glProgramParameteri(program,pname,value){GL.recordError(1280)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.queries[id],target)}function _emscripten_glReadBuffer(x0){GLctx["readBuffer"](x0)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<<shift;var sizePerPixel=__colorChannelsInGlTextureFormat(format)*byteSize;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);return heap.subarray(pixels>>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _emscripten_glResumeTransformFeedback(){GLctx["resumeTransformFeedback"]()}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glSamplerParameterf(sampler,pname,param){GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteri(sampler,pname,param){GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _emscripten_glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx["texStorage3D"](x0,x1,x2,x3,x4,x5)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _emscripten_glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i<count;i++)vars.push(UTF8ToString(HEAP32[varyings+i*4>>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform1fv(webglGetUniformLocation(location),HEAPF32,value>>2,count);return}if(count<=288){var view=miniTempWebGLFloatBuffers[count-1];for(var i=0;i<count;++i){view[i]=HEAPF32[value+4*i>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform1iv(webglGetUniformLocation(location),HEAP32,value>>2,count);return}if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i<count;++i){view[i]=HEAP32[value+4*i>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform1ui(location,v0){GLctx.uniform1ui(webglGetUniformLocation(location),v0)}function _emscripten_glUniform1uiv(location,count,value){count&&GLctx.uniform1uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(webglGetUniformLocation(location),v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(webglGetUniformLocation(location),v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2iv(webglGetUniformLocation(location),HEAP32,value>>2,count*2);return}if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform2ui(location,v0,v1){GLctx.uniform2ui(webglGetUniformLocation(location),v0,v1)}function _emscripten_glUniform2uiv(location,count,value){count&&GLctx.uniform2uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*2)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(webglGetUniformLocation(location),v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform3fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(webglGetUniformLocation(location),v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform3iv(webglGetUniformLocation(location),HEAP32,value>>2,count*3);return}if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(webglGetUniformLocation(location),v0,v1,v2)}function _emscripten_glUniform3uiv(location,count,value){count&&GLctx.uniform3uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*3)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(webglGetUniformLocation(location),v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(webglGetUniformLocation(location),v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(webglGetUniformLocation(location),v0,v1,v2,v3)}function _emscripten_glUniform4uiv(location,count,value){count&&GLctx.uniform4uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*4)}function _emscripten_glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUniformMatrix2x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix2x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUniformMatrix3x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix3x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUniformMatrix4x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix4x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorARB(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorEXT(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorNV(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribI4i(x0,x1,x2,x3,x4){GLctx["vertexAttribI4i"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])}function _emscripten_glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])}function _emscripten_glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_glWaitSync(sync,flags,timeoutLo,timeoutHi){GLctx.waitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop){var browserIterationFunc=getWasmTableEntry(func);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop)}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence<y.precedence})},removeDeferredCalls:function(targetFunction){for(var i=0;i<JSEvents.deferredCalls.length;++i){if(JSEvents.deferredCalls[i].targetFunction==targetFunction){JSEvents.deferredCalls.splice(i,1);--i}}},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(!JSEvents.canPerformEventHandlerRequests()){return}for(var i=0;i<JSEvents.deferredCalls.length;++i){var call=JSEvents.deferredCalls[i];JSEvents.deferredCalls.splice(i,1);--i;call.targetFunction.apply(null,call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==target&&(!eventTypeString||eventTypeString==JSEvents.eventHandlers[i].eventTypeString)){JSEvents._removeHandler(i--)}}},_removeHandler:function(i){var h=JSEvents.eventHandlers[i];h.target.removeEventListener(h.eventTypeString,h.eventListenerFunc,h.useCapture);JSEvents.eventHandlers.splice(i,1)},registerOrRemoveHandler:function(eventHandler){var jsEventHandler=function jsEventHandler(event){++JSEvents.inEventHandler;JSEvents.currentEventHandler=eventHandler;JSEvents.runDeferredCalls();eventHandler.handlerFunc(event);JSEvents.runDeferredCalls();--JSEvents.inEventHandler};if(eventHandler.callbackfunc){eventHandler.eventListenerFunc=jsEventHandler;eventHandler.target.addEventListener(eventHandler.eventTypeString,jsEventHandler,eventHandler.useCapture);JSEvents.eventHandlers.push(eventHandler);JSEvents.registerRemoveEventListeners()}else{for(var i=0;i<JSEvents.eventHandlers.length;++i){if(JSEvents.eventHandlers[i].target==eventHandler.target&&JSEvents.eventHandlers[i].eventTypeString==eventHandler.eventTypeString){JSEvents._removeHandler(i--)}}}},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};var __emscripten_webgl_power_preferences=["default","low-power","high-performance"];function maybeCStringToJsString(cString){return cString>2?UTF8ToString(cString):cString}var specialHTMLTargets=[0,typeof document!="undefined"?document:0,typeof window!="undefined"?window:0];function findEventTarget(target){target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||(typeof document!="undefined"?document.querySelector(target):undefined);return domElement}function findCanvasEventTarget(target){return findEventTarget(target)}function _emscripten_webgl_do_create_context(target,attributes){var a=attributes>>2;var powerPreference=HEAP32[a+(24>>2)];var contextAttributes={"alpha":!!HEAP32[a+(0>>2)],"depth":!!HEAP32[a+(4>>2)],"stencil":!!HEAP32[a+(8>>2)],"antialias":!!HEAP32[a+(12>>2)],"premultipliedAlpha":!!HEAP32[a+(16>>2)],"preserveDrawingBuffer":!!HEAP32[a+(20>>2)],"powerPreference":__emscripten_webgl_power_preferences[powerPreference],"failIfMajorPerformanceCaveat":!!HEAP32[a+(28>>2)],majorVersion:HEAP32[a+(32>>2)],minorVersion:HEAP32[a+(36>>2)],enableExtensionsByDefault:HEAP32[a+(40>>2)],explicitSwapControl:HEAP32[a+(44>>2)],proxyContextToMainThread:HEAP32[a+(48>>2)],renderViaOffscreenBackBuffer:HEAP32[a+(52>>2)]};var canvas=findCanvasEventTarget(target);if(!canvas){return 0}if(contextAttributes.explicitSwapControl&&!contextAttributes.renderViaOffscreenBackBuffer){contextAttributes.renderViaOffscreenBackBuffer=true}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_destroy_context(contextHandle){if(GL.currentContext==contextHandle)GL.currentContext=0;GL.deleteContext(contextHandle)}function _emscripten_webgl_init_context_attributes(attributes){var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4;HEAP8[pbuf>>0]=type;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function _getTempRet0(){return getTempRet0()}function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?inetNtop6(addr):inetNtop4(addr);sa=_malloc(salen);errno=writeSockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAP32[ai+24>>2]=canon;HEAPU32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=inetPton4(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=inetPton6(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAPU32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=inetPton4(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0}function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=readSockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBeginTransformFeedback(x0){GLctx["beginTransformFeedback"](x0)}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx["bindBufferBase"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,framebuffer?GL.framebuffers[framebuffer]:GL.currentContext.defaultFbo)}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _glBlendEquation(x0){GLctx["blendEquation"](x0)}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBlendFuncSeparate(x0,x1,x2,x3){GLctx["blendFuncSeparate"](x0,x1,x2,x3)}function _glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){GLctx["blitFramebuffer"](x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data&&size){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){size&&GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearBufferfv(buffer,drawbuffer,value){GLctx["clearBufferfv"](buffer,drawbuffer,HEAPF32,value>>2)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i<n;i++){var id=HEAP32[buffers+i*4>>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i<n;++i){var id=HEAP32[framebuffers+i*4>>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i<n;i++){var id=HEAP32[renderbuffers+i*4>>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i<n;i++){var id=HEAP32[textures+i*4>>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i<n;i++){var id=HEAP32[vaos+i*4>>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDepthMask(flag){GLctx.depthMask(!!flag)}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i<n;i++){bufArray[i]=HEAP32[bufs+i*4>>2]}GLctx["drawBuffers"](bufArray)}function _glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _glFinish(){GLctx["finish"]()}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i<GLctx.getProgramParameter(program,35718);++i){program.maxUniformLength=Math.max(program.maxUniformLength,GLctx.getActiveUniform(program,i).name.length+1)}}HEAP32[p>>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i<GLctx.getProgramParameter(program,35721);++i){program.maxAttributeLength=Math.max(program.maxAttributeLength,GLctx.getActiveAttrib(program,i).name.length+1)}}HEAP32[p>>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i<GLctx.getProgramParameter(program,35382);++i){program.maxUniformBlockNameLength=Math.max(program.maxUniformBlockNameLength,GLctx.getActiveUniformBlockName(program,i).length+1)}}HEAP32[p>>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _glGetUniformLocation(program,name){name=UTF8ToString(name);if(program=GL.programs[program]){webglPrepareUniformLocationsBeforeFirstUse(program);var uniformLocsById=program.uniformLocsById;var arrayIndex=0;var uniformBaseName=name;var leftBrace=webglGetLeftBracePos(name);if(leftBrace>0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex<sizeAndId[0]){arrayIndex+=sizeAndId[1];if(uniformLocsById[arrayIndex]=uniformLocsById[arrayIndex]||GLctx.getUniformLocation(program,name)){return arrayIndex}}}else{GL.recordError(1281)}return-1}function _glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i<numAttachments;i++){list[i]=HEAP32[attachments+i*4>>2]}GLctx["invalidateFramebuffer"](target,list)}function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}function _glProgramParameteri(program,pname,value){GL.recordError(1280)}function _glReadBuffer(x0){GLctx["readBuffer"](x0)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i<count;i++)vars.push(UTF8ToString(HEAP32[varyings+i*4>>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}function _glUniform1iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform1iv(webglGetUniformLocation(location),HEAP32,value>>2,count);return}if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i<count;++i){view[i]=HEAP32[value+4*i>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(webglGetUniformLocation(location),view)}function _glUniform1ui(location,v0){GLctx.uniform1ui(webglGetUniformLocation(location),v0)}function _glUniform2f(location,v0,v1){GLctx.uniform2f(webglGetUniformLocation(location),v0,v1)}function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _glUniform2i(location,v0,v1){GLctx.uniform2i(webglGetUniformLocation(location),v0,v1)}function _glUniform2iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2iv(webglGetUniformLocation(location),HEAP32,value>>2,count*2);return}if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(webglGetUniformLocation(location),view)}function _glUniform3f(location,v0,v1,v2){GLctx.uniform3f(webglGetUniformLocation(location),v0,v1,v2)}function _glUniform3fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform3fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(webglGetUniformLocation(location),view)}function _glUniform3i(location,v0,v1,v2){GLctx.uniform3i(webglGetUniformLocation(location),v0,v1,v2)}function _glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(webglGetUniformLocation(location),v0,v1,v2,v3)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}function _glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(webglGetUniformLocation(location),v0,v1,v2,v3)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,view)}function _glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,view)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GodotRuntime={get_func:function(ptr){return wasmTable.get(ptr)},error:function(){err.apply(null,Array.from(arguments))},print:function(){out.apply(null,Array.from(arguments))},malloc:function(p_size){return _malloc(p_size)},free:function(p_ptr){_free(p_ptr)},getHeapValue:function(p_ptr,p_type){return getValue(p_ptr,p_type)},setHeapValue:function(p_ptr,p_value,p_type){setValue(p_ptr,p_value,p_type)},heapSub:function(p_heap,p_ptr,p_len){const bytes=p_heap.BYTES_PER_ELEMENT;return p_heap.subarray(p_ptr/bytes,p_ptr/bytes+p_len)},heapSlice:function(p_heap,p_ptr,p_len){const bytes=p_heap.BYTES_PER_ELEMENT;return p_heap.slice(p_ptr/bytes,p_ptr/bytes+p_len)},heapCopy:function(p_dst,p_src,p_ptr){const bytes=p_src.BYTES_PER_ELEMENT;return p_dst.set(p_src,p_ptr/bytes)},parseString:function(p_ptr){return UTF8ToString(p_ptr)},parseStringArray:function(p_ptr,p_size){const strings=[];const ptrs=GodotRuntime.heapSub(HEAP32,p_ptr,p_size);ptrs.forEach(function(ptr){strings.push(GodotRuntime.parseString(ptr))});return strings},strlen:function(p_str){return lengthBytesUTF8(p_str)},allocString:function(p_str){const length=GodotRuntime.strlen(p_str)+1;const c_str=GodotRuntime.malloc(length);stringToUTF8(p_str,c_str,length);return c_str},allocStringArray:function(p_strings){const size=p_strings.length;const c_ptr=GodotRuntime.malloc(size*4);for(let i=0;i<size;i++){HEAP32[(c_ptr>>2)+i]=GodotRuntime.allocString(p_strings[i])}return c_ptr},freeStringArray:function(p_ptr,p_len){for(let i=0;i<p_len;i++){GodotRuntime.free(HEAP32[(p_ptr>>2)+i])}GodotRuntime.free(p_ptr)},stringToHeap:function(p_str,p_ptr,p_len){return stringToUTF8Array(p_str,HEAP8,p_ptr,p_len)}};var GodotConfig={canvas:null,locale:"en",canvas_resize_policy:2,virtual_keyboard:false,persistent_drops:false,on_execute:null,on_exit:null,init_config:function(p_opts){GodotConfig.canvas_resize_policy=p_opts["canvasResizePolicy"];GodotConfig.canvas=p_opts["canvas"];GodotConfig.locale=p_opts["locale"]||GodotConfig.locale;GodotConfig.virtual_keyboard=p_opts["virtualKeyboard"];GodotConfig.persistent_drops=!!p_opts["persistentDrops"];GodotConfig.on_execute=p_opts["onExecute"];GodotConfig.on_exit=p_opts["onExit"];if(p_opts["focusCanvas"]){GodotConfig.canvas.focus()}},locate_file:function(file){return Module["locateFile"](file)},clear:function(){GodotConfig.canvas=null;GodotConfig.locale="en";GodotConfig.canvas_resize_policy=2;GodotConfig.virtual_keyboard=false;GodotConfig.persistent_drops=false;GodotConfig.on_execute=null;GodotConfig.on_exit=null}};var ERRNO_CODES={};var GodotFS={_idbfs:false,_syncing:false,_mount_points:[],is_persistent:function(){return GodotFS._idbfs?1:0},init:function(persistentPaths){GodotFS._idbfs=false;if(!Array.isArray(persistentPaths)){return Promise.reject(new Error("Persistent paths must be an array"))}if(!persistentPaths.length){return Promise.resolve()}GodotFS._mount_points=persistentPaths.slice();function createRecursive(dir){try{FS.stat(dir)}catch(e){if(e.errno!==ERRNO_CODES.ENOENT){throw e}FS.mkdirTree(dir)}}GodotFS._mount_points.forEach(function(path){createRecursive(path);FS.mount(IDBFS,{},path)});return new Promise(function(resolve,reject){FS.syncfs(true,function(err){if(err){GodotFS._mount_points=[];GodotFS._idbfs=false;GodotRuntime.print(`IndexedDB not available: ${err.message}`)}else{GodotFS._idbfs=true}resolve(err)})})},deinit:function(){GodotFS._mount_points.forEach(function(path){try{FS.unmount(path)}catch(e){GodotRuntime.print("Already unmounted",e)}if(GodotFS._idbfs&&IDBFS.dbs[path]){IDBFS.dbs[path].close();delete IDBFS.dbs[path]}});GodotFS._mount_points=[];GodotFS._idbfs=false;GodotFS._syncing=false},sync:function(){if(GodotFS._syncing){GodotRuntime.error("Already syncing!");return Promise.resolve()}GodotFS._syncing=true;return new Promise(function(resolve,reject){FS.syncfs(false,function(error){if(error){GodotRuntime.error(`Failed to save IDB file system: ${error.message}`)}GodotFS._syncing=false;resolve(error)})})},copy_to_fs:function(path,buffer){const idx=path.lastIndexOf("/");let dir="/";if(idx>0){dir=path.slice(0,idx)}try{FS.stat(dir)}catch(e){if(e.errno!==ERRNO_CODES.ENOENT){throw e}FS.mkdirTree(dir)}FS.writeFile(path,new Uint8Array(buffer))}};var GodotOS={request_quit:function(){},_async_cbs:[],_fs_sync_promise:null,atexit:function(p_promise_cb){GodotOS._async_cbs.push(p_promise_cb)},cleanup:function(exit_code){const cb=GodotConfig.on_exit;GodotFS.deinit();GodotConfig.clear();if(cb){cb(exit_code)}},finish_async:function(callback){GodotOS._fs_sync_promise.then(function(err){const promises=[];GodotOS._async_cbs.forEach(function(cb){promises.push(new Promise(cb))});return Promise.all(promises)}).then(function(){return GodotFS.sync()}).then(function(err){setTimeout(function(){callback()},0)})}};var GodotAudio={ctx:null,input:null,driver:null,interval:0,init:function(mix_rate,latency,onstatechange,onlatencyupdate){const opts={};if(mix_rate){opts["sampleRate"]=mix_rate}const ctx=new(window.AudioContext||window.webkitAudioContext)(opts);GodotAudio.ctx=ctx;ctx.onstatechange=function(){let state=0;switch(ctx.state){case"suspended":state=0;break;case"running":state=1;break;case"closed":state=2;break}onstatechange(state)};ctx.onstatechange();GodotAudio.interval=setInterval(function(){let computed_latency=0;if(ctx.baseLatency){computed_latency+=GodotAudio.ctx.baseLatency}if(ctx.outputLatency){computed_latency+=GodotAudio.ctx.outputLatency}onlatencyupdate(computed_latency)},1e3);GodotOS.atexit(GodotAudio.close_async);return ctx.destination.channelCount},create_input:function(callback){if(GodotAudio.input){return 0}function gotMediaInput(stream){try{GodotAudio.input=GodotAudio.ctx.createMediaStreamSource(stream);callback(GodotAudio.input)}catch(e){GodotRuntime.error("Failed creaating input.",e)}}if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){navigator.mediaDevices.getUserMedia({"audio":true}).then(gotMediaInput,function(e){GodotRuntime.error("Error getting user media.",e)})}else{if(!navigator.getUserMedia){navigator.getUserMedia=navigator.webkitGetUserMedia||navigator.mozGetUserMedia}if(!navigator.getUserMedia){GodotRuntime.error("getUserMedia not available.");return 1}navigator.getUserMedia({"audio":true},gotMediaInput,function(e){GodotRuntime.print(e)})}return 0},close_async:function(resolve,reject){const ctx=GodotAudio.ctx;GodotAudio.ctx=null;if(!ctx){resolve();return}if(GodotAudio.interval){clearInterval(GodotAudio.interval);GodotAudio.interval=0}if(GodotAudio.input){GodotAudio.input.disconnect();GodotAudio.input=null}let closed=Promise.resolve();if(GodotAudio.driver){closed=GodotAudio.driver.close()}closed.then(function(){return ctx.close()}).then(function(){ctx.onstatechange=null;resolve()}).catch(function(e){ctx.onstatechange=null;GodotRuntime.error("Error closing AudioContext",e);resolve()})}};function _godot_audio_capture_start(){return GodotAudio.create_input(function(input){input.connect(GodotAudio.driver.get_node())})}function _godot_audio_capture_stop(){if(GodotAudio.input){const tracks=GodotAudio.input["mediaStream"]["getTracks"]();for(let i=0;i<tracks.length;i++){tracks[i]["stop"]()}GodotAudio.input.disconnect();GodotAudio.input=null}}function _godot_audio_has_script_processor(){return GodotAudio.ctx&&GodotAudio.ctx.createScriptProcessor?1:0}function _godot_audio_has_worklet(){return GodotAudio.ctx&&GodotAudio.ctx.audioWorklet?1:0}function _godot_audio_init(p_mix_rate,p_latency,p_state_change,p_latency_update){const statechange=GodotRuntime.get_func(p_state_change);const latencyupdate=GodotRuntime.get_func(p_latency_update);const mix_rate=GodotRuntime.getHeapValue(p_mix_rate,"i32");const channels=GodotAudio.init(mix_rate,p_latency,statechange,latencyupdate);GodotRuntime.setHeapValue(p_mix_rate,GodotAudio.ctx.sampleRate,"i32");return channels}function _godot_audio_is_available(){if(!(window.AudioContext||window.webkitAudioContext)){return 0}return 1}function _godot_audio_resume(){if(GodotAudio.ctx&&GodotAudio.ctx.state!=="running"){GodotAudio.ctx.resume()}}var GodotAudioScript={script:null,create:function(buffer_length,channel_count){GodotAudioScript.script=GodotAudio.ctx.createScriptProcessor(buffer_length,2,channel_count);GodotAudio.driver=GodotAudioScript;return GodotAudioScript.script.bufferSize},start:function(p_in_buf,p_in_size,p_out_buf,p_out_size,onprocess){GodotAudioScript.script.onaudioprocess=function(event){const inb=GodotRuntime.heapSub(HEAPF32,p_in_buf,p_in_size);const input=event.inputBuffer;if(GodotAudio.input){const inlen=input.getChannelData(0).length;for(let ch=0;ch<2;ch++){const data=input.getChannelData(ch);for(let s=0;s<inlen;s++){inb[s*2+ch]=data[s]}}}onprocess();const outb=GodotRuntime.heapSub(HEAPF32,p_out_buf,p_out_size);const output=event.outputBuffer;const channels=output.numberOfChannels;for(let ch=0;ch<channels;ch++){const data=output.getChannelData(ch);for(let sample=0;sample<data.length;sample++){data[sample]=outb[sample*channels+ch]}}};GodotAudioScript.script.connect(GodotAudio.ctx.destination)},get_node:function(){return GodotAudioScript.script},close:function(){return new Promise(function(resolve,reject){GodotAudioScript.script.disconnect();GodotAudioScript.script.onaudioprocess=null;GodotAudioScript.script=null;resolve()})}};function _godot_audio_script_create(buffer_length,channel_count){const buf_len=GodotRuntime.getHeapValue(buffer_length,"i32");try{const out_len=GodotAudioScript.create(buf_len,channel_count);GodotRuntime.setHeapValue(buffer_length,out_len,"i32")}catch(e){GodotRuntime.error("Error starting AudioDriverScriptProcessor",e);return 1}return 0}function _godot_audio_script_start(p_in_buf,p_in_size,p_out_buf,p_out_size,p_cb){const onprocess=GodotRuntime.get_func(p_cb);GodotAudioScript.start(p_in_buf,p_in_size,p_out_buf,p_out_size,onprocess)}var GodotAudioWorklet={promise:null,worklet:null,ring_buffer:null,create:function(channels){const path=GodotConfig.locate_file("godot.audio.worklet.js");GodotAudioWorklet.promise=GodotAudio.ctx.audioWorklet.addModule(path).then(function(){GodotAudioWorklet.worklet=new AudioWorkletNode(GodotAudio.ctx,"godot-processor",{"outputChannelCount":[channels]});return Promise.resolve()});GodotAudio.driver=GodotAudioWorklet},start:function(in_buf,out_buf,state){GodotAudioWorklet.promise.then(function(){const node=GodotAudioWorklet.worklet;node.connect(GodotAudio.ctx.destination);node.port.postMessage({"cmd":"start","data":[state,in_buf,out_buf]});node.port.onmessage=function(event){GodotRuntime.error(event.data)}})},start_no_threads:function(p_out_buf,p_out_size,out_callback,p_in_buf,p_in_size,in_callback){function RingBuffer(){let wpos=0;let rpos=0;let pending_samples=0;const wbuf=new Float32Array(p_out_size);function send(port){if(pending_samples===0){return}const buffer=GodotRuntime.heapSub(HEAPF32,p_out_buf,p_out_size);const size=buffer.length;const tot_sent=pending_samples;out_callback(wpos,pending_samples);if(wpos+pending_samples>=size){const high=size-wpos;wbuf.set(buffer.subarray(wpos,size));pending_samples-=high;wpos=0}if(pending_samples>0){wbuf.set(buffer.subarray(wpos,wpos+pending_samples),tot_sent-pending_samples)}port.postMessage({"cmd":"chunk","data":wbuf.subarray(0,tot_sent)});wpos+=pending_samples;pending_samples=0}this.receive=function(recv_buf){const buffer=GodotRuntime.heapSub(HEAPF32,p_in_buf,p_in_size);const from=rpos;let to_write=recv_buf.length;let high=0;if(rpos+to_write>=p_in_size){high=p_in_size-rpos;buffer.set(recv_buf.subarray(0,high),rpos);to_write-=high;rpos=0}if(to_write){buffer.set(recv_buf.subarray(high,to_write),rpos)}in_callback(from,recv_buf.length);rpos+=to_write};this.consumed=function(size,port){pending_samples+=size;send(port)}}GodotAudioWorklet.ring_buffer=new RingBuffer;GodotAudioWorklet.promise.then(function(){const node=GodotAudioWorklet.worklet;const buffer=GodotRuntime.heapSlice(HEAPF32,p_out_buf,p_out_size);node.connect(GodotAudio.ctx.destination);node.port.postMessage({"cmd":"start_nothreads","data":[buffer,p_in_size]});node.port.onmessage=function(event){if(!GodotAudioWorklet.worklet){return}if(event.data["cmd"]==="read"){const read=event.data["data"];GodotAudioWorklet.ring_buffer.consumed(read,GodotAudioWorklet.worklet.port)}else if(event.data["cmd"]==="input"){const buf=event.data["data"];if(buf.length>p_in_size){GodotRuntime.error("Input chunk is too big");return}GodotAudioWorklet.ring_buffer.receive(buf)}else{GodotRuntime.error(event.data)}}})},get_node:function(){return GodotAudioWorklet.worklet},close:function(){return new Promise(function(resolve,reject){if(GodotAudioWorklet.promise===null){return}GodotAudioWorklet.promise.then(function(){GodotAudioWorklet.worklet.port.postMessage({"cmd":"stop","data":null});GodotAudioWorklet.worklet.disconnect();GodotAudioWorklet.worklet=null;GodotAudioWorklet.promise=null;resolve()}).catch(function(err){})})}};function _godot_audio_worklet_create(channels){try{GodotAudioWorklet.create(channels)}catch(e){GodotRuntime.error("Error starting AudioDriverWorklet",e);return 1}return 0}function _godot_audio_worklet_start_no_threads(p_out_buf,p_out_size,p_out_callback,p_in_buf,p_in_size,p_in_callback){const out_callback=GodotRuntime.get_func(p_out_callback);const in_callback=GodotRuntime.get_func(p_in_callback);GodotAudioWorklet.start_no_threads(p_out_buf,p_out_size,out_callback,p_in_buf,p_in_size,in_callback)}function _godot_js_config_canvas_id_get(p_ptr,p_ptr_max){GodotRuntime.stringToHeap(`#${GodotConfig.canvas.id}`,p_ptr,p_ptr_max)}function _godot_js_config_locale_get(p_ptr,p_ptr_max){GodotRuntime.stringToHeap(GodotConfig.locale,p_ptr,p_ptr_max)}var GodotDisplayCursor={shape:"auto",visible:true,cursors:{},set_style:function(style){GodotConfig.canvas.style.cursor=style},set_shape:function(shape){GodotDisplayCursor.shape=shape;let css=shape;if(shape in GodotDisplayCursor.cursors){const c=GodotDisplayCursor.cursors[shape];css=`url("${c.url}") ${c.x} ${c.y}, auto`}if(GodotDisplayCursor.visible){GodotDisplayCursor.set_style(css)}},clear:function(){GodotDisplayCursor.set_style("");GodotDisplayCursor.shape="auto";GodotDisplayCursor.visible=true;Object.keys(GodotDisplayCursor.cursors).forEach(function(key){URL.revokeObjectURL(GodotDisplayCursor.cursors[key]);delete GodotDisplayCursor.cursors[key]})},lockPointer:function(){const canvas=GodotConfig.canvas;if(canvas.requestPointerLock){canvas.requestPointerLock()}},releasePointer:function(){if(document.exitPointerLock){document.exitPointerLock()}},isPointerLocked:function(){return document.pointerLockElement===GodotConfig.canvas}};var GodotEventListeners={handlers:[],has:function(target,event,method,capture){return GodotEventListeners.handlers.findIndex(function(e){return e.target===target&&e.event===event&&e.method===method&&e.capture===capture})!==-1},add:function(target,event,method,capture){if(GodotEventListeners.has(target,event,method,capture)){return}function Handler(p_target,p_event,p_method,p_capture){this.target=p_target;this.event=p_event;this.method=p_method;this.capture=p_capture}GodotEventListeners.handlers.push(new Handler(target,event,method,capture));target.addEventListener(event,method,capture)},clear:function(){GodotEventListeners.handlers.forEach(function(h){h.target.removeEventListener(h.event,h.method,h.capture)});GodotEventListeners.handlers.length=0}};function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}var GodotDisplayScreen={desired_size:[0,0],hidpi:true,getPixelRatio:function(){return GodotDisplayScreen.hidpi?window.devicePixelRatio||1:1},isFullscreen:function(){const elem=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(elem){return elem===GodotConfig.canvas}return document.fullscreen||document.mozFullScreen||document.webkitIsFullscreen},hasFullscreen:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled},requestFullscreen:function(){if(!GodotDisplayScreen.hasFullscreen()){return 1}const canvas=GodotConfig.canvas;try{const promise=(canvas.requestFullscreen||canvas.msRequestFullscreen||canvas.mozRequestFullScreen||canvas.mozRequestFullscreen||canvas.webkitRequestFullscreen).call(canvas);if(promise){promise.catch(function(){})}}catch(e){return 1}return 0},exitFullscreen:function(){if(!GodotDisplayScreen.isFullscreen()){return 0}try{const promise=document.exitFullscreen();if(promise){promise.catch(function(){})}}catch(e){return 1}return 0},_updateGL:function(){const gl_context_handle=_emscripten_webgl_get_current_context();const gl=GL.getContext(gl_context_handle);if(gl){GL.resizeOffscreenFramebuffer(gl)}},updateSize:function(){const isFullscreen=GodotDisplayScreen.isFullscreen();const wantsFullWindow=GodotConfig.canvas_resize_policy===2;const noResize=GodotConfig.canvas_resize_policy===0;const wwidth=GodotDisplayScreen.desired_size[0];const wheight=GodotDisplayScreen.desired_size[1];const canvas=GodotConfig.canvas;let width=wwidth;let height=wheight;if(noResize){if(canvas.width!==width||canvas.height!==height){GodotDisplayScreen.desired_size=[canvas.width,canvas.height];GodotDisplayScreen._updateGL();return 1}return 0}const scale=GodotDisplayScreen.getPixelRatio();if(isFullscreen||wantsFullWindow){width=window.innerWidth*scale;height=window.innerHeight*scale}const csw=`${width/scale}px`;const csh=`${height/scale}px`;if(canvas.style.width!==csw||canvas.style.height!==csh||canvas.width!==width||canvas.height!==height){canvas.width=width;canvas.height=height;canvas.style.width=csw;canvas.style.height=csh;GodotDisplayScreen._updateGL();return 1}return 0}};var GodotDisplayVK={textinput:null,textarea:null,available:function(){return GodotConfig.virtual_keyboard&&"ontouchstart"in window},init:function(input_cb){function create(what){const elem=document.createElement(what);elem.style.display="none";elem.style.position="absolute";elem.style.zIndex="-1";elem.style.background="transparent";elem.style.padding="0px";elem.style.margin="0px";elem.style.overflow="hidden";elem.style.width="0px";elem.style.height="0px";elem.style.border="0px";elem.style.outline="none";elem.readonly=true;elem.disabled=true;GodotEventListeners.add(elem,"input",function(evt){const c_str=GodotRuntime.allocString(elem.value);input_cb(c_str,elem.selectionEnd);GodotRuntime.free(c_str)},false);GodotEventListeners.add(elem,"blur",function(evt){elem.style.display="none";elem.readonly=true;elem.disabled=true},false);GodotConfig.canvas.insertAdjacentElement("beforebegin",elem);return elem}GodotDisplayVK.textinput=create("input");GodotDisplayVK.textarea=create("textarea");GodotDisplayVK.updateSize()},show:function(text,multiline,start,end){if(!GodotDisplayVK.textinput||!GodotDisplayVK.textarea){return}if(GodotDisplayVK.textinput.style.display!==""||GodotDisplayVK.textarea.style.display!==""){GodotDisplayVK.hide()}GodotDisplayVK.updateSize();const elem=multiline?GodotDisplayVK.textarea:GodotDisplayVK.textinput;elem.readonly=false;elem.disabled=false;elem.value=text;elem.style.display="block";elem.focus();elem.setSelectionRange(start,end)},hide:function(){if(!GodotDisplayVK.textinput||!GodotDisplayVK.textarea){return}[GodotDisplayVK.textinput,GodotDisplayVK.textarea].forEach(function(elem){elem.blur();elem.style.display="none";elem.value=""})},updateSize:function(){if(!GodotDisplayVK.textinput||!GodotDisplayVK.textarea){return}const rect=GodotConfig.canvas.getBoundingClientRect();function update(elem){elem.style.left=`${rect.left}px`;elem.style.top=`${rect.top}px`;elem.style.width=`${rect.width}px`;elem.style.height=`${rect.height}px`}update(GodotDisplayVK.textinput);update(GodotDisplayVK.textarea)},clear:function(){if(GodotDisplayVK.textinput){GodotDisplayVK.textinput.remove();GodotDisplayVK.textinput=null}if(GodotDisplayVK.textarea){GodotDisplayVK.textarea.remove();GodotDisplayVK.textarea=null}}};var GodotDisplay={window_icon:"",findDPI:function(){function testDPI(dpi){return window.matchMedia(`(max-resolution: ${dpi}dpi)`).matches}function bisect(low,high,func){const mid=parseInt((high-low)/2+low,10);if(high-low<=1){return func(high)?high:low}if(func(mid)){return bisect(low,mid,func)}return bisect(mid,high,func)}try{const dpi=bisect(0,800,testDPI);return dpi>=96?dpi:96}catch(e){return 96}}};function _godot_js_display_alert(p_text){window.alert(GodotRuntime.parseString(p_text))}function _godot_js_display_canvas_focus(){GodotConfig.canvas.focus()}function _godot_js_display_canvas_is_focused(){return document.activeElement===GodotConfig.canvas}function _godot_js_display_clipboard_get(callback){const func=GodotRuntime.get_func(callback);try{navigator.clipboard.readText().then(function(result){const ptr=GodotRuntime.allocString(result);func(ptr);GodotRuntime.free(ptr)}).catch(function(e){})}catch(e){}}function _godot_js_display_clipboard_set(p_text){const text=GodotRuntime.parseString(p_text);if(!navigator.clipboard||!navigator.clipboard.writeText){return 1}navigator.clipboard.writeText(text).catch(function(e){GodotRuntime.error("Setting OS clipboard is only possible from an input callback for the HTML5 plafrom. Exception:",e)});return 0}function _godot_js_display_cursor_is_hidden(){return!GodotDisplayCursor.visible}function _godot_js_display_cursor_is_locked(){return GodotDisplayCursor.isPointerLocked()?1:0}function _godot_js_display_cursor_lock_set(p_lock){if(p_lock){GodotDisplayCursor.lockPointer()}else{GodotDisplayCursor.releasePointer()}}function _godot_js_display_cursor_set_custom_shape(p_shape,p_ptr,p_len,p_hotspot_x,p_hotspot_y){const shape=GodotRuntime.parseString(p_shape);const old_shape=GodotDisplayCursor.cursors[shape];if(p_len>0){const png=new Blob([GodotRuntime.heapSlice(HEAPU8,p_ptr,p_len)],{type:"image/png"});const url=URL.createObjectURL(png);GodotDisplayCursor.cursors[shape]={url:url,x:p_hotspot_x,y:p_hotspot_y}}else{delete GodotDisplayCursor.cursors[shape]}if(shape===GodotDisplayCursor.shape){GodotDisplayCursor.set_shape(GodotDisplayCursor.shape)}if(old_shape){URL.revokeObjectURL(old_shape.url)}}function _godot_js_display_cursor_set_shape(p_string){GodotDisplayCursor.set_shape(GodotRuntime.parseString(p_string))}function _godot_js_display_cursor_set_visible(p_visible){const visible=p_visible!==0;if(visible===GodotDisplayCursor.visible){return}GodotDisplayCursor.visible=visible;if(visible){GodotDisplayCursor.set_shape(GodotDisplayCursor.shape)}else{GodotDisplayCursor.set_style("none")}}function _godot_js_display_desired_size_set(width,height){GodotDisplayScreen.desired_size=[width,height];GodotDisplayScreen.updateSize()}function _godot_js_display_fullscreen_cb(callback){const canvas=GodotConfig.canvas;const func=GodotRuntime.get_func(callback);function change_cb(evt){if(evt.target===canvas){func(GodotDisplayScreen.isFullscreen())}}GodotEventListeners.add(document,"fullscreenchange",change_cb,false);GodotEventListeners.add(document,"mozfullscreenchange",change_cb,false);GodotEventListeners.add(document,"webkitfullscreenchange",change_cb,false)}function _godot_js_display_fullscreen_exit(){return GodotDisplayScreen.exitFullscreen()}function _godot_js_display_fullscreen_request(){return GodotDisplayScreen.requestFullscreen()}function _godot_js_display_glGetBufferSubData(target,offset,size,data){const gl_context_handle=_emscripten_webgl_get_current_context();const gl=GL.getContext(gl_context_handle);if(gl){gl.GLctx["getBufferSubData"](target,offset,HEAPU8,data,size)}}function _godot_js_display_has_webgl(p_version){if(p_version!==1&&p_version!==2){return false}try{return!!document.createElement("canvas").getContext(p_version===2?"webgl2":"webgl")}catch(e){}return false}function _godot_js_display_is_swap_ok_cancel(){const win=["Windows","Win64","Win32","WinCE"];const plat=navigator.platform||"";if(win.indexOf(plat)!==-1){return 1}return 0}function _godot_js_display_notification_cb(callback,p_enter,p_exit,p_in,p_out){const canvas=GodotConfig.canvas;const func=GodotRuntime.get_func(callback);const notif=[p_enter,p_exit,p_in,p_out];["mouseover","mouseleave","focus","blur"].forEach(function(evt_name,idx){GodotEventListeners.add(canvas,evt_name,function(){func(notif[idx])},true)})}function _godot_js_display_pixel_ratio_get(){return GodotDisplayScreen.getPixelRatio()}function _godot_js_display_screen_dpi_get(){return GodotDisplay.findDPI()}function _godot_js_display_screen_size_get(width,height){const scale=GodotDisplayScreen.getPixelRatio();GodotRuntime.setHeapValue(width,window.screen.width*scale,"i32");GodotRuntime.setHeapValue(height,window.screen.height*scale,"i32")}function _godot_js_display_setup_canvas(p_width,p_height,p_fullscreen,p_hidpi){const canvas=GodotConfig.canvas;GodotEventListeners.add(canvas,"contextmenu",function(ev){ev.preventDefault()},false);GodotEventListeners.add(canvas,"webglcontextlost",function(ev){alert("WebGL context lost, please reload the page");ev.preventDefault()},false);GodotDisplayScreen.hidpi=!!p_hidpi;switch(GodotConfig.canvas_resize_policy){case 0:GodotDisplayScreen.desired_size=[canvas.width,canvas.height];break;case 1:GodotDisplayScreen.desired_size=[p_width,p_height];break;default:canvas.style.position="absolute";canvas.style.top=0;canvas.style.left=0;break}GodotDisplayScreen.updateSize();if(p_fullscreen){GodotDisplayScreen.requestFullscreen()}}function _godot_js_display_size_update(){const updated=GodotDisplayScreen.updateSize();if(updated){GodotDisplayVK.updateSize()}return updated}function _godot_js_display_touchscreen_is_available(){return"ontouchstart"in window}function _godot_js_display_vk_available(){return GodotDisplayVK.available()}function _godot_js_display_vk_cb(p_input_cb){const input_cb=GodotRuntime.get_func(p_input_cb);if(GodotDisplayVK.available()){GodotDisplayVK.init(input_cb)}}function _godot_js_display_vk_hide(){GodotDisplayVK.hide()}function _godot_js_display_vk_show(p_text,p_multiline,p_start,p_end){const text=GodotRuntime.parseString(p_text);const start=p_start>0?p_start:0;const end=p_end>0?p_end:start;GodotDisplayVK.show(text,p_multiline,start,end)}function _godot_js_display_window_blur_cb(callback){const func=GodotRuntime.get_func(callback);GodotEventListeners.add(window,"blur",function(){func()},false)}function _godot_js_display_window_icon_set(p_ptr,p_len){let link=document.getElementById("-gd-engine-icon");if(link===null){link=document.createElement("link");link.rel="icon";link.id="-gd-engine-icon";document.head.appendChild(link)}const old_icon=GodotDisplay.window_icon;const png=new Blob([GodotRuntime.heapSlice(HEAPU8,p_ptr,p_len)],{type:"image/png"});GodotDisplay.window_icon=URL.createObjectURL(png);link.href=GodotDisplay.window_icon;if(old_icon){URL.revokeObjectURL(old_icon)}}function _godot_js_display_window_size_get(p_width,p_height){GodotRuntime.setHeapValue(p_width,GodotConfig.canvas.width,"i32");GodotRuntime.setHeapValue(p_height,GodotConfig.canvas.height,"i32")}function _godot_js_display_window_title_set(p_data){document.title=GodotRuntime.parseString(p_data)}function _godot_js_eval(p_js,p_use_global_ctx,p_union_ptr,p_byte_arr,p_byte_arr_write,p_callback){const js_code=GodotRuntime.parseString(p_js);let eval_ret=null;try{if(p_use_global_ctx){const global_eval=eval;eval_ret=global_eval(js_code)}else{eval_ret=eval(js_code)}}catch(e){GodotRuntime.error(e)}switch(typeof eval_ret){case"boolean":GodotRuntime.setHeapValue(p_union_ptr,eval_ret,"i32");return 1;case"number":GodotRuntime.setHeapValue(p_union_ptr,eval_ret,"double");return 3;case"string":GodotRuntime.setHeapValue(p_union_ptr,GodotRuntime.allocString(eval_ret),"*");return 4;case"object":if(eval_ret===null){break}if(ArrayBuffer.isView(eval_ret)&&!(eval_ret instanceof Uint8Array)){eval_ret=new Uint8Array(eval_ret.buffer)}else if(eval_ret instanceof ArrayBuffer){eval_ret=new Uint8Array(eval_ret)}if(eval_ret instanceof Uint8Array){const func=GodotRuntime.get_func(p_callback);const bytes_ptr=func(p_byte_arr,p_byte_arr_write,eval_ret.length);HEAPU8.set(eval_ret,bytes_ptr);return 20}break}return 0}var IDHandler={_last_id:0,_references:{},get:function(p_id){return IDHandler._references[p_id]},add:function(p_data){const id=++IDHandler._last_id;IDHandler._references[id]=p_data;return id},remove:function(p_id){delete IDHandler._references[p_id]}};var GodotFetch={onread:function(id,result){const obj=IDHandler.get(id);if(!obj){return}if(result.value){obj.chunks.push(result.value)}obj.reading=false;obj.done=result.done},onresponse:function(id,response){const obj=IDHandler.get(id);if(!obj){return}let chunked=false;response.headers.forEach(function(value,header){const v=value.toLowerCase().trim();const h=header.toLowerCase().trim();if(h==="transfer-encoding"&&v==="chunked"){chunked=true}});obj.status=response.status;obj.response=response;obj.reader=response.body.getReader();obj.chunked=chunked},onerror:function(id,err){GodotRuntime.error(err);const obj=IDHandler.get(id);if(!obj){return}obj.error=err},create:function(method,url,headers,body){const obj={request:null,response:null,reader:null,error:null,done:false,reading:false,status:0,chunks:[],bodySize:-1};const id=IDHandler.add(obj);const init={method:method,headers:headers,body:body};obj.request=fetch(url,init);obj.request.then(GodotFetch.onresponse.bind(null,id)).catch(GodotFetch.onerror.bind(null,id));return id},free:function(id){const obj=IDHandler.get(id);if(!obj){return}IDHandler.remove(id);if(!obj.request){return}obj.request.then(function(response){response.abort()}).catch(function(e){})},read:function(id){const obj=IDHandler.get(id);if(!obj){return}if(obj.reader&&!obj.reading){if(obj.done){obj.reader=null;return}obj.reading=true;obj.reader.read().then(GodotFetch.onread.bind(null,id)).catch(GodotFetch.onerror.bind(null,id))}}};function _godot_js_fetch_body_length_get(p_id){const obj=IDHandler.get(p_id);if(!obj||!obj.response){return-1}return obj.bodySize}function _godot_js_fetch_create(p_method,p_url,p_headers,p_headers_size,p_body,p_body_size){const method=GodotRuntime.parseString(p_method);const url=GodotRuntime.parseString(p_url);const headers=GodotRuntime.parseStringArray(p_headers,p_headers_size);const body=p_body_size?GodotRuntime.heapSlice(HEAP8,p_body,p_body_size):null;return GodotFetch.create(method,url,headers.map(function(hv){const idx=hv.indexOf(":");if(idx<=0){return[]}return[hv.slice(0,idx).trim(),hv.slice(idx+1).trim()]}).filter(function(v){return v.length===2}),body)}function _godot_js_fetch_free(id){GodotFetch.free(id)}function _godot_js_fetch_http_status_get(p_id){const obj=IDHandler.get(p_id);if(!obj||!obj.response){return 0}return obj.status}function _godot_js_fetch_is_chunked(p_id){const obj=IDHandler.get(p_id);if(!obj||!obj.response){return-1}return obj.chunked?1:0}function _godot_js_fetch_read_chunk(p_id,p_buf,p_buf_size){const obj=IDHandler.get(p_id);if(!obj||!obj.response){return 0}let to_read=p_buf_size;const chunks=obj.chunks;while(to_read&&chunks.length){const chunk=obj.chunks[0];if(chunk.length>to_read){GodotRuntime.heapCopy(HEAP8,chunk.slice(0,to_read),p_buf);chunks[0]=chunk.slice(to_read);to_read=0}else{GodotRuntime.heapCopy(HEAP8,chunk,p_buf);to_read-=chunk.length;chunks.pop()}}if(!chunks.length){GodotFetch.read(p_id)}return p_buf_size-to_read}function _godot_js_fetch_read_headers(p_id,p_parse_cb,p_ref){const obj=IDHandler.get(p_id);if(!obj||!obj.response){return 1}const cb=GodotRuntime.get_func(p_parse_cb);const arr=[];obj.response.headers.forEach(function(v,h){arr.push(`${h}:${v}`)});const c_ptr=GodotRuntime.allocStringArray(arr);cb(arr.length,c_ptr,p_ref);GodotRuntime.freeStringArray(c_ptr,arr.length);return 0}function _godot_js_fetch_state_get(p_id){const obj=IDHandler.get(p_id);if(!obj){return-1}if(obj.error){return-1}if(!obj.response){return 0}if(obj.reader){return 1}if(obj.done){return 2}return-1}var GodotInputGamepads={samples:[],get_pads:function(){try{const pads=navigator.getGamepads();if(pads){return pads}return[]}catch(e){return[]}},get_samples:function(){return GodotInputGamepads.samples},get_sample:function(index){const samples=GodotInputGamepads.samples;return index<samples.length?samples[index]:null},sample:function(){const pads=GodotInputGamepads.get_pads();const samples=[];for(let i=0;i<pads.length;i++){const pad=pads[i];if(!pad){samples.push(null);continue}const s={standard:pad.mapping==="standard",buttons:[],axes:[],connected:pad.connected};for(let b=0;b<pad.buttons.length;b++){s.buttons.push(pad.buttons[b].value)}for(let a=0;a<pad.axes.length;a++){s.axes.push(pad.axes[a])}samples.push(s)}GodotInputGamepads.samples=samples},init:function(onchange){GodotInputGamepads.samples=[];function add(pad){const guid=GodotInputGamepads.get_guid(pad);const c_id=GodotRuntime.allocString(pad.id);const c_guid=GodotRuntime.allocString(guid);onchange(pad.index,1,c_id,c_guid);GodotRuntime.free(c_id);GodotRuntime.free(c_guid)}const pads=GodotInputGamepads.get_pads();for(let i=0;i<pads.length;i++){if(pads[i]){add(pads[i])}}GodotEventListeners.add(window,"gamepadconnected",function(evt){if(evt.gamepad){add(evt.gamepad)}},false);GodotEventListeners.add(window,"gamepaddisconnected",function(evt){if(evt.gamepad){onchange(evt.gamepad.index,0)}},false)},get_guid:function(pad){if(pad.mapping){return pad.mapping}const ua=navigator.userAgent;let os="Unknown";if(ua.indexOf("Android")>=0){os="Android"}else if(ua.indexOf("Linux")>=0){os="Linux"}else if(ua.indexOf("iPhone")>=0){os="iOS"}else if(ua.indexOf("Macintosh")>=0){os="MacOSX"}else if(ua.indexOf("Windows")>=0){os="Windows"}const id=pad.id;const exp1=/vendor: ([0-9a-f]{4}) product: ([0-9a-f]{4})/i;const exp2=/^([0-9a-f]+)-([0-9a-f]+)-/i;let vendor="";let product="";if(exp1.test(id)){const match=exp1.exec(id);vendor=match[1].padStart(4,"0");product=match[2].padStart(4,"0")}else if(exp2.test(id)){const match=exp2.exec(id);vendor=match[1].padStart(4,"0");product=match[2].padStart(4,"0")}if(!vendor||!product){return`${os}Unknown`}return os+vendor+product}};var GodotInputDragDrop={promises:[],pending_files:[],add_entry:function(entry){if(entry.isDirectory){GodotInputDragDrop.add_dir(entry)}else if(entry.isFile){GodotInputDragDrop.add_file(entry)}else{GodotRuntime.error("Unrecognized entry...",entry)}},add_dir:function(entry){GodotInputDragDrop.promises.push(new Promise(function(resolve,reject){const reader=entry.createReader();reader.readEntries(function(entries){for(let i=0;i<entries.length;i++){GodotInputDragDrop.add_entry(entries[i])}resolve()})}))},add_file:function(entry){GodotInputDragDrop.promises.push(new Promise(function(resolve,reject){entry.file(function(file){const reader=new FileReader;reader.onload=function(){const f={"path":file.relativePath||file.webkitRelativePath,"name":file.name,"type":file.type,"size":file.size,"data":reader.result};if(!f["path"]){f["path"]=f["name"]}GodotInputDragDrop.pending_files.push(f);resolve()};reader.onerror=function(){GodotRuntime.print("Error reading file");reject()};reader.readAsArrayBuffer(file)},function(err){GodotRuntime.print("Error!");reject()})}))},process:function(resolve,reject){if(GodotInputDragDrop.promises.length===0){resolve();return}GodotInputDragDrop.promises.pop().then(function(){setTimeout(function(){GodotInputDragDrop.process(resolve,reject)},0)})},_process_event:function(ev,callback){ev.preventDefault();if(ev.dataTransfer.items){for(let i=0;i<ev.dataTransfer.items.length;i++){const item=ev.dataTransfer.items[i];let entry=null;if("getAsEntry"in item){entry=item.getAsEntry()}else if("webkitGetAsEntry"in item){entry=item.webkitGetAsEntry()}if(entry){GodotInputDragDrop.add_entry(entry)}}}else{GodotRuntime.error("File upload not supported")}new Promise(GodotInputDragDrop.process).then(function(){const DROP=`/tmp/drop-${parseInt(Math.random()*(1<<30),10)}/`;const drops=[];const files=[];FS.mkdir(DROP.slice(0,-1));GodotInputDragDrop.pending_files.forEach(elem=>{const path=elem["path"];GodotFS.copy_to_fs(DROP+path,elem["data"]);let idx=path.indexOf("/");if(idx===-1){drops.push(DROP+path)}else{const sub=path.substr(0,idx);idx=sub.indexOf("/");if(idx<0&&drops.indexOf(DROP+sub)===-1){drops.push(DROP+sub)}}files.push(DROP+path)});GodotInputDragDrop.promises=[];GodotInputDragDrop.pending_files=[];callback(drops);if(GodotConfig.persistent_drops){GodotOS.atexit(function(resolve,reject){GodotInputDragDrop.remove_drop(files,DROP);resolve()})}else{GodotInputDragDrop.remove_drop(files,DROP)}})},remove_drop:function(files,drop_path){const dirs=[drop_path.substr(0,drop_path.length-1)];files.forEach(function(file){FS.unlink(file);let dir=file.replace(drop_path,"");let idx=dir.lastIndexOf("/");while(idx>0){dir=dir.substr(0,idx);if(dirs.indexOf(drop_path+dir)===-1){dirs.push(drop_path+dir)}idx=dir.lastIndexOf("/")}});dirs.sort(function(a,b){const al=(a.match(/\//g)||[]).length;const bl=(b.match(/\//g)||[]).length;if(al>bl){return-1}else if(al<bl){return 1}return 0}).forEach(function(dir){FS.rmdir(dir)})},handler:function(callback){return function(ev){GodotInputDragDrop._process_event(ev,callback)}}};var GodotInput={getModifiers:function(evt){return evt.shiftKey+0+(evt.altKey+0<<1)+(evt.ctrlKey+0<<2)+(evt.metaKey+0<<3)},computePosition:function(evt,rect){const canvas=GodotConfig.canvas;const rw=canvas.width/rect.width;const rh=canvas.height/rect.height;const x=(evt.clientX-rect.x)*rw;const y=(evt.clientY-rect.y)*rh;return[x,y]}};function _godot_js_input_drop_files_cb(callback){const func=GodotRuntime.get_func(callback);const dropFiles=function(files){const args=files||[];if(!args.length){return}const argc=args.length;const argv=GodotRuntime.allocStringArray(args);func(argv,argc);GodotRuntime.freeStringArray(argv,argc)};const canvas=GodotConfig.canvas;GodotEventListeners.add(canvas,"dragover",function(ev){ev.preventDefault()},false);GodotEventListeners.add(canvas,"drop",GodotInputDragDrop.handler(dropFiles))}function _godot_js_input_gamepad_cb(change_cb){const onchange=GodotRuntime.get_func(change_cb);GodotInputGamepads.init(onchange)}function _godot_js_input_gamepad_sample(){GodotInputGamepads.sample();return 0}function _godot_js_input_gamepad_sample_count(){return GodotInputGamepads.get_samples().length}function _godot_js_input_gamepad_sample_get(p_index,r_btns,r_btns_num,r_axes,r_axes_num,r_standard){const sample=GodotInputGamepads.get_sample(p_index);if(!sample||!sample.connected){return 1}const btns=sample.buttons;const btns_len=btns.length<16?btns.length:16;for(let i=0;i<btns_len;i++){GodotRuntime.setHeapValue(r_btns+(i<<2),btns[i],"float")}GodotRuntime.setHeapValue(r_btns_num,btns_len,"i32");const axes=sample.axes;const axes_len=axes.length<10?axes.length:10;for(let i=0;i<axes_len;i++){GodotRuntime.setHeapValue(r_axes+(i<<2),axes[i],"float")}GodotRuntime.setHeapValue(r_axes_num,axes_len,"i32");const is_standard=sample.standard?1:0;GodotRuntime.setHeapValue(r_standard,is_standard,"i32");return 0}function _godot_js_input_key_cb(callback,code,key){const func=GodotRuntime.get_func(callback);function key_cb(pressed,evt){const modifiers=GodotInput.getModifiers(evt);GodotRuntime.stringToHeap(evt.code,code,32);GodotRuntime.stringToHeap(evt.key,key,32);func(pressed,evt.repeat,modifiers);evt.preventDefault()}GodotEventListeners.add(GodotConfig.canvas,"keydown",key_cb.bind(null,1),false);GodotEventListeners.add(GodotConfig.canvas,"keyup",key_cb.bind(null,0),false)}function _godot_js_input_mouse_button_cb(callback){const func=GodotRuntime.get_func(callback);const canvas=GodotConfig.canvas;function button_cb(p_pressed,evt){const rect=canvas.getBoundingClientRect();const pos=GodotInput.computePosition(evt,rect);const modifiers=GodotInput.getModifiers(evt);if(p_pressed){GodotConfig.canvas.focus()}if(func(p_pressed,evt.button,pos[0],pos[1],modifiers)){evt.preventDefault()}}GodotEventListeners.add(canvas,"mousedown",button_cb.bind(null,1),false);GodotEventListeners.add(window,"mouseup",button_cb.bind(null,0),false)}function _godot_js_input_mouse_move_cb(callback){const func=GodotRuntime.get_func(callback);const canvas=GodotConfig.canvas;function move_cb(evt){const rect=canvas.getBoundingClientRect();const pos=GodotInput.computePosition(evt,rect);const rw=canvas.width/rect.width;const rh=canvas.height/rect.height;const rel_pos_x=evt.movementX*rw;const rel_pos_y=evt.movementY*rh;const modifiers=GodotInput.getModifiers(evt);func(pos[0],pos[1],rel_pos_x,rel_pos_y,modifiers)}GodotEventListeners.add(window,"mousemove",move_cb,false)}function _godot_js_input_mouse_wheel_cb(callback){const func=GodotRuntime.get_func(callback);function wheel_cb(evt){if(func(evt["deltaX"]||0,evt["deltaY"]||0)){evt.preventDefault()}}GodotEventListeners.add(GodotConfig.canvas,"wheel",wheel_cb,false)}function _godot_js_input_paste_cb(callback){const func=GodotRuntime.get_func(callback);GodotEventListeners.add(window,"paste",function(evt){const text=evt.clipboardData.getData("text");const ptr=GodotRuntime.allocString(text);func(ptr);GodotRuntime.free(ptr)},false)}function _godot_js_input_touch_cb(callback,ids,coords){const func=GodotRuntime.get_func(callback);const canvas=GodotConfig.canvas;function touch_cb(type,evt){if(type===0){GodotConfig.canvas.focus()}const rect=canvas.getBoundingClientRect();const touches=evt.changedTouches;for(let i=0;i<touches.length;i++){const touch=touches[i];const pos=GodotInput.computePosition(touch,rect);GodotRuntime.setHeapValue(coords+i*2*8,pos[0],"double");GodotRuntime.setHeapValue(coords+(i*2+1)*8,pos[1],"double");GodotRuntime.setHeapValue(ids+i*4,touch.identifier,"i32")}func(type,touches.length);if(evt.cancelable){evt.preventDefault()}}GodotEventListeners.add(canvas,"touchstart",touch_cb.bind(null,0),false);GodotEventListeners.add(canvas,"touchend",touch_cb.bind(null,1),false);GodotEventListeners.add(canvas,"touchcancel",touch_cb.bind(null,1),false);GodotEventListeners.add(canvas,"touchmove",touch_cb.bind(null,2),false)}function _godot_js_input_vibrate_handheld(p_duration_ms){if(typeof navigator.vibrate!=="function"){GodotRuntime.print("This browser does not support vibration.")}else{navigator.vibrate(p_duration_ms)}}function _godot_js_os_download_buffer(p_ptr,p_size,p_name,p_mime){const buf=GodotRuntime.heapSlice(HEAP8,p_ptr,p_size);const name=GodotRuntime.parseString(p_name);const mime=GodotRuntime.parseString(p_mime);const blob=new Blob([buf],{type:mime});const url=window.URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=name;a.style.display="none";document.body.appendChild(a);a.click();a.remove();window.URL.revokeObjectURL(url)}function _godot_js_os_execute(p_json){const json_args=GodotRuntime.parseString(p_json);const args=JSON.parse(json_args);if(GodotConfig.on_execute){GodotConfig.on_execute(args);return 0}return 1}function _godot_js_os_finish_async(p_callback){const func=GodotRuntime.get_func(p_callback);GodotOS.finish_async(func)}function _godot_js_os_fs_is_persistent(){return GodotFS.is_persistent()}function _godot_js_os_fs_sync(callback){const func=GodotRuntime.get_func(callback);GodotOS._fs_sync_promise=GodotFS.sync();GodotOS._fs_sync_promise.then(function(err){func()})}function _godot_js_os_hw_concurrency_get(){return navigator.hardwareConcurrency||1}function _godot_js_os_request_quit_cb(p_callback){GodotOS.request_quit=GodotRuntime.get_func(p_callback)}function _godot_js_os_shell_open(p_uri){window.open(GodotRuntime.parseString(p_uri),"_blank")}var GodotPWA={hasUpdate:false,updateState:function(cb,reg){if(!reg){return}if(!reg.active){return}if(reg.waiting){GodotPWA.hasUpdate=true;cb()}GodotEventListeners.add(reg,"updatefound",function(){const installing=reg.installing;GodotEventListeners.add(installing,"statechange",function(){if(installing.state==="installed"){GodotPWA.hasUpdate=true;cb()}})})}};function _godot_js_pwa_cb(p_update_cb){if("serviceWorker"in navigator){const cb=GodotRuntime.get_func(p_update_cb);navigator.serviceWorker.getRegistration().then(GodotPWA.updateState.bind(null,cb))}}function _godot_js_pwa_update(){if("serviceWorker"in navigator&&GodotPWA.hasUpdate){navigator.serviceWorker.getRegistration().then(function(reg){if(!reg||!reg.waiting){return}reg.waiting.postMessage("update")});return 0}return 1}var GodotRTCDataChannel={connect:function(p_id,p_on_open,p_on_message,p_on_error,p_on_close){const ref=IDHandler.get(p_id);if(!ref){return}ref.binaryType="arraybuffer";ref.onopen=function(event){p_on_open()};ref.onclose=function(event){p_on_close()};ref.onerror=function(event){p_on_error()};ref.onmessage=function(event){let buffer;let is_string=0;if(event.data instanceof ArrayBuffer){buffer=new Uint8Array(event.data)}else if(event.data instanceof Blob){GodotRuntime.error("Blob type not supported");return}else if(typeof event.data==="string"){is_string=1;const enc=new TextEncoder("utf-8");buffer=new Uint8Array(enc.encode(event.data))}else{GodotRuntime.error("Unknown message type");return}const len=buffer.length*buffer.BYTES_PER_ELEMENT;const out=GodotRuntime.malloc(len);HEAPU8.set(buffer,out);p_on_message(out,len,is_string);GodotRuntime.free(out)}},close:function(p_id){const ref=IDHandler.get(p_id);if(!ref){return}ref.onopen=null;ref.onmessage=null;ref.onerror=null;ref.onclose=null;ref.close()},get_prop:function(p_id,p_prop,p_def){const ref=IDHandler.get(p_id);return ref&&ref[p_prop]!==undefined?ref[p_prop]:p_def}};function _godot_js_rtc_datachannel_close(p_id){const ref=IDHandler.get(p_id);if(!ref){return}GodotRTCDataChannel.close(p_id)}function _godot_js_rtc_datachannel_connect(p_id,p_ref,p_on_open,p_on_message,p_on_error,p_on_close){const onopen=GodotRuntime.get_func(p_on_open).bind(null,p_ref);const onmessage=GodotRuntime.get_func(p_on_message).bind(null,p_ref);const onerror=GodotRuntime.get_func(p_on_error).bind(null,p_ref);const onclose=GodotRuntime.get_func(p_on_close).bind(null,p_ref);GodotRTCDataChannel.connect(p_id,onopen,onmessage,onerror,onclose)}function _godot_js_rtc_datachannel_destroy(p_id){GodotRTCDataChannel.close(p_id);IDHandler.remove(p_id)}function _godot_js_rtc_datachannel_get_buffered_amount(p_id){return GodotRTCDataChannel.get_prop(p_id,"bufferedAmount",0)}function _godot_js_rtc_datachannel_id_get(p_id){return GodotRTCDataChannel.get_prop(p_id,"id",65535)}function _godot_js_rtc_datachannel_is_negotiated(p_id){return GodotRTCDataChannel.get_prop(p_id,"negotiated",65535)}function _godot_js_rtc_datachannel_is_ordered(p_id){return GodotRTCDataChannel.get_prop(p_id,"ordered",true)}function _godot_js_rtc_datachannel_label_get(p_id){const ref=IDHandler.get(p_id);if(!ref||!ref.label){return 0}return GodotRuntime.allocString(ref.label)}function _godot_js_rtc_datachannel_max_packet_lifetime_get(p_id){const ref=IDHandler.get(p_id);if(!ref){return 65535}if(ref["maxPacketLifeTime"]!==undefined){return ref["maxPacketLifeTime"]}else if(ref["maxRetransmitTime"]!==undefined){return ref["maxRetransmitTime"]}return 65535}function _godot_js_rtc_datachannel_max_retransmits_get(p_id){return GodotRTCDataChannel.get_prop(p_id,"maxRetransmits",65535)}function _godot_js_rtc_datachannel_protocol_get(p_id){const ref=IDHandler.get(p_id);if(!ref||!ref.protocol){return 0}return GodotRuntime.allocString(ref.protocol)}function _godot_js_rtc_datachannel_ready_state_get(p_id){const ref=IDHandler.get(p_id);if(!ref){return 3}switch(ref.readyState){case"connecting":return 0;case"open":return 1;case"closing":return 2;case"closed":default:return 3}}function _godot_js_rtc_datachannel_send(p_id,p_buffer,p_length,p_raw){const ref=IDHandler.get(p_id);if(!ref){return 1}const bytes_array=new Uint8Array(p_length);for(let i=0;i<p_length;i++){bytes_array[i]=GodotRuntime.getHeapValue(p_buffer+i,"i8")}if(p_raw){ref.send(bytes_array.buffer)}else{const string=new TextDecoder("utf-8").decode(bytes_array);ref.send(string)}return 0}var GodotRTCPeerConnection={onstatechange:function(p_id,p_conn,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}let state;switch(p_conn.iceConnectionState){case"new":state=0;break;case"checking":state=1;break;case"connected":case"completed":state=2;break;case"disconnected":state=3;break;case"failed":state=4;break;case"closed":default:state=5;break}callback(state)},onicecandidate:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref||!event.candidate){return}const c=event.candidate;const candidate_str=GodotRuntime.allocString(c.candidate);const mid_str=GodotRuntime.allocString(c.sdpMid);callback(mid_str,c.sdpMLineIndex,candidate_str);GodotRuntime.free(candidate_str);GodotRuntime.free(mid_str)},ondatachannel:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}const cid=IDHandler.add(event.channel);callback(cid)},onsession:function(p_id,callback,session){const ref=IDHandler.get(p_id);if(!ref){return}const type_str=GodotRuntime.allocString(session.type);const sdp_str=GodotRuntime.allocString(session.sdp);callback(type_str,sdp_str);GodotRuntime.free(type_str);GodotRuntime.free(sdp_str)},onerror:function(p_id,callback,error){const ref=IDHandler.get(p_id);if(!ref){return}GodotRuntime.error(error);callback()}};function _godot_js_rtc_pc_close(p_id){const ref=IDHandler.get(p_id);if(!ref){return}ref.close()}function _godot_js_rtc_pc_create(p_config,p_ref,p_on_state_change,p_on_candidate,p_on_datachannel){const onstatechange=GodotRuntime.get_func(p_on_state_change).bind(null,p_ref);const oncandidate=GodotRuntime.get_func(p_on_candidate).bind(null,p_ref);const ondatachannel=GodotRuntime.get_func(p_on_datachannel).bind(null,p_ref);const config=JSON.parse(GodotRuntime.parseString(p_config));let conn=null;try{conn=new RTCPeerConnection(config)}catch(e){GodotRuntime.error(e);return 0}const base=GodotRTCPeerConnection;const id=IDHandler.add(conn);conn.oniceconnectionstatechange=base.onstatechange.bind(null,id,conn,onstatechange);conn.onicecandidate=base.onicecandidate.bind(null,id,oncandidate);conn.ondatachannel=base.ondatachannel.bind(null,id,ondatachannel);return id}function _godot_js_rtc_pc_datachannel_create(p_id,p_label,p_config){try{const ref=IDHandler.get(p_id);if(!ref){return 0}const label=GodotRuntime.parseString(p_label);const config=JSON.parse(GodotRuntime.parseString(p_config));const channel=ref.createDataChannel(label,config);return IDHandler.add(channel)}catch(e){GodotRuntime.error(e);return 0}}function _godot_js_rtc_pc_destroy(p_id){const ref=IDHandler.get(p_id);if(!ref){return}ref.oniceconnectionstatechange=null;ref.onicecandidate=null;ref.ondatachannel=null;IDHandler.remove(p_id)}function _godot_js_rtc_pc_ice_candidate_add(p_id,p_mid_name,p_mline_idx,p_sdp){const ref=IDHandler.get(p_id);if(!ref){return}const sdpMidName=GodotRuntime.parseString(p_mid_name);const sdpName=GodotRuntime.parseString(p_sdp);ref.addIceCandidate(new RTCIceCandidate({"candidate":sdpName,"sdpMid":sdpMidName,"sdpMlineIndex":p_mline_idx}))}function _godot_js_rtc_pc_local_description_set(p_id,p_type,p_sdp,p_obj,p_on_error){const ref=IDHandler.get(p_id);if(!ref){return}const type=GodotRuntime.parseString(p_type);const sdp=GodotRuntime.parseString(p_sdp);const onerror=GodotRuntime.get_func(p_on_error).bind(null,p_obj);ref.setLocalDescription({"sdp":sdp,"type":type}).catch(function(error){GodotRTCPeerConnection.onerror(p_id,onerror,error)})}function _godot_js_rtc_pc_offer_create(p_id,p_obj,p_on_session,p_on_error){const ref=IDHandler.get(p_id);if(!ref){return}const onsession=GodotRuntime.get_func(p_on_session).bind(null,p_obj);const onerror=GodotRuntime.get_func(p_on_error).bind(null,p_obj);ref.createOffer().then(function(session){GodotRTCPeerConnection.onsession(p_id,onsession,session)}).catch(function(error){GodotRTCPeerConnection.onerror(p_id,onerror,error)})}function _godot_js_rtc_pc_remote_description_set(p_id,p_type,p_sdp,p_obj,p_session_created,p_on_error){const ref=IDHandler.get(p_id);if(!ref){return}const type=GodotRuntime.parseString(p_type);const sdp=GodotRuntime.parseString(p_sdp);const onerror=GodotRuntime.get_func(p_on_error).bind(null,p_obj);const onsession=GodotRuntime.get_func(p_session_created).bind(null,p_obj);ref.setRemoteDescription({"sdp":sdp,"type":type}).then(function(){if(type!=="offer"){return Promise.resolve()}return ref.createAnswer().then(function(session){GodotRTCPeerConnection.onsession(p_id,onsession,session)})}).catch(function(error){GodotRTCPeerConnection.onerror(p_id,onerror,error)})}var GodotWebSocket={_onopen:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}const c_str=GodotRuntime.allocString(ref.protocol);callback(c_str);GodotRuntime.free(c_str)},_onmessage:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}let buffer;let is_string=0;if(event.data instanceof ArrayBuffer){buffer=new Uint8Array(event.data)}else if(event.data instanceof Blob){GodotRuntime.error("Blob type not supported");return}else if(typeof event.data==="string"){is_string=1;const enc=new TextEncoder("utf-8");buffer=new Uint8Array(enc.encode(event.data))}else{GodotRuntime.error("Unknown message type");return}const len=buffer.length*buffer.BYTES_PER_ELEMENT;const out=GodotRuntime.malloc(len);HEAPU8.set(buffer,out);callback(out,len,is_string);GodotRuntime.free(out)},_onerror:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}callback()},_onclose:function(p_id,callback,event){const ref=IDHandler.get(p_id);if(!ref){return}const c_str=GodotRuntime.allocString(event.reason);callback(event.code,c_str,event.wasClean?1:0);GodotRuntime.free(c_str)},send:function(p_id,p_data){const ref=IDHandler.get(p_id);if(!ref||ref.readyState!==ref.OPEN){return 1}ref.send(p_data);return 0},bufferedAmount:function(p_id){const ref=IDHandler.get(p_id);if(!ref){return 0}return ref.bufferedAmount},create:function(socket,p_on_open,p_on_message,p_on_error,p_on_close){const id=IDHandler.add(socket);socket.onopen=GodotWebSocket._onopen.bind(null,id,p_on_open);socket.onmessage=GodotWebSocket._onmessage.bind(null,id,p_on_message);socket.onerror=GodotWebSocket._onerror.bind(null,id,p_on_error);socket.onclose=GodotWebSocket._onclose.bind(null,id,p_on_close);return id},close:function(p_id,p_code,p_reason){const ref=IDHandler.get(p_id);if(ref&&ref.readyState<ref.CLOSING){const code=p_code;const reason=GodotRuntime.parseString(p_reason);ref.close(code,reason)}},destroy:function(p_id){const ref=IDHandler.get(p_id);if(!ref){return}GodotWebSocket.close(p_id,3001,"destroyed");IDHandler.remove(p_id);ref.onopen=null;ref.onmessage=null;ref.onerror=null;ref.onclose=null}};function _godot_js_websocket_buffered_amount(p_id){return GodotWebSocket.bufferedAmount(p_id)}function _godot_js_websocket_close(p_id,p_code,p_reason){const code=p_code;const reason=GodotRuntime.parseString(p_reason);GodotWebSocket.close(p_id,code,reason)}function _godot_js_websocket_create(p_ref,p_url,p_proto,p_on_open,p_on_message,p_on_error,p_on_close){const on_open=GodotRuntime.get_func(p_on_open).bind(null,p_ref);const on_message=GodotRuntime.get_func(p_on_message).bind(null,p_ref);const on_error=GodotRuntime.get_func(p_on_error).bind(null,p_ref);const on_close=GodotRuntime.get_func(p_on_close).bind(null,p_ref);const url=GodotRuntime.parseString(p_url);const protos=GodotRuntime.parseString(p_proto);let socket=null;try{if(protos){socket=new WebSocket(url,protos.split(","))}else{socket=new WebSocket(url)}}catch(e){return 0}socket.binaryType="arraybuffer";return GodotWebSocket.create(socket,on_open,on_message,on_error,on_close)}function _godot_js_websocket_destroy(p_id){GodotWebSocket.destroy(p_id)}function _godot_js_websocket_send(p_id,p_buf,p_buf_len,p_raw){const bytes_array=new Uint8Array(p_buf_len);let i=0;for(i=0;i<p_buf_len;i++){bytes_array[i]=GodotRuntime.getHeapValue(p_buf+i,"i8")}let out=bytes_array.buffer;if(!p_raw){out=new TextDecoder("utf-8").decode(bytes_array)}return GodotWebSocket.send(p_id,out)}var GodotJSWrapper={proxies:null,MyProxy:function(val){const id=IDHandler.add(this);GodotJSWrapper.proxies.set(val,id);let refs=1;this.ref=function(){refs++};this.unref=function(){refs--;if(refs===0){IDHandler.remove(id);GodotJSWrapper.proxies.delete(val)}};this.get_val=function(){return val};this.get_id=function(){return id}},get_proxied:function(val){const id=GodotJSWrapper.proxies.get(val);if(id===undefined){const proxy=new GodotJSWrapper.MyProxy(val);return proxy.get_id()}IDHandler.get(id).ref();return id},get_proxied_value:function(id){const proxy=IDHandler.get(id);if(proxy===undefined){return undefined}return proxy.get_val()},variant2js:function(type,val){switch(type){case 0:return null;case 1:return!!GodotRuntime.getHeapValue(val,"i64");case 2:return GodotRuntime.getHeapValue(val,"i64");case 3:return GodotRuntime.getHeapValue(val,"double");case 4:return GodotRuntime.parseString(GodotRuntime.getHeapValue(val,"*"));case 17:return GodotJSWrapper.get_proxied_value(GodotRuntime.getHeapValue(val,"i64"));default:return undefined}},js2variant:function(p_val,p_exchange){if(p_val===undefined||p_val===null){return 0}const type=typeof p_val;if(type==="boolean"){GodotRuntime.setHeapValue(p_exchange,p_val,"i64");return 1}else if(type==="number"){if(Number.isInteger(p_val)){GodotRuntime.setHeapValue(p_exchange,p_val,"i64");return 2}GodotRuntime.setHeapValue(p_exchange,p_val,"double");return 3}else if(type==="string"){const c_str=GodotRuntime.allocString(p_val);GodotRuntime.setHeapValue(p_exchange,c_str,"*");return 4}const id=GodotJSWrapper.get_proxied(p_val);GodotRuntime.setHeapValue(p_exchange,id,"i64");return 17}};function _godot_js_wrapper_create_cb(p_ref,p_func){const func=GodotRuntime.get_func(p_func);let id=0;const cb=function(){if(!GodotJSWrapper.get_proxied_value(id)){return}const args=Array.from(arguments);func(p_ref,GodotJSWrapper.get_proxied(args),args.length)};id=GodotJSWrapper.get_proxied(cb);return id}function _godot_js_wrapper_create_object(p_object,p_args,p_argc,p_convert_callback,p_exchange,p_lock,p_free_lock_callback){const name=GodotRuntime.parseString(p_object);if(typeof window[name]==="undefined"){return-1}const convert=GodotRuntime.get_func(p_convert_callback);const freeLock=GodotRuntime.get_func(p_free_lock_callback);const args=new Array(p_argc);for(let i=0;i<p_argc;i++){const type=convert(p_args,i,p_exchange,p_lock);const lock=GodotRuntime.getHeapValue(p_lock,"*");args[i]=GodotJSWrapper.variant2js(type,p_exchange);if(lock){freeLock(p_lock,type)}}try{const res=new window[name](...args);return GodotJSWrapper.js2variant(res,p_exchange)}catch(e){GodotRuntime.error(`Error calling constructor ${name} with args:`,args,"error:",e);return-1}}function _godot_js_wrapper_interface_get(p_name){const name=GodotRuntime.parseString(p_name);if(typeof window[name]!=="undefined"){return GodotJSWrapper.get_proxied(window[name])}return 0}function _godot_js_wrapper_object_call(p_id,p_method,p_args,p_argc,p_convert_callback,p_exchange,p_lock,p_free_lock_callback){const obj=GodotJSWrapper.get_proxied_value(p_id);if(obj===undefined){return-1}const method=GodotRuntime.parseString(p_method);const convert=GodotRuntime.get_func(p_convert_callback);const freeLock=GodotRuntime.get_func(p_free_lock_callback);const args=new Array(p_argc);for(let i=0;i<p_argc;i++){const type=convert(p_args,i,p_exchange,p_lock);const lock=GodotRuntime.getHeapValue(p_lock,"*");args[i]=GodotJSWrapper.variant2js(type,p_exchange);if(lock){freeLock(p_lock,type)}}try{const res=obj[method](...args);return GodotJSWrapper.js2variant(res,p_exchange)}catch(e){GodotRuntime.error(`Error calling method ${method} on:`,obj,"error:",e);return-1}}function _godot_js_wrapper_object_get(p_id,p_exchange,p_prop){const obj=GodotJSWrapper.get_proxied_value(p_id);if(obj===undefined){return 0}if(p_prop){const prop=GodotRuntime.parseString(p_prop);try{return GodotJSWrapper.js2variant(obj[prop],p_exchange)}catch(e){GodotRuntime.error(`Error getting variable ${prop} on object`,obj);return 0}}return GodotJSWrapper.js2variant(obj,p_exchange)}function _godot_js_wrapper_object_getvar(p_id,p_type,p_exchange){const obj=GodotJSWrapper.get_proxied_value(p_id);if(obj===undefined){return-1}const prop=GodotJSWrapper.variant2js(p_type,p_exchange);if(prop===undefined||prop===null){return-1}try{return GodotJSWrapper.js2variant(obj[prop],p_exchange)}catch(e){GodotRuntime.error(`Error getting variable ${prop} on object`,obj,e);return-1}}function _godot_js_wrapper_object_set(p_id,p_name,p_type,p_exchange){const obj=GodotJSWrapper.get_proxied_value(p_id);if(obj===undefined){return}const name=GodotRuntime.parseString(p_name);try{obj[name]=GodotJSWrapper.variant2js(p_type,p_exchange)}catch(e){GodotRuntime.error(`Error setting variable ${name} on object`,obj)}}function _godot_js_wrapper_object_setvar(p_id,p_key_type,p_key_ex,p_val_type,p_val_ex){const obj=GodotJSWrapper.get_proxied_value(p_id);if(obj===undefined){return-1}const key=GodotJSWrapper.variant2js(p_key_type,p_key_ex);try{obj[key]=GodotJSWrapper.variant2js(p_val_type,p_val_ex);return 0}catch(e){GodotRuntime.error(`Error setting variable ${key} on object`,obj);return-1}}function _godot_js_wrapper_object_unref(p_id){const proxy=IDHandler.get(p_id);if(proxy!==undefined){proxy.unref()}}var GodotWebXR={gl:null,session:null,space:null,frame:null,pose:null,orig_requestAnimationFrame:null,requestAnimationFrame:callback=>{if(GodotWebXR.session&&GodotWebXR.space){const onFrame=function(time,frame){GodotWebXR.frame=frame;GodotWebXR.pose=frame.getViewerPose(GodotWebXR.space);callback(time);GodotWebXR.frame=null;GodotWebXR.pose=null};GodotWebXR.session.requestAnimationFrame(onFrame)}else{GodotWebXR.orig_requestAnimationFrame(callback)}},monkeyPatchRequestAnimationFrame:enable=>{if(GodotWebXR.orig_requestAnimationFrame===null){GodotWebXR.orig_requestAnimationFrame=Browser.requestAnimationFrame}Browser.requestAnimationFrame=enable?GodotWebXR.requestAnimationFrame:GodotWebXR.orig_requestAnimationFrame},pauseResumeMainLoop:()=>{Browser.mainLoop.pause();window.setTimeout(function(){Browser.mainLoop.resume()},0)},shaderProgram:null,programInfo:null,buffer:null,vsSource:"\n\t\t\tconst vec2 scale = vec2(0.5, 0.5);\n\t\t\tattribute vec4 aVertexPosition;\n\n\t\t\tvarying highp vec2 vTextureCoord;\n\n\t\t\tvoid main () {\n\t\t\t\tgl_Position = aVertexPosition;\n\t\t\t\tvTextureCoord = aVertexPosition.xy * scale + scale;\n\t\t\t}\n\t\t",fsSource:"\n\t\t\tvarying highp vec2 vTextureCoord;\n\n\t\t\tuniform sampler2D uSampler;\n\n\t\t\tvoid main() {\n\t\t\t\tgl_FragColor = texture2D(uSampler, vTextureCoord);\n\t\t\t}\n\t\t",initShaderProgram:(gl,vsSource,fsSource)=>{const vertexShader=GodotWebXR.loadShader(gl,gl.VERTEX_SHADER,vsSource);const fragmentShader=GodotWebXR.loadShader(gl,gl.FRAGMENT_SHADER,fsSource);const shaderProgram=gl.createProgram();gl.attachShader(shaderProgram,vertexShader);gl.attachShader(shaderProgram,fragmentShader);gl.linkProgram(shaderProgram);if(!gl.getProgramParameter(shaderProgram,gl.LINK_STATUS)){GodotRuntime.error(`Unable to initialize the shader program: ${gl.getProgramInfoLog(shaderProgram)}`);return null}return shaderProgram},loadShader:(gl,type,source)=>{const shader=gl.createShader(type);gl.shaderSource(shader,source);gl.compileShader(shader);if(!gl.getShaderParameter(shader,gl.COMPILE_STATUS)){GodotRuntime.error(`An error occurred compiling the shader: ${gl.getShaderInfoLog(shader)}`);gl.deleteShader(shader);return null}return shader},initBuffer:gl=>{const positionBuffer=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,positionBuffer);const positions=[-1,-1,1,-1,-1,1,1,1];gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(positions),gl.STATIC_DRAW);return positionBuffer},blitTexture:(gl,texture)=>{if(GodotWebXR.shaderProgram===null){GodotWebXR.shaderProgram=GodotWebXR.initShaderProgram(gl,GodotWebXR.vsSource,GodotWebXR.fsSource);GodotWebXR.programInfo={program:GodotWebXR.shaderProgram,attribLocations:{vertexPosition:gl.getAttribLocation(GodotWebXR.shaderProgram,"aVertexPosition")},uniformLocations:{uSampler:gl.getUniformLocation(GodotWebXR.shaderProgram,"uSampler")}};GodotWebXR.buffer=GodotWebXR.initBuffer(gl)}const orig_program=gl.getParameter(gl.CURRENT_PROGRAM);gl.useProgram(GodotWebXR.shaderProgram);gl.bindBuffer(gl.ARRAY_BUFFER,GodotWebXR.buffer);gl.vertexAttribPointer(GodotWebXR.programInfo.attribLocations.vertexPosition,2,gl.FLOAT,false,0,0);gl.enableVertexAttribArray(GodotWebXR.programInfo.attribLocations.vertexPosition);gl.activeTexture(gl.TEXTURE0);gl.bindTexture(gl.TEXTURE_2D,texture);gl.uniform1i(GodotWebXR.programInfo.uniformLocations.uSampler,0);gl.drawArrays(gl.TRIANGLE_STRIP,0,4);gl.bindTexture(gl.TEXTURE_2D,null);gl.disableVertexAttribArray(GodotWebXR.programInfo.attribLocations.vertexPosition);gl.bindBuffer(gl.ARRAY_BUFFER,null);gl.useProgram(orig_program)},controllers:[],sampleControllers:()=>{if(!GodotWebXR.session){return}let other_index=2;const controllers=[];GodotWebXR.session.inputSources.forEach(input_source=>{if(input_source.targetRayMode==="tracked-pointer"){if(input_source.handedness==="right"){controllers[1]=input_source}else if(input_source.handedness==="left"||!controllers[0]){controllers[0]=input_source}}else{controllers[other_index++]=input_source}});GodotWebXR.controllers=controllers},getControllerId:input_source=>GodotWebXR.controllers.indexOf(input_source)};function _godot_webxr_commit_for_eye(p_eye,p_texture_id){if(!GodotWebXR.session||!GodotWebXR.pose){return}const view_index=p_eye===2?1:0;const glLayer=GodotWebXR.session.renderState.baseLayer;const view=GodotWebXR.pose.views[view_index];const viewport=glLayer.getViewport(view);const gl=GodotWebXR.gl;const orig_framebuffer=gl.getParameter(gl.FRAMEBUFFER_BINDING);const orig_viewport=gl.getParameter(gl.VIEWPORT);gl.bindFramebuffer(gl.FRAMEBUFFER,glLayer.framebuffer);gl.viewport(viewport.x,viewport.y,viewport.width,viewport.height);GodotWebXR.blitTexture(gl,GL.textures[p_texture_id]);gl.bindFramebuffer(gl.FRAMEBUFFER,orig_framebuffer);gl.viewport(orig_viewport[0],orig_viewport[1],orig_viewport[2],orig_viewport[3])}function _godot_webxr_get_bounds_geometry(){if(!GodotWebXR.space||!GodotWebXR.space.boundsGeometry){return 0}const point_count=GodotWebXR.space.boundsGeometry.length;if(point_count===0){return 0}const buf=GodotRuntime.malloc((point_count*3+1)*4);GodotRuntime.setHeapValue(buf,point_count,"i32");for(let i=0;i<point_count;i++){const point=GodotWebXR.space.boundsGeometry[i];GodotRuntime.setHeapValue(buf+(i*3+1)*4,point.x,"float");GodotRuntime.setHeapValue(buf+(i*3+2)*4,point.y,"float");GodotRuntime.setHeapValue(buf+(i*3+3)*4,point.z,"float")}return buf}function _godot_webxr_get_controller_axes(p_controller,p_xr_standard_mapping){if(GodotWebXR.controllers.length===0){return 0}const controller=GodotWebXR.controllers[p_controller];if(!controller||!controller.gamepad){return 0}let axes=controller.gamepad.axes;if(controller.gamepad.mapping==="xr-standard"){if(p_xr_standard_mapping){const trigger_axis=controller.gamepad.buttons[0].value;const grip_axis=controller.gamepad.buttons[1].value;axes=[axes[2],axes[3]*-1,trigger_axis,grip_axis,grip_axis,0,axes[0],axes[1]*-1]}else{axes[1]*=-1;axes[3]*=-1}}const buf=GodotRuntime.malloc((axes.length+1)*4);GodotRuntime.setHeapValue(buf,axes.length,"i32");for(let i=0;i<axes.length;i++){GodotRuntime.setHeapValue(buf+4+i*4,axes[i],"float")}return buf}function _godot_webxr_get_controller_buttons(p_controller,p_xr_standard_mapping){if(GodotWebXR.controllers.length===0){return 0}const controller=GodotWebXR.controllers[p_controller];if(!controller||!controller.gamepad){return 0}let buttons=controller.gamepad.buttons;if(controller.gamepad.mapping==="xr-standard"&&p_xr_standard_mapping){buttons=[0,buttons[5],buttons[1],buttons[3],buttons[6],buttons[7],buttons[8],buttons[4],buttons[9],buttons[10],buttons[11],buttons[12],buttons[13],buttons[14],buttons[2],buttons[0]]}const buf=GodotRuntime.malloc((buttons.length+1)*4);GodotRuntime.setHeapValue(buf,buttons.length,"i32");for(let i=0;i<buttons.length;i++){GodotRuntime.setHeapValue(buf+4+i*4,buttons[i]?buttons[i].value:0,"float")}return buf}function _godot_webxr_get_controller_count(){if(!GodotWebXR.session||!GodotWebXR.frame){return 0}return GodotWebXR.controllers.length}function _godot_webxr_get_controller_target_ray_mode(p_controller){if(p_controller<0||p_controller>=GodotWebXR.controllers.length){return 0}const controller=GodotWebXR.controllers[p_controller];if(!controller){return 0}switch(controller.targetRayMode){case"gaze":return 1;case"tracked-pointer":return 2;case"screen":return 3;default:break}return 0}function _godot_webxr_get_controller_transform(p_controller){if(!GodotWebXR.session||!GodotWebXR.frame){return 0}const controller=GodotWebXR.controllers[p_controller];if(!controller){return 0}const frame=GodotWebXR.frame;const space=GodotWebXR.space;const pose=frame.getPose(controller.targetRaySpace,space);if(!pose){return 0}const matrix=pose.transform.matrix;const buf=GodotRuntime.malloc(16*4);for(let i=0;i<16;i++){GodotRuntime.setHeapValue(buf+i*4,matrix[i],"float")}return buf}function _godot_webxr_get_projection_for_eye(p_eye){if(!GodotWebXR.session||!GodotWebXR.pose){return 0}const view_index=p_eye===2?1:0;const matrix=GodotWebXR.pose.views[view_index].projectionMatrix;const buf=GodotRuntime.malloc(16*4);for(let i=0;i<16;i++){GodotRuntime.setHeapValue(buf+i*4,matrix[i],"float")}return buf}function _godot_webxr_get_render_targetsize(){if(!GodotWebXR.session||!GodotWebXR.pose){return 0}const glLayer=GodotWebXR.session.renderState.baseLayer;const view=GodotWebXR.pose.views[0];const viewport=glLayer.getViewport(view);const buf=GodotRuntime.malloc(2*4);GodotRuntime.setHeapValue(buf+0,viewport.width,"i32");GodotRuntime.setHeapValue(buf+4,viewport.height,"i32");return buf}function _godot_webxr_get_transform_for_eye(p_eye){if(!GodotWebXR.session||!GodotWebXR.pose){return 0}const views=GodotWebXR.pose.views;let matrix;if(p_eye===0){matrix=GodotWebXR.pose.transform.matrix}else{matrix=views[p_eye-1].transform.matrix}const buf=GodotRuntime.malloc(16*4);for(let i=0;i<16;i++){GodotRuntime.setHeapValue(buf+i*4,matrix[i],"float")}return buf}function _godot_webxr_get_view_count(){if(!GodotWebXR.session||!GodotWebXR.pose){return 0}return GodotWebXR.pose.views.length}function _godot_webxr_get_visibility_state(){if(!GodotWebXR.session||!GodotWebXR.session.visibilityState){return 0}return GodotRuntime.allocString(GodotWebXR.session.visibilityState)}function _godot_webxr_initialize(p_session_mode,p_required_features,p_optional_features,p_requested_reference_spaces,p_on_session_started,p_on_session_ended,p_on_session_failed,p_on_controller_changed,p_on_input_event,p_on_simple_event){GodotWebXR.monkeyPatchRequestAnimationFrame(true);const session_mode=GodotRuntime.parseString(p_session_mode);const required_features=GodotRuntime.parseString(p_required_features).split(",").map(s=>s.trim()).filter(s=>s!=="");const optional_features=GodotRuntime.parseString(p_optional_features).split(",").map(s=>s.trim()).filter(s=>s!=="");const requested_reference_space_types=GodotRuntime.parseString(p_requested_reference_spaces).split(",").map(s=>s.trim());const onstarted=GodotRuntime.get_func(p_on_session_started);const onended=GodotRuntime.get_func(p_on_session_ended);const onfailed=GodotRuntime.get_func(p_on_session_failed);const oncontroller=GodotRuntime.get_func(p_on_controller_changed);const oninputevent=GodotRuntime.get_func(p_on_input_event);const onsimpleevent=GodotRuntime.get_func(p_on_simple_event);const session_init={};if(required_features.length>0){session_init["requiredFeatures"]=required_features}if(optional_features.length>0){session_init["optionalFeatures"]=optional_features}navigator.xr.requestSession(session_mode,session_init).then(function(session){GodotWebXR.session=session;session.addEventListener("end",function(evt){onended()});session.addEventListener("inputsourceschange",function(evt){let controller_changed=false;[evt.added,evt.removed].forEach(lst=>{lst.forEach(input_source=>{if(input_source.targetRayMode==="tracked-pointer"){controller_changed=true}})});if(controller_changed){oncontroller()}});["selectstart","selectend","select","squeezestart","squeezeend","squeeze"].forEach((input_event,index)=>{session.addEventListener(input_event,function(evt){GodotWebXR.sampleControllers();oninputevent(index,GodotWebXR.getControllerId(evt.inputSource))})});session.addEventListener("visibilitychange",function(evt){const c_str=GodotRuntime.allocString("visibility_state_changed");onsimpleevent(c_str);GodotRuntime.free(c_str)});const gl_context_handle=_emscripten_webgl_get_current_context();const gl=GL.getContext(gl_context_handle).GLctx;GodotWebXR.gl=gl;gl.makeXRCompatible().then(function(){session.updateRenderState({baseLayer:new XRWebGLLayer(session,gl)});function onReferenceSpaceSuccess(reference_space,reference_space_type){GodotWebXR.space=reference_space;reference_space.onreset=function(evt){const c_str=GodotRuntime.allocString("reference_space_reset");onsimpleevent(c_str);GodotRuntime.free(c_str)};GodotWebXR.pauseResumeMainLoop();window.setTimeout(function(){const c_str=GodotRuntime.allocString(reference_space_type);onstarted(c_str);GodotRuntime.free(c_str)},0)}function requestReferenceSpace(){const reference_space_type=requested_reference_space_types.shift();session.requestReferenceSpace(reference_space_type).then(refSpace=>{onReferenceSpaceSuccess(refSpace,reference_space_type)}).catch(()=>{if(requested_reference_space_types.length===0){const c_str=GodotRuntime.allocString("Unable to get any of the requested reference space types");onfailed(c_str);GodotRuntime.free(c_str)}else{requestReferenceSpace()}})}requestReferenceSpace()}).catch(function(error){const c_str=GodotRuntime.allocString(`Unable to make WebGL context compatible with WebXR: ${error}`);onfailed(c_str);GodotRuntime.free(c_str)})}).catch(function(error){const c_str=GodotRuntime.allocString(`Unable to start session: ${error}`);onfailed(c_str);GodotRuntime.free(c_str)})}function _godot_webxr_is_controller_connected(p_controller){if(!GodotWebXR.session||!GodotWebXR.frame){return false}return!!GodotWebXR.controllers[p_controller]}function _godot_webxr_is_session_supported(p_session_mode,p_callback){const session_mode=GodotRuntime.parseString(p_session_mode);const cb=GodotRuntime.get_func(p_callback);if(navigator.xr){navigator.xr.isSessionSupported(session_mode).then(function(supported){const c_str=GodotRuntime.allocString(session_mode);cb(c_str,supported?1:0);GodotRuntime.free(c_str)})}else{const c_str=GodotRuntime.allocString(session_mode);cb(c_str,0);GodotRuntime.free(c_str)}}function _godot_webxr_is_supported(){return!!navigator.xr}function _godot_webxr_sample_controller_data(){GodotWebXR.sampleControllers()}function _godot_webxr_uninitialize(){if(GodotWebXR.session){GodotWebXR.session.end().catch(e=>{})}GodotWebXR.session=null;GodotWebXR.space=null;GodotWebXR.frame=null;GodotWebXR.pose=null;GodotWebXR.monkeyPatchRequestAnimationFrame(false);GodotWebXR.pauseResumeMainLoop()}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,"0")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var preloadedImages={};var preloadedAudios={};var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}Module["request_quit"]=function(){GodotOS.request_quit()};Module["onExit"]=GodotOS.cleanup;GodotOS._fs_sync_promise=Promise.resolve();Module["initConfig"]=GodotConfig.init_config;Module["initFS"]=GodotFS.init;Module["copyToFS"]=GodotFS.copy_to_fs;ERRNO_CODES={"EPERM":63,"ENOENT":44,"ESRCH":71,"EINTR":27,"EIO":29,"ENXIO":60,"E2BIG":1,"ENOEXEC":45,"EBADF":8,"ECHILD":12,"EAGAIN":6,"EWOULDBLOCK":6,"ENOMEM":48,"EACCES":2,"EFAULT":21,"ENOTBLK":105,"EBUSY":10,"EEXIST":20,"EXDEV":75,"ENODEV":43,"ENOTDIR":54,"EISDIR":31,"EINVAL":28,"ENFILE":41,"EMFILE":33,"ENOTTY":59,"ETXTBSY":74,"EFBIG":22,"ENOSPC":51,"ESPIPE":70,"EROFS":69,"EMLINK":34,"EPIPE":64,"EDOM":18,"ERANGE":68,"ENOMSG":49,"EIDRM":24,"ECHRNG":106,"EL2NSYNC":156,"EL3HLT":107,"EL3RST":108,"ELNRNG":109,"EUNATCH":110,"ENOCSI":111,"EL2HLT":112,"EDEADLK":16,"ENOLCK":46,"EBADE":113,"EBADR":114,"EXFULL":115,"ENOANO":104,"EBADRQC":103,"EBADSLT":102,"EDEADLOCK":16,"EBFONT":101,"ENOSTR":100,"ENODATA":116,"ETIME":117,"ENOSR":118,"ENONET":119,"ENOPKG":120,"EREMOTE":121,"ENOLINK":47,"EADV":122,"ESRMNT":123,"ECOMM":124,"EPROTO":65,"EMULTIHOP":36,"EDOTDOT":125,"EBADMSG":9,"ENOTUNIQ":126,"EBADFD":127,"EREMCHG":128,"ELIBACC":129,"ELIBBAD":130,"ELIBSCN":131,"ELIBMAX":132,"ELIBEXEC":133,"ENOSYS":52,"ENOTEMPTY":55,"ENAMETOOLONG":37,"ELOOP":32,"EOPNOTSUPP":138,"EPFNOSUPPORT":139,"ECONNRESET":15,"ENOBUFS":42,"EAFNOSUPPORT":5,"EPROTOTYPE":67,"ENOTSOCK":57,"ENOPROTOOPT":50,"ESHUTDOWN":140,"ECONNREFUSED":14,"EADDRINUSE":3,"ECONNABORTED":13,"ENETUNREACH":40,"ENETDOWN":38,"ETIMEDOUT":73,"EHOSTDOWN":142,"EHOSTUNREACH":23,"EINPROGRESS":26,"EALREADY":7,"EDESTADDRREQ":17,"EMSGSIZE":35,"EPROTONOSUPPORT":66,"ESOCKTNOSUPPORT":137,"EADDRNOTAVAIL":4,"ENETRESET":39,"EISCONN":30,"ENOTCONN":53,"ETOOMANYREFS":141,"EUSERS":136,"EDQUOT":19,"ESTALE":72,"ENOTSUP":138,"ENOMEDIUM":148,"EILSEQ":25,"EOVERFLOW":61,"ECANCELED":11,"ENOTRECOVERABLE":56,"EOWNERDEAD":62,"ESTRPIPE":135};GodotOS.atexit(function(resolve,reject){GodotDisplayCursor.clear();resolve()});GodotOS.atexit(function(resolve,reject){GodotEventListeners.clear();resolve()});GodotOS.atexit(function(resolve,reject){GodotDisplayVK.clear();resolve()});GodotJSWrapper.proxies=new Map;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"Xc":___call_sighandler,"Rc":___syscall__newselect,"Mc":___syscall_accept4,"Lc":___syscall_bind,"rd":___syscall_chdir,"qd":___syscall_chmod,"Kc":___syscall_connect,"sd":___syscall_faccessat,"Fa":___syscall_fcntl64,"fd":___syscall_getcwd,"Wc":___syscall_getdents64,"Jc":___syscall_getsockname,"Ic":___syscall_getsockopt,"mb":___syscall_ioctl,"Hc":___syscall_listen,"ad":___syscall_lstat64,"_c":___syscall_mkdirat,"$c":___syscall_newfstatat,"nb":___syscall_openat,"Zc":___syscall_poll,"Vc":___syscall_readlinkat,"Gc":___syscall_recvfrom,"Sc":___syscall_renameat,"Tc":___syscall_rmdir,"Fc":___syscall_sendto,"jb":___syscall_socket,"bd":___syscall_stat64,"Qc":___syscall_statfs64,"Pc":___syscall_symlink,"Uc":___syscall_unlinkat,"nd":__dlinit,"pd":__dlopen_js,"od":__dlsym_js,"Va":__emscripten_date_now,"id":__emscripten_get_now_is_monotonic,"Ec":__emscripten_throw_longjmp,"jd":__gmtime_js,"kd":__localtime_js,"md":__tzset_js,"ja":_abort,"qb":_emscripten_cancel_main_loop,"Jh":_emscripten_force_exit,"Ua":_emscripten_get_now,"yi":_emscripten_glActiveTexture,"xi":_emscripten_glAttachShader,"mf":_emscripten_glBeginQuery,"Qi":_emscripten_glBeginQueryEXT,"Ue":_emscripten_glBeginTransformFeedback,"wi":_emscripten_glBindAttribLocation,"vi":_emscripten_glBindBuffer,"Qe":_emscripten_glBindBufferBase,"Re":_emscripten_glBindBufferRange,"ui":_emscripten_glBindFramebuffer,"ti":_emscripten_glBindRenderbuffer,"Td":_emscripten_glBindSampler,"si":_emscripten_glBindTexture,"Kd":_emscripten_glBindTransformFeedback,"Ze":_emscripten_glBindVertexArray,"Hi":_emscripten_glBindVertexArrayOES,"ri":_emscripten_glBlendColor,"qi":_emscripten_glBlendEquation,"pi":_emscripten_glBlendEquationSeparate,"ni":_emscripten_glBlendFunc,"mi":_emscripten_glBlendFuncSeparate,"af":_emscripten_glBlitFramebuffer,"li":_emscripten_glBufferData,"ki":_emscripten_glBufferSubData,"ji":_emscripten_glCheckFramebufferStatus,"ii":_emscripten_glClear,"re":_emscripten_glClearBufferfi,"se":_emscripten_glClearBufferfv,"ue":_emscripten_glClearBufferiv,"te":_emscripten_glClearBufferuiv,"hi":_emscripten_glClearColor,"gi":_emscripten_glClearDepthf,"fi":_emscripten_glClearStencil,"ce":_emscripten_glClientWaitSync,"ei":_emscripten_glColorMask,"bi":_emscripten_glCompileShader,"ai":_emscripten_glCompressedTexImage2D,"rf":_emscripten_glCompressedTexImage3D,"$h":_emscripten_glCompressedTexSubImage2D,"qf":_emscripten_glCompressedTexSubImage3D,"pe":_emscripten_glCopyBufferSubData,"_h":_emscripten_glCopyTexImage2D,"Zh":_emscripten_glCopyTexSubImage2D,"sf":_emscripten_glCopyTexSubImage3D,"Yh":_emscripten_glCreateProgram,"Xh":_emscripten_glCreateShader,"Wh":_emscripten_glCullFace,"Vh":_emscripten_glDeleteBuffers,"Uh":_emscripten_glDeleteFramebuffers,"Th":_emscripten_glDeleteProgram,"of":_emscripten_glDeleteQueries,"Si":_emscripten_glDeleteQueriesEXT,"Sh":_emscripten_glDeleteRenderbuffers,"Vd":_emscripten_glDeleteSamplers,"Rh":_emscripten_glDeleteShader,"de":_emscripten_glDeleteSync,"Qh":_emscripten_glDeleteTextures,"Jd":_emscripten_glDeleteTransformFeedbacks,"Ye":_emscripten_glDeleteVertexArrays,"Gi":_emscripten_glDeleteVertexArraysOES,"Ph":_emscripten_glDepthFunc,"Oh":_emscripten_glDepthMask,"Nh":_emscripten_glDepthRangef,"Mh":_emscripten_glDetachShader,"Lh":_emscripten_glDisable,"Kh":_emscripten_glDisableVertexAttribArray,"Ih":_emscripten_glDrawArrays,"he":_emscripten_glDrawArraysInstanced,"Ci":_emscripten_glDrawArraysInstancedANGLE,"Bf":_emscripten_glDrawArraysInstancedARB,"Cf":_emscripten_glDrawArraysInstancedEXT,"td":_emscripten_glDrawArraysInstancedNV,"hf":_emscripten_glDrawBuffers,"xf":_emscripten_glDrawBuffersEXT,"Di":_emscripten_glDrawBuffersWEBGL,"Hh":_emscripten_glDrawElements,"ge":_emscripten_glDrawElementsInstanced,"Bi":_emscripten_glDrawElementsInstancedANGLE,"yf":_emscripten_glDrawElementsInstancedARB,"zf":_emscripten_glDrawElementsInstancedEXT,"Af":_emscripten_glDrawElementsInstancedNV,"vf":_emscripten_glDrawRangeElements,"Gh":_emscripten_glEnable,"Fh":_emscripten_glEnableVertexAttribArray,"lf":_emscripten_glEndQuery,"Pi":_emscripten_glEndQueryEXT,"Se":_emscripten_glEndTransformFeedback,"fe":_emscripten_glFenceSync,"Eh":_emscripten_glFinish,"Dh":_emscripten_glFlush,"Ch":_emscripten_glFramebufferRenderbuffer,"Bh":_emscripten_glFramebufferTexture2D,"_e":_emscripten_glFramebufferTextureLayer,"Ah":_emscripten_glFrontFace,"zh":_emscripten_glGenBuffers,"xh":_emscripten_glGenFramebuffers,"pf":_emscripten_glGenQueries,"Ti":_emscripten_glGenQueriesEXT,"wh":_emscripten_glGenRenderbuffers,"Wd":_emscripten_glGenSamplers,"vh":_emscripten_glGenTextures,"Id":_emscripten_glGenTransformFeedbacks,"Xe":_emscripten_glGenVertexArrays,"Fi":_emscripten_glGenVertexArraysOES,"yh":_emscripten_glGenerateMipmap,"uh":_emscripten_glGetActiveAttrib,"th":_emscripten_glGetActiveUniform,"je":_emscripten_glGetActiveUniformBlockName,"ke":_emscripten_glGetActiveUniformBlockiv,"ne":_emscripten_glGetActiveUniformsiv,"sh":_emscripten_glGetAttachedShaders,"rh":_emscripten_glGetAttribLocation,"qh":_emscripten_glGetBooleanv,"Xd":_emscripten_glGetBufferParameteri64v,"ph":_emscripten_glGetBufferParameteriv,"nh":_emscripten_glGetError,"mh":_emscripten_glGetFloatv,"Ee":_emscripten_glGetFragDataLocation,"lh":_emscripten_glGetFramebufferAttachmentParameteriv,"Yd":_emscripten_glGetInteger64i_v,"_d":_emscripten_glGetInteger64v,"Ve":_emscripten_glGetIntegeri_v,"kh":_emscripten_glGetIntegerv,"wd":_emscripten_glGetInternalformativ,"Dd":_emscripten_glGetProgramBinary,"ih":_emscripten_glGetProgramInfoLog,"jh":_emscripten_glGetProgramiv,"Ji":_emscripten_glGetQueryObjecti64vEXT,"Mi":_emscripten_glGetQueryObjectivEXT,"Ii":_emscripten_glGetQueryObjectui64vEXT,"jf":_emscripten_glGetQueryObjectuiv,"Li":_emscripten_glGetQueryObjectuivEXT,"kf":_emscripten_glGetQueryiv,"Ni":_emscripten_glGetQueryivEXT,"hh":_emscripten_glGetRenderbufferParameteriv,"Md":_emscripten_glGetSamplerParameterfv,"Nd":_emscripten_glGetSamplerParameteriv,"fh":_emscripten_glGetShaderInfoLog,"eh":_emscripten_glGetShaderPrecisionFormat,"ch":_emscripten_glGetShaderSource,"gh":_emscripten_glGetShaderiv,"bh":_emscripten_glGetString,"qe":_emscripten_glGetStringi,"Zd":_emscripten_glGetSynciv,"ah":_emscripten_glGetTexParameterfv,"$g":_emscripten_glGetTexParameteriv,"Oe":_emscripten_glGetTransformFeedbackVarying,"le":_emscripten_glGetUniformBlockIndex,"oe":_emscripten_glGetUniformIndices,"Yg":_emscripten_glGetUniformLocation,"_g":_emscripten_glGetUniformfv,"Zg":_emscripten_glGetUniformiv,"Fe":_emscripten_glGetUniformuiv,"Me":_emscripten_glGetVertexAttribIiv,"Le":_emscripten_glGetVertexAttribIuiv,"Vg":_emscripten_glGetVertexAttribPointerv,"Xg":_emscripten_glGetVertexAttribfv,"Wg":_emscripten_glGetVertexAttribiv,"Tg":_emscripten_glHint,"Ad":_emscripten_glInvalidateFramebuffer,"zd":_emscripten_glInvalidateSubFramebuffer,"Sg":_emscripten_glIsBuffer,"Rg":_emscripten_glIsEnabled,"Qg":_emscripten_glIsFramebuffer,"Pg":_emscripten_glIsProgram,"nf":_emscripten_glIsQuery,"Ri":_emscripten_glIsQueryEXT,"Og":_emscripten_glIsRenderbuffer,"Ud":_emscripten_glIsSampler,"Ng":_emscripten_glIsShader,"ee":_emscripten_glIsSync,"Mg":_emscripten_glIsTexture,"Hd":_emscripten_glIsTransformFeedback,"We":_emscripten_glIsVertexArray,"Ei":_emscripten_glIsVertexArrayOES,"Lg":_emscripten_glLineWidth,"Kg":_emscripten_glLinkProgram,"Fd":_emscripten_glPauseTransformFeedback,"Ig":_emscripten_glPixelStorei,"Hg":_emscripten_glPolygonOffset,"Cd":_emscripten_glProgramBinary,"Bd":_emscripten_glProgramParameteri,"Oi":_emscripten_glQueryCounterEXT,"wf":_emscripten_glReadBuffer,"Gg":_emscripten_glReadPixels,"Fg":_emscripten_glReleaseShaderCompiler,"Eg":_emscripten_glRenderbufferStorage,"$e":_emscripten_glRenderbufferStorageMultisample,"Ed":_emscripten_glResumeTransformFeedback,"Dg":_emscripten_glSampleCoverage,"Pd":_emscripten_glSamplerParameterf,"Od":_emscripten_glSamplerParameterfv,"Sd":_emscripten_glSamplerParameteri,"Qd":_emscripten_glSamplerParameteriv,"Cg":_emscripten_glScissor,"Bg":_emscripten_glShaderBinary,"Ag":_emscripten_glShaderSource,"zg":_emscripten_glStencilFunc,"xg":_emscripten_glStencilFuncSeparate,"wg":_emscripten_glStencilMask,"vg":_emscripten_glStencilMaskSeparate,"ug":_emscripten_glStencilOp,"tg":_emscripten_glStencilOpSeparate,"sg":_emscripten_glTexImage2D,"uf":_emscripten_glTexImage3D,"rg":_emscripten_glTexParameterf,"qg":_emscripten_glTexParameterfv,"pg":_emscripten_glTexParameteri,"og":_emscripten_glTexParameteriv,"yd":_emscripten_glTexStorage2D,"xd":_emscripten_glTexStorage3D,"mg":_emscripten_glTexSubImage2D,"tf":_emscripten_glTexSubImage3D,"Pe":_emscripten_glTransformFeedbackVaryings,"lg":_emscripten_glUniform1f,"kg":_emscripten_glUniform1fv,"jg":_emscripten_glUniform1i,"ig":_emscripten_glUniform1iv,"De":_emscripten_glUniform1ui,"ze":_emscripten_glUniform1uiv,"hg":_emscripten_glUniform2f,"gg":_emscripten_glUniform2fv,"fg":_emscripten_glUniform2i,"eg":_emscripten_glUniform2iv,"Ce":_emscripten_glUniform2ui,"ye":_emscripten_glUniform2uiv,"dg":_emscripten_glUniform3f,"ag":_emscripten_glUniform3fv,"$f":_emscripten_glUniform3i,"_f":_emscripten_glUniform3iv,"Be":_emscripten_glUniform3ui,"we":_emscripten_glUniform3uiv,"Zf":_emscripten_glUniform4f,"Yf":_emscripten_glUniform4fv,"Xf":_emscripten_glUniform4i,"Wf":_emscripten_glUniform4iv,"Ae":_emscripten_glUniform4ui,"ve":_emscripten_glUniform4uiv,"ie":_emscripten_glUniformBlockBinding,"Vf":_emscripten_glUniformMatrix2fv,"gf":_emscripten_glUniformMatrix2x3fv,"ef":_emscripten_glUniformMatrix2x4fv,"Uf":_emscripten_glUniformMatrix3fv,"ff":_emscripten_glUniformMatrix3x2fv,"cf":_emscripten_glUniformMatrix3x4fv,"Tf":_emscripten_glUniformMatrix4fv,"df":_emscripten_glUniformMatrix4x2fv,"bf":_emscripten_glUniformMatrix4x3fv,"Rf":_emscripten_glUseProgram,"Qf":_emscripten_glValidateProgram,"Pf":_emscripten_glVertexAttrib1f,"Of":_emscripten_glVertexAttrib1fv,"Nf":_emscripten_glVertexAttrib2f,"Mf":_emscripten_glVertexAttrib2fv,"Lf":_emscripten_glVertexAttrib3f,"Kf":_emscripten_glVertexAttrib3fv,"Jf":_emscripten_glVertexAttrib4f,"If":_emscripten_glVertexAttrib4fv,"Ld":_emscripten_glVertexAttribDivisor,"Ai":_emscripten_glVertexAttribDivisorANGLE,"Df":_emscripten_glVertexAttribDivisorARB,"Ef":_emscripten_glVertexAttribDivisorEXT,"ud":_emscripten_glVertexAttribDivisorNV,"Ke":_emscripten_glVertexAttribI4i,"He":_emscripten_glVertexAttribI4iv,"Je":_emscripten_glVertexAttribI4ui,"Ge":_emscripten_glVertexAttribI4uiv,"Ne":_emscripten_glVertexAttribIPointer,"Gf":_emscripten_glVertexAttribPointer,"Ff":_emscripten_glViewport,"$d":_emscripten_glWaitSync,"hd":_emscripten_memcpy_big,"Ta":_emscripten_resize_heap,"pb":_emscripten_set_main_loop,"fb":_emscripten_webgl_commit_frame,"Cc":_emscripten_webgl_create_context,"bc":_emscripten_webgl_destroy_context,"Oc":_emscripten_webgl_init_context_attributes,"xc":_emscripten_webgl_make_context_current,"dd":_environ_get,"ed":_environ_sizes_get,"ua":_fd_close,"cd":_fd_fdstat_get,"lb":_fd_read,"Ac":_fd_seek,"kb":_fd_write,"k":_getTempRet0,"Sa":_getaddrinfo,"Pb":_getnameinfo,"c":_glActiveTexture,"Na":_glAttachShader,"bb":_glBeginTransformFeedback,"vb":_glBindAttribLocation,"b":_glBindBuffer,"P":_glBindBufferBase,"e":_glBindFramebuffer,"_":_glBindRenderbuffer,"a":_glBindTexture,"m":_glBindVertexArray,"D":_glBlendEquation,"X":_glBlendFunc,"w":_glBlendFuncSeparate,"ha":_glBlitFramebuffer,"q":_glBufferData,"K":_glBufferSubData,"M":_glCheckFramebufferStatus,"J":_glClear,"qa":_glClearBufferfv,"O":_glClearColor,"aa":_glClearDepthf,"N":_glColorMask,"ka":_glCompileShader,"Ab":_glCompressedTexImage2D,"gj":_glCompressedTexSubImage2D,"zb":_glCompressedTexSubImage3D,"ej":_glCopyBufferSubData,"_a":_glCopyTexSubImage2D,"$a":_glCreateProgram,"Da":_glCreateShader,"ra":_glCullFace,"L":_glDeleteBuffers,"F":_glDeleteFramebuffers,"Q":_glDeleteProgram,"U":_glDeleteRenderbuffers,"I":_glDeleteShader,"A":_glDeleteTextures,"ea":_glDeleteVertexArrays,"Y":_glDepthFunc,"H":_glDepthMask,"i":_glDisable,"p":_glDisableVertexAttribArray,"B":_glDrawArrays,"ya":_glDrawArraysInstanced,"Ja":_glDrawBuffers,"ba":_glDrawElements,"Ka":_glDrawElementsInstanced,"s":_glEnable,"j":_glEnableVertexAttribArray,"ab":_glEndTransformFeedback,"Db":_glFinish,"Z":_glFramebufferRenderbuffer,"x":_glFramebufferTexture2D,"fj":_glFramebufferTextureLayer,"Bb":_glFrontFace,"C":_glGenBuffers,"E":_glGenFramebuffers,"ga":_glGenRenderbuffers,"v":_glGenTextures,"W":_glGenVertexArrays,"R":_glGenerateMipmap,"Cb":_glGetError,"wb":_glGetFloatv,"$":_glGetIntegerv,"Zi":_glGetProgramBinary,"tb":_glGetProgramInfoLog,"Ea":_glGetProgramiv,"Oa":_glGetShaderInfoLog,"Vi":_glGetShaderSource,"da":_glGetShaderiv,"wa":_glGetString,"dj":_glGetStringi,"Xi":_glGetUniformBlockIndex,"va":_glGetUniformLocation,"lj":_glInvalidateFramebuffer,"ub":_glLinkProgram,"la":_glPixelStorei,"bj":_glProgramBinary,"_i":_glProgramParameteri,"ia":_glReadBuffer,"cb":_glReadPixels,"fa":_glRenderbufferStorage,"Ga":_glRenderbufferStorageMultisample,"T":_glScissor,"Pa":_glShaderSource,"r":_glTexImage2D,"Ia":_glTexImage3D,"g":_glTexParameterf,"d":_glTexParameteri,"ij":_glTexStorage2D,"Ha":_glTexSubImage2D,"Qa":_glTexSubImage3D,"$i":_glTransformFeedbackVaryings,"f":_glUniform1f,"u":_glUniform1i,"db":_glUniform1iv,"xb":_glUniform1ui,"Za":_glUniform2f,"n":_glUniform2fv,"Ca":_glUniform2i,"ma":_glUniform2iv,"Ya":_glUniform3f,"V":_glUniform3fv,"Ba":_glUniform3i,"xa":_glUniform4f,"y":_glUniform4fv,"Aa":_glUniform4i,"Wi":_glUniformBlockBinding,"sb":_glUniformMatrix2fv,"rb":_glUniformMatrix3fv,"o":_glUniformMatrix4fv,"pa":_glUseProgram,"z":_glVertexAttrib4f,"S":_glVertexAttrib4fv,"G":_glVertexAttribDivisor,"pj":_glVertexAttribI4ui,"La":_glVertexAttribIPointer,"h":_glVertexAttribPointer,"t":_glViewport,"di":_godot_audio_capture_start,"cg":_godot_audio_capture_stop,"be":_godot_audio_has_script_processor,"dc":_godot_audio_has_worklet,"bk":_godot_audio_init,"ck":_godot_audio_is_available,"kj":_godot_audio_resume,"yc":_godot_audio_script_create,"nc":_godot_audio_script_start,"Ub":_godot_audio_worklet_create,"ak":_godot_audio_worklet_start_no_threads,"Sb":_godot_js_config_canvas_id_get,"dh":_godot_js_config_locale_get,"_b":_godot_js_display_alert,"me":_godot_js_display_canvas_focus,"xe":_godot_js_display_canvas_is_focused,"ld":_godot_js_display_clipboard_get,"vd":_godot_js_display_clipboard_set,"Te":_godot_js_display_cursor_is_hidden,"Ie":_godot_js_display_cursor_is_locked,"Wa":_godot_js_display_cursor_lock_set,"ob":_godot_js_display_cursor_set_custom_shape,"Hf":_godot_js_display_cursor_set_shape,"Xa":_godot_js_display_cursor_set_visible,"yg":_godot_js_display_desired_size_set,"oc":_godot_js_display_fullscreen_cb,"Sf":_godot_js_display_fullscreen_exit,"bg":_godot_js_display_fullscreen_request,"Rj":_godot_js_display_glGetBufferSubData,"ib":_godot_js_display_has_webgl,"Yc":_godot_js_display_is_swap_ok_cancel,"lc":_godot_js_display_notification_cb,"cc":_godot_js_display_pixel_ratio_get,"ec":_godot_js_display_screen_dpi_get,"Jg":_godot_js_display_screen_size_get,"gd":_godot_js_display_setup_canvas,"Ug":_godot_js_display_size_update,"ae":_godot_js_display_touchscreen_is_available,"jc":_godot_js_display_vk_available,"kc":_godot_js_display_vk_cb,"hc":_godot_js_display_vk_hide,"ic":_godot_js_display_vk_show,"mc":_godot_js_display_window_blur_cb,"Yb":_godot_js_display_window_icon_set,"ng":_godot_js_display_window_size_get,"Zb":_godot_js_display_window_title_set,"zi":_godot_js_eval,"qj":_godot_js_fetch_body_length_get,"Aj":_godot_js_fetch_create,"Jb":_godot_js_fetch_free,"nj":_godot_js_fetch_http_status_get,"rj":_godot_js_fetch_is_chunked,"oj":_godot_js_fetch_read_chunk,"mj":_godot_js_fetch_read_headers,"eb":_godot_js_fetch_state_get,"pc":_godot_js_input_drop_files_cb,"rc":_godot_js_input_gamepad_cb,"fc":_godot_js_input_gamepad_sample,"Rd":_godot_js_input_gamepad_sample_count,"Gd":_godot_js_input_gamepad_sample_get,"sc":_godot_js_input_key_cb,"wc":_godot_js_input_mouse_button_cb,"vc":_godot_js_input_mouse_move_cb,"uc":_godot_js_input_mouse_wheel_cb,"qc":_godot_js_input_paste_cb,"tc":_godot_js_input_touch_cb,"Wb":_godot_js_input_vibrate_handheld,"oi":_godot_js_os_download_buffer,"ac":_godot_js_os_execute,"oh":_godot_js_os_finish_async,"Rb":_godot_js_os_fs_is_persistent,"gc":_godot_js_os_fs_sync,"$b":_godot_js_os_hw_concurrency_get,"Tb":_godot_js_os_request_quit_cb,"Xb":_godot_js_os_shell_open,"Qb":_godot_js_pwa_cb,"Vb":_godot_js_pwa_update,"Ob":_godot_js_rtc_datachannel_close,"Vj":_godot_js_rtc_datachannel_connect,"Sj":_godot_js_rtc_datachannel_destroy,"Wj":_godot_js_rtc_datachannel_get_buffered_amount,"_j":_godot_js_rtc_datachannel_id_get,"Xj":_godot_js_rtc_datachannel_is_negotiated,"$j":_godot_js_rtc_datachannel_is_ordered,"Uj":_godot_js_rtc_datachannel_label_get,"Zj":_godot_js_rtc_datachannel_max_packet_lifetime_get,"Yj":_godot_js_rtc_datachannel_max_retransmits_get,"Tj":_godot_js_rtc_datachannel_protocol_get,"Nb":_godot_js_rtc_datachannel_ready_state_get,"Mb":_godot_js_rtc_datachannel_send,"Qj":_godot_js_rtc_pc_close,"Lj":_godot_js_rtc_pc_create,"Kj":_godot_js_rtc_pc_datachannel_create,"Lb":_godot_js_rtc_pc_destroy,"Mj":_godot_js_rtc_pc_ice_candidate_add,"Oj":_godot_js_rtc_pc_local_description_set,"Pj":_godot_js_rtc_pc_offer_create,"Nj":_godot_js_rtc_pc_remote_description_set,"Kb":_godot_js_websocket_buffered_amount,"Ij":_godot_js_websocket_close,"Hj":_godot_js_websocket_create,"Ib":_godot_js_websocket_destroy,"Jj":_godot_js_websocket_send,"Yi":_godot_js_wrapper_create_cb,"Ki":_godot_js_wrapper_create_object,"Ui":_godot_js_wrapper_interface_get,"aj":_godot_js_wrapper_object_call,"hj":_godot_js_wrapper_object_get,"yb":_godot_js_wrapper_object_getvar,"jj":_godot_js_wrapper_object_set,"cj":_godot_js_wrapper_object_setvar,"ci":_godot_js_wrapper_object_unref,"vj":_godot_webxr_commit_for_eye,"Ej":_godot_webxr_get_bounds_geometry,"Fb":_godot_webxr_get_controller_axes,"sj":_godot_webxr_get_controller_buttons,"uj":_godot_webxr_get_controller_count,"Ra":_godot_webxr_get_controller_target_ray_mode,"tj":_godot_webxr_get_controller_transform,"wj":_godot_webxr_get_projection_for_eye,"yj":_godot_webxr_get_render_targetsize,"xj":_godot_webxr_get_transform_for_eye,"Dj":_godot_webxr_get_view_count,"Fj":_godot_webxr_get_visibility_state,"Bj":_godot_webxr_initialize,"Gb":_godot_webxr_is_controller_connected,"Gj":_godot_webxr_is_session_supported,"Cj":_godot_webxr_is_supported,"Hb":_godot_webxr_sample_controller_data,"zj":_godot_webxr_uninitialize,"za":invoke_ii,"na":invoke_iii,"gb":invoke_iiii,"hb":invoke_iiiii,"Dc":invoke_iiiiii,"Bc":invoke_iiiiiii,"zc":invoke_iij,"ca":invoke_vi,"oa":invoke_vii,"ta":invoke_viii,"sa":invoke_viiii,"Ma":invoke_viiiiiii,"l":_setTempRet0,"Eb":_strftime,"Nc":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["ek"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["fk"]).apply(null,arguments)};var __Z13godot_js_mainiPPc=Module["__Z13godot_js_mainiPPc"]=function(){return(__Z13godot_js_mainiPPc=Module["__Z13godot_js_mainiPPc"]=Module["asm"]["gk"]).apply(null,arguments)};var _main=Module["_main"]=function(){return(_main=Module["_main"]=Module["asm"]["hk"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["ik"]).apply(null,arguments)};var _htonl=Module["_htonl"]=function(){return(_htonl=Module["_htonl"]=Module["asm"]["jk"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["kk"]).apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return(_ntohs=Module["_ntohs"]=Module["asm"]["lk"]).apply(null,arguments)};var _fflush=Module["_fflush"]=function(){return(_fflush=Module["_fflush"]=Module["asm"]["mk"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["nk"]).apply(null,arguments)};var __emwebxr_on_input_event=Module["__emwebxr_on_input_event"]=function(){return(__emwebxr_on_input_event=Module["__emwebxr_on_input_event"]=Module["asm"]["ok"]).apply(null,arguments)};var __emwebxr_on_simple_event=Module["__emwebxr_on_simple_event"]=function(){return(__emwebxr_on_simple_event=Module["__emwebxr_on_simple_event"]=Module["asm"]["pk"]).apply(null,arguments)};var ___funcs_on_exit=Module["___funcs_on_exit"]=function(){return(___funcs_on_exit=Module["___funcs_on_exit"]=Module["asm"]["qk"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["sk"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["tk"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["uk"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["vk"]).apply(null,arguments)};var dynCall_iij=Module["dynCall_iij"]=function(){return(dynCall_iij=Module["dynCall_iij"]=Module["asm"]["wk"]).apply(null,arguments)};function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iij(index,a1,a2,a3){var sp=stackSave();try{return dynCall_iij(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}Module["cwrap"]=cwrap;Module["callMain"]=callMain;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}var calledMain=false;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args){var entryFunction=Module["_main"];args=args||[];args.unshift(thisProgram);var argc=args.length;var argv=stackAlloc((argc+1)*4);var argv_ptr=argv>>2;args.forEach(arg=>{HEAP32[argv_ptr++]=allocateUTF8OnStack(arg)});HEAP32[argv_ptr]=0;try{var ret=entryFunction(argc,argv);exit(ret,true);return ret}catch(e){return handleException(e)}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){EXITSTATUS=status;if(!keepRuntimeAlive()){exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=false;if(Module["noInitialRun"])shouldRunNow=false;run();
10
11
12 return Godot.ready
13}
14);
15})();
16if (typeof exports === 'object' && typeof module === 'object')
17 module.exports = Godot;
18else if (typeof define === 'function' && define['amd'])
19 define([], function() { return Godot; });
20else if (typeof exports === 'object')
21 exports["Godot"] = Godot;
22
23const Preloader = /** @constructor */ function () { // eslint-disable-line no-unused-vars
24 function getTrackedResponse(response, load_status) {
25 function onloadprogress(reader, controller) {
26 return reader.read().then(function (result) {
27 if (load_status.done) {
28 return Promise.resolve();
29 }
30 if (result.value) {
31 controller.enqueue(result.value);
32 load_status.loaded += result.value.length;
33 }
34 if (!result.done) {
35 return onloadprogress(reader, controller);
36 }
37 load_status.done = true;
38 return Promise.resolve();
39 });
40 }
41 const reader = response.body.getReader();
42 return new Response(new ReadableStream({
43 start: function (controller) {
44 onloadprogress(reader, controller).then(function () {
45 controller.close();
46 });
47 },
48 }), { headers: response.headers });
49 }
50
51 function loadFetch(file, tracker, fileSize, raw) {
52 tracker[file] = {
53 total: fileSize || 0,
54 loaded: 0,
55 done: false,
56 };
57 return fetch(file).then(function (response) {
58 if (!response.ok) {
59 return Promise.reject(new Error(`Failed loading file '${file}'`));
60 }
61 const tr = getTrackedResponse(response, tracker[file]);
62 if (raw) {
63 return Promise.resolve(tr);
64 }
65 return tr.arrayBuffer();
66 });
67 }
68
69 function retry(func, attempts = 1) {
70 function onerror(err) {
71 if (attempts <= 1) {
72 return Promise.reject(err);
73 }
74 return new Promise(function (resolve, reject) {
75 setTimeout(function () {
76 retry(func, attempts - 1).then(resolve).catch(reject);
77 }, 1000);
78 });
79 }
80 return func().catch(onerror);
81 }
82
83 const DOWNLOAD_ATTEMPTS_MAX = 4;
84 const loadingFiles = {};
85 const lastProgress = { loaded: 0, total: 0 };
86 let progressFunc = null;
87
88 const animateProgress = function () {
89 let loaded = 0;
90 let total = 0;
91 let totalIsValid = true;
92 let progressIsFinal = true;
93
94 Object.keys(loadingFiles).forEach(function (file) {
95 const stat = loadingFiles[file];
96 if (!stat.done) {
97 progressIsFinal = false;
98 }
99 if (!totalIsValid || stat.total === 0) {
100 totalIsValid = false;
101 total = 0;
102 } else {
103 total += stat.total;
104 }
105 loaded += stat.loaded;
106 });
107 if (loaded !== lastProgress.loaded || total !== lastProgress.total) {
108 lastProgress.loaded = loaded;
109 lastProgress.total = total;
110 if (typeof progressFunc === 'function') {
111 progressFunc(loaded, total);
112 }
113 }
114 if (!progressIsFinal) {
115 requestAnimationFrame(animateProgress);
116 }
117 };
118
119 this.animateProgress = animateProgress;
120
121 this.setProgressFunc = function (callback) {
122 progressFunc = callback;
123 };
124
125 this.loadPromise = function (file, fileSize, raw = false) {
126 return retry(loadFetch.bind(null, file, loadingFiles, fileSize, raw), DOWNLOAD_ATTEMPTS_MAX);
127 };
128
129 this.preloadedFiles = [];
130 this.preload = function (pathOrBuffer, destPath, fileSize) {
131 let buffer = null;
132 if (typeof pathOrBuffer === 'string') {
133 const me = this;
134 return this.loadPromise(pathOrBuffer, fileSize).then(function (buf) {
135 me.preloadedFiles.push({
136 path: destPath || pathOrBuffer,
137 buffer: buf,
138 });
139 return Promise.resolve();
140 });
141 } else if (pathOrBuffer instanceof ArrayBuffer) {
142 buffer = new Uint8Array(pathOrBuffer);
143 } else if (ArrayBuffer.isView(pathOrBuffer)) {
144 buffer = new Uint8Array(pathOrBuffer.buffer);
145 }
146 if (buffer) {
147 this.preloadedFiles.push({
148 path: destPath,
149 buffer: pathOrBuffer,
150 });
151 return Promise.resolve();
152 }
153 return Promise.reject(new Error('Invalid object for preloading'));
154 };
155};
156
157/**
158 * An object used to configure the Engine instance based on godot export options, and to override those in custom HTML
159 * templates if needed.
160 *
161 * @header Engine configuration
162 * @summary The Engine configuration object. This is just a typedef, create it like a regular object, e.g.:
163 *
164 * ``const MyConfig = { executable: 'godot', unloadAfterInit: false }``
165 *
166 * @typedef {Object} EngineConfig
167 */
168const EngineConfig = {}; // eslint-disable-line no-unused-vars
169
170/**
171 * @struct
172 * @constructor
173 * @ignore
174 */
175const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-vars
176 const cfg = /** @lends {InternalConfig.prototype} */ {
177 /**
178 * Whether the unload the engine automatically after the instance is initialized.
179 *
180 * @memberof EngineConfig
181 * @default
182 * @type {boolean}
183 */
184 unloadAfterInit: true,
185 /**
186 * The HTML DOM Canvas object to use.
187 *
188 * By default, the first canvas element in the document will be used is none is specified.
189 *
190 * @memberof EngineConfig
191 * @default
192 * @type {?HTMLCanvasElement}
193 */
194 canvas: null,
195 /**
196 * The name of the WASM file without the extension. (Set by Godot Editor export process).
197 *
198 * @memberof EngineConfig
199 * @default
200 * @type {string}
201 */
202 executable: '',
203 /**
204 * An alternative name for the game pck to load. The executable name is used otherwise.
205 *
206 * @memberof EngineConfig
207 * @default
208 * @type {?string}
209 */
210 mainPack: null,
211 /**
212 * Specify a language code to select the proper localization for the game.
213 *
214 * The browser locale will be used if none is specified. See complete list of
215 * :ref:`supported locales <doc_locales>`.
216 *
217 * @memberof EngineConfig
218 * @type {?string}
219 * @default
220 */
221 locale: null,
222 /**
223 * The canvas resize policy determines how the canvas should be resized by Godot.
224 *
225 * ``0`` means Godot won't do any resizing. This is useful if you want to control the canvas size from
226 * javascript code in your template.
227 *
228 * ``1`` means Godot will resize the canvas on start, and when changing window size via engine functions.
229 *
230 * ``2`` means Godot will adapt the canvas size to match the whole browser window.
231 *
232 * @memberof EngineConfig
233 * @type {number}
234 * @default
235 */
236 canvasResizePolicy: 2,
237 /**
238 * The arguments to be passed as command line arguments on startup.
239 *
240 * See :ref:`command line tutorial <doc_command_line_tutorial>`.
241 *
242 * **Note**: :js:meth:`startGame <Engine.prototype.startGame>` will always add the ``--main-pack`` argument.
243 *
244 * @memberof EngineConfig
245 * @type {Array<string>}
246 * @default
247 */
248 args: [],
249 /**
250 * When enabled, the game canvas will automatically grab the focus when the engine starts.
251 *
252 * @memberof EngineConfig
253 * @type {boolean}
254 * @default
255 */
256 focusCanvas: true,
257 /**
258 * When enabled, this will turn on experimental virtual keyboard support on mobile.
259 *
260 * @memberof EngineConfig
261 * @type {boolean}
262 * @default
263 */
264 experimentalVK: false,
265 /**
266 * The progressive web app service worker to install.
267 * @memberof EngineConfig
268 * @default
269 * @type {string}
270 */
271 serviceWorker: '',
272 /**
273 * @ignore
274 * @type {Array.<string>}
275 */
276 persistentPaths: ['/userfs'],
277 /**
278 * @ignore
279 * @type {boolean}
280 */
281 persistentDrops: false,
282 /**
283 * @ignore
284 * @type {Array.<string>}
285 */
286 gdnativeLibs: [],
287 /**
288 * @ignore
289 * @type {Array.<string>}
290 */
291 fileSizes: [],
292 /**
293 * A callback function for handling Godot's ``OS.execute`` calls.
294 *
295 * This is for example used in the Web Editor template to switch between project manager and editor, and for running the game.
296 *
297 * @callback EngineConfig.onExecute
298 * @param {string} path The path that Godot's wants executed.
299 * @param {Array.<string>} args The arguments of the "command" to execute.
300 */
301 /**
302 * @ignore
303 * @type {?function(string, Array.<string>)}
304 */
305 onExecute: null,
306 /**
307 * A callback function for being notified when the Godot instance quits.
308 *
309 * **Note**: This function will not be called if the engine crashes or become unresponsive.
310 *
311 * @callback EngineConfig.onExit
312 * @param {number} status_code The status code returned by Godot on exit.
313 */
314 /**
315 * @ignore
316 * @type {?function(number)}
317 */
318 onExit: null,
319 /**
320 * A callback function for displaying download progress.
321 *
322 * The function is called once per frame while downloading files, so the usage of ``requestAnimationFrame()``
323 * is not necessary.
324 *
325 * If the callback function receives a total amount of bytes as 0, this means that it is impossible to calculate.
326 * Possible reasons include:
327 *
328 * - Files are delivered with server-side chunked compression
329 * - Files are delivered with server-side compression on Chromium
330 * - Not all file downloads have started yet (usually on servers without multi-threading)
331 *
332 * @callback EngineConfig.onProgress
333 * @param {number} current The current amount of downloaded bytes so far.
334 * @param {number} total The total amount of bytes to be downloaded.
335 */
336 /**
337 * @ignore
338 * @type {?function(number, number)}
339 */
340 onProgress: null,
341 /**
342 * A callback function for handling the standard output stream. This method should usually only be used in debug pages.
343 *
344 * By default, ``console.log()`` is used.
345 *
346 * @callback EngineConfig.onPrint
347 * @param {...*} [var_args] A variadic number of arguments to be printed.
348 */
349 /**
350 * @ignore
351 * @type {?function(...*)}
352 */
353 onPrint: function () {
354 console.log.apply(console, Array.from(arguments)); // eslint-disable-line no-console
355 },
356 /**
357 * A callback function for handling the standard error stream. This method should usually only be used in debug pages.
358 *
359 * By default, ``console.error()`` is used.
360 *
361 * @callback EngineConfig.onPrintError
362 * @param {...*} [var_args] A variadic number of arguments to be printed as errors.
363 */
364 /**
365 * @ignore
366 * @type {?function(...*)}
367 */
368 onPrintError: function (var_args) {
369 console.error.apply(console, Array.from(arguments)); // eslint-disable-line no-console
370 },
371 };
372
373 /**
374 * @ignore
375 * @struct
376 * @constructor
377 * @param {EngineConfig} opts
378 */
379 function Config(opts) {
380 this.update(opts);
381 }
382
383 Config.prototype = cfg;
384
385 /**
386 * @ignore
387 * @param {EngineConfig} opts
388 */
389 Config.prototype.update = function (opts) {
390 const config = opts || {};
391 // NOTE: We must explicitly pass the default, accessing it via
392 // the key will fail due to closure compiler renames.
393 function parse(key, def) {
394 if (typeof (config[key]) === 'undefined') {
395 return def;
396 }
397 return config[key];
398 }
399 // Module config
400 this.unloadAfterInit = parse('unloadAfterInit', this.unloadAfterInit);
401 this.onPrintError = parse('onPrintError', this.onPrintError);
402 this.onPrint = parse('onPrint', this.onPrint);
403 this.onProgress = parse('onProgress', this.onProgress);
404
405 // Godot config
406 this.canvas = parse('canvas', this.canvas);
407 this.executable = parse('executable', this.executable);
408 this.mainPack = parse('mainPack', this.mainPack);
409 this.locale = parse('locale', this.locale);
410 this.canvasResizePolicy = parse('canvasResizePolicy', this.canvasResizePolicy);
411 this.persistentPaths = parse('persistentPaths', this.persistentPaths);
412 this.persistentDrops = parse('persistentDrops', this.persistentDrops);
413 this.experimentalVK = parse('experimentalVK', this.experimentalVK);
414 this.focusCanvas = parse('focusCanvas', this.focusCanvas);
415 this.serviceWorker = parse('serviceWorker', this.serviceWorker);
416 this.gdnativeLibs = parse('gdnativeLibs', this.gdnativeLibs);
417 this.fileSizes = parse('fileSizes', this.fileSizes);
418 this.args = parse('args', this.args);
419 this.onExecute = parse('onExecute', this.onExecute);
420 this.onExit = parse('onExit', this.onExit);
421 };
422
423 /**
424 * @ignore
425 * @param {string} loadPath
426 * @param {Response} response
427 */
428 Config.prototype.getModuleConfig = function (loadPath, response) {
429 let r = response;
430 return {
431 'print': this.onPrint,
432 'printErr': this.onPrintError,
433 'thisProgram': this.executable,
434 'noExitRuntime': true,
435 'dynamicLibraries': [`${loadPath}.side.wasm`],
436 'instantiateWasm': function (imports, onSuccess) {
437 function done(result) {
438 onSuccess(result['instance'], result['module']);
439 }
440 if (typeof (WebAssembly.instantiateStreaming) !== 'undefined') {
441 WebAssembly.instantiateStreaming(Promise.resolve(r), imports).then(done);
442 } else {
443 r.arrayBuffer().then(function (buffer) {
444 WebAssembly.instantiate(buffer, imports).then(done);
445 });
446 }
447 r = null;
448 return {};
449 },
450 'locateFile': function (path) {
451 if (path.endsWith('.worker.js')) {
452 return `${loadPath}.worker.js`;
453 } else if (path.endsWith('.audio.worklet.js')) {
454 return `${loadPath}.audio.worklet.js`;
455 } else if (path.endsWith('.js')) {
456 return `${loadPath}.js`;
457 } else if (path.endsWith('.side.wasm')) {
458 return `${loadPath}.side.wasm`;
459 } else if (path.endsWith('.wasm')) {
460 return `${loadPath}.wasm`;
461 }
462 return path;
463 },
464 };
465 };
466
467 /**
468 * @ignore
469 * @param {function()} cleanup
470 */
471 Config.prototype.getGodotConfig = function (cleanup) {
472 // Try to find a canvas
473 if (!(this.canvas instanceof HTMLCanvasElement)) {
474 const nodes = document.getElementsByTagName('canvas');
475 if (nodes.length && nodes[0] instanceof HTMLCanvasElement) {
476 this.canvas = nodes[0];
477 }
478 if (!this.canvas) {
479 throw new Error('No canvas found in page');
480 }
481 }
482 // Canvas can grab focus on click, or key events won't work.
483 if (this.canvas.tabIndex < 0) {
484 this.canvas.tabIndex = 0;
485 }
486
487 // Browser locale, or custom one if defined.
488 let locale = this.locale;
489 if (!locale) {
490 locale = navigator.languages ? navigator.languages[0] : navigator.language;
491 locale = locale.split('.')[0];
492 }
493 locale = locale.replace('-', '_');
494 const onExit = this.onExit;
495
496 // Godot configuration.
497 return {
498 'canvas': this.canvas,
499 'canvasResizePolicy': this.canvasResizePolicy,
500 'locale': locale,
501 'persistentDrops': this.persistentDrops,
502 'virtualKeyboard': this.experimentalVK,
503 'focusCanvas': this.focusCanvas,
504 'onExecute': this.onExecute,
505 'onExit': function (p_code) {
506 cleanup(); // We always need to call the cleanup callback to free memory.
507 if (typeof (onExit) === 'function') {
508 onExit(p_code);
509 }
510 },
511 };
512 };
513 return new Config(initConfig);
514};
515
516/**
517 * Projects exported for the Web expose the :js:class:`Engine` class to the JavaScript environment, that allows
518 * fine control over the engine's start-up process.
519 *
520 * This API is built in an asynchronous manner and requires basic understanding
521 * of `Promises <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises>`__.
522 *
523 * @module Engine
524 * @header HTML5 shell class reference
525 */
526const Engine = (function () {
527 const preloader = new Preloader();
528
529 let loadPromise = null;
530 let loadPath = '';
531 let initPromise = null;
532
533 /**
534 * @classdesc The ``Engine`` class provides methods for loading and starting exported projects on the Web. For default export
535 * settings, this is already part of the exported HTML page. To understand practical use of the ``Engine`` class,
536 * see :ref:`Custom HTML page for Web export <doc_customizing_html5_shell>`.
537 *
538 * @description Create a new Engine instance with the given configuration.
539 *
540 * @global
541 * @constructor
542 * @param {EngineConfig} initConfig The initial config for this instance.
543 */
544 function Engine(initConfig) { // eslint-disable-line no-shadow
545 this.config = new InternalConfig(initConfig);
546 this.rtenv = null;
547 }
548
549 /**
550 * Load the engine from the specified base path.
551 *
552 * @param {string} basePath Base path of the engine to load.
553 * @param {number=} [size=0] The file size if known.
554 * @returns {Promise} A Promise that resolves once the engine is loaded.
555 *
556 * @function Engine.load
557 */
558 Engine.load = function (basePath, size) {
559 if (loadPromise == null) {
560 loadPath = basePath;
561 loadPromise = preloader.loadPromise(`${loadPath}.wasm`, size, true);
562 requestAnimationFrame(preloader.animateProgress);
563 }
564 return loadPromise;
565 };
566
567 /**
568 * Unload the engine to free memory.
569 *
570 * This method will be called automatically depending on the configuration. See :js:attr:`unloadAfterInit`.
571 *
572 * @function Engine.unload
573 */
574 Engine.unload = function () {
575 loadPromise = null;
576 };
577
578 /**
579 * Check whether WebGL is available. Optionally, specify a particular version of WebGL to check for.
580 *
581 * @param {number=} [majorVersion=1] The major WebGL version to check for.
582 * @returns {boolean} If the given major version of WebGL is available.
583 * @function Engine.isWebGLAvailable
584 */
585 Engine.isWebGLAvailable = function (majorVersion = 1) {
586 try {
587 return !!document.createElement('canvas').getContext(['webgl', 'webgl2'][majorVersion - 1]);
588 } catch (e) { /* Not available */ }
589 return false;
590 };
591
592 /**
593 * Safe Engine constructor, creates a new prototype for every new instance to avoid prototype pollution.
594 * @ignore
595 * @constructor
596 */
597 function SafeEngine(initConfig) {
598 const proto = /** @lends Engine.prototype */ {
599 /**
600 * Initialize the engine instance. Optionally, pass the base path to the engine to load it,
601 * if it hasn't been loaded yet. See :js:meth:`Engine.load`.
602 *
603 * @param {string=} basePath Base path of the engine to load.
604 * @return {Promise} A ``Promise`` that resolves once the engine is loaded and initialized.
605 */
606 init: function (basePath) {
607 if (initPromise) {
608 return initPromise;
609 }
610 if (loadPromise == null) {
611 if (!basePath) {
612 initPromise = Promise.reject(new Error('A base path must be provided when calling `init` and the engine is not loaded.'));
613 return initPromise;
614 }
615 Engine.load(basePath, this.config.fileSizes[`${basePath}.wasm`]);
616 }
617 const me = this;
618 function doInit(promise) {
619 // Care! Promise chaining is bogus with old emscripten versions.
620 // This caused a regression with the Mono build (which uses an older emscripten version).
621 // Make sure to test that when refactoring.
622 return new Promise(function (resolve, reject) {
623 promise.then(function (response) {
624 const cloned = new Response(response.clone().body, { 'headers': [['content-type', 'application/wasm']] });
625 Godot(me.config.getModuleConfig(loadPath, cloned)).then(function (module) {
626 const paths = me.config.persistentPaths;
627 module['initFS'](paths).then(function (err) {
628 me.rtenv = module;
629 if (me.config.unloadAfterInit) {
630 Engine.unload();
631 }
632 resolve();
633 });
634 });
635 });
636 });
637 }
638 preloader.setProgressFunc(this.config.onProgress);
639 initPromise = doInit(loadPromise);
640 return initPromise;
641 },
642
643 /**
644 * Load a file so it is available in the instance's file system once it runs. Must be called **before** starting the
645 * instance.
646 *
647 * If not provided, the ``path`` is derived from the URL of the loaded file.
648 *
649 * @param {string|ArrayBuffer} file The file to preload.
650 *
651 * If a ``string`` the file will be loaded from that path.
652 *
653 * If an ``ArrayBuffer`` or a view on one, the buffer will used as the content of the file.
654 *
655 * @param {string=} path Path by which the file will be accessible. Required, if ``file`` is not a string.
656 *
657 * @returns {Promise} A Promise that resolves once the file is loaded.
658 */
659 preloadFile: function (file, path) {
660 return preloader.preload(file, path, this.config.fileSizes[file]);
661 },
662
663 /**
664 * Start the engine instance using the given override configuration (if any).
665 * :js:meth:`startGame <Engine.prototype.startGame>` can be used in typical cases instead.
666 *
667 * This will initialize the instance if it is not initialized. For manual initialization, see :js:meth:`init <Engine.prototype.init>`.
668 * The engine must be loaded beforehand.
669 *
670 * Fails if a canvas cannot be found on the page, or not specified in the configuration.
671 *
672 * @param {EngineConfig} override An optional configuration override.
673 * @return {Promise} Promise that resolves once the engine started.
674 */
675 start: function (override) {
676 this.config.update(override);
677 const me = this;
678 return me.init().then(function () {
679 if (!me.rtenv) {
680 return Promise.reject(new Error('The engine must be initialized before it can be started'));
681 }
682
683 let config = {};
684 try {
685 config = me.config.getGodotConfig(function () {
686 me.rtenv = null;
687 });
688 } catch (e) {
689 return Promise.reject(e);
690 }
691 // Godot configuration.
692 me.rtenv['initConfig'](config);
693
694 // Preload GDNative libraries.
695 const libs = [];
696 me.config.gdnativeLibs.forEach(function (lib) {
697 libs.push(me.rtenv['loadDynamicLibrary'](lib, { 'loadAsync': true }));
698 });
699 return Promise.all(libs).then(function () {
700 return new Promise(function (resolve, reject) {
701 preloader.preloadedFiles.forEach(function (file) {
702 me.rtenv['copyToFS'](file.path, file.buffer);
703 });
704 preloader.preloadedFiles.length = 0; // Clear memory
705 me.rtenv['callMain'](me.config.args);
706 initPromise = null;
707 if (me.config.serviceWorker && 'serviceWorker' in navigator) {
708 navigator.serviceWorker.register(me.config.serviceWorker);
709 }
710 resolve();
711 });
712 });
713 });
714 },
715
716 /**
717 * Start the game instance using the given configuration override (if any).
718 *
719 * This will initialize the instance if it is not initialized. For manual initialization, see :js:meth:`init <Engine.prototype.init>`.
720 *
721 * This will load the engine if it is not loaded, and preload the main pck.
722 *
723 * This method expects the initial config (or the override) to have both the :js:attr:`executable` and :js:attr:`mainPack`
724 * properties set (normally done by the editor during export).
725 *
726 * @param {EngineConfig} override An optional configuration override.
727 * @return {Promise} Promise that resolves once the game started.
728 */
729 startGame: function (override) {
730 this.config.update(override);
731 // Add main-pack argument.
732 const exe = this.config.executable;
733 const pack = this.config.mainPack || `${exe}.pck`;
734 this.config.args = ['--main-pack', pack].concat(this.config.args);
735 // Start and init with execName as loadPath if not inited.
736 const me = this;
737 return Promise.all([
738 this.init(exe),
739 this.preloadFile(pack, pack),
740 ]).then(function () {
741 return me.start.apply(me);
742 });
743 },
744
745 /**
746 * Create a file at the specified ``path`` with the passed as ``buffer`` in the instance's file system.
747 *
748 * @param {string} path The location where the file will be created.
749 * @param {ArrayBuffer} buffer The content of the file.
750 */
751 copyToFS: function (path, buffer) {
752 if (this.rtenv == null) {
753 throw new Error('Engine must be inited before copying files');
754 }
755 this.rtenv['copyToFS'](path, buffer);
756 },
757
758 /**
759 * Request that the current instance quit.
760 *
761 * This is akin the user pressing the close button in the window manager, and will
762 * have no effect if the engine has crashed, or is stuck in a loop.
763 *
764 */
765 requestQuit: function () {
766 if (this.rtenv) {
767 this.rtenv['request_quit']();
768 }
769 },
770 };
771
772 Engine.prototype = proto;
773 // Closure compiler exported instance methods.
774 Engine.prototype['init'] = Engine.prototype.init;
775 Engine.prototype['preloadFile'] = Engine.prototype.preloadFile;
776 Engine.prototype['start'] = Engine.prototype.start;
777 Engine.prototype['startGame'] = Engine.prototype.startGame;
778 Engine.prototype['copyToFS'] = Engine.prototype.copyToFS;
779 Engine.prototype['requestQuit'] = Engine.prototype.requestQuit;
780 // Also expose static methods as instance methods
781 Engine.prototype['load'] = Engine.load;
782 Engine.prototype['unload'] = Engine.unload;
783 Engine.prototype['isWebGLAvailable'] = Engine.isWebGLAvailable;
784 return new Engine(initConfig);
785 }
786
787 // Closure compiler exported static methods.
788 SafeEngine['load'] = Engine.load;
789 SafeEngine['unload'] = Engine.unload;
790 SafeEngine['isWebGLAvailable'] = Engine.isWebGLAvailable;
791
792 return SafeEngine;
793}());
794if (typeof window !== 'undefined') {
795 window['Engine'] = Engine;
796}
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.pck b/public/assets/godot-dynamic-tile-loading/example1/index.pck
deleted file mode 100644
index 07ac55c..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.pck
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.png b/public/assets/godot-dynamic-tile-loading/example1/index.png
deleted file mode 100644
index 766b0b6..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/example1/index.wasm b/public/assets/godot-dynamic-tile-loading/example1/index.wasm
deleted file mode 100644
index 5151d56..0000000
--- a/public/assets/godot-dynamic-tile-loading/example1/index.wasm
+++ /dev/null
Binary files differ
diff --git a/public/assets/godot-dynamic-tile-loading/village-creator.png b/public/assets/godot-dynamic-tile-loading/village-creator.png
deleted file mode 100644
index bb5b468..0000000
--- a/public/assets/godot-dynamic-tile-loading/village-creator.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/helix-editor/editor.png b/public/assets/helix-editor/editor.png
deleted file mode 100755
index 2648364..0000000
--- a/public/assets/helix-editor/editor.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/iot-app-output.png b/public/assets/iot-application/iot-app-output.png
deleted file mode 100755
index 1c80589..0000000
--- a/public/assets/iot-application/iot-app-output.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/iot-rest-example.png b/public/assets/iot-application/iot-rest-example.png
deleted file mode 100755
index 3ed86aa..0000000
--- a/public/assets/iot-application/iot-rest-example.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/iot-sqlite-db.png b/public/assets/iot-application/iot-sqlite-db.png
deleted file mode 100755
index 82e1e29..0000000
--- a/public/assets/iot-application/iot-sqlite-db.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/kcachegrind.png b/public/assets/iot-application/kcachegrind.png
deleted file mode 100755
index 0dc48ab..0000000
--- a/public/assets/iot-application/kcachegrind.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/profiling-viewer.png b/public/assets/iot-application/profiling-viewer.png
deleted file mode 100755
index a450513..0000000
--- a/public/assets/iot-application/profiling-viewer.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/simple-iot-application-overview.svg b/public/assets/iot-application/simple-iot-application-overview.svg
deleted file mode 100755
index 817666d..0000000
--- a/public/assets/iot-application/simple-iot-application-overview.svg
+++ /dev/null
@@ -1,2 +0,0 @@
1<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="623px" height="482px" version="1.1" content="&lt;mxfile userAgent=&quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36&quot; version=&quot;7.1.3&quot; editor=&quot;www.draw.io&quot; type=&quot;google&quot;&gt;&lt;diagram id=&quot;d1a10cf0-d877-4170-d86f-ec45460d7050&quot; name=&quot;Page-1&quot;&gt;7Vnbbts4EP0aPzYQdbP9mKTNFtjtokgWSPpIi7RNrCRqKfq2X79DiZREUU5sV267RREgoI6o4XDmkHNIT4L7bP+bwMX6Eyc0nfge2U+C9xPfn8Yz+K+AQw1Ecw2sBCM1hFrgif1LNehpdMMILa2OkvNUssIGE57nNJEWhoXgO7vbkqf2qAVeUQd4SnDqos+MyHWNziKvxT9StlqbkZGn32TYdNZAucaE7zpQ8GES3AvOZd3K9vc0VbEzcam/ezjytnFM0Fye8oFff7DF6UbP7T2WeIFLqv2TBzNpcLVQzeSQspxQMQnudmsm6VOBE4XvINWArWWWwhOC5oJvoCP5Y2GAUgr+dxMymOzdkufySY+hnd9SIen+6HxQEyVgF+UZleIAXfQHwVzPSDMrjHWgd22e4qiG1p0UzXQ3rJmxaiy3wYOGjt9wLAMnlhM/TqUKBDRWqmEANW0ruvE/G25evCsrwt9CBxQV+/alsfJMF8rVokhZgiXjuTELHtaW7dEAdjwgbNuHjnpp1p/xI3RdamyIgcFP9QmwAbdO8XRw2Dft9wguarrCg/c2t10qj8Fesy0ces8d9vpmL+nSt9lgvoa/4QB/eyGiOblV+yc85TynVRywkAZLUlyWLLEjBXMXhxcV1RsUzgzwpQLm8VQBeyZfdNhVu34XVV3JA1MOV+/cmFemPlPBYLJqR6q61V5T4uzhvTTAzPhGJNTaCWE6Kyo7C9pNVicZ0UAuDCZoCotzazsxlB89wmfOquXWcCGyuBD1t6jaef1Vd4vvG5r2DAU9Q/WUHUOQVHzodCtUh/IVhyObvJFnlR5o1BZbLjYxPYme0Vn0bKloMVSzdpies2japSe68VCXnsihZ2X6F0H/JwQN5+iqBI1RMItmOF7OEY0hPO9cxj4LKCoDhY2A6Cpqb08qVVBi5FA9uucpFy3Nl0DNHoRTtsrV+gCqVRpOFSyQEemtfpExQtQwgwVwhBrn9xVa6Na4cIC1/ggVzsnQ1MnQI8XktQSVP3+GIhT9OBmaORm6FWTDcj6QpE+/P4IQ8s6We+gSubdSBUZv6GOfYvzYLqVo4BSD/IEUxNdIwdzdxqoDyEIdpIGhIwc24Zmq21cJbPhDBdZcZ4ytuI/IkJeOrDYSp6u+b/yoq3Ac+X2ZbAlc2TK8yL+Xjukvtst1DOoZupbQ7p0SzeXF1XQMMkvvq6T3qFSd9ql6PXLOf5HzDHJG35yc/iWbKMHluilRr/LRlm0TP7ir/s6g3PfiTjwbTsXZ3EHxG4aOcOeC9CK8REmYYN+fYoo9OnCG6t1OLnFi305+pOmWKsHs3lI+8o3UN6vKyWM3lKNLeVHn9jwlb8uortzsK6QHnLFU5eYvllFYm96fdAf/H3mG82uIqGBq0SGYuyJqeqXzgcOP+Hr8wAX7dhRJ6fLnYUgQeG8yZD4OQ+Cx/bWs3nDanxyDD/8B&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g transform="translate(0.5,0.5)"><path d="M 283 367 C 283 345.67 348 345.67 348 367 L 348 415 C 348 436.33 283 436.33 283 415 Z" fill="#ffffff" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 283 367 C 283 383 348 383 348 367" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(287.5,395.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="54" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 54px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Database</div></div></foreignObject><text x="27" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">Database</text></switch></g><rect x="211" y="211" width="200" height="100" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(252.5,234.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="115" height="51" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 115px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 15px">Web application</font></b><div><b><font size="4"><br /></font></b></div><div><b><br /></b></div></div></div></foreignObject><text x="58" y="32" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 274.76 391 L 251 391 Q 241 391 241 381 L 241 308" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 280.76 391 L 272.76 395 L 274.76 391 L 272.76 387 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 348 391 L 372 391 Q 382 391 382 381 L 382 321.24" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 382 315.24 L 386 323.24 L 382 321.24 L 378 323.24 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(177.5,327.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="50" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 50px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Write<div>datapoint</div></div></div></foreignObject><text x="25" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><g transform="translate(397.5,327.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="56" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 56px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Read<div>datapoints</div></div></div></foreignObject><text x="28" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="151" y="51" width="120" height="60" rx="9" ry="9" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(182.5,67.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 55px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Arduino<div>MKR1000</div></div></div></foreignObject><text x="28" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">[Not supported by viewer]</text></switch></g><rect x="351" y="51" width="120" height="60" rx="9" ry="9" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(372.5,74.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="75" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 77px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Web browser</div></div></foreignObject><text x="38" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">Web browser</text></switch></g><path d="M 254.57 205.86 L 218.81 177.25 Q 211 171 211 161 L 211 111" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 259.25 209.6 L 250.51 207.73 L 254.57 205.86 L 255.51 201.48 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 367.43 205.86 L 403.19 177.25 Q 411 171 411 161 L 411 119.24" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 362.75 209.6 L 366.49 201.48 L 367.43 205.86 L 371.49 207.73 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 411 113.24 L 415 121.24 L 411 119.24 L 407 121.24 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 571 171 L 51 171" fill="none" stroke="#b3b3b3" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="6 6" pointer-events="none"/><g transform="translate(350.5,284.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="45" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: &quot;Times New Roman&quot;; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 46px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font face="Helvetica">Route: /</font></div></div></foreignObject><text x="23" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Times New Roman" font-weight="bold">[Not supported by viewer]</text></switch></g><g transform="translate(222.5,284.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="62" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: &quot;Times New Roman&quot;; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 63px; white-space: nowrap; word-wrap: normal; font-weight: bold;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font face="Helvetica">Route: /api</font></div></div></foreignObject><text x="31" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Times New Roman" font-weight="bold">[Not supported by viewer]</text></switch></g></g></svg> \ No newline at end of file
diff --git a/public/assets/iot-application/simple-iot-application.zip b/public/assets/iot-application/simple-iot-application.zip
deleted file mode 100755
index 46d3205..0000000
--- a/public/assets/iot-application/simple-iot-application.zip
+++ /dev/null
Binary files differ
diff --git a/public/assets/iot-application/snakeviz.png b/public/assets/iot-application/snakeviz.png
deleted file mode 100755
index 5bab395..0000000
--- a/public/assets/iot-application/snakeviz.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/microsoundtrack/cow.m4v b/public/assets/microsoundtrack/cow.m4v
deleted file mode 100644
index 1b2461b..0000000
--- a/public/assets/microsoundtrack/cow.m4v
+++ /dev/null
Binary files differ
diff --git a/public/assets/pid1/boxes.mp4 b/public/assets/pid1/boxes.mp4
deleted file mode 100755
index eb647ff..0000000
--- a/public/assets/pid1/boxes.mp4
+++ /dev/null
Binary files differ
diff --git a/public/assets/pid1/qemu.log b/public/assets/pid1/qemu.log
deleted file mode 100755
index 11be312..0000000
--- a/public/assets/pid1/qemu.log
+++ /dev/null
@@ -1,320 +0,0 @@
1[ 0.000000] Linux version 5.15.7 (m@khan) (gcc (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7), GNU ld version 2.37-10.fc35) #7 SMP Mon Dec 13 10:23:25 CET 2021
2[ 0.000000] Command line: console=ttyS0
3[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
4[ 0.000000] signal: max sigframe size: 1440
5[ 0.000000] BIOS-provided physical RAM map:
6[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
7[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
8[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
9[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
10[ 0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
11[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
12[ 0.000000] NX (Execute Disable) protection: active
13[ 0.000000] SMBIOS 2.8 present.
14[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-6.fc35 04/01/2014
15[ 0.000000] tsc: Fast TSC calibration failed
16[ 0.000000] last_pfn = 0x7fe0 max_arch_pfn = 0x400000000
17[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
18[ 0.000000] found SMP MP-table at [mem 0x000f5c40-0x000f5c4f]
19[ 0.000000] RAMDISK: [mem 0x07e06000-0x07fdffff]
20[ 0.000000] ACPI: Early table checksum verification disabled
21[ 0.000000] ACPI: RSDP 0x00000000000F5A80 000014 (v00 BOCHS )
22[ 0.000000] ACPI: RSDT 0x0000000007FE1905 000034 (v01 BOCHS BXPC 00000001 BXPC 00000001)
23[ 0.000000] ACPI: FACP 0x0000000007FE17B9 000074 (v01 BOCHS BXPC 00000001 BXPC 00000001)
24[ 0.000000] ACPI: DSDT 0x0000000007FE0040 001779 (v01 BOCHS BXPC 00000001 BXPC 00000001)
25[ 0.000000] ACPI: FACS 0x0000000007FE0000 000040
26[ 0.000000] ACPI: APIC 0x0000000007FE182D 000078 (v01 BOCHS BXPC 00000001 BXPC 00000001)
27[ 0.000000] ACPI: HPET 0x0000000007FE18A5 000038 (v01 BOCHS BXPC 00000001 BXPC 00000001)
28[ 0.000000] ACPI: WAET 0x0000000007FE18DD 000028 (v01 BOCHS BXPC 00000001 BXPC 00000001)
29[ 0.000000] ACPI: Reserving FACP table memory at [mem 0x7fe17b9-0x7fe182c]
30[ 0.000000] ACPI: Reserving DSDT table memory at [mem 0x7fe0040-0x7fe17b8]
31[ 0.000000] ACPI: Reserving FACS table memory at [mem 0x7fe0000-0x7fe003f]
32[ 0.000000] ACPI: Reserving APIC table memory at [mem 0x7fe182d-0x7fe18a4]
33[ 0.000000] ACPI: Reserving HPET table memory at [mem 0x7fe18a5-0x7fe18dc]
34[ 0.000000] ACPI: Reserving WAET table memory at [mem 0x7fe18dd-0x7fe1904]
35[ 0.000000] No NUMA configuration found
36[ 0.000000] Faking a node at [mem 0x0000000000000000-0x0000000007fdffff]
37[ 0.000000] NODE_DATA(0) allocated [mem 0x07e02000-0x07e05fff]
38[ 0.000000] Zone ranges:
39[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
40[ 0.000000] DMA32 [mem 0x0000000001000000-0x0000000007fdffff]
41[ 0.000000] Normal empty
42[ 0.000000] Movable zone start for each node
43[ 0.000000] Early memory node ranges
44[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
45[ 0.000000] node 0: [mem 0x0000000000100000-0x0000000007fdffff]
46[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x0000000007fdffff]
47[ 0.000000] On node 0, zone DMA: 1 pages in unavailable ranges
48[ 0.000000] On node 0, zone DMA: 97 pages in unavailable ranges
49[ 0.000000] On node 0, zone DMA32: 32 pages in unavailable ranges
50[ 0.000000] ACPI: PM-Timer IO Port: 0x608
51[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
52[ 0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
53[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
54[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
55[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
56[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
57[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
58[ 0.000000] ACPI: Using ACPI (MADT) for SMP configuration information
59[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
60[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
61[ 0.000000] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
62[ 0.000000] PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
63[ 0.000000] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000effff]
64[ 0.000000] PM: hibernation: Registered nosave memory: [mem 0x000f0000-0x000fffff]
65[ 0.000000] [mem 0x08000000-0xfffbffff] available for PCI devices
66[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
67[ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
68[ 0.000000] percpu: Embedded 52 pages/cpu s174360 r8192 d30440 u2097152
69[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31968
70[ 0.000000] Policy zone: DMA32
71[ 0.000000] Kernel command line: console=ttyS0
72[ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
73[ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
74[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
75[ 0.000000] Memory: 94464K/130552K available (14350K kernel code, 2582K rwdata, 3596K rodata, 1368K init, 1488K bss, 35828K reserved, 0K cma-reserved)
76[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
77[ 0.000000] rcu: Hierarchical RCU implementation.
78[ 0.000000] rcu: RCU event tracing is enabled.
79[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
80[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
81[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
82[ 0.000000] NR_IRQS: 4352, nr_irqs: 256, preallocated irqs: 16
83[ 0.000000] random: get_random_bytes called from start_kernel+0x492/0x65f with crng_init=0
84[ 0.000000] Console: colour VGA+ 80x25
85[ 0.000000] printk: console [ttyS0] enabled
86[ 0.000000] ACPI: Core revision 20210730
87[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
88[ 0.002000] APIC: Switch to symmetric I/O mode setup
89[ 0.005000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
90[ 0.013000] tsc: Unable to calibrate against PIT
91[ 0.014000] tsc: using HPET reference calibration
92[ 0.014000] tsc: Detected 3189.099 MHz processor
93[ 0.001005] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2df8103a89b, max_idle_ns: 440795220785 ns
94[ 0.002672] Calibrating delay loop (skipped), value calculated using timer frequency.. 6378.19 BogoMIPS (lpj=3189099)
95[ 0.002960] pid_max: default: 32768 minimum: 301
96[ 0.003627] LSM: Security Framework initializing
97[ 0.004329] SELinux: Initializing.
98[ 0.005051] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
99[ 0.005202] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
100[ 0.020479] process: using AMD E400 aware idle routine
101[ 0.020699] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
102[ 0.020832] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
103[ 0.021165] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
104[ 0.021438] Spectre V2 : Mitigation: Full AMD retpoline
105[ 0.021586] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
106[ 0.238228] Freeing SMP alternatives memory: 44K
107[ 0.242641] random: fast init done
108[ 0.350203] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0xf, model: 0x6b, stepping: 0x1)
109[ 0.355136] Performance Events: PMU not available due to virtualization, using software events only.
110[ 0.356607] rcu: Hierarchical SRCU implementation.
111[ 0.360890] smp: Bringing up secondary CPUs ...
112[ 0.361082] smp: Brought up 1 node, 1 CPU
113[ 0.361253] smpboot: Max logical packages: 1
114[ 0.361394] smpboot: Total of 1 processors activated (6378.19 BogoMIPS)
115[ 0.371481] devtmpfs: initialized
116[ 0.378162] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
117[ 0.378478] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
118[ 0.381522] PM: RTC time: 00:19:47, date: 2021-12-27
119[ 0.384915] NET: Registered PF_NETLINK/PF_ROUTE protocol family
120[ 0.387403] audit: initializing netlink subsys (disabled)
121[ 0.391765] audit: type=2000 audit(1640564386.402:1): state=initialized audit_enabled=0 res=1
122[ 0.392916] thermal_sys: Registered thermal governor 'step_wise'
123[ 0.392950] thermal_sys: Registered thermal governor 'user_space'
124[ 0.393202] cpuidle: using governor menu
125[ 0.394085] ACPI: bus type PCI registered
126[ 0.396583] PCI: Using configuration type 1 for base access
127[ 0.415012] Kprobes globally optimized
128[ 0.416844] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
129[ 0.420649] cryptomgr_test (20) used greatest stack depth: 15680 bytes left
130[ 0.426071] ACPI: Added _OSI(Module Device)
131[ 0.426182] ACPI: Added _OSI(Processor Device)
132[ 0.426279] ACPI: Added _OSI(3.0 _SCP Extensions)
133[ 0.426376] ACPI: Added _OSI(Processor Aggregator Device)
134[ 0.426606] ACPI: Added _OSI(Linux-Dell-Video)
135[ 0.426709] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
136[ 0.426821] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
137[ 0.439511] ACPI: 1 ACPI AML tables successfully acquired and loaded
138[ 0.452709] ACPI: Interpreter enabled
139[ 0.453468] ACPI: PM: (supports S0 S3 S4 S5)
140[ 0.453603] ACPI: Using IOAPIC for interrupt routing
141[ 0.454022] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
142[ 0.455266] ACPI: Enabled 2 GPEs in block 00 to 0F
143[ 0.480013] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
144[ 0.480702] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
145[ 0.481425] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
146[ 0.483666] PCI host bridge to bus 0000:00
147[ 0.483848] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
148[ 0.484096] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
149[ 0.484237] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
150[ 0.484480] pci_bus 0000:00: root bus resource [mem 0x08000000-0xfebfffff window]
151[ 0.484578] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
152[ 0.484870] pci_bus 0000:00: root bus resource [bus 00-ff]
153[ 0.486588] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
154[ 0.492625] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
155[ 0.493621] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
156[ 0.495015] pci 0000:00:01.1: reg 0x20: [io 0xc040-0xc04f]
157[ 0.495760] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
158[ 0.495936] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
159[ 0.496095] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
160[ 0.496598] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
161[ 0.497793] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
162[ 0.498219] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
163[ 0.498384] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
164[ 0.499487] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
165[ 0.500186] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
166[ 0.500569] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff]
167[ 0.502569] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref]
168[ 0.508052] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000
169[ 0.508590] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff]
170[ 0.509075] pci 0000:00:03.0: reg 0x14: [io 0xc000-0xc03f]
171[ 0.511015] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
172[ 0.517286] ACPI: PCI: Interrupt link LNKA configured for IRQ 10
173[ 0.518032] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
174[ 0.518504] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
175[ 0.518920] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
176[ 0.519208] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
177[ 0.521412] iommu: Default domain type: Translated
178[ 0.521589] iommu: DMA domain TLB invalidation policy: lazy mode
179[ 0.524448] pci 0000:00:02.0: vgaarb: setting as boot VGA device
180[ 0.524569] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
181[ 0.524633] pci 0000:00:02.0: vgaarb: bridge control possible
182[ 0.524846] vgaarb: loaded
183[ 0.526151] SCSI subsystem initialized
184[ 0.528124] ACPI: bus type USB registered
185[ 0.528600] usbcore: registered new interface driver usbfs
186[ 0.528917] usbcore: registered new interface driver hub
187[ 0.529156] usbcore: registered new device driver usb
188[ 0.529593] pps_core: LinuxPPS API ver. 1 registered
189[ 0.529693] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
190[ 0.529916] PTP clock support registered
191[ 0.531428] Advanced Linux Sound Architecture Driver Initialized.
192[ 0.538313] NetLabel: Initializing
193[ 0.538413] NetLabel: domain hash size = 128
194[ 0.538513] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
195[ 0.539300] NetLabel: unlabeled traffic allowed by default
196[ 0.540192] PCI: Using ACPI for IRQ routing
197[ 0.541336] hpet: 3 channels of 0 reserved for per-cpu timers
198[ 0.541742] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
199[ 0.541934] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
200[ 0.547124] clocksource: Switched to clocksource tsc-early
201[ 0.589778] VFS: Disk quotas dquot_6.6.0
202[ 0.590116] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
203[ 0.591999] pnp: PnP ACPI init
204[ 1.348853] pnp: PnP ACPI: found 6 devices
205[ 1.363393] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
206[ 1.364026] NET: Registered PF_INET protocol family
207[ 1.364871] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
208[ 1.369722] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
209[ 1.369973] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
210[ 1.370241] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
211[ 1.370483] TCP: Hash tables configured (established 1024 bind 1024)
212[ 1.371348] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
213[ 1.371835] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
214[ 1.373053] NET: Registered PF_UNIX/PF_LOCAL protocol family
215[ 1.374701] RPC: Registered named UNIX socket transport module.
216[ 1.375153] RPC: Registered udp transport module.
217[ 1.375280] RPC: Registered tcp transport module.
218[ 1.375386] RPC: Registered tcp NFSv4.1 backchannel transport module.
219[ 1.377429] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
220[ 1.377567] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
221[ 1.377738] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
222[ 1.377893] pci_bus 0000:00: resource 7 [mem 0x08000000-0xfebfffff window]
223[ 1.378032] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
224[ 1.378574] pci 0000:00:01.0: PIIX3: Enabling Passive Release
225[ 1.378817] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
226[ 1.378993] pci 0000:00:01.0: Activating ISA DMA hang workarounds
227[ 1.379296] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
228[ 1.379537] PCI: CLS 0 bytes, default 64
229[ 1.385473] Unpacking initramfs...
230[ 1.394653] Initialise system trusted keyrings
231[ 1.395898] workingset: timestamp_bits=56 max_order=15 bucket_order=0
232[ 1.400517] Freeing initrd memory: 1896K
233[ 1.409899] NFS: Registering the id_resolver key type
234[ 1.410240] Key type id_resolver registered
235[ 1.410358] Key type id_legacy registered
236[ 1.436299] Key type asymmetric registered
237[ 1.436505] Asymmetric key parser 'x509' registered
238[ 1.436899] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
239[ 1.437334] io scheduler mq-deadline registered
240[ 1.437848] io scheduler kyber registered
241[ 1.440723] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
242[ 1.443386] ACPI: button: Power Button [PWRF]
243[ 1.445654] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
244[ 1.447264] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
245[ 1.450740] Non-volatile memory driver v1.3
246[ 1.451106] Linux agpgart interface v0.103
247[ 1.467087] loop: module loaded
248[ 1.474468] scsi host0: ata_piix
249[ 1.476252] scsi host1: ata_piix
250[ 1.476701] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc040 irq 14
251[ 1.476882] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc048 irq 15
252[ 1.481539] libphy: Fixed MDIO Bus: probed
253[ 1.482188] e100: Intel(R) PRO/100 Network Driver
254[ 1.482313] e100: Copyright(c) 1999-2006 Intel Corporation
255[ 1.482507] e1000: Intel(R) PRO/1000 Network Driver
256[ 1.482702] e1000: Copyright (c) 1999-2006 Intel Corporation.
257[ 1.616439] ACPI: \_SB_.LNKC: Enabled at IRQ 11
258[ 1.649465] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
259[ 1.664135] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
260[ 1.693021] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
261[ 1.693338] cdrom: Uniform CD-ROM driver Revision: 3.20
262[ 1.723925] sr 1:0:0:0: Attached scsi generic sg0 type 5
263[ 1.946674] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
264[ 1.947107] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
265[ 1.947650] e1000e: Intel(R) PRO/1000 Network Driver
266[ 1.947749] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
267[ 1.947947] sky2: driver version 1.30
268[ 1.948805] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
269[ 1.948993] ehci-pci: EHCI PCI platform driver
270[ 1.949218] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
271[ 1.949394] ohci-pci: OHCI PCI platform driver
272[ 1.949636] uhci_hcd: USB Universal Host Controller Interface driver
273[ 1.950082] usbcore: registered new interface driver usblp
274[ 1.950302] usbcore: registered new interface driver usb-storage
275[ 1.951012] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
276[ 1.954333] serio: i8042 KBD port at 0x60,0x64 irq 1
277[ 1.954634] serio: i8042 AUX port at 0x60,0x64 irq 12
278[ 1.957984] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
279[ 1.960071] rtc_cmos 00:05: RTC can wake from S4
280[ 1.964738] rtc_cmos 00:05: registered as rtc0
281[ 1.965357] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram, hpet irqs
282[ 1.966676] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
283[ 1.967364] hid: raw HID events driver (C) Jiri Kosina
284[ 1.968571] usbcore: registered new interface driver usbhid
285[ 1.968750] usbhid: USB HID core driver
286[ 1.974818] Initializing XFRM netlink socket
287[ 1.975673] NET: Registered PF_INET6 protocol family
288[ 1.981212] Segment Routing with IPv6
289[ 1.981421] In-situ OAM (IOAM) with IPv6
290[ 1.982292] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
291[ 1.984278] NET: Registered PF_PACKET protocol family
292[ 1.984857] Key type dns_resolver registered
293[ 1.985989] IPI shorthand broadcast: enabled
294[ 1.986261] sched_clock: Marking stable (1999028700, -13430834)->(1985937339, -339473)
295[ 1.987965] registered taskstats version 1
296[ 1.988095] Loading compiled-in X.509 certificates
297[ 1.991283] PM: Magic number: 1:335:305
298[ 1.991523] tty tty34: hash matches
299[ 1.991951] printk: console [netcon0] enabled
300[ 1.992067] netconsole: network logging started
301[ 1.994549] cfg80211: Loading compiled-in X.509 certificates for regulatory database
302[ 2.004972] kworker/u2:2 (64) used greatest stack depth: 14856 bytes left
303[ 2.012521] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
304[ 2.013924] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
305[ 2.014318] cfg80211: failed to load regulatory.db
306[ 2.016106] ALSA device list:
307[ 2.016329] No soundcards found.
308[ 2.053176] Freeing unused kernel image (initmem) memory: 1368K
309[ 2.056095] Write protecting the kernel read-only data: 20480k
310[ 2.058248] Freeing unused kernel image (text/rodata gap) memory: 2032K
311[ 2.058811] Freeing unused kernel image (rodata/data gap) memory: 500K
312[ 2.059164] Run /init as init process
313Hello from Golang
314[ 2.386879] tsc: Refined TSC clocksource calibration: 3192.032 MHz
315[ 2.387114] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e02e31fa14, max_idle_ns: 440795264947 ns
316[ 2.387380] clocksource: Switched to clocksource tsc
317[ 2.587895] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
318Hello from Golang
319Hello from Golang
320Hello from Golang
diff --git a/public/assets/pid1/unikernels.png b/public/assets/pid1/unikernels.png
deleted file mode 100755
index 16026ed..0000000
--- a/public/assets/pid1/unikernels.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/pid1/unikernels.svg b/public/assets/pid1/unikernels.svg
deleted file mode 100755
index 460fb94..0000000
--- a/public/assets/pid1/unikernels.svg
+++ /dev/null
@@ -1,128 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg width="210mm" height="297mm" viewBox="0 0 210 297" version="1.1" id="svg5" inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" sodipodi:docname="unikernels.svg" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
5 <sodipodi:namedview id="namedview7" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.4948513" inkscape:cx="431.48104" inkscape:cy="473.6257" inkscape:window-width="1887" inkscape:window-height="913" inkscape:window-x="1859" inkscape:window-y="48" inkscape:window-maximized="0" inkscape:current-layer="layer1" showguides="true" inkscape:guide-bbox="true" />
6 <defs id="defs2" />
7 <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
8 <g id="g98495" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
9 <rect style="fill:#ececec;stroke:none;stroke-width:0.318966;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect18248" width="65.511665" height="75.571449" x="5.6951494" y="75.506912" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862" />
10 <rect style="fill:#ececec;stroke:none;stroke-width:0.318966;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect18418" width="65.511665" height="75.571449" x="72.166878" y="75.506912" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862" />
11 <rect style="fill:#ececec;stroke:none;stroke-width:0.318966;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect18420" width="65.511665" height="75.571449" x="138.63863" y="75.506912" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862" />
12 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:2.82222px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Heavy';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" x="25.735832" y="144.60236" id="text18439" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
13 <tspan sodipodi:role="line" id="tspan18437" style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:2.82222px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Ultra-Bold';fill:#000000;stroke-width:0.264583" x="25.735832" y="144.60236">VIRTUAL MACHINE</tspan>
14 </text>
15 <g id="g50691" transform="translate(0,-101.60001)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
16 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect38097-3" width="50.57568" height="8.4333" x="13.294504" y="213.63496" ry="1.5" />
17 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Heavy';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.263063" y="218.54855" id="text32261">
18 <tspan sodipodi:role="line" id="tspan32259" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="24.263063" y="218.54855">HOST OS / HYPERVISOR</tspan>
19 </text>
20 </g>
21 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect38097" width="22.000685" height="26.315866" x="13.294504" y="184.14406" ry="1.5" transform="translate(0,-102.12917)" />
22 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="204.21999" id="text38435" transform="translate(0,-102.12917)">
23 <tspan sodipodi:role="line" id="tspan38433" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="204.48907">VIRTUAL</tspan>
24 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="206.28824" id="tspan38945">MACHINE</tspan>
25 </text>
26 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="198.19913" id="text41165" transform="translate(0,-102.12917)">
27 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="198.19913" id="tspan41163">GUEST OS</tspan>
28 </text>
29 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="189.40337" id="text42587" transform="translate(0,-102.12917)">
30 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="189.67245" id="tspan42585">TARGET</tspan>
31 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="191.47162" id="tspan42611">SOFTWARE</tspan>
32 </text>
33 <g id="g50696" transform="translate(0,-99.483339)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
34 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect48544" width="50.57568" height="8.4333" x="13.294504" y="223.15991" ry="1.5" />
35 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Heavy';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="31.535746" y="228.24654" id="text47169">
36 <tspan sodipodi:role="line" id="tspan47167" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="31.535746" y="228.24654">HARDWARE</tspan>
37 </text>
38 </g>
39 <g id="g48202" transform="translate(28.574999,-102.12917)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
40 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect48184" width="22.000685" height="26.315866" x="13.294504" y="184.14406" ry="1.5" />
41 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="204.21999" id="text48190">
42 <tspan sodipodi:role="line" id="tspan48186" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="204.48907">VIRTUAL</tspan>
43 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="206.28824" id="tspan48188">MACHINE</tspan>
44 </text>
45 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="198.19913" id="text48194">
46 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="198.19913" id="tspan48192">GUEST OS</tspan>
47 </text>
48 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="189.40337" id="text48200">
49 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="189.67245" id="tspan48196">TARGET</tspan>
50 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="191.47162" id="tspan48198">SOFTWARE</tspan>
51 </text>
52 </g>
53 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:2.82222px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Heavy';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" x="95.948242" y="144.60236" id="text51110" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
54 <tspan sodipodi:role="line" id="tspan51108" style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:2.82222px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Ultra-Bold';fill:#000000;stroke-width:0.264583" x="95.948242" y="144.60236">CONTAINERS</tspan>
55 </text>
56 <g id="g51118" transform="translate(66.675002,-101.60001)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
57 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect51112" width="50.57568" height="8.4333" x="13.294504" y="213.63496" ry="1.5" />
58 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="33.144272" y="218.54855" id="text51116">
59 <tspan sodipodi:role="line" id="tspan51114" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="33.144272" y="218.54855">HOST OS</tspan>
60 </text>
61 </g>
62 <g id="g51138" transform="translate(66.675002,-102.12917)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
63 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect51120" width="22.000685" height="26.315866" x="13.294504" y="184.14406" ry="1.5" />
64 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="206.33662" id="text51126">
65 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="206.33662" id="tspan51124">CONTAINER</tspan>
66 </text>
67 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="198.19913" id="text51130">
68 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="198.46822" id="tspan51128">PROGRAMS &amp;</tspan>
69 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="200.26738" id="tspan56912">LIBRARIES</tspan>
70 </text>
71 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="189.40337" id="text51136">
72 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="189.67245" id="tspan51132">TARGET</tspan>
73 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="191.47162" id="tspan51134">SOFTWARE</tspan>
74 </text>
75 </g>
76 <g id="g51146" transform="translate(66.675002,-99.483339)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
77 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect51140" width="50.57568" height="8.4333" x="13.294504" y="223.15991" ry="1.5" />
78 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="31.535746" y="228.24654" id="text51144">
79 <tspan sodipodi:role="line" id="tspan51142" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="31.535746" y="228.24654">HARDWARE</tspan>
80 </text>
81 </g>
82 <g id="g51166" transform="translate(95.250005,-102.12917)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
83 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect51148" width="22.000685" height="26.315866" x="13.294504" y="184.14406" ry="1.5" />
84 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="206.33662" id="text51154">
85 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="206.33662" id="tspan51152">CONTAINER</tspan>
86 </text>
87 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="198.19913" id="text51158">
88 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="198.46822" id="tspan51156">PROGRAMS &amp;</tspan>
89 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="200.26738" id="tspan64780">LIBRARIES</tspan>
90 </text>
91 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="189.40337" id="text51164">
92 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="189.67245" id="tspan51160">TARGET</tspan>
93 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="191.47162" id="tspan51162">SOFTWARE</tspan>
94 </text>
95 </g>
96 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:2.82222px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Heavy';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583" x="162.66873" y="144.60236" id="text74212" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
97 <tspan sodipodi:role="line" id="tspan74210" style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:2.82222px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Ultra-Bold';fill:#000000;stroke-width:0.264583" x="162.66873" y="144.60236">UNIKERNELS</tspan>
98 </text>
99 <g id="g74220" transform="translate(132.82087,-101.60001)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
100 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect74214" width="50.57568" height="8.4333" x="13.294504" y="213.63496" ry="1.5" />
101 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="30.66217" y="218.54855" id="text74218">
102 <tspan sodipodi:role="line" id="tspan74216" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="30.66217" y="218.54855">HYPERVISOR</tspan>
103 </text>
104 </g>
105 <g id="g74240" transform="translate(132.82087,-102.12917)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
106 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.377825;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect74222" width="22.000685" height="15.026576" x="13.294504" y="195.43335" ry="0.85651237" />
107 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="202.66647" id="text74232">
108 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="202.93556" id="tspan74228">UNIKERNEL &amp;</tspan>
109 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="204.73473" id="tspan74230">APPLICATION</tspan>
110 </text>
111 </g>
112 <g id="g74248" transform="translate(132.82087,-99.483339)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
113 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.429153;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect74242" width="50.57568" height="8.4333" x="13.294504" y="223.15991" ry="1.5" />
114 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;line-height:1.25;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="31.535746" y="228.24654" id="text74246">
115 <tspan sodipodi:role="line" id="tspan74244" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.46944px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';fill:#4d4d4d;stroke-width:0.264583" x="31.535746" y="228.24654">HARDWARE</tspan>
116 </text>
117 </g>
118 <g id="g85408" transform="translate(161.34783,-102.25244)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862">
119 <rect style="fill:#f9f9f9;stroke:none;stroke-width:0.377825;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect85400" width="22.000685" height="15.026576" x="13.294504" y="195.43335" ry="0.85651237" />
120 <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;line-height:0.85;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.264583" x="24.336025" y="202.66647" id="text85406">
121 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="202.93556" id="tspan85402">UNIKERNEL &amp;</tspan>
122 <tspan sodipodi:role="line" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.11667px;font-family:'SF Pro Display';-inkscape-font-specification:'SF Pro Display Bold';text-align:center;text-anchor:middle;fill:#4d4d4d;stroke-width:0.264583" x="24.336025" y="204.73473" id="tspan85404">APPLICATION</tspan>
123 </text>
124 </g>
125 </g>
126 <g id="g48182" transform="translate(0,-102.12917)" inkscape:export-filename="/home/m/Vault/projects/mitjafelicijan.com/pid1/unikernels.png" inkscape:export-xdpi="127.98862" inkscape:export-ydpi="127.98862" />
127 </g>
128</svg>
diff --git a/public/assets/profile-bind-error/error.jpg b/public/assets/profile-bind-error/error.jpg
deleted file mode 100755
index c2e4e8f..0000000
--- a/public/assets/profile-bind-error/error.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/python-profiling/kcachegrind.png b/public/assets/python-profiling/kcachegrind.png
deleted file mode 100755
index 0dc48ab..0000000
--- a/public/assets/python-profiling/kcachegrind.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/python-profiling/profiling-viewer.png b/public/assets/python-profiling/profiling-viewer.png
deleted file mode 100755
index a450513..0000000
--- a/public/assets/python-profiling/profiling-viewer.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/python-profiling/snakeviz.png b/public/assets/python-profiling/snakeviz.png
deleted file mode 100755
index 5bab395..0000000
--- a/public/assets/python-profiling/snakeviz.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/sentiment-analysis/.ipynb_checkpoints/TF Test-checkpoint.ipynb b/public/assets/sentiment-analysis/.ipynb_checkpoints/TF Test-checkpoint.ipynb
deleted file mode 100755
index e2a85c4..0000000
--- a/public/assets/sentiment-analysis/.ipynb_checkpoints/TF Test-checkpoint.ipynb
+++ /dev/null
@@ -1,588 +0,0 @@
1{
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 1,
6 "metadata": {},
7 "outputs": [
8 {
9 "name": "stderr",
10 "output_type": "stream",
11 "text": [
12 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
13 " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
14 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
15 " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
16 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
17 " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
18 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
19 " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
20 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
21 " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
22 "/home/m/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
23 " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n"
24 ]
25 },
26 {
27 "name": "stdout",
28 "output_type": "stream",
29 "text": [
30 "2.0.0-beta1\n"
31 ]
32 },
33 {
34 "name": "stderr",
35 "output_type": "stream",
36 "text": [
37 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
38 " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
39 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
40 " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
41 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
42 " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
43 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
44 " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
45 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
46 " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
47 "/home/m/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
48 " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n"
49 ]
50 }
51 ],
52 "source": [
53 "import tensorflow as tf\n",
54 "from tensorflow import keras\n",
55 "\n",
56 "# Helper libraries\n",
57 "import numpy as np\n",
58 "import matplotlib.pyplot as plt\n",
59 "\n",
60 "print(tf.__version__)"
61 ]
62 },
63 {
64 "cell_type": "code",
65 "execution_count": 2,
66 "metadata": {},
67 "outputs": [],
68 "source": [
69 "from numpy import genfromtxt\n",
70 "data = genfromtxt('data.csv', delimiter=',')"
71 ]
72 },
73 {
74 "cell_type": "code",
75 "execution_count": 3,
76 "metadata": {},
77 "outputs": [],
78 "source": [
79 "data_input = data[:,0:3]\n",
80 "data_labels = data[:,3]\n",
81 "\n",
82 "#data_input = np.transpose(data_input)\n",
83 "#data_labels = np.transpose(data_labels)"
84 ]
85 },
86 {
87 "cell_type": "code",
88 "execution_count": 4,
89 "metadata": {},
90 "outputs": [
91 {
92 "name": "stdout",
93 "output_type": "stream",
94 "text": [
95 "(600, 3)\n",
96 "[1.e-01 1.e+00 3.e+02]\n"
97 ]
98 }
99 ],
100 "source": [
101 "print(np.shape(data_input))\n",
102 "print(data_input[2])"
103 ]
104 },
105 {
106 "cell_type": "markdown",
107 "metadata": {},
108 "source": [
109 "print(len(data_input))\n",
110 "print(len(data_labels))"
111 ]
112 },
113 {
114 "cell_type": "code",
115 "execution_count": 5,
116 "metadata": {},
117 "outputs": [
118 {
119 "name": "stdout",
120 "output_type": "stream",
121 "text": [
122 "(500, 3)\n",
123 "(100, 3)\n",
124 "(500,)\n",
125 "(100,)\n"
126 ]
127 }
128 ],
129 "source": [
130 "data_input_train = data_input[0:500,:]\n",
131 "data_input_test = data_input[500:,:]\n",
132 "\n",
133 "data_labels_train = data_labels[0:500]\n",
134 "data_labels_test = data_labels[500:]\n",
135 "\n",
136 "print(np.shape(data_input_train))\n",
137 "print(np.shape(data_input_test))\n",
138 "\n",
139 "print(np.shape(data_labels_train))\n",
140 "print(np.shape(data_labels_test))"
141 ]
142 },
143 {
144 "cell_type": "code",
145 "execution_count": 6,
146 "metadata": {},
147 "outputs": [],
148 "source": [
149 "model = keras.Sequential([\n",
150 " keras.layers.Dense(128, activation='relu', input_shape=[3]),\n",
151 " keras.layers.Dense(512, activation='relu'),\n",
152 " keras.layers.Dense(512, activation='relu'),\n",
153 " keras.layers.Dense(512, activation='relu'),\n",
154 " keras.layers.Dense(128, activation='relu'),\n",
155 " keras.layers.Dense(1)\n",
156 "])"
157 ]
158 },
159 {
160 "cell_type": "code",
161 "execution_count": 7,
162 "metadata": {},
163 "outputs": [],
164 "source": [
165 "optimizer = tf.keras.optimizers.RMSprop(0.001)\n",
166 "model.compile(loss='mse',\n",
167 " optimizer=optimizer,\n",
168 " metrics=['accuracy'])"
169 ]
170 },
171 {
172 "cell_type": "code",
173 "execution_count": 8,
174 "metadata": {},
175 "outputs": [
176 {
177 "name": "stdout",
178 "output_type": "stream",
179 "text": [
180 "Train on 500 samples\n",
181 "Epoch 1/100\n",
182 "500/500 [==============================] - 0s 399us/sample - loss: 247.2794 - accuracy: 0.0040\n",
183 "Epoch 2/100\n",
184 "500/500 [==============================] - 0s 121us/sample - loss: 4.2495 - accuracy: 0.0060\n",
185 "Epoch 3/100\n",
186 "500/500 [==============================] - 0s 131us/sample - loss: 1.8787 - accuracy: 0.0040\n",
187 "Epoch 4/100\n",
188 "500/500 [==============================] - 0s 121us/sample - loss: 0.4284 - accuracy: 0.0060\n",
189 "Epoch 5/100\n",
190 "500/500 [==============================] - 0s 107us/sample - loss: 4.7904 - accuracy: 0.0080\n",
191 "Epoch 6/100\n",
192 "500/500 [==============================] - 0s 113us/sample - loss: 0.0819 - accuracy: 0.0040\n",
193 "Epoch 7/100\n",
194 "500/500 [==============================] - 0s 108us/sample - loss: 1.6904 - accuracy: 0.0040\n",
195 "Epoch 8/100\n",
196 "500/500 [==============================] - 0s 116us/sample - loss: 0.1761 - accuracy: 0.0040\n",
197 "Epoch 9/100\n",
198 "500/500 [==============================] - 0s 142us/sample - loss: 0.1135 - accuracy: 0.0040\n",
199 "Epoch 10/100\n",
200 "500/500 [==============================] - 0s 124us/sample - loss: 0.4387 - accuracy: 0.0040\n",
201 "Epoch 11/100\n",
202 "500/500 [==============================] - 0s 112us/sample - loss: 0.0815 - accuracy: 0.0040\n",
203 "Epoch 12/100\n",
204 "500/500 [==============================] - 0s 117us/sample - loss: 0.1725 - accuracy: 0.0040\n",
205 "Epoch 13/100\n",
206 "500/500 [==============================] - 0s 119us/sample - loss: 0.1487 - accuracy: 0.0040\n",
207 "Epoch 14/100\n",
208 "500/500 [==============================] - 0s 111us/sample - loss: 0.0720 - accuracy: 0.0040\n",
209 "Epoch 15/100\n",
210 "500/500 [==============================] - 0s 111us/sample - loss: 0.3110 - accuracy: 0.0040\n",
211 "Epoch 16/100\n",
212 "500/500 [==============================] - 0s 128us/sample - loss: 0.0947 - accuracy: 0.0040\n",
213 "Epoch 17/100\n",
214 "500/500 [==============================] - 0s 133us/sample - loss: 0.0739 - accuracy: 0.0040\n",
215 "Epoch 18/100\n",
216 "500/500 [==============================] - 0s 131us/sample - loss: 0.1353 - accuracy: 0.0060\n",
217 "Epoch 19/100\n",
218 "500/500 [==============================] - 0s 135us/sample - loss: 0.0837 - accuracy: 0.0040\n",
219 "Epoch 20/100\n",
220 "500/500 [==============================] - 0s 130us/sample - loss: 0.0754 - accuracy: 0.0040\n",
221 "Epoch 21/100\n",
222 "500/500 [==============================] - 0s 118us/sample - loss: 0.0840 - accuracy: 0.0040\n",
223 "Epoch 22/100\n",
224 "500/500 [==============================] - 0s 115us/sample - loss: 0.1105 - accuracy: 0.0040\n",
225 "Epoch 23/100\n",
226 "500/500 [==============================] - 0s 116us/sample - loss: 0.0651 - accuracy: 0.0040\n",
227 "Epoch 24/100\n",
228 "500/500 [==============================] - 0s 109us/sample - loss: 0.0615 - accuracy: 0.0040\n",
229 "Epoch 25/100\n",
230 "500/500 [==============================] - 0s 118us/sample - loss: 0.0656 - accuracy: 0.0040\n",
231 "Epoch 26/100\n",
232 "500/500 [==============================] - 0s 113us/sample - loss: 0.0695 - accuracy: 0.0040\n",
233 "Epoch 27/100\n",
234 "500/500 [==============================] - 0s 116us/sample - loss: 0.0585 - accuracy: 0.0040\n",
235 "Epoch 28/100\n",
236 "500/500 [==============================] - 0s 118us/sample - loss: 0.1300 - accuracy: 0.0040\n",
237 "Epoch 29/100\n",
238 "500/500 [==============================] - 0s 112us/sample - loss: 0.0567 - accuracy: 0.0040\n",
239 "Epoch 30/100\n",
240 "500/500 [==============================] - 0s 137us/sample - loss: 0.0647 - accuracy: 0.0040\n",
241 "Epoch 31/100\n",
242 "500/500 [==============================] - 0s 130us/sample - loss: 0.0559 - accuracy: 0.0040\n",
243 "Epoch 32/100\n",
244 "500/500 [==============================] - 0s 130us/sample - loss: 0.0576 - accuracy: 0.0040\n",
245 "Epoch 33/100\n",
246 "500/500 [==============================] - 0s 128us/sample - loss: 0.0578 - accuracy: 0.0040\n",
247 "Epoch 34/100\n",
248 "500/500 [==============================] - 0s 130us/sample - loss: 0.0512 - accuracy: 0.0040\n",
249 "Epoch 35/100\n",
250 "500/500 [==============================] - 0s 114us/sample - loss: 0.0601 - accuracy: 0.0040\n",
251 "Epoch 36/100\n",
252 "500/500 [==============================] - 0s 111us/sample - loss: 0.0531 - accuracy: 0.0040\n",
253 "Epoch 37/100\n",
254 "500/500 [==============================] - 0s 130us/sample - loss: 0.0532 - accuracy: 0.0040\n",
255 "Epoch 38/100\n",
256 "500/500 [==============================] - 0s 131us/sample - loss: 0.0480 - accuracy: 0.0040\n",
257 "Epoch 39/100\n",
258 "500/500 [==============================] - 0s 136us/sample - loss: 0.0503 - accuracy: 0.0040\n",
259 "Epoch 40/100\n",
260 "500/500 [==============================] - 0s 134us/sample - loss: 0.0468 - accuracy: 0.0040\n",
261 "Epoch 41/100\n",
262 "500/500 [==============================] - 0s 115us/sample - loss: 0.0509 - accuracy: 0.0040\n",
263 "Epoch 42/100\n",
264 "500/500 [==============================] - 0s 109us/sample - loss: 0.0453 - accuracy: 0.0040\n",
265 "Epoch 43/100\n",
266 "500/500 [==============================] - 0s 111us/sample - loss: 0.0484 - accuracy: 0.0040\n",
267 "Epoch 44/100\n",
268 "500/500 [==============================] - 0s 104us/sample - loss: 0.0458 - accuracy: 0.0040\n",
269 "Epoch 45/100\n",
270 "500/500 [==============================] - 0s 110us/sample - loss: 0.0481 - accuracy: 0.0040\n",
271 "Epoch 46/100\n",
272 "500/500 [==============================] - 0s 114us/sample - loss: 0.0468 - accuracy: 0.0060\n",
273 "Epoch 47/100\n",
274 "500/500 [==============================] - 0s 124us/sample - loss: 0.0473 - accuracy: 0.0060\n",
275 "Epoch 48/100\n",
276 "500/500 [==============================] - 0s 137us/sample - loss: 0.0455 - accuracy: 0.0040\n",
277 "Epoch 49/100\n",
278 "500/500 [==============================] - 0s 125us/sample - loss: 0.0431 - accuracy: 0.0060\n",
279 "Epoch 50/100\n",
280 "500/500 [==============================] - 0s 132us/sample - loss: 0.0432 - accuracy: 0.0060\n",
281 "Epoch 51/100\n",
282 "500/500 [==============================] - 0s 116us/sample - loss: 0.0484 - accuracy: 0.0060\n",
283 "Epoch 52/100\n",
284 "500/500 [==============================] - 0s 112us/sample - loss: 0.0482 - accuracy: 0.0040\n",
285 "Epoch 53/100\n",
286 "500/500 [==============================] - 0s 117us/sample - loss: 0.0444 - accuracy: 0.0060\n",
287 "Epoch 54/100\n",
288 "500/500 [==============================] - 0s 109us/sample - loss: 0.0469 - accuracy: 0.0060\n",
289 "Epoch 55/100\n",
290 "500/500 [==============================] - 0s 106us/sample - loss: 0.0427 - accuracy: 0.0040\n",
291 "Epoch 56/100\n",
292 "500/500 [==============================] - 0s 110us/sample - loss: 0.0433 - accuracy: 0.0040\n",
293 "Epoch 57/100\n",
294 "500/500 [==============================] - 0s 102us/sample - loss: 0.0437 - accuracy: 0.0060\n",
295 "Epoch 58/100\n",
296 "500/500 [==============================] - 0s 117us/sample - loss: 0.0425 - accuracy: 0.0040\n",
297 "Epoch 59/100\n",
298 "500/500 [==============================] - 0s 105us/sample - loss: 0.0418 - accuracy: 0.0040\n",
299 "Epoch 60/100\n",
300 "500/500 [==============================] - 0s 109us/sample - loss: 0.0397 - accuracy: 0.0040\n",
301 "Epoch 61/100\n",
302 "500/500 [==============================] - 0s 119us/sample - loss: 0.0507 - accuracy: 0.0040\n",
303 "Epoch 62/100\n",
304 "500/500 [==============================] - 0s 112us/sample - loss: 0.0402 - accuracy: 0.0060\n",
305 "Epoch 63/100\n",
306 "500/500 [==============================] - 0s 133us/sample - loss: 0.0397 - accuracy: 0.0040\n",
307 "Epoch 64/100\n",
308 "500/500 [==============================] - 0s 132us/sample - loss: 0.0427 - accuracy: 0.0060\n",
309 "Epoch 65/100\n",
310 "500/500 [==============================] - 0s 138us/sample - loss: 0.0398 - accuracy: 0.0040\n",
311 "Epoch 66/100\n",
312 "500/500 [==============================] - 0s 145us/sample - loss: 0.0375 - accuracy: 0.0060\n",
313 "Epoch 67/100\n",
314 "500/500 [==============================] - 0s 138us/sample - loss: 0.0402 - accuracy: 0.0060\n",
315 "Epoch 68/100\n",
316 "500/500 [==============================] - 0s 132us/sample - loss: 0.0388 - accuracy: 0.0080\n",
317 "Epoch 69/100\n",
318 "500/500 [==============================] - 0s 115us/sample - loss: 0.0375 - accuracy: 0.0080\n",
319 "Epoch 70/100\n",
320 "500/500 [==============================] - 0s 113us/sample - loss: 0.0384 - accuracy: 0.0040\n",
321 "Epoch 71/100\n",
322 "500/500 [==============================] - 0s 109us/sample - loss: 0.0360 - accuracy: 0.0080\n",
323 "Epoch 72/100\n",
324 "500/500 [==============================] - 0s 111us/sample - loss: 0.0350 - accuracy: 0.0080\n",
325 "Epoch 73/100\n",
326 "500/500 [==============================] - 0s 118us/sample - loss: 0.0370 - accuracy: 0.0060\n",
327 "Epoch 74/100\n",
328 "500/500 [==============================] - 0s 95us/sample - loss: 0.0354 - accuracy: 0.0080\n",
329 "Epoch 75/100\n",
330 "500/500 [==============================] - 0s 102us/sample - loss: 0.0376 - accuracy: 0.0060\n",
331 "Epoch 76/100\n",
332 "500/500 [==============================] - 0s 106us/sample - loss: 0.0371 - accuracy: 0.0080\n",
333 "Epoch 77/100\n",
334 "500/500 [==============================] - 0s 100us/sample - loss: 0.0369 - accuracy: 0.0060\n",
335 "Epoch 78/100\n"
336 ]
337 },
338 {
339 "name": "stdout",
340 "output_type": "stream",
341 "text": [
342 "500/500 [==============================] - 0s 98us/sample - loss: 0.0315 - accuracy: 0.0060\n",
343 "Epoch 79/100\n",
344 "500/500 [==============================] - 0s 97us/sample - loss: 0.0355 - accuracy: 0.0060\n",
345 "Epoch 80/100\n",
346 "500/500 [==============================] - 0s 100us/sample - loss: 0.0278 - accuracy: 0.0080\n",
347 "Epoch 81/100\n",
348 "500/500 [==============================] - 0s 99us/sample - loss: 0.0320 - accuracy: 0.0080\n",
349 "Epoch 82/100\n",
350 "500/500 [==============================] - 0s 99us/sample - loss: 0.0321 - accuracy: 0.0080\n",
351 "Epoch 83/100\n",
352 "500/500 [==============================] - 0s 94us/sample - loss: 0.0332 - accuracy: 0.0060\n",
353 "Epoch 84/100\n",
354 "500/500 [==============================] - 0s 106us/sample - loss: 0.0317 - accuracy: 0.0060\n",
355 "Epoch 85/100\n",
356 "500/500 [==============================] - 0s 103us/sample - loss: 0.0293 - accuracy: 0.0080\n",
357 "Epoch 86/100\n",
358 "500/500 [==============================] - 0s 107us/sample - loss: 0.0304 - accuracy: 0.0060\n",
359 "Epoch 87/100\n",
360 "500/500 [==============================] - 0s 101us/sample - loss: 0.0327 - accuracy: 0.0040\n",
361 "Epoch 88/100\n",
362 "500/500 [==============================] - 0s 100us/sample - loss: 0.0290 - accuracy: 0.0080\n",
363 "Epoch 89/100\n",
364 "500/500 [==============================] - 0s 123us/sample - loss: 0.0293 - accuracy: 0.0060\n",
365 "Epoch 90/100\n",
366 "500/500 [==============================] - 0s 104us/sample - loss: 0.0246 - accuracy: 0.0060\n",
367 "Epoch 91/100\n",
368 "500/500 [==============================] - 0s 124us/sample - loss: 0.0303 - accuracy: 0.0060\n",
369 "Epoch 92/100\n",
370 "500/500 [==============================] - 0s 129us/sample - loss: 0.0376 - accuracy: 0.0080\n",
371 "Epoch 93/100\n",
372 "500/500 [==============================] - 0s 122us/sample - loss: 0.0264 - accuracy: 0.0080\n",
373 "Epoch 94/100\n",
374 "500/500 [==============================] - 0s 102us/sample - loss: 0.0265 - accuracy: 0.0080\n",
375 "Epoch 95/100\n",
376 "500/500 [==============================] - 0s 108us/sample - loss: 0.0291 - accuracy: 0.0080\n",
377 "Epoch 96/100\n",
378 "500/500 [==============================] - 0s 101us/sample - loss: 0.0314 - accuracy: 0.0080\n",
379 "Epoch 97/100\n",
380 "500/500 [==============================] - 0s 95us/sample - loss: 0.0257 - accuracy: 0.0060\n",
381 "Epoch 98/100\n",
382 "500/500 [==============================] - 0s 100us/sample - loss: 0.0248 - accuracy: 0.0080\n",
383 "Epoch 99/100\n",
384 "500/500 [==============================] - 0s 94us/sample - loss: 0.0250 - accuracy: 0.0040\n",
385 "Epoch 100/100\n",
386 "500/500 [==============================] - 0s 106us/sample - loss: 0.0312 - accuracy: 0.0060\n"
387 ]
388 },
389 {
390 "data": {
391 "text/plain": [
392 "<tensorflow.python.keras.callbacks.History at 0x7f55a3853f60>"
393 ]
394 },
395 "execution_count": 8,
396 "metadata": {},
397 "output_type": "execute_result"
398 }
399 ],
400 "source": [
401 "#model.fit(data_input_train, data_labels_train, validation_data=(data_input_test, data_labels_test), epochs=100)\n",
402 "model.fit(data_input_train, data_labels_train, epochs=100)"
403 ]
404 },
405 {
406 "cell_type": "code",
407 "execution_count": 9,
408 "metadata": {},
409 "outputs": [
410 {
411 "name": "stdout",
412 "output_type": "stream",
413 "text": [
414 "100/100 - 0s - loss: 0.0470 - accuracy: 0.0100\n",
415 "\n",
416 "Test accuracy: 0.01\n"
417 ]
418 }
419 ],
420 "source": [
421 "test_loss, test_acc = model.evaluate(data_input_test, data_labels_test, verbose=2)\n",
422 "\n",
423 "print('\\nTest accuracy:', test_acc)"
424 ]
425 },
426 {
427 "cell_type": "code",
428 "execution_count": 10,
429 "metadata": {},
430 "outputs": [
431 {
432 "name": "stdout",
433 "output_type": "stream",
434 "text": [
435 "[[0.3141548]]\n"
436 ]
437 }
438 ],
439 "source": [
440 "input = np.array([0.46,2,136])\n",
441 "input.shape = (1,3)\n",
442 "\n",
443 "prediction = model.predict(input)\n",
444 "print(prediction)"
445 ]
446 },
447 {
448 "cell_type": "code",
449 "execution_count": 11,
450 "metadata": {},
451 "outputs": [],
452 "source": [
453 "predictions = model.predict(data_input_test)"
454 ]
455 },
456 {
457 "cell_type": "code",
458 "execution_count": 12,
459 "metadata": {},
460 "outputs": [],
461 "source": [
462 "%matplotlib qt \n",
463 "plt.plot(predictions)\n",
464 "plt.plot(data_labels_test, 'r')\n",
465 "plt.show()"
466 ]
467 },
468 {
469 "cell_type": "code",
470 "execution_count": 204,
471 "metadata": {},
472 "outputs": [],
473 "source": [
474 "%matplotlib qt\n",
475 "a = data_labels_test - predictions\n",
476 "plt.plot(a[0])\n",
477 "plt.show()"
478 ]
479 },
480 {
481 "cell_type": "code",
482 "execution_count": 207,
483 "metadata": {},
484 "outputs": [],
485 "source": [
486 "%matplotlib qt\n",
487 "a = data_labels_test - predictions\n",
488 "plt.plot(predictions)\n",
489 "plt.plot(data_labels_test, 'r')\n",
490 "plt.plot(a[0], 'g')\n",
491 "plt.show()"
492 ]
493 },
494 {
495 "cell_type": "code",
496 "execution_count": 180,
497 "metadata": {},
498 "outputs": [
499 {
500 "data": {
501 "text/plain": [
502 "-0.08489150602276586"
503 ]
504 },
505 "execution_count": 180,
506 "metadata": {},
507 "output_type": "execute_result"
508 }
509 ],
510 "source": [
511 "np.average(a[0])"
512 ]
513 },
514 {
515 "cell_type": "code",
516 "execution_count": 182,
517 "metadata": {},
518 "outputs": [
519 {
520 "name": "stdout",
521 "output_type": "stream",
522 "text": [
523 "Model: \"sequential_13\"\n",
524 "_________________________________________________________________\n",
525 "Layer (type) Output Shape Param # \n",
526 "=================================================================\n",
527 "dense_38 (Dense) (None, 128) 512 \n",
528 "_________________________________________________________________\n",
529 "dense_39 (Dense) (None, 512) 66048 \n",
530 "_________________________________________________________________\n",
531 "dense_40 (Dense) (None, 512) 262656 \n",
532 "_________________________________________________________________\n",
533 "dense_41 (Dense) (None, 512) 262656 \n",
534 "_________________________________________________________________\n",
535 "dense_42 (Dense) (None, 128) 65664 \n",
536 "_________________________________________________________________\n",
537 "dense_43 (Dense) (None, 1) 129 \n",
538 "=================================================================\n",
539 "Total params: 657,665\n",
540 "Trainable params: 657,665\n",
541 "Non-trainable params: 0\n",
542 "_________________________________________________________________\n"
543 ]
544 }
545 ],
546 "source": [
547 "model.summary()"
548 ]
549 },
550 {
551 "cell_type": "code",
552 "execution_count": 183,
553 "metadata": {},
554 "outputs": [],
555 "source": [
556 "model.save('my_model.h5')"
557 ]
558 },
559 {
560 "cell_type": "code",
561 "execution_count": null,
562 "metadata": {},
563 "outputs": [],
564 "source": []
565 }
566 ],
567 "metadata": {
568 "kernelspec": {
569 "display_name": "Python 3",
570 "language": "python",
571 "name": "python3"
572 },
573 "language_info": {
574 "codemirror_mode": {
575 "name": "ipython",
576 "version": 3
577 },
578 "file_extension": ".py",
579 "mimetype": "text/x-python",
580 "name": "python",
581 "nbconvert_exporter": "python",
582 "pygments_lexer": "ipython3",
583 "version": "3.7.3"
584 }
585 },
586 "nbformat": 4,
587 "nbformat_minor": 2
588}
diff --git a/public/assets/sentiment-analysis/.ipynb_checkpoints/sentiment-analysis-checkpoint.ipynb b/public/assets/sentiment-analysis/.ipynb_checkpoints/sentiment-analysis-checkpoint.ipynb
deleted file mode 100755
index 2c0934c..0000000
--- a/public/assets/sentiment-analysis/.ipynb_checkpoints/sentiment-analysis-checkpoint.ipynb
+++ /dev/null
@@ -1,170 +0,0 @@
1{
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Sentiment analysis of Guardian World News articles"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## Get articles from a website"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "### Install rss parser dependency"
22 ]
23 },
24 {
25 "cell_type": "code",
26 "execution_count": null,
27 "metadata": {},
28 "outputs": [],
29 "source": [
30 "!pip3 install feedparser"
31 ]
32 },
33 {
34 "cell_type": "markdown",
35 "metadata": {},
36 "source": [
37 "### Parsing RSS feed for world news"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": null,
43 "metadata": {},
44 "outputs": [],
45 "source": [
46 "import feedparser\n",
47 "feed_url = \"https://www.theguardian.com/world/rss\"\n",
48 "feed = feedparser.parse(feed_url)"
49 ]
50 },
51 {
52 "cell_type": "code",
53 "execution_count": null,
54 "metadata": {},
55 "outputs": [],
56 "source": [
57 "import re\n",
58 "for item in feed.entries:\n",
59 " # sanitize html\n",
60 " item.description = re.sub('<[^<]+?>', '', item.description)"
61 ]
62 },
63 {
64 "cell_type": "markdown",
65 "metadata": {},
66 "source": [
67 "### Install Vader Sentiment library and perform sentiment analysis"
68 ]
69 },
70 {
71 "cell_type": "code",
72 "execution_count": null,
73 "metadata": {},
74 "outputs": [],
75 "source": [
76 "!pip3 install vaderSentiment"
77 ]
78 },
79 {
80 "cell_type": "code",
81 "execution_count": null,
82 "metadata": {},
83 "outputs": [],
84 "source": [
85 "from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer\n",
86 "analyser = SentimentIntensityAnalyzer()"
87 ]
88 },
89 {
90 "cell_type": "code",
91 "execution_count": null,
92 "metadata": {},
93 "outputs": [],
94 "source": [
95 "sentiment_results = []\n",
96 "for item in feed.entries:\n",
97 " sentiment_title = analyser.polarity_scores(item.title)\n",
98 " sentiment_description = analyser.polarity_scores(item.description)\n",
99 " sentiment_results.append([sentiment_title['compound'], sentiment_description['compound']])"
100 ]
101 },
102 {
103 "cell_type": "markdown",
104 "metadata": {},
105 "source": [
106 "### Install Matplotlib and visualize compound score"
107 ]
108 },
109 {
110 "cell_type": "code",
111 "execution_count": null,
112 "metadata": {},
113 "outputs": [],
114 "source": [
115 "!pip3 install matplotlib"
116 ]
117 },
118 {
119 "cell_type": "code",
120 "execution_count": null,
121 "metadata": {},
122 "outputs": [],
123 "source": [
124 "import matplotlib.pyplot as plt"
125 ]
126 },
127 {
128 "cell_type": "code",
129 "execution_count": null,
130 "metadata": {},
131 "outputs": [],
132 "source": [
133 "%matplotlib inline\n",
134 "plt.rcParams['figure.figsize'] = (15, 3)\n",
135 "plt.plot(sentiment_results, drawstyle='steps')\n",
136 "plt.title('Sentiment analysis relationship between title and description (Guardian World News)')\n",
137 "plt.legend(['title', 'description'])\n",
138 "plt.show()"
139 ]
140 },
141 {
142 "cell_type": "code",
143 "execution_count": null,
144 "metadata": {},
145 "outputs": [],
146 "source": []
147 }
148 ],
149 "metadata": {
150 "kernelspec": {
151 "display_name": "Python 3",
152 "language": "python",
153 "name": "python3"
154 },
155 "language_info": {
156 "codemirror_mode": {
157 "name": "ipython",
158 "version": 3
159 },
160 "file_extension": ".py",
161 "mimetype": "text/x-python",
162 "name": "python",
163 "nbconvert_exporter": "python",
164 "pygments_lexer": "ipython3",
165 "version": "3.7.3"
166 }
167 },
168 "nbformat": 4,
169 "nbformat_minor": 4
170}
diff --git a/public/assets/sentiment-analysis/guardian-sa-title-desc-relationship.png b/public/assets/sentiment-analysis/guardian-sa-title-desc-relationship.png
deleted file mode 100755
index 7195bbf..0000000
--- a/public/assets/sentiment-analysis/guardian-sa-title-desc-relationship.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/sentiment-analysis/sentiment-analysis.ipynb b/public/assets/sentiment-analysis/sentiment-analysis.ipynb
deleted file mode 100755
index 2c0934c..0000000
--- a/public/assets/sentiment-analysis/sentiment-analysis.ipynb
+++ /dev/null
@@ -1,170 +0,0 @@
1{
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Sentiment analysis of Guardian World News articles"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## Get articles from a website"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "### Install rss parser dependency"
22 ]
23 },
24 {
25 "cell_type": "code",
26 "execution_count": null,
27 "metadata": {},
28 "outputs": [],
29 "source": [
30 "!pip3 install feedparser"
31 ]
32 },
33 {
34 "cell_type": "markdown",
35 "metadata": {},
36 "source": [
37 "### Parsing RSS feed for world news"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": null,
43 "metadata": {},
44 "outputs": [],
45 "source": [
46 "import feedparser\n",
47 "feed_url = \"https://www.theguardian.com/world/rss\"\n",
48 "feed = feedparser.parse(feed_url)"
49 ]
50 },
51 {
52 "cell_type": "code",
53 "execution_count": null,
54 "metadata": {},
55 "outputs": [],
56 "source": [
57 "import re\n",
58 "for item in feed.entries:\n",
59 " # sanitize html\n",
60 " item.description = re.sub('<[^<]+?>', '', item.description)"
61 ]
62 },
63 {
64 "cell_type": "markdown",
65 "metadata": {},
66 "source": [
67 "### Install Vader Sentiment library and perform sentiment analysis"
68 ]
69 },
70 {
71 "cell_type": "code",
72 "execution_count": null,
73 "metadata": {},
74 "outputs": [],
75 "source": [
76 "!pip3 install vaderSentiment"
77 ]
78 },
79 {
80 "cell_type": "code",
81 "execution_count": null,
82 "metadata": {},
83 "outputs": [],
84 "source": [
85 "from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer\n",
86 "analyser = SentimentIntensityAnalyzer()"
87 ]
88 },
89 {
90 "cell_type": "code",
91 "execution_count": null,
92 "metadata": {},
93 "outputs": [],
94 "source": [
95 "sentiment_results = []\n",
96 "for item in feed.entries:\n",
97 " sentiment_title = analyser.polarity_scores(item.title)\n",
98 " sentiment_description = analyser.polarity_scores(item.description)\n",
99 " sentiment_results.append([sentiment_title['compound'], sentiment_description['compound']])"
100 ]
101 },
102 {
103 "cell_type": "markdown",
104 "metadata": {},
105 "source": [
106 "### Install Matplotlib and visualize compound score"
107 ]
108 },
109 {
110 "cell_type": "code",
111 "execution_count": null,
112 "metadata": {},
113 "outputs": [],
114 "source": [
115 "!pip3 install matplotlib"
116 ]
117 },
118 {
119 "cell_type": "code",
120 "execution_count": null,
121 "metadata": {},
122 "outputs": [],
123 "source": [
124 "import matplotlib.pyplot as plt"
125 ]
126 },
127 {
128 "cell_type": "code",
129 "execution_count": null,
130 "metadata": {},
131 "outputs": [],
132 "source": [
133 "%matplotlib inline\n",
134 "plt.rcParams['figure.figsize'] = (15, 3)\n",
135 "plt.plot(sentiment_results, drawstyle='steps')\n",
136 "plt.title('Sentiment analysis relationship between title and description (Guardian World News)')\n",
137 "plt.legend(['title', 'description'])\n",
138 "plt.show()"
139 ]
140 },
141 {
142 "cell_type": "code",
143 "execution_count": null,
144 "metadata": {},
145 "outputs": [],
146 "source": []
147 }
148 ],
149 "metadata": {
150 "kernelspec": {
151 "display_name": "Python 3",
152 "language": "python",
153 "name": "python3"
154 },
155 "language_info": {
156 "codemirror_mode": {
157 "name": "ipython",
158 "version": 3
159 },
160 "file_extension": ".py",
161 "mimetype": "text/x-python",
162 "name": "python",
163 "nbconvert_exporter": "python",
164 "pygments_lexer": "ipython3",
165 "version": "3.7.3"
166 }
167 },
168 "nbformat": 4,
169 "nbformat_minor": 4
170}
diff --git a/public/assets/simple-pubsub-server/caniuse.png b/public/assets/simple-pubsub-server/caniuse.png
deleted file mode 100755
index 90f7883..0000000
--- a/public/assets/simple-pubsub-server/caniuse.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/simple-pubsub-server/chrome-debugging.png b/public/assets/simple-pubsub-server/chrome-debugging.png
deleted file mode 100755
index 1bdc448..0000000
--- a/public/assets/simple-pubsub-server/chrome-debugging.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/simple-pubsub-server/clients.m4v b/public/assets/simple-pubsub-server/clients.m4v
deleted file mode 100755
index 1342bc6..0000000
--- a/public/assets/simple-pubsub-server/clients.m4v
+++ /dev/null
Binary files differ
diff --git a/public/assets/simple-pubsub-server/pubsub-overview.png b/public/assets/simple-pubsub-server/pubsub-overview.png
deleted file mode 100755
index 0279ec3..0000000
--- a/public/assets/simple-pubsub-server/pubsub-overview.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/simple-pubsub-server/sse-pubsub-server.zip b/public/assets/simple-pubsub-server/sse-pubsub-server.zip
deleted file mode 100755
index 898b290..0000000
--- a/public/assets/simple-pubsub-server/sse-pubsub-server.zip
+++ /dev/null
Binary files differ
diff --git a/public/assets/state-of-web/2008-vs-2020.png b/public/assets/state-of-web/2008-vs-2020.png
deleted file mode 100755
index 6cf94e5..0000000
--- a/public/assets/state-of-web/2008-vs-2020.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/state-of-web/compiling-vs-transpiling.png b/public/assets/state-of-web/compiling-vs-transpiling.png
deleted file mode 100755
index afd5000..0000000
--- a/public/assets/state-of-web/compiling-vs-transpiling.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/wap/emulator.mp4 b/public/assets/wap/emulator.mp4
deleted file mode 100755
index e4f59aa..0000000
--- a/public/assets/wap/emulator.mp4
+++ /dev/null
Binary files differ
diff --git a/public/assets/wap/phones.gif b/public/assets/wap/phones.gif
deleted file mode 100755
index 15f99e2..0000000
--- a/public/assets/wap/phones.gif
+++ /dev/null
Binary files differ
diff --git a/public/assets/world-clock/enclosure.stl b/public/assets/world-clock/enclosure.stl
deleted file mode 100755
index 99f3d1a..0000000
--- a/public/assets/world-clock/enclosure.stl
+++ /dev/null
Binary files differ
diff --git a/public/assets/world-clock/hardware.jpg b/public/assets/world-clock/hardware.jpg
deleted file mode 100755
index 315a04d..0000000
--- a/public/assets/world-clock/hardware.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/world-clock/world-clock.jpg b/public/assets/world-clock/world-clock.jpg
deleted file mode 100755
index afdb6e2..0000000
--- a/public/assets/world-clock/world-clock.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/yapyap/hello.png b/public/assets/yapyap/hello.png
deleted file mode 100755
index d141cd3..0000000
--- a/public/assets/yapyap/hello.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/yapyap/pid1.jpg b/public/assets/yapyap/pid1.jpg
deleted file mode 100755
index 99bc1d8..0000000
--- a/public/assets/yapyap/pid1.jpg
+++ /dev/null
Binary files differ
diff --git a/public/assets/zed/zed-1.png b/public/assets/zed/zed-1.png
deleted file mode 100755
index c4da2f6..0000000
--- a/public/assets/zed/zed-1.png
+++ /dev/null
Binary files differ
diff --git a/public/assets/zed/zed-2.png b/public/assets/zed/zed-2.png
deleted file mode 100755
index 38ce72d..0000000
--- a/public/assets/zed/zed-2.png
+++ /dev/null
Binary files differ
diff --git a/public/bind-warning-on-login-in-ubuntu.html b/public/bind-warning-on-login-in-ubuntu.html
deleted file mode 100755
index 9547714..0000000
--- a/public/bind-warning-on-login-in-ubuntu.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/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AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Fix bind warning in .profile on login in Ubuntu</title><meta name=description content="Recently I moved back to bash as mydefault shell."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Fix bind warning in .profile on login in Ubuntu</h1><p>Sep 8, 2020<div><p>Recently I moved back to <a href=https://www.gnu.org/software/bash/>bash</a> as my
7default shell. I was previously using <a href=https://fishshell.com/>fish</a> and got
8used to the cool features it has. But, regardless of that, I wanted to move to a
9more standard shell because I was hopping back and forth with exporting
10variables and stuff like that which got pretty annoying.<p>So I embarked on a mission to make <a href=https://www.gnu.org/software/bash/>bash</a>
11more like <a href=https://fishshell.com/>fish</a> and in the process found that I really
12missed autosuggest with TAB on changing directories.<p>I found a nice alternative that emulates <a href=http://zsh.sourceforge.net/>zsh</a> like
13autosuggestion and autocomplete so I added the following to my <code>.bashrc</code> file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>bind <span style=color:#a31515>&#34;TAB:menu-complete&#34;</span>
14</span></span><span style=display:flex><span>bind <span style=color:#a31515>&#34;set show-all-if-ambiguous on&#34;</span>
15</span></span><span style=display:flex><span>bind <span style=color:#a31515>&#34;set completion-ignore-case on&#34;</span>
16</span></span><span style=display:flex><span>bind <span style=color:#a31515>&#34;set menu-complete-display-prefix on&#34;</span>
17</span></span><span style=display:flex><span>bind <span style=color:#a31515>&#39;&#34;\e[Z&#34;:menu-complete-backward&#39;</span>
18</span></span></code></pre><p>I haven't noticed anything wrong with this and all was working fine until I
19restarted my machine and then I got this error.<p><img src=/assets/profile-bind-error/error.jpg alt="Profile bind error"><p>When I pressed OK, I got into the <a href=https://wiki.gnome.org/Projects/GnomeShell>Gnome
20shell</a> and all was working fine, but
21the error was still bugging me. I started looking for the reason why this is
22happening and found a solution to this error on <a href=https://superuser.com/a/892682>Remote SSH Commands - bash bind
23warning: line editing not enabled</a>.<p>So I added a simple <code>if [ -t 1 ]</code> around <code>bind</code> statements to avoid running
24commands that presume the session is interactive when it isn't.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>if</span> [ -t 1 ]; <span style=color:#00f>then</span>
25</span></span><span style=display:flex><span> bind <span style=color:#a31515>&#34;TAB:menu-complete&#34;</span>
26</span></span><span style=display:flex><span> bind <span style=color:#a31515>&#34;set show-all-if-ambiguous on&#34;</span>
27</span></span><span style=display:flex><span> bind <span style=color:#a31515>&#34;set completion-ignore-case on&#34;</span>
28</span></span><span style=display:flex><span> bind <span style=color:#a31515>&#34;set menu-complete-display-prefix on&#34;</span>
29</span></span><span style=display:flex><span> bind <span style=color:#a31515>&#39;&#34;\e[Z&#34;:menu-complete-backward&#39;</span>
30</span></span><span style=display:flex><span><span style=color:#00f>fi</span>
31</span></span></code></pre><p>After logging out and back in the problem was gone.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
32<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
33with me
34<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
35the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
36otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/bringing-all-of-my-projects-together-under-one-umbrella.html b/public/bringing-all-of-my-projects-together-under-one-umbrella.html
deleted file mode 100755
index fa16694..0000000
--- a/public/bringing-all-of-my-projects-together-under-one-umbrella.html
+++ /dev/null
@@ -1,164 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAA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AAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Bringing all of my projects together under one umbrella</title><meta name=description content="What is the issue anyway?"><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Bringing all of my projects together under one umbrella</h1><p>Jul 1, 2023<div><h2 id=what-is-the-issue-anyway>What is the issue anyway?</h2><p>Over the years, I have accumulated a bunch of virtual servers on my
7<a href=https://www.digitalocean.com/>DigitalOcean</a> account for small experimental
8projects I dabble in. And this has resulted in quite a bill. I mean, I wouldn't
9care if these projects were actually being used. But there were just being there
10unused and wasting resources. Which makes this an unnecessary burden for me.<p>Most of them are just small HTML pages that have an endpoint or two to read data
11from or to, and for that reason I wrote servers left and right. To be honest,
12all of those things could have been done with <a href=https://en.wikipedia.org/wiki/Common_Gateway_Interface>CGI
13scripts</a> and that would
14have been more than enough.<p>Recently, I decided to stop language hopping and focus on a simpler stack which
15includes C, Go and Lua. And I can accomplish all the things I am interested in.<h2 id=finding-a-web-server-replacement>Finding a web server replacement</h2><p>Usually I had <a href=https://nginx.org/en/>Nginx</a> in front of these small web servers
16and I had to manage SSL certificates and all that jazz. I am bored with these
17things. I don't want to manage any of this bullshit anymore.<p>So the logical move forward was to find a solid alternative for this. I have
18ended up on <a href=https://caddyserver.com/>Caddy server</a>. I've used it in the past
19but kind of forgotten about it. What I really like about it is an ease of use
20and a bunch of out of the box functionalities that come with it.<p>These are the <em>pitch</em> points from their website:<ul><li><strong>Secure by Default</strong>: Caddy is the only web server that uses HTTPS by
21default. A hardened TLS stack with modern protocols preserves privacy and
22exposes MITM attacks.<li><strong>Config API</strong>: As its primary mode of configuration, Caddy's REST API makes
23it easy to automate and integrate with your apps.<li><strong>No Dependencies</strong>: Because Caddy is written in Go, its binaries are entirely
24self-contained and run on every platform, including containers without libc.<li><strong>Modular Stack</strong>: Take back control over your compute edge. Caddy can be
25extended with everything you need using plugins.</ul><p>I had just a few requirements:<ul><li>Automatic SSL<li>Static file server<li>Basic authentication<li>CGI script support</ul><p>And the vanilla version does all of it, but CGI scripts. But that can easily be
26fixed with their modular approach. You can do this on their website and build a
27custom version of the server, or do it with Docker.<p>This is a <code>Dockerfile</code> I used to build a custom server.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>FROM</span><span style=color:#a31515> caddy:builder AS builder</span><span>
28</span></span></span><span style=display:flex><span><span>
29</span></span></span><span style=display:flex><span><span></span><span style=color:#00f>RUN</span> xcaddy build <span style=color:#a31515>\
30</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --with github.com/aksdb/caddy-cgi<span>
31</span></span></span><span style=display:flex><span><span>
32</span></span></span><span style=display:flex><span><span></span><span style=color:#00f>FROM</span><span style=color:#a31515> caddy:latest</span><span>
33</span></span></span><span style=display:flex><span><span></span><span style=color:#00f>RUN</span> apk add --no-cache nano<span>
34</span></span></span><span style=display:flex><span><span>
35</span></span></span><span style=display:flex><span><span></span><span style=color:#00f>COPY</span> --from=builder /usr/bin/caddy /usr/bin/caddy<span>
36</span></span></span></code></pre><h2 id=getting-rid-of-all-the-unnecessary-virtual-machines>Getting rid of all the unnecessary virtual machines</h2><p>The next step was to get a handle on the number of virtual servers I have all
37over the place.<p>I decided to move all the projects and services into two main VMs:<ul><li>personal server (still Nginx)<ul><li>git server<li>static file server<li>personal blog</ul><li>projects server (Caddy server)<ul><li>personal experiments<li>other projects</ul></ul><p>I will focus on projects' server in this post since it's more interesting.<h2 id=testing-cgi-scripts>Testing CGI scripts</h2><p>The first thing I tested was how CGI scripts work under Caddy. This is
38particularly import to me because almost all of my experiments and mini projects
39need this to work.<p>To configure Caddy server, you must provide the server with a configuration
40file. By default, it's called <code>Caaddyfile</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{
41</span></span><span style=display:flex><span> <span style=color:#00f>order</span> <span style=color:#a31515>cgi</span> before <span style=color:#a31515>respond</span>
42</span></span><span style=display:flex><span>}
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span><span style=font-weight:700>examples.mitjafelicijan.com</span> {
45</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /bash-test <span style=color:#a31515>/opt/projects/examples/bash-test.sh</span>
46</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /tcl-test <span style=color:#a31515>/opt/projects/examples/tcl-test.tcl</span>
47</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /lua-test <span style=color:#a31515>/opt/projects/examples/lua-test.lua</span>
48</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /python-test <span style=color:#a31515>/opt/projects/examples/python-test.py</span>
49</span></span><span style=display:flex><span>
50</span></span><span style=display:flex><span> <span style=color:#00f>root</span> * <span style=color:#a31515>/opt/projects/examples</span>
51</span></span><span style=display:flex><span> <span style=color:#00f>file_server</span>
52</span></span><span style=display:flex><span>}
53</span></span></code></pre><ul><li>The order is very important. Make sure that <code>order cgi before respond</code> is at
54the top of the configuration file.<li>Also, when you run with Caddy v2, make sure you provide <code>adapter</code> argument
55like this <code>/usr/bin/caddy run --watch --environ --config /etc/caddy/Caddyfile --adapter caddyfile</code>. Otherwise, Caddy will try to use a different format for
56config file.</ul><p>I did a small batch of tests with <a href=https://www.gnu.org/software/bash/>Bash</a>,
57<a href=https://www.tcl-lang.org/>Tcl</a>, <a href=https://www.lua.org/>Lua</a> and
58<a href=https://www.python.org/>Python</a>. Here is a cheat sheet if you need it.<p>Let's get Bash out of the way first.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/usr/bin/bash
59</span></span></span><span style=display:flex><span><span style=color:#00f></span>
60</span></span><span style=display:flex><span>printf <span style=color:#a31515>&#34;Content-type: text/plain\n\n&#34;</span>
61</span></span><span style=display:flex><span>
62</span></span><span style=display:flex><span>printf <span style=color:#a31515>&#34;Hello from Bash\n\n&#34;</span>
63</span></span><span style=display:flex><span>printf <span style=color:#a31515>&#34;PATH_INFO [%s]\n&#34;</span> $PATH_INFO
64</span></span><span style=display:flex><span>printf <span style=color:#a31515>&#34;QUERY_STRING [%s]\n&#34;</span> $QUERY_STRING
65</span></span><span style=display:flex><span>printf <span style=color:#a31515>&#34;\n&#34;</span>
66</span></span><span style=display:flex><span>
67</span></span><span style=display:flex><span><span style=color:#00f>for</span> i in {0..9..1}; <span style=color:#00f>do</span>
68</span></span><span style=display:flex><span> printf <span style=color:#a31515>&#34;&gt; %s\n&#34;</span> $i
69</span></span><span style=display:flex><span><span style=color:#00f>done</span>
70</span></span><span style=display:flex><span>
71</span></span><span style=display:flex><span>exit 0
72</span></span></code></pre><p>This one is for Tcl script.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>#!/usr/bin/tclsh
73</span></span></span><span style=display:flex><span><span style=color:green>
74</span></span></span><span style=display:flex><span><span style=color:green></span>puts <span style=color:#a31515>&#34;Content-type: text/plain\n&#34;</span>
75</span></span><span style=display:flex><span>
76</span></span><span style=display:flex><span>puts <span style=color:#a31515>&#34;Hello from Tcl\n&#34;</span>
77</span></span><span style=display:flex><span>puts <span style=color:#a31515>&#34;PATH_INFO \[$env(PATH_INFO)\]&#34;</span>
78</span></span><span style=display:flex><span>puts <span style=color:#a31515>&#34;QUERY_STRING \[$env(QUERY_STRING)\]&#34;</span>
79</span></span><span style=display:flex><span>puts <span style=color:#a31515>&#34;&#34;</span>
80</span></span><span style=display:flex><span>
81</span></span><span style=display:flex><span><span style=color:#00f>for</span> <span style=color:#00f>{set</span> i 0<span style=color:#00f>}</span> <span style=color:#00f>{</span>$i &lt; 10<span style=color:#00f>}</span> <span style=color:#00f>{</span>incr i<span style=color:#00f>}</span> <span style=color:#00f>{</span>
82</span></span><span style=display:flex><span> puts <span style=color:#a31515>&#34;&gt; $i&#34;</span>
83</span></span><span style=display:flex><span><span style=color:#00f>}</span>
84</span></span></code></pre><p>And for all you Python enjoyers.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>#!/usr/bin/python3</span>
85</span></span><span style=display:flex><span>
86</span></span><span style=display:flex><span><span style=color:#00f>import</span> os
87</span></span><span style=display:flex><span>
88</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;Content-type: text/plain</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span>)
89</span></span><span style=display:flex><span>
90</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;Hello from Python</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span>)
91</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;PATH_INFO [</span><span style=color:#a31515>{}</span><span style=color:#a31515>]&#34;</span>.format(os.environ[<span style=color:#a31515>&#39;PATH_INFO&#39;</span>]))
92</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;QUERY_STRING [</span><span style=color:#a31515>{}</span><span style=color:#a31515>]&#34;</span>.format(os.environ[<span style=color:#a31515>&#39;QUERY_STRING&#39;</span>]))
93</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;&#34;</span>)
94</span></span><span style=display:flex><span>
95</span></span><span style=display:flex><span><span style=color:#00f>for</span> i <span style=color:#00f>in</span> range(10):
96</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;&gt; </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(i))
97</span></span></code></pre><p>And for the final example, Lua.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/usr/bin/lua</span>
98</span></span><span style=display:flex><span>
99</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;Content-type: text/plain</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span>)
100</span></span><span style=display:flex><span>
101</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;Hello from Lua</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span>)
102</span></span><span style=display:flex><span>print(string.format(<span style=color:#a31515>&#34;PATH_INFO [%s]&#34;</span>, os.getenv(<span style=color:#a31515>&#34;PATH_INFO&#34;</span>)))
103</span></span><span style=display:flex><span>print(string.format(<span style=color:#a31515>&#34;QUERY_STRING [%s]&#34;</span>, os.getenv(<span style=color:#a31515>&#34;QUERY_STRING&#34;</span>)))
104</span></span><span style=display:flex><span>print()
105</span></span><span style=display:flex><span>
106</span></span><span style=display:flex><span><span style=color:#00f>for</span> i = 0, 9 <span style=color:#00f>do</span>
107</span></span><span style=display:flex><span> print(string.format(<span style=color:#a31515>&#34;&gt; %d&#34;</span>, i))
108</span></span><span style=display:flex><span><span style=color:#00f>end</span>
109</span></span></code></pre><h2 id=basic-authentication>Basic authentication</h2><p>One thing was also to have an option for some sort of authentication, and
110something like <a href=https://en.wikipedia.org/wiki/Basic_access_authentication>Basic access
111authentication</a> would
112be more than enough.<p>Thankfully, Caddy supports this out of the box already. Below is an updated
113example.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{
114</span></span><span style=display:flex><span> <span style=color:#00f>order</span> <span style=color:#a31515>cgi</span> before <span style=color:#a31515>respond</span>
115</span></span><span style=display:flex><span>}
116</span></span><span style=display:flex><span>
117</span></span><span style=display:flex><span><span style=font-weight:700>examples.mitjafelicijan.com</span> {
118</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /bash-test <span style=color:#a31515>/opt/projects/examples/bash-test.sh</span>
119</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /tcl-test <span style=color:#a31515>/opt/projects/examples/tcl-test.tcl</span>
120</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /lua-test <span style=color:#a31515>/opt/projects/examples/lua-test.lua</span>
121</span></span><span style=display:flex><span> <span style=color:#00f>cgi</span> /python-test <span style=color:#a31515>/opt/projects/examples/python-test.py</span>
122</span></span><span style=display:flex><span>
123</span></span><span style=display:flex><span> <span style=color:#00f>root</span> * <span style=color:#a31515>/opt/projects/examples</span>
124</span></span><span style=display:flex><span> <span style=color:#00f>file_server</span>
125</span></span><span style=display:flex><span>
126</span></span><span style=display:flex><span> <span style=color:#00f>basicauth</span> * {
127</span></span><span style=display:flex><span> <span style=color:#00f>bob</span> <span>$</span><span style=color:#a31515>2a</span><span>$</span>14<span>$</span><span style=color:#a31515>/wCgaf9oMnmQa20txB76u.nI1AldGMBT/1J7fXCfgOiRShwz/JOkK</span>
128</span></span><span style=display:flex><span> }
129</span></span><span style=display:flex><span>}
130</span></span></code></pre><p><code>basicauth *</code> matches everything under this domain/sub-domain and protects it
131with Basic Authentication.<ul><li><code>bob</code> is the username<li><code>hash</code> is the password</ul><p>To generate these passwords, execute <code>caddy hash-password</code> and this will prompt
132you to insert a password twice and spit out a hashed password that you can put
133in your configuration file.<p>Restart the server and you are ready to go.<h2 id=making-caddy-a-service-with-systemd>Making Caddy a service with systemd</h2><p>After the tests were successful, I copied <code>caddy</code> to <code>/usr/bin/caddy</code> and copied
134<code>Caddyfile</code> to <code>/etc/caddy/Caddyfile</code>.<p>Now off to the systemd. Each systemd service requires you to create a service
135file.<ul><li>I created a <code>/etc/systemd/system/caddy.service</code> and put the following content
136in the file.</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>[Unit]</span>
137</span></span><span style=display:flex><span>Description=<span style=color:#a31515>Caddy</span>
138</span></span><span style=display:flex><span>Documentation=<span style=color:#a31515>https://caddyserver.com/docs/</span>
139</span></span><span style=display:flex><span>After=<span style=color:#a31515>network.target network-online.target</span>
140</span></span><span style=display:flex><span>Requires=<span style=color:#a31515>network-online.target</span>
141</span></span><span style=display:flex><span>
142</span></span><span style=display:flex><span><span style=color:#00f>[Service]</span>
143</span></span><span style=display:flex><span>Type=<span style=color:#a31515>notify</span>
144</span></span><span style=display:flex><span>User=<span style=color:#a31515>root</span>
145</span></span><span style=display:flex><span>Group=<span style=color:#a31515>root</span>
146</span></span><span style=display:flex><span>ExecStart=<span style=color:#a31515>/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile --adapter caddyfile</span>
147</span></span><span style=display:flex><span>ExecReload=<span style=color:#a31515>/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force --adapter caddyfile</span>
148</span></span><span style=display:flex><span>TimeoutStopSec=<span style=color:#a31515>5s</span>
149</span></span><span style=display:flex><span>LimitNOFILE=<span style=color:#a31515>1048576</span>
150</span></span><span style=display:flex><span>LimitNPROC=<span style=color:#a31515>512</span>
151</span></span><span style=display:flex><span>PrivateTmp=<span style=color:#a31515>true</span>
152</span></span><span style=display:flex><span>ProtectSystem=<span style=color:#a31515>full</span>
153</span></span><span style=display:flex><span>AmbientCapabilities=<span style=color:#a31515>CAP_NET_ADMIN CAP_NET_BIND_SERVICE</span>
154</span></span><span style=display:flex><span>
155</span></span><span style=display:flex><span><span style=color:#00f>[Install]</span>
156</span></span><span style=display:flex><span>WantedBy=<span style=color:#a31515>multi-user.target</span>
157</span></span></code></pre><ul><li>You might need to reload systemd with <code>systemctl daemon-reload</code>.<li>Then I enabled the service with <code>systemctl enable caddy.service</code>.<li>And then I started the service with <code>systemctl start caddy.service</code>.</ul><p>This was about all that I needed to do to get it running. Now I can easily add
158new subdomains and domains to the main configuration file and be done with
159it. No manual Let's Encrypt shenanigans needed.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
160<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
161with me
162<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
163the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
164otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/bulk-make-thumbnails.html b/public/bulk-make-thumbnails.html
deleted file mode 100755
index 3f510e8..0000000
--- a/public/bulk-make-thumbnails.html
+++ /dev/null
@@ -1,19 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAA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//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Bulk thumbnails</title><meta name=description content="Make bulk thumbnails of JPGs with ImageMagick."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Bulk thumbnails</h1><p>Jun 4, 2023<div><p>Make bulk thumbnails of JPGs with ImageMagick.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/bin/bash
7</span></span></span><span style=display:flex><span><span style=color:#00f></span>
8</span></span><span style=display:flex><span>directory=<span style=color:#a31515>&#34;./images/&#34;</span>
9</span></span><span style=display:flex><span>dimensions=<span style=color:#a31515>&#34;360x360&#34;</span>
10</span></span><span style=display:flex><span>
11</span></span><span style=display:flex><span><span style=color:#00f>for</span> file in <span style=color:#a31515>&#34;</span>$directory<span style=color:#a31515>&#34;</span>*.jpg; <span style=color:#00f>do</span>
12</span></span><span style=display:flex><span> convert <span style=color:#a31515>&#34;</span>$file<span style=color:#a31515>&#34;</span> -resize $dimensions <span style=color:#a31515>&#34;</span>$file<span style=color:#a31515>&#34;</span> <span style=color:#a31515>&#34;</span><span style=color:#a31515>${</span>file%.*<span style=color:#a31515>}</span><span style=color:#a31515>-thumbnail.jpg&#34;</span>
13</span></span><span style=display:flex><span><span style=color:#00f>done</span>
14</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
15<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
16with me
17<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
18the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
19otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/cachebusting-in-hugo.html b/public/cachebusting-in-hugo.html
deleted file mode 100755
index c20da58..0000000
--- a/public/cachebusting-in-hugo.html
+++ /dev/null
@@ -1,15 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf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uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Cache busting in Hugo</title><meta name=description content="{{ $cachebuster := delimit (shuffle (split (md5 &amp;#34;6fab11c6669976d759d2992eff1dd5be&amp;#34;) &amp;#34;&amp;#34; )) &amp;#34;&amp;#34; }}&amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;/style."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Cache busting in Hugo</h1><p>May 1, 2023<div><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{{ $cachebuster := delimit (shuffle (split (md5 &#34;6fab11c6669976d759d2992eff1dd5be&#34;) &#34;&#34; )) &#34;&#34; }}
7</span></span><span style=display:flex><span>
8</span></span><span style=display:flex><span>&lt;link rel=<span style=color:#a31515>&#34;stylesheet&#34;</span> href=<span style=color:#a31515>&#34;/style.css?v={{ $cachebuster }}&#34;</span>&gt;
9</span></span></code></pre><p>This <code>6fab11c6669976d759d2992eff1dd5be</code> can be random string you generate use.
10You can use whatever you want.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
11<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
12with me
13<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
14the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
15otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/catv-weechat-config.html b/public/catv-weechat-config.html
deleted file mode 100755
index 25008ff..0000000
--- a/public/catv-weechat-config.html
+++ /dev/null
@@ -1,18 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>#cat-v on weechat configuration</title><meta name=description content="Set up weechat to connect to #cat-v on oftc."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>#cat-v on weechat configuration</h1><p>May 9, 2023<div><p>Set up weechat to connect to #cat-v on oftc. This applies to
7<a href=https://weechat.org/>weechat</a> but should be similar for other irc clients.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Install weechat and launch it and execute the following commands.</span>
8</span></span><span style=display:flex><span>
9</span></span><span style=display:flex><span>/server add oftc irc.oftc.net -tls
10</span></span><span style=display:flex><span>/set irc.server.oftc.autoconnect on
11</span></span><span style=display:flex><span>/set irc.server.oftc.autojoin <span style=color:#a31515>&#34;#cat-v&#34;</span>
12</span></span><span style=display:flex><span>/set irc.server.oftc.nicks <span style=color:#a31515>&#34;nick1,nick2,nick3&#34;</span>
13</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
14<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
15with me
16<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
17the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
18otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/convert-mkv.html b/public/convert-mkv.html
deleted file mode 100755
index b6faef5..0000000
--- a/public/convert-mkv.html
+++ /dev/null
@@ -1,16 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Convert all MKV files into other formats</title><meta name=description content="You will need ffmpeg installed on your system."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Convert all MKV files into other formats</h1><p>May 14, 2023<div><p>You will need <code>ffmpeg</code> installed on your system. This will convert all MKV files
7into WebM format.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Convert all MKV files into WebM format.</span>
8</span></span><span style=display:flex><span>find ./ -name <span style=color:#a31515>&#39;*.mkv&#39;</span> -exec bash -c <span style=color:#a31515>&#39;ffmpeg -i &#34;$0&#34; -vcodec libvpx -acodec libvorbis -cpu-used 5 -threads 8 &#34;${0%%.mp4}.webm&#34;&#39;</span> {} <span style=color:#a31515>\;</span>
9</span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Convert all MKV files into MP4 format.</span>
10</span></span><span style=display:flex><span>find ./ -name <span style=color:#a31515>&#39;*.mkv&#39;</span> -exec bash -c <span style=color:#a31515>&#39;ffmpeg -i &#34;$0&#34; c:a copy -c:v copy -cpu-used 5 -threads 8 &#34;${0%%.mp4}.mp4&#34;&#39;</span> {} <span style=color:#a31515>\;</span>
11</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
12<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
13with me
14<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
15the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
16otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/crafting-stories-in-zed-editor.html b/public/crafting-stories-in-zed-editor.html
deleted file mode 100755
index 735aa01..0000000
--- a/public/crafting-stories-in-zed-editor.html
+++ /dev/null
@@ -1,44 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/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==" rel=icon type=image/x-icon><title>From General Zod to Superman - Crafting Stories in Zed Editor</title><meta name=description content="Pretentious title!"><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>From General Zod to Superman - Crafting Stories in Zed Editor</h1><p>May 22, 2023<div><p>Pretentious title! Good start! I have nothing to add to this discussion. I just
7like this editor and wanted to write something here that will remind me to use
8it again in a while when/if it becomes available for Linux.<p><strong>TLDR:</strong> I think this code editor is very cool and has a massive potential. I
9hope they don’t mess up with adding a plugin ecosystem to it!<p>Out of morbid curiosity, I started using the <a href=https://zed.dev/>Zed editor</a> on
10my Mac. Zed is a high-performance, multiplayer code editor developed by the
11creators of Atom and Tree-sitter. Written in Rust so it has to be blazingly
12fast! 😊 It's a joke, calm down.<p>Over the past year, I have switched between <a href=https://helix-editor.com/>Helix
13editor</a> and <a href=https://code.visualstudio.com/>VS
14Code</a>, but for the last couple of months, I have
15been using Helix exclusively.<p>I've been genuinely impressed by Zed. When you open a file, it automatically
16detects its type and downloads the corresponding <a href=https://en.wikipedia.org/wiki/Language_Server_Protocol>LSP (language
17server)</a>. The list of
18supported languages is not extensive, but it's still impressive. It's a great
19example of how to create a product that stays out of your way.<p><img src="/assets/zed/zed-1.png?style=bigimg" alt="Zed editor"><p>For C development it downloaded <a href=https://clangd.llvm.org/>clangd</a> and setting
20up missing dependencies in code was rather easy. For this project I use
21<a href=https://www.libsdl.org/>SDL2</a> for rendering terminal emulator. It’s a hobby
22project, don’t worry about it.<p>If you are going to give this a try and you are using C, I suggest checking two
23files in the root of your project folder. If you don't have them, create them.<p><strong>compile_flags.txt</strong><pre><code>-I/opt/homebrew/include
24-I/opt/homebrew/include/SDL2
25</code></pre><p>Easy way of checking what the appropriate includes for a specific library is to
26use <code>pkg-config</code> and in my case <code>pkg-config SDL2 --cflags-only-I</code>. But this is
27nothing new to C/C++ devs. Just a noter for people who are using Visual Studio.<p><strong>.clang-format</strong><pre><code>ColumnLimit: 220
28BasedOnStyle: Mozilla
29</code></pre><p>I prefer Mozilla coding style for C so you can set that up.<p>They really have something special here. Although there is no version available
30for Linux yet, I will stick to Helix. This impressive piece of engineering is,
31above all, an amazing example of craftsmanship.<p>They have a bunch of amazing integrated functionalities like live desktop
32sharing, code sharing in a live coding session. There is a lot of pretentious
33marketing speak there but the product is still amazing!<p>For me the speed and the simplicity of the product was the most impressive
34thing. You get that: it just works feeling. A rare thing in 2023.<p><img src="/assets/zed/zed-2.png?style=bigimg" alt="Zed editor"><p>They also managed to add <a href=https://github.com/features/copilot>Github Copilot</a>
35in a non obtrusive way. To me, everything feels very intentional and
36specifically selected. It's minimal yet maximally effective.<p><video src=https://zed.dev/img/post/copilot/copilot-demo.webm autoplay loop></video><p>It is a perfect balance between VS Code, Jetbrains IDE’s and something like VIM
37or Helix.<p>I just hope they <strong>DON’T</strong> add plugin support and keep it like it is. They as a
38vendor should add stuff to it with great deliberation and thought. And this way
39the product will stay fast and focused. That’s my two cents.<p>Amazing job!</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
40<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
41with me
42<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
43the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
44otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/create-placeholder-images-with-sharp.html b/public/create-placeholder-images-with-sharp.html
deleted file mode 100755
index 9a3db25..0000000
--- a/public/create-placeholder-images-with-sharp.html
+++ /dev/null
@@ -1,78 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Create placeholder images with sharp Node.js image processing library</title><meta name=description content="I have been searching for a solution to pre-generate some placeholder images forimage server I needed to develop that resizes images on S3."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Create placeholder images with sharp Node.js image processing library</h1><p>Mar 27, 2020<div><p>I have been searching for a solution to pre-generate some placeholder images for
7image server I needed to develop that resizes images on S3. I though this would
8be a 15min job and quickly found out how very mistaken I was.<p>Even though Node.js is not really the best way to do this kind of things (surely
9something written in C or Rust or even Golang would be the correct way to do
10this but we didn't need the speed in our case) I found an excellent library
11<a href=https://github.com/lovell/sharp>sharp - High performance Node.js image
12processing</a>.<p>Getting things running was a breeze.<h2 id=fetch-image-from-s3-and-save-resized>Fetch image from S3 and save resized</h2><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>const</span> sharp = require(<span style=color:#a31515>&#39;sharp&#39;</span>);
13</span></span><span style=display:flex><span><span style=color:#00f>const</span> aws = require(<span style=color:#a31515>&#39;aws-sdk&#39;</span>);
14</span></span><span style=display:flex><span>
15</span></span><span style=display:flex><span><span style=color:#00f>const</span> x,y = 100;
16</span></span><span style=display:flex><span><span style=color:#00f>const</span> s3 = <span style=color:#00f>new</span> aws.S3({});
17</span></span><span style=display:flex><span>
18</span></span><span style=display:flex><span>aws.config.update({
19</span></span><span style=display:flex><span> secretAccessKey: <span style=color:#a31515>&#39;secretAccessKey&#39;</span>,
20</span></span><span style=display:flex><span> accessKeyId: <span style=color:#a31515>&#39;accessKeyId&#39;</span>,
21</span></span><span style=display:flex><span> region: <span style=color:#a31515>&#39;region&#39;</span>
22</span></span><span style=display:flex><span>});
23</span></span><span style=display:flex><span>
24</span></span><span style=display:flex><span><span style=color:#00f>const</span> originalImage = <span style=color:#00f>await</span> s3.getObject({
25</span></span><span style=display:flex><span> Bucket: <span style=color:#a31515>&#39;some-bucket-name&#39;</span>,
26</span></span><span style=display:flex><span> Key: <span style=color:#a31515>&#39;image.jpg&#39;</span>,
27</span></span><span style=display:flex><span>}).promise();
28</span></span><span style=display:flex><span>
29</span></span><span style=display:flex><span><span style=color:#00f>const</span> resizedImage = <span style=color:#00f>await</span> sharp(originalImage.Body)
30</span></span><span style=display:flex><span> .resize(x, y)
31</span></span><span style=display:flex><span> .jpeg({ progressive: <span style=color:#00f>true</span> })
32</span></span><span style=display:flex><span> .toBuffer();
33</span></span><span style=display:flex><span>
34</span></span><span style=display:flex><span>s3.putObject({
35</span></span><span style=display:flex><span> Bucket: <span style=color:#a31515>&#39;some-bucket-name&#39;</span>,
36</span></span><span style=display:flex><span> Key: <span style=color:#a31515>`optimized/</span><span style=color:#a31515>${</span>x<span style=color:#a31515>}</span><span style=color:#a31515>x</span><span style=color:#a31515>${</span>y<span style=color:#a31515>}</span><span style=color:#a31515>/image.jpg`</span>,
37</span></span><span style=display:flex><span> Body: resizedImage,
38</span></span><span style=display:flex><span> ContentType: <span style=color:#a31515>&#39;image/jpeg&#39;</span>,
39</span></span><span style=display:flex><span> ACL: <span style=color:#a31515>&#39;public-read&#39;</span>
40</span></span><span style=display:flex><span>}).promise();
41</span></span></code></pre><p>All this code was wrapped inside a web service with some additional security
42checks and defensive coding to detect if key is missing on S3.<p>And at that point I needed to return placeholder images as a response in case
43key is missing or x,y are not allowed by the server etc. I could have created
44PNG in Gimp and just serve them but I wanted to respect aspect ratio and I
45didn't want to return some mangled images.<blockquote><p>Main problem with finding a clean solution I could copy and paste and change a
46bit was a task. API is changing constantly and there weren't clear examples or
47I was unable to find them.</blockquote><h2 id=generating-placeholder-images-using-svg>Generating placeholder images using SVG</h2><p>What I ended up was using SVG to generate text and created image with sharp and
48used composition to combine both layers. Response returned by this function is a
49buffer you can use to either upload to S3 or save to local file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>const</span> generatePlaceholderImageWithText = <span style=color:#00f>async</span> (width, height, message) =&gt; {
50</span></span><span style=display:flex><span> <span style=color:#00f>const</span> overlay = <span style=color:#a31515>`&lt;svg width=&#34;</span><span style=color:#a31515>${</span>width - 20<span style=color:#a31515>}</span><span style=color:#a31515>&#34; height=&#34;</span><span style=color:#a31515>${</span>height - 20<span style=color:#a31515>}</span><span style=color:#a31515>&#34;&gt;
51</span></span></span><span style=display:flex><span><span style=color:#a31515> &lt;text x=&#34;50%&#34; y=&#34;50%&#34; font-family=&#34;sans-serif&#34; font-size=&#34;16&#34; text-anchor=&#34;middle&#34;&gt;</span><span style=color:#a31515>${</span>message<span style=color:#a31515>}</span><span style=color:#a31515>&lt;/text&gt;
52</span></span></span><span style=display:flex><span><span style=color:#a31515> &lt;/svg&gt;`</span>;
53</span></span><span style=display:flex><span>
54</span></span><span style=display:flex><span> <span style=color:#00f>return</span> <span style=color:#00f>await</span> sharp({
55</span></span><span style=display:flex><span> create: {
56</span></span><span style=display:flex><span> width: width,
57</span></span><span style=display:flex><span> height: height,
58</span></span><span style=display:flex><span> channels: 4,
59</span></span><span style=display:flex><span> background: { r: 230, g: 230, b: 230, alpha: 1 }
60</span></span><span style=display:flex><span> }
61</span></span><span style=display:flex><span> })
62</span></span><span style=display:flex><span> .composite([{
63</span></span><span style=display:flex><span> input: Buffer.from(overlay),
64</span></span><span style=display:flex><span> gravity: <span style=color:#a31515>&#39;center&#39;</span>,
65</span></span><span style=display:flex><span> }])
66</span></span><span style=display:flex><span> .jpeg()
67</span></span><span style=display:flex><span> .toBuffer();
68</span></span><span style=display:flex><span>}
69</span></span></code></pre><p>That is about it. Nothing more to it. You can change the color of the image by
70changing <code>background</code> and if you want to change text styling you can adapt SVG
71to your needs.<blockquote><p>Also be careful about the length of the text. This function positions text at
72the center and adds <code>20px</code> padding on all sides. If text is longer than the
73image it will get cut.</blockquote></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
74<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
75with me
76<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
77the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
78otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/cronjobs-github-with-actions.html b/public/cronjobs-github-with-actions.html
deleted file mode 100755
index c808d1d..0000000
--- a/public/cronjobs-github-with-actions.html
+++ /dev/null
@@ -1,27 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Cronjobs on Github with Github Actions</title><meta name=description content="In the root of your repository create a folder ."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Cronjobs on Github with Github Actions</h1><p>May 27, 2023<div><p>In the root of your repository create a folder <code>.github/workflows</code> and in that
7folder create a file a file <code>cron.yaml</code>. This file can be named whatever you
8wish. But it has to be a <code>yaml</code> file.<p>File below (<code>.github/workflows/cron.yaml</code>) describes an action that will trigger
9every six hours and it will curl example.com.<p>However. Be sure that you have enough credits. Free account is not that generous
10with the minutes they give you for free. Check more about GitHub Actions usage
11on their website <a href=https://docs.github.com/en/actions>https://docs.github.com/en/actions</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># .github/workflows/cron.yaml</span>
12</span></span><span style=display:flex><span>name: Do a curl every 6 hours
13</span></span><span style=display:flex><span>on:
14</span></span><span style=display:flex><span> schedule:
15</span></span><span style=display:flex><span> - cron: <span style=color:#a31515>&#39;0 */6 * * *&#39;</span>
16</span></span><span style=display:flex><span>jobs:
17</span></span><span style=display:flex><span> cron:
18</span></span><span style=display:flex><span> runs-on: ubuntu-latest
19</span></span><span style=display:flex><span> steps:
20</span></span><span style=display:flex><span> - name: Call some url
21</span></span><span style=display:flex><span> run: curl &#39;https://example.com&#39;
22</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
23<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
24with me
25<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
26the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
27otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/curriculum-vitae.html b/public/curriculum-vitae.html
deleted file mode 100755
index f5d68b2..0000000
--- a/public/curriculum-vitae.html
+++ /dev/null
@@ -1,21 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3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jafelicijan."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Curriculum Vitae</h1><div><style>img{width:auto!important;left:initial!important;margin:initial!important;border:0!important}</style><div class=cv-picture><p><img src=/assets/cv/avatar.gif alt></div><script>
7 window.addEventListener('load', async () => {
8 // flip CV image on mouse over
9 const cvImage = document.querySelector('.cv-picture img');
10 if (cvImage) {
11 setInterval(() => {
12 cvImage.style.transform = cvImage.style.transform === 'scaleX(1)' ? 'scaleX(-1)' : 'scaleX(1)';
13 }, 1000);
14 }
15 });
16</script><p><strong>Mitja Felicijan</strong><p>Email me at <em><a href="mailto:m@mitjafelicijan.com?subject=Website+CV+Contact">m@mitjafelicijan.com</a></em><h2 id=technical-experience>Technical experience</h2><ul><li><strong>Key languages:</strong> C, Golang, Lua, Python, Bash.<li><strong>Platforms:</strong> GNU/Linux, macOS.<li><strong>Interests:</strong> Zigbee, KNX, Modbus, Machine to Machine, Embedded systems, Operating systems, Distributed systems, IOT, RDBMS, Algorithms, Database engine design, SQL, NoSQL, NewSQL, Big data analytics, Machine learning, Prediction algorithms, Realtime analytics, Systems automation, Natural language processing, Bioinformatics, Game development.</ul><h2 id=major-projects>Major projects</h2><ul><li>SMS marketing system (2007)<li>Yacht management software (2008)<li>Smart Home Gateway (2009)<li>Moxa UPort 1130 USB to RS485 Universal Linux driver (2009)<li>Remote management of electricity meter (2009)<li>Remote management of blood pressure monitor (2010)<li>Infomat automation system (2010)<li>GPS Tourist - GIS Software (2011)<li>Minimal GNU/Linux distribution for embedded platforms (2011)<li>Digital Jukebox system (2012)<li>NanoCloudLogger - Machine to Machine (2012)<li>Street Lightning System (2012)<li>Smart cabins with hardware sensor management (2013)<li>Contextual advertising server (2015)<li>Network accessible database engine for caching and in-memory storage (2016)<li>Tick database engine specifically designed for storing and processing large amount of sensor data with high write throughput (2016)<li>Wireless industrial lighting management system - hardware and software (2016)<li>Minimal configuration reverse proxy (2017)<li>Industrial IOT platform for deployment on on-premise (2018)<li>Custom Platform as a service based on Docker Swarm (2018)<li>Toolkit for encoding binary data into DNA sequence (2019)<li>Minimal configuration reverse proxy with load balancing and rate limiting (2019)<li>E-ink conference room occupancy display, hardware and software solution (2019)<li>Caching module for Apache web server (2022)<li>Task runner for the command line (2022)<li>World of Warcraft Tweaks and Enhancements Addon (2023)</ul><h2 id=employment-history>Employment history</h2><ul><li>Freelancer (2001 – Present)<li>Software developer at Mobinia (2005 – 2007)<li>Senior Software Engineer at Milk (2007 – 2009)<li>Co-Founder of UTS (2009 – 2015)<li>Senior Software Engineer at TSmedia (2015 - 2017)<li>Senior Software Engineer at Renderspace (2017 - 2019)<li>Senior Software Engineer at Digg (2019 - Present)</ul><h2 id=awards>Awards</h2><ul><li>Regional Award for Innovation by Chamber of Commerce and Industry of Slovenia for project Intelligent system management and regulation of Street Lighting, 2010<li>National Award for Innovation by Chamber of Commerce and Industry of Slovenia for project Intelligent system management and regulation of Street Lighting, 2010</ul><h2 id=key-responsibilities>Key responsibilities</h2><ul><li>Embedded platform development.<li>Hardware design and driver development.<li>Designing, developing and testing systems.<li>Implementation of the systems.<li>Writing and maintaining user and technical documents.<li>Development and maintenance of the project.<li>Code revision, testing and output.<li>Work on the enhancement suggested by the customers and fixes the bugs reported.</ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
17<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
18with me
19<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
20the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
21otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/dcss-new-player-guide.html b/public/dcss-new-player-guide.html
deleted file mode 100755
index 070feac..0000000
--- a/public/dcss-new-player-guide.html
+++ /dev/null
@@ -1,43 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Dungeon Crawl Stone Soup - New player guide</title><meta name=description content="An amazing game deserves an amazing guide."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Dungeon Crawl Stone Soup - New player guide</h1><p>May 25, 2023<div><p>An amazing game deserves an amazing guide. All this material can be find in some
7form on another on <a href=https://github.com/crawl/crawl>craw's</a> official repository.<ul><li><a href=/notes/dcss-quickstart.pdf>DCSS Quickstart</a> - Very short introduction to the
8game<li><a href=/notes/dcss_manual.pdf>DCSS Manual</a> - Extensive manual about the game</ul><p><img src=/notes/dcss.jpg alt="Dungeon Crawl Stone Soup"><p><strong>Movement and Exploration</strong><ul><li>You can move around with the numpad (try numlock on and off), vi-keys, or
9clicking with the mouse. Arrow keys work, though you can't move diagonally
10with them. Pressing Shift and a direction will move until you see/hit
11something.<li>Pressing <code>></code> will take you down a staircase, and <code>&lt;</code> to go up a staircase.<li>You can open doors by walking into them, and close them with <code>C</code>.<li>You can autoexplore by pressing <code>o</code>.<li>You can re-view recent messages with <code>Ctrl-p</code>.</ul><p><strong>Monsters and Combat</strong><ul><li>You can pick up items with <code>,</code> or <code>g</code>.<li>Wield weapons with <code>w</code>. Weapons have different stats.<ul><li>(You may also engage in Unarmed Combat, though it isn't very effective when
12untrained).</ul><li>Attack monsters in melee by walking in their direction (or with
13Ctrl-direction).<li>You can wait with <code>.</code> or <code>s</code>, passing your turn - such as to get monsters into
14a corridor with you.<li>You can rest with <code>5</code>, waiting until you are fully healed, or something
15noteworthy happens.<li>Either mouseover and rightclick, or use <code>x</code> then <code>v</code> on the monster to examine
16monsters. Monsters with a red border are 'dangerous' relative to your current
17XP level (XL).<li>Quiver (often ranged) actions for further use with <code>Q</code>.<li>You can fire ranged weapons manually with <code>f</code>, or auto-target your quiver with
18<code>p</code> or <code>Shift-Tab</code>. Throwing weapons can be thrown immediately, while
19launchers (like bows) need to be wielded first.</ul><p><strong>Items and Inventory</strong><ul><li>View your inventory by pressing <code>i</code>. Most item related commands can also be
20done with this menu.<li>You can wear amour with <code>W;</code> amour gives <code>AC</code>, while heavier body armour
21reduces <code>EV</code>.<li>Autoexplore will automatically pick up useful items, such as potions and
22scrolls, if you aren't in danger.<li>You can read scrolls with <code>r</code> and drink ("quaff") potions with <code>q</code>.<li>Equipment items may have brands, with special properties. Branded equipment is
23blue when unidentified.<li>Equipment items may be artifacts, often with unique properties, and are
24unmodifiable. They are written in white.<li>You can evoke wands with <code>V</code>.<li>You can put on jewelry with <code>P</code>, and remove it with <code>R</code>.<li>Gold is used in shops, which can be interacted with by either <code>></code> or <code>&lt;</code>.</ul><p><strong>Magic and Spellcasting</strong><ul><li>Once you find a spellbook, you can memorize spells with <code>M</code>.<li>You need to be the same XL as the spell's spell level in order to learn it, in
25addition to training magical skill (to lower failure rate).<li>Cast spells by pressing <code>z</code>, then the letter assigned to the spell. You may
26also Quiver a spell and then use it like a ranged weapon (with Shift-Tab).<li>You can view your memorized spells by pressing <code>I</code> (capital-i) or <code>z</code>.<li>Like HP, you can recover MP by resting (with 5).<li>Many spells can be positioned more effectively, or combined with other spells,
27in order to get (more effective) use out of them.<li>Heavier body amour and shields hamper spellcasting.</ul><p><strong>Gods and Divine Abilities</strong><ul><li>You may look at a god's overview by praying at their altar (with <code>></code> or <code>&lt;</code>).
28After praying, you can worship the god by pressing Enter afterwards.<li>Gods all have unique features about them. Trog, the god of the tutorial, is
29also the god of rage and bloodshed, and so despises spellcasting.<li>Gods like and dislike different things. Most gods either like killing things
30(like Trog) or exploring new areas (like Elyvilon), rewarding you piety
31(divine favor) for doing so.<li>You should learn to use and even rely on divine abilities often, as they are
32usually very strong. Trog's Berserk gives you 1.5x health, 1.5x speed (to all
33valid actions), and a big damage boost. Note that Berserk prevents most
34actions other than move and melee attack, and runs out very quickly if you
35aren't attacking. And after berserk ends, you are slowed down and can't
36berserk again for a short time.<li>In addition, the vast majority of abilities consume piety in the process.
37Regardless, this ability is very cheap, and the benefits are incredible, so
38don't hold back!<li>Pressing <code>^</code> will let you view your current god, abilities, and piety.</ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
39<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
40with me
41<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
42the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
43otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/dcss-on-4k-display.html b/public/dcss-on-4k-display.html
deleted file mode 100755
index e8df370..0000000
--- a/public/dcss-on-4k-display.html
+++ /dev/null
@@ -1,22 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Make DCSS playable on 4k displays</title><meta name=description content="Dungeon Crawl Stone Soup has a a very small font by default."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Make DCSS playable on 4k displays</h1><p>May 27, 2023<div><p>Dungeon Crawl Stone Soup has a a very small font by default. On a 4k display, it
7is barely readable. This is how I made it playable.<p>Make a file <code>~/.crawlrc</code> with the following content:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Adjust the sizes to your liking.</span>
8</span></span><span style=display:flex><span>
9</span></span><span style=display:flex><span>tile_font_crt_size = <span style=color:#a31515>32</span>
10</span></span><span style=display:flex><span>tile_font_stat_size = <span style=color:#a31515>32</span>
11</span></span><span style=display:flex><span>tile_font_msg_size = <span style=color:#a31515>32</span>
12</span></span><span style=display:flex><span>tile_font_tip_size = <span style=color:#a31515>32</span>
13</span></span><span style=display:flex><span>tile_font_lbl_size = <span style=color:#a31515>32</span>
14</span></span><span style=display:flex><span>tile_sidebar_pixels = <span style=color:#a31515>64</span>
15</span></span></code></pre><p>To zoom in and out in viewport, press <code>Ctrl+</code> and <code>Ctrl-</code> respectively.<p>All the possible options are documented in the <a href=https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt>Dungeon Crawl Stone Soup Options
16Guide</a>
17file.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
18<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
19with me
20<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
21the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
22otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html b/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html
deleted file mode 100755
index 188eeb2..0000000
--- a/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html
+++ /dev/null
@@ -1,125 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Debian based riced up distribution for Developers and DevOps folks</title><meta name=description content="IntroductionI have been using Ubuntu for quite a longtime now."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Debian based riced up distribution for Developers and DevOps folks</h1><p>Dec 3, 2021<div><h2 id=introduction>Introduction</h2><p>I have been using <a href=https://ubuntu.com/>Ubuntu</a> for quite a longtime now. I have
7used <a href=https://www.debian.org/>Debian</a> in the past and
8<a href=https://manjaro.org/>Manjaro</a>. Also had <a href=https://archlinux.org/>Arch</a> for
9some time and even ran <a href=https://www.gentoo.org/>Gentoo</a> way back.<p>What I learned from all this is that I prefer running a bit older versions and
10having them be stable than run bleeding edge rolling release. For that reason, I
11stuck with Ubuntu for a couple of years now. I am also at a point in my life
12where I just don't care what is cool or hip anymore. I just want a stable system
13that doesn't get in my way.<p>During all this, I noticed that these distributions were getting very bloated
14and a lot of software got included that I usually uninstall on fresh
15installation. Maybe this is my OCD speaking, but why do I have to give fresh
16installation min 1 GB of ram out of the box just to have a blank screen in front
17of me? I get it, there are many things included in the distro to make my life
18easier. I understand. But at this point I have a feeling that modern Linux
19distributions are becoming similar to <a href=https://devhumor.com/content/uploads/images/August2017/node-modules.jpg>Node.js project with
20node_modules</a>.
21Just a crazy number of packages serving very little or no purpose, just
22supporting other software.<p>I felt I needed a fresh start. To start over with something minimal and clean.
23Something that would put a little more joy into using a computer again.<p>For the first version, I wanted to target the following machines I have at home
24that I want this thing to work on.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># My main stationary work machine</span>
25</span></span><span style=display:flex><span>Resolution: 3840x1080 (Super Ultrawide Monitor 32:9)
26</span></span><span style=display:flex><span>CPU: Intel i7-8700 (12) @ 4.600GHz
27</span></span><span style=display:flex><span>GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
28</span></span><span style=display:flex><span>Memory: 32020MiB
29</span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Thinkpad x220 for testing things and goofing around</span>
30</span></span><span style=display:flex><span>Resolution: 1366x768
31</span></span><span style=display:flex><span>CPU: Intel i5-2520M (4) @ 3.200GHz
32</span></span><span style=display:flex><span>GPU: Intel 2nd Generation Core Processor Family
33</span></span><span style=display:flex><span>Memory: 15891MiB
34</span></span></code></pre><h2 id=how-should-i-approach-this>How should I approach this?</h2><p>I knew I wanted to use <a href=https://www.debian.org/CD/netinst/>minimal Debian netinst</a> for the base to give myself a head
35start. No reason to go through changing the installer and also testing all that
36behemoth of a thing. So, some sort of ricing was the only logical option to get
37this thing of the grounds somewhat quickly.<blockquote><p><strong>What is ricing anyway?</strong>
38The term “RICE” stands for Race Inspired Cosmetic Enhancement. A group of
39people (could be one, idk) decided to see if they could tweak their own
40distros like they/others did their cars. This gave rise to a community of
41Linux/Unix enthusiasts trying to make their distros look cooler and better
42than others... For more information, read this article
43<a href=https://pesos.github.io/2020/07/14/what-is-ricing.html>What in the world is ricing!?</a>.</blockquote><p>I didn't want this to just be a set of config files for theming purpose. I
44wanted this to include a set of pre-installed tools and services that are being
45used all the time by a modern developer. Theming is just a tiny part of it.
46Fonts being applied across the distro and things like that.<p>First, I choose terminal installer and left it to load additional components.
47Avoid using graphical installer in this case.<p><img src=/assets/dfd-rice/install-00.png alt><p>After that I selected hostname and created a normal user and set password for
48that user and root user and choose guided mode for disk partitioning.<p><img src=/assets/dfd-rice/install-01.png alt><p>I left it run to install all the things required for the base system and opted
49out of scanning additional media for use by the package manager. Those will be
50downloaded from the internet during installation.<p><img src=/assets/dfd-rice/install-02.png alt><p>I opted out of the popularity contest, and <strong>now comes the important part</strong>.
51Uncheck all the boxes in Software selection and only leave 'standard system
52utilities'. I also left an SSH server, so I was able to log in to the machine
53from my main PC.<p><img src=/assets/dfd-rice/install-03.png alt><p>At this point, I installed GRUB bootloader on the disk where I installed the
54system.<p><img src=/assets/dfd-rice/install-04.png alt><p>That concluded the installation of base Debian and after restarting the computer
55I was prompted with the login screen.<p><img src=/assets/dfd-rice/install-05.png alt><p>Now that I had the base installation, it was time to choose what software do I
56want to include in this so-called distribution. I wanted out of the box
57developer experience, so I had plenty to choose.<p>Let's not waste time and go through the list.<h2 id=desktop-environments>Desktop environments</h2><p>I have been using <a href=https://www.gnome.org/>Gnome</a> for my whole Linux life. From
58version 2 forward. It's been quite a ride. I hated version 3 when it came out
59and replaced version 2. But I got used to it. And now with version 40+ they also
60made couple of changes which I found both frustrating and presently surprised.<p>The amount of vertical space you loose because of the beefy title bars on
61windows is ridiculous. And then in case of
62<a href=https://gnunn1.github.io/tilix-web/>Tilix</a> you also have tabs, and you are
63100px deep. Vertical space is one of the most important things for a
64developer. The more real estate you have, the more code you can have in a
65viewport.<p>But on the other hand, I still love how Gnome feels and looks. I gotta give them
66that. They really are trying to make Gnome feel unified and modern.<p>Regardless of all the nice things Gnome has, I was looking at the tiling window
67managers for some time, but never had the nerve to actually go with it. But now
68was the ideal time to give it a go. No guts, no glory kind of a thing.<p>One of the requirements for me was easy custom layouts because I use a really
69strange monitor with aspect ratio of 32:9. So relying on included layouts most
70of them have is a non-starter.<p>What I was doing in Gnome was having windows in a layout like the diagram
71below. This is my common practice. And if you look at it you can clearly see I
72was replicating tiling window manager setup in Gnome.<p><img src=/assets/dfd-rice/layout.png alt><p>That made me look into a bunch of tiling window managers and then tested them
73out. Candidates I was looking at were:<ul><li><a href=https://i3wm.org/>i3</a><li><a href=https://github.com/baskerville/bspwm>bspwm</a><li><a href=https://awesomewm.org/index.html>awesome</a><li><a href=https://xmonad.org/>XMonad</a><li><a href=https://swaywm.org/>sway</a><li><a href=http://www.qtile.org/>Qtile</a><li><a href=https://dwm.suckless.org/>dwm</a></ul><p>You can also check article <a href=https://www.tecmint.com/best-tiling-window-managers-for-linux/>13 Best Tiling Window Managers for
74Linux</a> I was
75referencing while testing them out.<p>While all of them provided what I needed, I liked i3 the most. What particular
76caught my eye was the ease to use and tree based layouts which allows flexible
77layouts. I know others can be set up also to have custom layouts other than<br>spiral, dwindle etc. I think i3 is a good entry-level window manager for
78somebody like me.<h2 id=batteries-included>Batteries included</h2><p>The source for the whole thing is located on Github
79<a href=https://github.com/mitjafelicijan/dfd-rice>https://github.com/mitjafelicijan/dfd-rice</a>.<p>Currenly included:<ul><li><code>non-free</code> (enables non-free packages in apt)<li><code>sudo</code> (adds sudo and adds user to sudo group)<li><code>essentials</code> (gcc, htop, zip, curl, etc...)<li><code>wifi</code> (network manager nmtui)<li><code>desktop</code> (i3, dmenu, fonts, configurations)<li><code>pulseaudio</code> (pulseaudio with pavucontrol)<li><code>code-editors</code> (vim, micro, vscode)<li><code>ohmybash</code> (make bash pretty)<li><code>file-managers</code> (mc)<li><code>git-ui</code> (terminal git gui)<li><code>meld</code> (diff tool)<li><code>profiling</code> (kcachegrind, valgrind, strace, ltrace)<li><code>browsers</code> (brave, firefox, chromium)<li>programming languages:<ul><li><code>python</code><li><code>golang</code><li><code>nodejs</code><li><code>rust</code><li><code>nim</code><li><code>php</code><li><code>ruby</code></ul><li><code>docker</code> (with docker-compose)<li><code>ansible</code></ul><p>Install script also allows you to install only specific packages (example for:
80essentials ohmybash docker rust).<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>su - root <span style=color:#a31515>\
81</span></span></span><span style=display:flex><span><span style=color:#a31515></span> bash -c <span style=color:#a31515>&#34;</span><span style=color:#00f>$(</span>wget -q https://raw.github.com/mitjafelicijan/dfd-rice/master/tools/install.sh -O -<span style=color:#00f>)</span><span style=color:#a31515>&#34;</span> -- <span style=color:#a31515>\
82</span></span></span><span style=display:flex><span><span style=color:#a31515></span> essentials ohmybash docker rust
83</span></span></code></pre><p>Currently, most of these recipes use what Debian and this is totally fine with
84me since I never use bleeding edge features of a package. But if something major
85would come to light, I will replace it with a possible compilation script or
86something similar.<p>This is some of the output from the installation script.<p><img src=/assets/dfd-rice/script.png alt><p>Let's take a look at some examples in the installation script.<h3 id=docker-recipe>Docker recipe</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># docker</span>
87</span></span><span style=display:flex><span>print_header <span style=color:#a31515>&#34;Installing Docker&#34;</span>
88</span></span><span style=display:flex><span>curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
89</span></span><span style=display:flex><span>echo <span style=color:#a31515>&#34;deb [arch=</span><span style=color:#00f>$(</span>dpkg --print-architecture<span style=color:#00f>)</span><span style=color:#a31515> signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian </span><span style=color:#00f>$(</span>lsb_release -cs<span style=color:#00f>)</span><span style=color:#a31515> stable&#34;</span> | tee /etc/apt/sources.list.d/docker.list &gt; /dev/null
90</span></span><span style=display:flex><span>apt update
91</span></span><span style=display:flex><span>apt -y install docker-ce docker-ce-cli containerd.io docker-compose
92</span></span><span style=display:flex><span>
93</span></span><span style=display:flex><span>systemctl start docker
94</span></span><span style=display:flex><span>systemctl enable docker
95</span></span><span style=display:flex><span>systemctl status docker --no-pager
96</span></span><span style=display:flex><span>
97</span></span><span style=display:flex><span>/sbin/usermod -aG docker $USERNAME
98</span></span></code></pre><h3 id=making-bash-pretty>Making bash pretty</h3><p>I really like <a href=https://ohmyz.sh/>Oh My Zsh</a>, but I don't like zsh shell. When
99I used it, I constantly needed to be aware of it and running bash scripts was a
100pain. So, I was really delighted when I found out that a version for bash
101existed called <a href=https://ohmybash.nntoan.com/>Oh My Bash</a>. Let's take a look at
102the recipe for installing it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># ohmybash</span>
103</span></span><span style=display:flex><span>print_header <span style=color:#a31515>&#34;Enabling OhMyBash&#34;</span>
104</span></span><span style=display:flex><span>sudo -u $USERNAME sh -c <span style=color:#a31515>&#34;</span><span style=color:#00f>$(</span>curl -fsSL https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh<span style=color:#00f>)</span><span style=color:#a31515>&#34;</span> &amp;
105</span></span><span style=display:flex><span>T1=<span style=color:#a31515>${</span>!<span style=color:#a31515>}</span>
106</span></span><span style=display:flex><span>wait <span style=color:#a31515>${</span>T1<span style=color:#a31515>}</span>
107</span></span></code></pre><p>Because OhMyBash does <code>exec bash</code> at the end, this traps our script inside
108another shell and our script cannot continue. For that reason, I executed this
109in background. But that presents a new problem. Because this is executed in
110background, we lose track of progress naturally. And that strange trick with
111<code>T1=${!}</code> and <code>wait ${T1}</code> waits for the background process to finish before
112continuing to another task in bash script.<p>Check <a href=https://www.cloudsavvyit.com/12277/how-to-use-multi-threaded-processing-in-bash-scripts/>Multi-Threaded Processing in Bash Scripts</a>
113for more details.<h2 id=conclusion>Conclusion</h2><p>Take a look at
114<a href=https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh>https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh</a> script
115to get familiar with it. This is just a first iteration and I will continue to
116update it because I need this in my life.<p>The current version boots in 4s to the login prompt, and after you log in, the
117desktop environment loads in 2s. So, its fast, very fast. And on clean boot, I
118measured ~230 MB of RAM usage.<p>And this is how it looks with two terminals side by side. I really like the
119simplicity and clean interface. I will polish the colors and stuff like that,
120but I really do like the results.<p><img src=/assets/dfd-rice/desktop.png alt></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
121<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
122with me
123<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
124the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
125otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/development-environments-with-nix.html b/public/development-environments-with-nix.html
deleted file mode 100755
index 7a230f8..0000000
--- a/public/development-environments-with-nix.html
+++ /dev/null
@@ -1,41 +0,0 @@
1<!doctype html><html lang=en-us><meta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Iv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Development environments with Nix</title><meta name=description content="Nix is amazing for making reproducible cross OS development environment."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Development environments with Nix</h1><p>Jun 25, 2023<div><p>Nix is amazing for making reproducible cross OS development environment.<p>First you need to <a href=https://nixos.org/download.html>install Nix package
7manager</a>.<ul><li>Create a file <code>shell.nix</code> in your project folder.<li>In the section that has <code>python3</code> etc add programs you want to use. These can
8be CLI or GUI applications. It doesn't matter to Nix.</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{ pkgs ? <span style=color:#00f>import</span> <span style=color:#a31515>&lt;nixpkgs&gt;</span> {} }:
9</span></span><span style=display:flex><span> pkgs.mkShell {
10</span></span><span style=display:flex><span> nativeBuildInputs = <span style=color:#00f>with</span> pkgs.buildPackages; [
11</span></span><span style=display:flex><span> python3
12</span></span><span style=display:flex><span> tinycc
13</span></span><span style=display:flex><span> ];
14</span></span><span style=display:flex><span>}
15</span></span></code></pre><p>And then run it <code>nix-shell</code>. By default it will look for <code>shell.nix</code> file. If
16you want to specify a different file use <code>nix-shell file.nix</code>. That is about it.<p>When the shell is spawned it could happen that your <code>PS1</code> prompt will be
17overwritten and your prompt will look differently. In that case you need to
18either do <code>NIX_SHELL_PRESERVE_PROMPT=1 nix shell</code> or add
19<code>NIX_SHELL_PRESERVE_PROMPT</code> variable to your <code>bashrc</code> or <code>zshrc</code> file and set it
20to <code>1</code>.<p>I also have a modified <code>PS1</code> prompt for Bash that I use and it also catches the
21usage of Nix shell.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>NIX_SHELL_PRESERVE_PROMPT=1
22</span></span><span style=display:flex><span>
23</span></span><span style=display:flex><span>parse_git_branch() {
24</span></span><span style=display:flex><span> git branch 2&gt; /dev/null | sed -e <span style=color:#a31515>&#39;/^[^*]/d&#39;</span> -e <span style=color:#a31515>&#39;s/* \(.*\)/ (\1)/&#39;</span>
25</span></span><span style=display:flex><span>}
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span>is_inside_nix_shell() {
28</span></span><span style=display:flex><span> nix_shell_name=<span style=color:#a31515>&#34;</span><span style=color:#00f>$(</span>basename <span style=color:#a31515>&#34;</span>$IN_NIX_SHELL<span style=color:#a31515>&#34;</span> 2&gt;/dev/null<span style=color:#00f>)</span><span style=color:#a31515>&#34;</span>
29</span></span><span style=display:flex><span> <span style=color:#00f>if</span> [[ -n <span style=color:#a31515>&#34;</span>$nix_shell_name<span style=color:#a31515>&#34;</span> ]]; <span style=color:#00f>then</span>
30</span></span><span style=display:flex><span> echo <span style=color:#a31515>&#34; \e[0;36m(nix-shell)\e[0m&#34;</span>
31</span></span><span style=display:flex><span> <span style=color:#00f>fi</span>
32</span></span><span style=display:flex><span>}
33</span></span><span style=display:flex><span>
34</span></span><span style=display:flex><span>export PS1=<span style=color:#a31515>&#34;[\033[38;5;9m\]\u@\h\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\]]</span><span style=color:#00f>$(</span>is_inside_nix_shell<span style=color:#00f>)</span><span style=color:#a31515>\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\] \n</span>$<span style=color:#a31515> &#34;</span>
35</span></span></code></pre><p>And this is what it looks like when you are in a Nix shell. Otherwise that part
36of prompt is omitted<p><img src=/notes/ps1-prompt.png alt="PS1 Prompt"><p>More resources:<ul><li><a href=https://nixos.wiki/wiki/Development_environment_with_nix-shell>https://nixos.wiki/wiki/Development_environment_with_nix-shell</a><li><a href=https://nixos.wiki/wiki/Main_Page>https://nixos.wiki/wiki/Main_Page</a><li><a href=https://itsfoss.com/why-use-nixos/>https://itsfoss.com/why-use-nixos/</a><li><a href=https://mynixos.com/>https://mynixos.com/</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
37<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
38with me
39<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
40the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
41otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/digitalocean-spaces-to-sync-between-computers.html b/public/digitalocean-spaces-to-sync-between-computers.html
deleted file mode 100755
index 04b7708..0000000
--- a/public/digitalocean-spaces-to-sync-between-computers.html
+++ /dev/null
@@ -1,65 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAA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AAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Using Digitalocean Spaces to sync between computers</title><meta name=description content="I&amp;#39;ve been using Dropbox for probably 10+ yearsnow and I-ve became so used to it that it runs in the background that I don&amp;#39;teven imagine a world without it."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Using Digitalocean Spaces to sync between computers</h1><p>Sep 9, 2020<div><p>I've been using <a href=https://www.dropbox.com/>Dropbox</a> for probably <strong>10+ years</strong>
7now and I-ve became so used to it that it runs in the background that I don't
8even imagine a world without it. But it's not without problems.<p>At first I had problems with <code>.venv</code> environments for Python and the only
9solution for excluding synchronization for this folder was to manually exclude a
10specific folder which is not really scalable. FYI, my whole project folder is
11synced on <a href=https://www.dropbox.com/>Dropbox</a>. This of course introduced a lot
12of syncing of files and folders that are not needed or even break things on
13other machines. In the case of <strong>Python</strong>, I couldn't use that on my second
14machine. I needed to delete <code>.venv</code> folder and pip it again which synced files
15again to the main machine. This was very frustrating. <strong>Nodejs</strong> handles this
16much nicer and I can just run the scripts without deleting <code>node_modules</code> again
17and reinstalling. However, <code>node_modules</code> is a beast of its own. It creates so
18many files that OS has a problem counting them when you check the folder
19contents for size.<p>I wanted something similar to Dropbox. I could without the instant syncing but
20it would need to be fast and had the option for me to exclude folders like
21<code>node_modules, .venv, .git</code> and folders like that.<p>I went on a hunt for an alternative to <a href=https://www.dropbox.com/>Dropbox</a>
22and found:<ul><li><a href=https://tresorit.com/>Tresorit</a><li><a href=https://sync.com>Sync.com</a><li><a href=https://www.box.com/>Box</a></ul><p>You know, the usual list of suspects. I didn't include <a href=https://drive.google.com>Google
23drive</a> or <a href=https://onedrive.live.com/>One drive</a>
24since they are even more draconian than Dropbox.<blockquote><p>All this does not stem from me being paranoid but recently these companies
25have became more and more aggressive and they keep violating our privacy when
26they share our data with 3rd party services. It is getting out of control.</blockquote><p>So, my main problem was still there. No way of excluding a specific folder from
27syncing. And before we go into "<em>But you have git, isn't that enough?</em>", I must
28say, that many of the files (PDFs, spreadsheets, etc) I have in a <code>git</code> repo
29don't get pushed upstream to Git and I still want to have them synced across my
30computers.<p>I initially wanted to use <a href=https://linux.die.net/man/1/rsync>rsync</a> but I would
31need to then have a remote VPS or transfer between my computers directly. I
32wanted a solution where all my files could be accessible to me without my
33machine.<blockquote><p><strong>WARNING: This solution will cost you money!</strong> DigitalOcean Spaces are $5 per
34month and there are some bandwidth limitations and if you go beyond that you get
35billed additionally.</blockquote><p>Then I remembered that I could use something like
36<a href=https://en.wikipedia.org/wiki/Amazon_S3>S3</a> since it has versioning and is
37fully managed. I didn't want to go down the AWS rabbit hole with this so I
38choose <a href=https://www.digitalocean.com/products/spaces/>DigitalOcean Spaces</a>.<p>Then I needed a command-line tool to sync between source and target. I found
39this nice tool <a href=https://s3tools.org/s3cmd>s3cmd</a> and it is in the Ubuntu
40repositories.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install s3cmd
41</span></span></code></pre><p>After installation will I create a new Space bucket on DigitalOcean. Remember
42the zone you will choose because you will need it when you will configure
43<code>s3cmd</code>.<p>Then I visited <a href=https://cloud.digitalocean.com/account/api/tokens>Digitalocean Applications &
44API</a> and generated <strong>Spaces
45access keys</strong>. Save both key and secret somewhere safe because when you will
46leave the page secret will not be available anymore to you and you will need to
47re-generate it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># enter your key and secret and correct endpoint</span>
48</span></span><span style=display:flex><span><span style=color:green># my endpoint is ams3.digitaloceanspaces.com because</span>
49</span></span><span style=display:flex><span><span style=color:green># I created my bucket in Amsterdam regiin</span>
50</span></span><span style=display:flex><span>s3cmd --configure
51</span></span></code></pre><p>After that I played around with options for <code>s3cmd</code> and got to the following
52command.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># I executed this command from my projects folder</span>
53</span></span><span style=display:flex><span>cd projects
54</span></span><span style=display:flex><span>s3cmd sync --delete-removed --exclude <span style=color:#a31515>&#39;node_modules/*&#39;</span> --exclude <span style=color:#a31515>&#39;.git/*&#39;</span> --exclude <span style=color:#a31515>&#39;.venv/*&#39;</span> ./ s3://my-bucket-name/projects/
55</span></span></code></pre><p>When syncing int he other direction you will need to change the order of the
56<code>SOURCE</code> and <code>TARGET</code> to <code>s3://my-bucket-name/projects/</code> and <code>./</code>.<blockquote><p>Be sure that all the paths have trailing slash so that sync knows that this
57are directories.</blockquote><p>I am planning to implement some sort of a <code>.ignore</code> file that will enable me to
58have a project-specific exclude options.<p>I am currently running this every hour as a cronjob which is perfectly fine for
59now when I am testing how this whole thing works and how it all will turn out.<p>I have also created a small Gnome extension which is still very unstable, but
60when/if this whole experiment pays of I will share on Github.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
61<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
62with me
63<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
64the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
65otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/disable-mouse-wake-from-suspend-with-systemd-service.html b/public/disable-mouse-wake-from-suspend-with-systemd-service.html
deleted file mode 100755
index 9a181d9..0000000
--- a/public/disable-mouse-wake-from-suspend-with-systemd-service.html
+++ /dev/null
@@ -1,51 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAA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AAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Disable mouse wake from suspend with systemd service</title><meta name=description content="I recently bought ThinkPadX220 just as ajoke on eBay to test Linux distributions and play around with things and notdestroy my main machine."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Disable mouse wake from suspend with systemd service</h1><p>Aug 15, 2020<div><p>I recently bought <a href=https://www.laptopmag.com/reviews/laptops/lenovo-thinkpad-x220>ThinkPad
7X220</a> just as a
8joke on eBay to test Linux distributions and play around with things and not
9destroy my main machine. Little to my knowledge I felt in love with it. Man,
10they really made awesome machines back then.<p>After changing disk that came with it to SSD and installing Ubuntu to test if 
11everything works I noticed that even after a single touch of my external mouse
12the system would wake up from sleep even though the lid was shut down.<p>I wouldn't even noticed it if laptop didn't have <a href="https://support.lenovo.com/lk/en/solutions/~/media/Images/ContentImages/p/pd025386_x1_status_03.ashx?w=426&amp;h=262">LED
13sleep indicator</a>.
14I already had a bad experience with Linux and it's power management. I had a
15<a href=https://www.pcmag.com/reviews/dell-inspiron-15-7537>Dell Inspiron 7537</a> laptop
16with a touchscreen and while traveling it decided to wake up and started cooking
17in my backpack to the point that the digitizer responsible for touch actually
18glue off and the whole screen got wrecked. So, I am a bit touchy about this.<p>I went on solution hunting and to my surprise there is no easy way to disable
19specific devices to perform wake up. Why is this not under the power management 
20tab in setting is really strange.<p>After googling for a solution I found <a href=https://codetrips.com/2020/03/18/ubuntu-disable-mouse-wake-from-suspend/>this nice article describing the
21solution</a>
22that worked for me. The only problem with this solution was that he added his
23solution to <code>.bashrc</code> and this triggers <code>sudo</code> that asks for a password each
24time new terminal is opened, which get annoying quickly since I open a lot of
25terminals all the time.<p>I followed his instructions and got to solution <code>sudo sh -c "echo 'disabled' > /sys/bus/usb/devices/2-1.1/power/wakeup"</code>.<p>I created a system service file <code>sudo nano /etc/systemd/system/disable-mouse-wakeup.service</code> and removed <code>sudo</code> and
26replaced <code>sh</code> with <code>/usr/bin/sh</code> and pasted all that in <code>ExecStart</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>[Unit]</span>
27</span></span><span style=display:flex><span>Description=<span style=color:#a31515>Disables wakeup on mouse event</span>
28</span></span><span style=display:flex><span>After=<span style=color:#a31515>network.target</span>
29</span></span><span style=display:flex><span>StartLimitIntervalSec=<span style=color:#a31515>0</span>
30</span></span><span style=display:flex><span>
31</span></span><span style=display:flex><span><span style=color:#00f>[Service]</span>
32</span></span><span style=display:flex><span>Type=<span style=color:#a31515>simple</span>
33</span></span><span style=display:flex><span>Restart=<span style=color:#a31515>always</span>
34</span></span><span style=display:flex><span>RestartSec=<span style=color:#a31515>1</span>
35</span></span><span style=display:flex><span>User=<span style=color:#a31515>root</span>
36</span></span><span style=display:flex><span>ExecStart=<span style=color:#a31515>/usr/bin/sh -c &#34;echo &#39;disabled&#39; &gt; /sys/bus/usb/devices/2-1.1/power/wakeup&#34;</span>
37</span></span><span style=display:flex><span>
38</span></span><span style=display:flex><span><span style=color:#00f>[Install]</span>
39</span></span><span style=display:flex><span>WantedBy=<span style=color:#a31515>multi-user.target</span>
40</span></span></code></pre><p>After that I enabled, started and checked status of service.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo systemctl enable disable-mouse-wakeup.service
41</span></span><span style=display:flex><span>sudo systemctl start disable-mouse-wakeup.service
42</span></span><span style=display:flex><span>sudo systemctl status disable-mouse-wakeup.service
43</span></span></code></pre><p>This will permanently disable that device from wakeing up you computer on boot.
44If you have many devices you would like to surpress from waking up your machine
45I would create a shell script and call that instead of direclty doing it in
46service file.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
47<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
48with me
49<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
50the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
51otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/download-youtube-videos.html b/public/download-youtube-videos.html
deleted file mode 100755
index 2a9c1bf..0000000
--- a/public/download-youtube-videos.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Download list of YouTube files</title><meta name=description content="If you need to download a list of YouTube videos and don&amp;#39;t want to download theactual YouTube list (which yt-dlp supports), you can use the following method."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Download list of YouTube files</h1><p>May 13, 2023<div><p>If you need to download a list of YouTube videos and don't want to download the
7actual YouTube list (which <code>yt-dlp</code> supports), you can use the following method.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>// Used to get list of raw URL&#39;s from YouTube&#39;s video tab&#39;.
8</span></span></span><span style=display:flex><span><span style=color:green>// Copy them into videos.txt.
9</span></span></span><span style=display:flex><span><span style=color:green></span>document.querySelectorAll(<span style=color:#a31515>&#39;#contents a.ytd-thumbnail.style-scope.ytd-thumbnail&#39;</span>).forEach(el =&gt; console.log(el.href))
10</span></span></code></pre><p>Download and install <a href=https://github.com/yt-dlp/yt-dlp>https://github.com/yt-dlp/yt-dlp</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># This will download all videos in videos.txt.</span>
11</span></span><span style=display:flex><span>yt-dlp --batch-file videos.txt -N <span style=color:#a31515>`</span>nproc<span style=color:#a31515>`</span> -f webm
12</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
13<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
14with me
15<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
16the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
17otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/drawing-pixels-in-plan9.html b/public/drawing-pixels-in-plan9.html
deleted file mode 100755
index 6940a2a..0000000
--- a/public/drawing-pixels-in-plan9.html
+++ /dev/null
@@ -1,63 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Drawing Pixels in Plan9</title><meta name=description content="I have started exploring Plan9&amp;#39;s graphics capabilities."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Drawing Pixels in Plan9</h1><p>May 27, 2023<div><p>I have started exploring Plan9's graphics capabilities. This is a hello world
7alternative for drawing that draws a yellow square on a blue background.<p>More information:<ul><li><a href=https://github.com/0intro/plan9/blob/main/sys/include/draw.h>draw.h header file</a>
8contains all the drawing functions<li><a href=https://9fans.github.io/plan9port/man/man3/draw.html>draw man page</a>
9has a bit more digestable descriptions of the draw functions<li><a href=https://9fans.github.io/plan9port/man/man3/graphics.html>graphics man page</a>
10has a bit more digestable descriptions of the graphics functions<li><a href=https://9fans.github.io/plan9port/man/man3/>all man pages</a>
11can be a valuable resource for learning about the system</ul><p><img src=/notes/plan9-pixels.png alt="Plan9 Howdy World!"><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>// main.c
12</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;u.h&gt;</span><span style=color:#00f>
13</span></span></span><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;libc.h&gt;</span><span style=color:#00f>
14</span></span></span><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;draw.h&gt;</span><span style=color:#00f>
15</span></span></span><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;cursor.h&gt;</span><span style=color:#00f>
16</span></span></span><span style=display:flex><span><span style=color:#00f></span>
17</span></span><span style=display:flex><span><span style=color:#2b91af>void</span>
18</span></span><span style=display:flex><span>main()
19</span></span><span style=display:flex><span>{
20</span></span><span style=display:flex><span> ulong co;
21</span></span><span style=display:flex><span> Image *im, *bg;
22</span></span><span style=display:flex><span> co = 0x0000FFFF;
23</span></span><span style=display:flex><span>
24</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (initdraw(nil, nil, argv0) &lt; 0)
25</span></span><span style=display:flex><span> {
26</span></span><span style=display:flex><span> sysfatal(<span style=color:#a31515>&#34;%s: %r&#34;</span>, argv0);
27</span></span><span style=display:flex><span> }
28</span></span><span style=display:flex><span>
29</span></span><span style=display:flex><span> im = allocimage(display, Rect(0, 0, 300, 300), RGB24, 0, DYellow);
30</span></span><span style=display:flex><span> bg = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1, co);
31</span></span><span style=display:flex><span>
32</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (im == nil || bg == nil)
33</span></span><span style=display:flex><span> {
34</span></span><span style=display:flex><span> sysfatal(<span style=color:#a31515>&#34;not enough memory&#34;</span>);
35</span></span><span style=display:flex><span> }
36</span></span><span style=display:flex><span>
37</span></span><span style=display:flex><span> draw(screen, screen-&gt;r, bg, nil, ZP);
38</span></span><span style=display:flex><span> draw(screen, screen-&gt;r, im, nil, Pt(-40, -40));
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span> flushimage(display, Refnone);
41</span></span><span style=display:flex><span>
42</span></span><span style=display:flex><span> <span style=color:green>// Wait 10 seconds before exiting.
43</span></span></span><span style=display:flex><span><span style=color:green></span> sleep(10000);
44</span></span><span style=display:flex><span>
45</span></span><span style=display:flex><span> exits(nil);
46</span></span><span style=display:flex><span>}
47</span></span></code></pre><p>And then compile with <code>mk</code> (mkfile below):<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># mkfile
48</span></span></span><span style=display:flex><span><span style=color:green></span><span>&lt;/$objtype/mkfile</span>
49</span></span><span style=display:flex><span>
50</span></span><span style=display:flex><span>RC=/rc/bin
51</span></span><span style=display:flex><span>BIN=/$objtype/bin
52</span></span><span style=display:flex><span>MAN=/sys/man
53</span></span><span style=display:flex><span>
54</span></span><span style=display:flex><span>main:
55</span></span><span style=display:flex><span> $CC $CFLAGS main.c
56</span></span><span style=display:flex><span> $LD $LDFLAGS -o main main.$O
57</span></span></code></pre><p>And run with <code>./main</code>. To exit the program, press <code>Delete key</code> (strange but this
58is the alternative for Ctrl+C).<p><em>This is <strong>very cool</strong> indeed!</em></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
59<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
60with me
61<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
62the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
63otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/easy-time-took-in-bash.html b/public/easy-time-took-in-bash.html
deleted file mode 100755
index e46ab6c..0000000
--- a/public/easy-time-took-in-bash.html
+++ /dev/null
@@ -1,23 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-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7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Easy measure time took in a bash script</title><meta name=description content="In Bash, the $SECONDS variable is a special variable that automatically keepstrack of the number of seconds since the current shell or script startedexecuting."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Easy measure time took in a bash script</h1><p>May 28, 2023<div><p>In Bash, the <code>$SECONDS</code> variable is a special variable that automatically keeps
7track of the number of seconds since the current shell or script started
8executing. It starts counting from the moment the script begins running.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/bin/bash
9</span></span></span><span style=display:flex><span><span style=color:#00f></span>
10</span></span><span style=display:flex><span><span style=color:green># Reset the timer to zero.</span>
11</span></span><span style=display:flex><span>SECONDS=0
12</span></span><span style=display:flex><span>
13</span></span><span style=display:flex><span><span style=color:green># Do something.</span>
14</span></span><span style=display:flex><span>sleep 5
15</span></span><span style=display:flex><span>
16</span></span><span style=display:flex><span><span style=color:green># Print the time elapsed.</span>
17</span></span><span style=display:flex><span>echo <span style=color:#a31515>&#34;Time taken: </span>$SECONDS<span style=color:#a31515> seconds&#34;</span>
18</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
19<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
20with me
21<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
22the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
23otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/encoding-binary-data-into-dna-sequence.html b/public/encoding-binary-data-into-dna-sequence.html
deleted file mode 100755
index 8da76da..0000000
--- a/public/encoding-binary-data-into-dna-sequence.html
+++ /dev/null
@@ -1,186 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Encoding binary data into DNA sequence</title><meta name=description content="Initial thoughtsImagine a world where you could go outside and take a leaf from a tree and putit through your personal DNA sequencer and get data like music, videos orcomputer programs from it."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Encoding binary data into DNA sequence</h1><p>Jan 3, 2019<div><h2 id=initial-thoughts>Initial thoughts</h2><p>Imagine a world where you could go outside and take a leaf from a tree and put
7it through your personal DNA sequencer and get data like music, videos or
8computer programs from it. Well, this is all possible now. It was not done on a
9large scale because it is quite expensive to create DNA strands but it's
10possible.<p>Encoding data into DNA sequence is relatively simple process once you understand
11the relationship between binary data and nucleotides and scientists have been
12making large leaps in this field in order to provide viable long-term storage
13solution for our data that would potentially survive our specie if case of
14global disaster. We could imprint all the world's knowledge into plants and
15ensure the survival of our knowledge.<p>More optimistic usage for this technology would be easier storage of ever
16growing data we produce every day. Once machines for sequencing DNA become fast
17enough and cheaper this could mean the next evolution of storing data and
18abandoning classical hard and solid state drives in data warehouses.<p>As we currently stand this is still not viable but it is quite an amazing and
19cool technology.<p>My interests in this field are purely in encoding processes and experimental
20testing mainly because I don't have the access to this expensive machines. My
21initial goal was to create a toolkit that can be used by everybody to encode
22their data into a proper DNA sequence.<h2 id=glossary>Glossary</h2><p><strong>deoxyribose</strong> A five-carbon sugar molecule with a hydrogen atom rather than a
23hydroxyl group in the 2′ position; the sugar component of DNA nucleotides.<p><strong>double helix</strong> The molecular shape of DNA in which two strands of nucleotides
24wind around each other in a spiral shape.<p><strong>nitrogenous base</strong> A nitrogen-containing molecule that acts as a base; often
25referring to one of the purine or pyrimidine components of nucleic acids.<p><strong>phosphate group</strong> A molecular group consisting of a central phosphorus atom
26bound to four oxygen atoms.<p><strong>RGB</strong> The RGB color model is an additive color model in which red, green and
27blue light are added together in various ways to reproduce a broad array of
28colors.<p><strong>GCC</strong> The GNU Compiler Collection is a compiler system produced by the GNU
29Project supporting various programming languages.<h2 id=data-encoding>Data encoding</h2><p><strong>TL;DR:</strong> Encoding involves the use of a code to change original data into a
30form that can be used by an external process.<p>Encoding is the process of converting data into a format required for a number
31of information processing needs, including:<ul><li>Program compiling and execution<li>Data transmission, storage and compression/decompression<li>Application data processing, such as file conversion</ul><p>Encoding can have two meanings:<ul><li>In computer technology, encoding is the process of applying a specific code,
32such as letters, symbols and numbers, to data for conversion into an
33equivalent cipher.<li>In electronics, encoding refers to analog to digital conversion.</ul><h2 id=quick-history-of-dna>Quick history of DNA</h2><ul><li><strong>1869</strong> - Friedrich Miescher identifies "nuclein".<li><strong>1900s</strong> - The Eugenics Movement.<li><strong>1900</strong> – Mendel's theories are rediscovered by researchers.<li><strong>1944</strong> - Oswald Avery identifies DNA as the 'transforming principle'.<li><strong>1952</strong> - Rosalind Franklin photographs crystallized DNA fibres.<li><strong>1953</strong> - James Watson and Francis Crick discover the double helix structure of DNA.<li><strong>1965</strong> - Marshall Nirenberg is the first person to sequence the bases in each codon.<li><strong>1983</strong> - Huntington's disease is the first mapped genetic disease.<li><strong>1990</strong> - The Human Genome Project begins.<li><strong>1995</strong> - Haemophilus Influenzae is the first bacterium genome sequenced.<li><strong>1996</strong> - Dolly the sheep is cloned.<li><strong>1999</strong> - First human chromosome is decoded.<li><strong>2000</strong> – Genetic code of the fruit fly is decoded.<li><strong>2002</strong> – Mouse is the first mammal to have its genome decoded.<li><strong>2003</strong> – The Human Genome Project is completed.<li><strong>2013</strong> – DNA Worldwide and Eurofins Forensic discover identical twins have differences in their genetic makeup.</ul><h2 id=what-is-dna>What is DNA?</h2><p>Deoxyribonucleic acid, a self-replicating material which is <strong>present in nearly
34all living organisms</strong> as the main constituent of chromosomes. It is the
35<strong>carrier of genetic information</strong>.<blockquote><p>The nitrogen in our DNA, the calcium in our teeth, the iron in our blood,
36the carbon in our apple pies were made in the interiors of collapsing stars.
37We are made of starstuff.
38<strong>-- Carl Sagan, Cosmos</strong></blockquote><p>The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases
39(cytosine (C), thymine (T), adenine (A), guanine (G)), and a phosphate.
40Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine
41bases. The sugar and the base together are called a nucleoside.<p><img src=/assets/dna-sequence/dna-basics.jpg alt=DNA><p><em>DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and
42cytosine pairs with guanine. (credit a: modification of work by Jerome Walker,
43Dennis Myts)</em><h2 id=encode-binary-data-into-dna-sequence>Encode binary data into DNA sequence</h2><p>As an input file you can use any file you want:<ul><li>ASCII files,<li>Compiled programs,<li>Multimedia files (MP3, MP4, MVK, etc),<li>Images,<li>Database files,<li>etc.</ul><p>Note: If you would copy all the bytes from RAM to file or pipe data to file you
44could encode also this data as long as you provide file pointer to the encoder.<h3 id=basic-encoding>Basic Encoding</h3><p>As already mentioned, the Basic Encoding is based on a simple mapping. Since DNA
45is composed of 4 nucleotides (Adenine, Cytosine, Guanine, Thymine; usually
46referred using the first letter). Using this technique we can encode<p>$$ log_2(4) = log_2(2^2) = 2 bits $$<p>using a single nucleotide. In this way, we are able to use the 4 bases that
47compose the DNA strand to encode each byte of data.<table><thead><tr><th>Two bits<th>Nucleotides<tbody><tr><td>00<td><strong>A</strong> (Adenine)<tr><td>10<td><strong>G</strong> (Guanine)<tr><td>01<td><strong>C</strong> (Cytosine)<tr><td>11<td><strong>T</strong> (Thymine)</table><p>With this in mind we can simply encode any data by using two-bit to Nucleotides
48conversion.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{ Algorithm 1: Naive byte array to DNA encode }
49</span></span><span style=display:flex><span>procedure EncodeToDNASequence(f) string
50</span></span><span style=display:flex><span>begin
51</span></span><span style=display:flex><span> enc string
52</span></span><span style=display:flex><span> <span style=color:#00f>while</span> <span style=color:#00f>not</span> eof(f) do
53</span></span><span style=display:flex><span> c byte := buffer[0] { Read 1 byte <span style=color:#00f>from</span> buffer }
54</span></span><span style=display:flex><span> bin integer := sprintf(<span style=color:#a31515>&#39;08b&#39;</span>, c) { Convert to string binary }
55</span></span><span style=display:flex><span> <span style=color:#00f>for</span> e <span style=color:#00f>in</span> range[0, 2, 4, 6] do
56</span></span><span style=display:flex><span> <span style=color:#00f>if</span> e[0] == 48 <span style=color:#00f>and</span> e[1] == 48 then { 0x00 - A (Adenine) }
57</span></span><span style=display:flex><span> enc += <span style=color:#a31515>&#39;A&#39;</span>
58</span></span><span style=display:flex><span> <span style=color:#00f>else</span> <span style=color:#00f>if</span> e[0] == 48 <span style=color:#00f>and</span> e[1] == 49 then { 0x01 - G (Guanine) }
59</span></span><span style=display:flex><span> enc += <span style=color:#a31515>&#39;G&#39;</span>
60</span></span><span style=display:flex><span> <span style=color:#00f>else</span> <span style=color:#00f>if</span> e[0] == 49 <span style=color:#00f>and</span> e[1] == 48 then { 0x10 - C (Cytosine) }
61</span></span><span style=display:flex><span> enc += <span style=color:#a31515>&#39;C&#39;</span>
62</span></span><span style=display:flex><span> <span style=color:#00f>else</span> <span style=color:#00f>if</span> e[0] == 49 <span style=color:#00f>and</span> e[1] == 49 then { 0x11 - T (Thymine) }
63</span></span><span style=display:flex><span> enc += <span style=color:#a31515>&#39;T&#39;</span>
64</span></span><span style=display:flex><span> <span style=color:#00f>return</span> enc { Return DNA sequence }
65</span></span><span style=display:flex><span>end
66</span></span></code></pre><p>Another encoding would be <strong>Goldman encoding</strong>. Using this encoding helps with
67Nonsense mutation (amino acids replaced by a stop codon) that occurs and is the
68most problematic during translation because it leads to truncated amino acid
69sequences, which in turn results in truncated proteins.<p><a href="https://www.youtube.com/watch?v=a4PiGWNsIEU">Where to store big data? In DNA: Nick Goldman at TEDxPrague</a><h3 id=fasta-file-format>FASTA file format</h3><p>In bioinformatics, FASTA format is a text-based format for representing either
70nucleotide sequences or peptide sequences, in which nucleotides or amino acids
71are represented using single-letter codes. The format also allows for sequence
72names and comments to precede the sequences. The format originates from the
73FASTA software package, but has now become a standard in the field of
74bioinformatics.<p>The first line in a FASTA file started either with a ">" (greater-than) symbol
75or, less frequently, a ";" (semicolon) was taken as a comment. Subsequent lines
76starting with a semicolon would be ignored by software. Since the only comment
77used was the first, it quickly became used to hold a summary description of the
78sequence, often starting with a unique library accession number, and with time
79it has become commonplace to always use ">" for the first line and to not use
80";" comments (which would otherwise be ignored).<pre><code>;LCBO - Prolactin precursor - Bovine
81; a sample sequence in FASTA format
82MDSKGSSQKGSRLLLLLVVSNLLLCQGVVSTPVCPNGPGNCQVSLRDLFDRAVMVSHYIHDLSS
83EMFNEFDKRYAQGKGFITMALNSCHTSSLPTPEDKEQAQQTHHEVLMSLILGLLRSWNDPLYHL
84VTEVRGMKGAPDAILSRAIEIEEENKRLLEGMEMIFGQVIPGAKETEPYPVWSGLPSLQTKDED
85ARYSAFYNLLHCLRRDSSKIDTYLKLLNCRIIYNNNC*
86
87&gt;MCHU - Calmodulin - Human, rabbit, bovine, rat, and chicken
88ADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTID
89FPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREA
90DIDGDGQVNYEEFVQMMTAK*
91
92&gt;gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
93LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
94EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
95LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
96GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
97IENY
98</code></pre><p>FASTA format was extended by <a href=https://en.wikipedia.org/wiki/FASTQ_format>FASTQ</a>
99format from the <a href=https://www.sanger.ac.uk/>Sanger Centre</a> in Cambridge.<h3 id=png-encoded-dna-sequence>PNG encoded DNA sequence</h3><table><thead><tr><th>Nucleotides<th>RGB<th>Color name<tbody><tr><td>A ➞ Adenine<td>(0,0,255)<td>Blue<tr><td>G ➞ Guanine<td>(0,100,0)<td>Green<tr><td>C ➞ Cytosine<td>(255,0,0)<td>Red<tr><td>T ➞ Thymine<td>(255,255,0)<td>Yellow</table><p>With this in mind we can create a simple algorithm to create PNG representation
100of a DNA sequence.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{ Algorithm 2: Naive DNA to PNG encode <span style=color:#00f>from</span> FASTA file }
101</span></span><span style=display:flex><span>procedure EncodeDNASequenceToPNG(f)
102</span></span><span style=display:flex><span>begin
103</span></span><span style=display:flex><span> i image
104</span></span><span style=display:flex><span> <span style=color:#00f>while</span> <span style=color:#00f>not</span> eof(f) do
105</span></span><span style=display:flex><span> c char := buffer[0] { Read 1 char <span style=color:#00f>from</span> buffer }
106</span></span><span style=display:flex><span> case c of
107</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;A&#39;</span>: color := RGB(0, 0, 255) { Blue }
108</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;G&#39;</span>: color := RGB(0, 100, 0) { Green }
109</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;C&#39;</span>: color := RGB(255, 0, 0) { Red }
110</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;T&#39;</span>: color := RGB(255, 255, 0) { Yellow }
111</span></span><span style=display:flex><span> drawRect(i, [x, y], color)
112</span></span><span style=display:flex><span> save(i) { Save PNG image }
113</span></span><span style=display:flex><span>end
114</span></span></code></pre><h2 id=encoding-text-file-in-practice>Encoding text file in practice</h2><p>In this example we will take a simple text file as our input stream for
115encoding. This file will have a quote from Niels Bohr and saved as txt file.<blockquote><p>How wonderful that we have met with a paradox. Now we have some hope of
116making progress.
117― Niels Bohr</blockquote><p>First we encode text file into FASTA file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>./dnae-encode -i quote.txt -o quote.fa
118</span></span><span style=display:flex><span>2019/01/10 00:38:29 Gathering input file stats
119</span></span><span style=display:flex><span>2019/01/10 00:38:29 Starting encoding ...
120</span></span><span style=display:flex><span> 106 B / 106 B [==================================] 100.00% 0s
121</span></span><span style=display:flex><span>2019/01/10 00:38:29 Saving to FASTA file ...
122</span></span><span style=display:flex><span>2019/01/10 00:38:29 Output FASTA file length is 438 B
123</span></span><span style=display:flex><span>2019/01/10 00:38:29 Process took 987.263µs
124</span></span><span style=display:flex><span>2019/01/10 00:38:29 Done ...
125</span></span></code></pre><p>Output of <code>quote.fa</code> file contains the encoded DNA sequence in ASCII format.<pre><code>&gt;SEQ1
126GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA
127GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA
128ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA
129ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT
130GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT
131GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC
132AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC
133AACC
134</code></pre><p>Then we encode FASTA file from previous operation to encode this data into PNG.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>./dnae-png -i quote.fa -o quote.png
135</span></span><span style=display:flex><span>2019/01/10 00:40:09 Gathering input file stats ...
136</span></span><span style=display:flex><span>2019/01/10 00:40:09 Deconstructing FASTA file ...
137</span></span><span style=display:flex><span>2019/01/10 00:40:09 Compositing image file ...
138</span></span><span style=display:flex><span> 424 / 424 [==================================] 100.00% 0s
139</span></span><span style=display:flex><span>2019/01/10 00:40:09 Saving output file ...
140</span></span><span style=display:flex><span>2019/01/10 00:40:09 Output image file length is 1.1 kB
141</span></span><span style=display:flex><span>2019/01/10 00:40:09 Process took 19.036117ms
142</span></span><span style=display:flex><span>2019/01/10 00:40:09 Done ...
143</span></span></code></pre><p>After encoding into PNG format this file looks like this.<p><img src=/assets/dna-sequence/quote.png alt="Encoded Quote in PNG format"><p>The larger the input stream is the larger the PNG file would be.<p>Compiled basic Hello World C program with
144<a href=https://www.gnu.org/software/gcc/>GCC</a> would <a href=/assets/dna-sequence/sample.png>look
145like</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>// gcc -O3 -o sample sample.c
146</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;stdio.h&gt;</span><span style=color:#00f>
147</span></span></span><span style=display:flex><span><span style=color:#00f></span>
148</span></span><span style=display:flex><span>main() {
149</span></span><span style=display:flex><span> printf(<span style=color:#a31515>&#34;Hello, world!</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span>);
150</span></span><span style=display:flex><span> <span style=color:#00f>return</span> 0;
151</span></span><span style=display:flex><span>}
152</span></span></code></pre><h2 id=toolkit-for-encoding-data>Toolkit for encoding data</h2><p>I have created a toolkit with two main programs:<ul><li>dnae-encode (encodes file into FASTA file)<li>dnae-png (encodes FASTA file into PNG)</ul><p>Toolkit with full source code is available on
153<a href=https://github.com/mitjafelicijan/dna-encoding>github.com/mitjafelicijan/dna-encoding</a>.<h3 id=dnae-encode>dnae-encode</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>&gt; ./dnae-encode --help
154</span></span><span style=display:flex><span>usage: dnae-encode --input=INPUT [&lt;flags&gt;]
155</span></span><span style=display:flex><span>
156</span></span><span style=display:flex><span>A command-line application that encodes file into DNA sequence.
157</span></span><span style=display:flex><span>
158</span></span><span style=display:flex><span>Flags:
159</span></span><span style=display:flex><span> --help Show context-sensitive help (also try --help-long and --help-man).
160</span></span><span style=display:flex><span> -i, --input=INPUT Input file (ASCII or binary) which will be encoded into DNA sequence.
161</span></span><span style=display:flex><span> -o, --output=<span style=color:#a31515>&#34;out.fa&#34;</span> Output file which stores DNA sequence in FASTA format.
162</span></span><span style=display:flex><span> -s, --sequence=SEQ1 The description line (defline) or header/identifier line, gives a name and/or a unique identifier <span style=color:#00f>for</span> the sequence.
163</span></span><span style=display:flex><span> -c, --columns=60 Row characters length (no more than 120 characters). Devices preallocate fixed line sizes in software.
164</span></span><span style=display:flex><span> --version Show application version.
165</span></span></code></pre><h3 id=dnae-png>dnae-png</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>&gt; ./dnae-png --help
166</span></span><span style=display:flex><span>usage: dnae-png --input=INPUT [&lt;flags&gt;]
167</span></span><span style=display:flex><span>
168</span></span><span style=display:flex><span>A command-line application that encodes FASTA file into PNG image.
169</span></span><span style=display:flex><span>
170</span></span><span style=display:flex><span>Flags:
171</span></span><span style=display:flex><span> --help Show context-sensitive help (also try --help-long and --help-man).
172</span></span><span style=display:flex><span> -i, --input=INPUT Input FASTA file which will be encoded into PNG image.
173</span></span><span style=display:flex><span> -o, --output=<span style=color:#a31515>&#34;out.png&#34;</span> Output file in PNG format that represents DNA sequence in graphical way.
174</span></span><span style=display:flex><span> -s, --size=10 Size of pairings of DNA bases on image in pixels (lower resolution lower file size).
175</span></span><span style=display:flex><span> --version Show application version.
176</span></span></code></pre><h2 id=benchmarks>Benchmarks</h2><p>First we generate some binary sample data with dd.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>dd <span style=color:#00f>if</span>=&lt;(openssl enc -aes-256-ctr -pass pass:<span style=color:#a31515>&#34;</span><span style=color:#00f>$(</span>dd <span style=color:#00f>if</span>=/dev/urandom bs=128 count=1 2&gt;/dev/null | base64<span style=color:#00f>)</span><span style=color:#a31515>&#34;</span> -nosalt &lt; /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock
177</span></span></code></pre><p>Our freshly generated 1KB file looks something like this (its full of garbage
178data as intended).<p><img src=/assets/dna-sequence/sample-binary-file.png alt="Sample binary file 1KB"><p>We create following binary files:<ul><li>1KB.bin<li>10KB.bin<li>100KB.bin<li>1MB.bin<li>10MB.bin<li>100MB.bin</ul><p>After this we create FASTA files for all the binary files by encoding them
179into DNA sequence.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>./dnae-encode -i 100MB.bin -o 100MB.fa
180</span></span></code></pre><p>Then we GZIP all the FASTA files to see how much the can be compressed.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>gzip -9 &lt; 10MB.fa &gt; 10MB.fa.gz
181</span></span></code></pre><p><a href=/dna-sequence/benchmarks.ods>Download ODS file with benchmarks</a>.<p><img src=/assets/dna-sequence/chart-1.png alt="Sample binary file 1KB"><p><img src=/assets/dna-sequence/chart-2.png alt="Sample binary file 1KB"><h2 id=references>References</h2><ul><li><a href=https://www.techopedia.com/definition/948/encoding>https://www.techopedia.com/definition/948/encoding</a><li><a href=https://www.dna-worldwide.com/resource/160/history-dna-timeline>https://www.dna-worldwide.com/resource/160/history-dna-timeline</a><li><a href=https://opentextbc.ca/biology/chapter/9-1-the-structure-of-dna/>https://opentextbc.ca/biology/chapter/9-1-the-structure-of-dna/</a><li><a href=https://arxiv.org/abs/1801.04774>https://arxiv.org/abs/1801.04774</a><li><a href=https://en.wikipedia.org/wiki/FASTA_format>https://en.wikipedia.org/wiki/FASTA_format</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
182<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
183with me
184<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
185the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
186otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/esp8266-and-micropython-guide.html b/public/esp8266-and-micropython-guide.html
deleted file mode 100755
index 6054a2b..0000000
--- a/public/esp8266-and-micropython-guide.html
+++ /dev/null
@@ -1,96 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/I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AAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Getting started with MicroPython and ESP8266</title><meta name=description content="IntroductionA while ago I bought someESP8266 andESP32 dev boards to playaround with and I finally found a project to try it out."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Getting started with MicroPython and ESP8266</h1><p>Sep 6, 2020<div><h2 id=introduction>Introduction</h2><p>A while ago I bought some
7<a href=https://www.espressif.com/en/products/socs/esp8266>ESP8266</a> and
8<a href=https://www.espressif.com/en/products/socs/esp32>ESP32</a> dev boards to play
9around with and I finally found a project to try it out.<p>For my project, I used <a href=https://www.espressif.com/en/products/socs/esp32>ESP32</a>
10but I could easily choose
11<a href=https://www.espressif.com/en/products/socs/esp8266>ESP8266</a>. This guide
12contains which tools I use and how I prepared my workspace to code for
13<a href=https://www.espressif.com/en/products/socs/esp8266>ESP8266</a>.<p><img src=/assets/esp8366-micropython/boards.jpg alt="ESP8266 and ESP32 boards"><p>This guide covers:<ul><li>flashing SOC<li>install proper tooling<li>deploying a simple script</ul><blockquote><p>Make sure that you are using <strong>a good USB cable</strong>. I had some problems with
14mine and once I replaced it everything started to work.</blockquote><h2 id=flashing-the-soc>Flashing the SOC</h2><p>Plug your ESP8266 to USB port and check if the device was recognized with
15executing <code>dmesg | grep ch341-uart</code>.<p>Then check if the device is available under <code>/dev/</code> by running <code>ls /dev/ttyUSB*</code>.<blockquote><p><strong>Linux users</strong>: if a device is not available be sure you are in <code>dialout</code>
16group. You can check this by executing <code>groups $USER</code>. You can add a user to
17<code>dialout</code> group with <code>sudo adduser $USER dialout</code>.</blockquote><p>After these conditions are meet go to the navigate to
18<a href=https://micropython.org/download/esp8266/>https://micropython.org/download/esp8266/</a>
19and download <code>esp8266-20200902-v1.13.bin</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>mkdir esp8266-test
20</span></span><span style=display:flex><span>cd esp8266-test
21</span></span><span style=display:flex><span>
22</span></span><span style=display:flex><span>wget https://micropython.org/resources/firmware/esp8266-20200902-v1.13.bin
23</span></span></code></pre><p>After obtaining firmware we will need some tooling to flash the firmware to the
24board.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo pip3 install esptool
25</span></span></code></pre><p>You can read more about <code>esptool</code> at
26<a href=https://github.com/espressif/esptool/>https://github.com/espressif/esptool/</a>.<p>Before flashing the firmware we need to erase the flash on device. Substitute
27<code>USB0</code> with the device listed in output of <code>ls /dev/ttyUSB*</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>esptool.py --port /dev/ttyUSB0 erase_flash
28</span></span></code></pre><p>If flash was successfully erased it is now time to flash the new firmware to it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20200902-v1.13.bin
29</span></span></code></pre><p>If everything went ok you can try accessing MicroPython REPL with <code>screen /dev/ttyUSB0 115200</code> or <code>picocom /dev/ttyUSB0 -b115200</code>.<blockquote><p>Sometimes you will need to press <code>ENTER</code> in <code>screen</code> or <code>picocom</code> to access
30REPL.</blockquote><p>When you are in REPL you can test if all is working properly following steps.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>&gt; <span style=color:#00f>import</span> machine
31</span></span><span style=display:flex><span>&gt; machine.freq()
32</span></span></code></pre><p>This should output a number representing a frequency of the CPU (mine was
33<code>80000000</code>).<p>When you are in <code>screen</code> or <code>picocom</code> these can help you a bit.<table><thead><tr><th>Key<th>Command<tbody><tr><td>CTRL+d<td>preforms soft reboot<tr><td>CTRL+a x<td>exits picocom<tr><td>CTRL+a \<td>exits screen</table><h2 id=install-better-tooling>Install better tooling</h2><p>Now, to make our lives a little bit easier there are couple of additional tools
34that will make this whole experience a little more bearable.<p>There are twq cool ways of uploading local files to SOC flash.<ul><li>ampy → <a href=https://github.com/scientifichackers/ampy>https://github.com/scientifichackers/ampy</a><li>rshell → <a href=https://github.com/dhylands/rshell>https://github.com/dhylands/rshell</a></ul><h3 id=ampy>ampy</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># installing ampy</span>
35</span></span><span style=display:flex><span>sudo pip3 install adafruit-ampy
36</span></span></code></pre><p>Listed below are some common commands I used.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>
37</span></span><span style=display:flex><span><span style=color:green># uploads file to flash</span>
38</span></span><span style=display:flex><span>ampy --delay 2 --port /dev/ttyUSB0 put boot.py
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span><span style=color:green># lists file on flash</span>
41</span></span><span style=display:flex><span>ampy --delay 2 --port /dev/ttyUSB0 ls
42</span></span><span style=display:flex><span>
43</span></span><span style=display:flex><span><span style=color:green># outputs contents of file on flash</span>
44</span></span><span style=display:flex><span>ampy --delay 2 --port /dev/ttyUSB0 cat boot.py
45</span></span></code></pre><blockquote><p>I added <code>delay</code> of 2 seconds because I had problems with executing commands.</blockquote><h3 id=rshell>rshell</h3><p>Even though <code>ampy</code> is a cool tool I opted with <code>rshell</code> in the end since it's
46much more polished and feature rich.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># installing ampy</span>
47</span></span><span style=display:flex><span>sudo pip3 install rshell
48</span></span></code></pre><p>Now that <code>rshell</code> is installed we can connect to the board.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>rshell --buffer-size=30 -p /dev/ttyUSB0 -a
49</span></span></code></pre><p>This will open a shell inside bash and from here you can execute multiple
50commands. You can check what is supported with <code>help</code> once you are inside of a
51shell.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>m@turing ~/Junk/esp8266-test
52</span></span><span style=display:flex><span>$ rshell --buffer-size=30 -p /dev/ttyUSB0 -a
53</span></span><span style=display:flex><span>
54</span></span><span style=display:flex><span>Using buffer-size of 30
55</span></span><span style=display:flex><span>Connecting to /dev/ttyUSB0 (buffer-size 30)...
56</span></span><span style=display:flex><span>Trying to connect to REPL connected
57</span></span><span style=display:flex><span>Testing <span style=color:#00f>if</span> ubinascii.unhexlify exists ... Y
58</span></span><span style=display:flex><span>Retrieving root directories ... /boot.py/
59</span></span><span style=display:flex><span>Setting time ... Sep 06, 2020 23:54:28
60</span></span><span style=display:flex><span>Evaluating board_name ... pyboard
61</span></span><span style=display:flex><span>Retrieving time epoch ... Jan 01, 2000
62</span></span><span style=display:flex><span>Welcome to rshell. Use Control-D (or the exit command) to exit rshell.
63</span></span><span style=display:flex><span>/home/m/Junk/esp8266-test&gt; help
64</span></span><span style=display:flex><span>
65</span></span><span style=display:flex><span>Documented commands (type help &lt;topic&gt;):
66</span></span><span style=display:flex><span>========================================
67</span></span><span style=display:flex><span>args cat connect date edit filesize help mkdir rm shell
68</span></span><span style=display:flex><span>boards cd cp echo exit filetype ls repl rsync
69</span></span><span style=display:flex><span>
70</span></span><span style=display:flex><span>Use Control-D (or the exit command) to exit rshell.
71</span></span></code></pre><blockquote><p>Inside a shell <code>ls</code> will display list of files on your machine. To get list
72of files on flash folder <code>/pyboard</code> is remapped inside the shell. To list files
73on flash you must perform <code>ls /pyboard</code>.</blockquote><h4 id=moving-files-to-flash>Moving files to flash</h4><p>To avoid copying files all the time I used <code>rsync</code> function from the inside of
74<code>rshell</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>rsync . /pyboard
75</span></span></code></pre><h4 id=executing-scripts>Executing scripts</h4><p>It is a pain to continuously reboot the device to trigger <code>/pyboard/boot.py</code> and
76there is a better way of testing local scripts on remote device.<p>Lets assume we have <code>src/freq.py</code> file that displays CPU frequency of a remote
77device.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># src/freq.py</span>
78</span></span><span style=display:flex><span>
79</span></span><span style=display:flex><span><span style=color:#00f>import</span> machine
80</span></span><span style=display:flex><span>print(machine.freq())
81</span></span></code></pre><p>Now lets upload this and execute it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># syncs files to remove device</span>
82</span></span><span style=display:flex><span>rsync ./src /pyboard
83</span></span><span style=display:flex><span>
84</span></span><span style=display:flex><span><span style=color:green># goes into REPL</span>
85</span></span><span style=display:flex><span>repl
86</span></span><span style=display:flex><span>
87</span></span><span style=display:flex><span><span style=color:green># we import file by importing it without .py extension and this will run the script</span>
88</span></span><span style=display:flex><span>&gt; import freq
89</span></span><span style=display:flex><span>
90</span></span><span style=display:flex><span><span style=color:green># CTRL+x will exit REPL</span>
91</span></span></code></pre><h2 id=additional-resources>Additional resources</h2><ul><li><a href=https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/>https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/</a><li><a href=http://docs.micropython.org/en/latest/esp8266/quickref.html>http://docs.micropython.org/en/latest/esp8266/quickref.html</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
92<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
93with me
94<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
95the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
96otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/ewd-manuscripts-ebook.html b/public/ewd-manuscripts-ebook.html
deleted file mode 100755
index da742d9..0000000
--- a/public/ewd-manuscripts-ebook.html
+++ /dev/null
@@ -1,13 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8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AAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Edsger W. Dijkstra Manuscripts ebook</title><meta name=description content="I love reading the original manuscripts of Edsger W."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Edsger W. Dijkstra Manuscripts ebook</h1><p>Jun 1, 2023<div><p>I love reading the original manuscripts of Edsger W. Dijkstra. They are
7available online at the University of Texas at Austin website, but I also found
8MOBI version. I converted it into ePub as well.<p>Downloads:<ul><li><a href=https://files.mitjafelicijan.com/haphazard/ewd-manuscripts.mobi>MOBI version of all Manuscripts</a><li><a href=https://files.mitjafelicijan.com/haphazard/ewd-manuscripts.epub>ePub version of all Manuscripts</a></ul><p>Sources and credits:<ul><li><a href=https://www.cs.utexas.edu/users/EWD/index00xx.html>Original manuscripts from University of Texas at Austin</a><li><a href=https://github.com/evmn/The-Manuscripts-of-Edsger-W.-Dijkstra>Original repository of MOBI version</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
9<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
10with me
11<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
12the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
13otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/extend-lua-with-custom-c.html b/public/extend-lua-with-custom-c.html
deleted file mode 100755
index c27548a..0000000
--- a/public/extend-lua-with-custom-c.html
+++ /dev/null
@@ -1,39 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAA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AAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Extend Lua with custom C functions using Clang</title><meta name=description content="Here is a boilerplate for extending Lua with custom C functions."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Extend Lua with custom C functions using Clang</h1><p>May 23, 2023<div><p>Here is a boilerplate for extending Lua with custom C functions. This requires
7Clang and Lua 5.1 to be installed. GCC can be used instead of Clang, but the
8Makefile will need to be modified.<ul><li><p>nativefunc.c<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;lua.h&gt;</span><span style=color:#00f>
9</span></span></span><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;lauxlib.h&gt;</span><span style=color:#00f>
10</span></span></span><span style=display:flex><span><span style=color:#00f></span>
11</span></span><span style=display:flex><span><span style=color:#00f>static</span> <span style=color:#2b91af>int</span> l_mult50(lua_State *L) {
12</span></span><span style=display:flex><span> <span style=color:#2b91af>double</span> number = luaL_checknumber(L, 1);
13</span></span><span style=display:flex><span> lua_pushnumber(L, number * 50);
14</span></span><span style=display:flex><span> <span style=color:#00f>return</span> 1;
15</span></span><span style=display:flex><span>}
16</span></span><span style=display:flex><span>
17</span></span><span style=display:flex><span><span style=color:#2b91af>int</span> luaopen_nativefunc(lua_State *L) {
18</span></span><span style=display:flex><span> <span style=color:#00f>static</span> <span style=color:#00f>const</span> <span style=color:#00f>struct</span> luaL_Reg nativeFuncLib[] = {{<span style=color:#a31515>&#34;mult50&#34;</span>, l_mult50}, {NULL, NULL}};
19</span></span><span style=display:flex><span>
20</span></span><span style=display:flex><span> luaL_register(L, <span style=color:#a31515>&#34;nativelib&#34;</span>, nativeFuncLib);
21</span></span><span style=display:flex><span> <span style=color:#00f>return</span> 1;
22</span></span><span style=display:flex><span>}
23</span></span></code></pre><li><p>main.lua<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>require <span style=color:#a31515>&#34;nativefunc&#34;</span>
24</span></span><span style=display:flex><span>print(nativelib.mult50(50))
25</span></span></code></pre><li><p>Makefile<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>CC = clang
26</span></span><span style=display:flex><span>CFLAGS =
27</span></span><span style=display:flex><span>INCLUDES = <span style=color:#a31515>`</span>pkg-config lua5.1 --cflags-only-I<span style=color:#a31515>`</span>
28</span></span><span style=display:flex><span>
29</span></span><span style=display:flex><span>all:
30</span></span><span style=display:flex><span> <span style=color:#00f>$(</span>CC<span style=color:#00f>)</span> -shared -o nativefunc.so -fPIC nativefunc.c <span style=color:#00f>$(</span>CFLAGS<span style=color:#00f>)</span> <span style=color:#00f>$(</span>INCLUDES<span style=color:#00f>)</span>
31</span></span><span style=display:flex><span>
32</span></span><span style=display:flex><span>clean:
33</span></span><span style=display:flex><span> rm *.so
34</span></span></code></pre></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
35<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
36with me
37<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
38the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
39otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/extending-dte-editor.html b/public/extending-dte-editor.html
deleted file mode 100755
index 05e9d86..0000000
--- a/public/extending-dte-editor.html
+++ /dev/null
@@ -1,46 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/v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AyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Extending dte editor</title><meta name=description content="dte is an interesting editor I startedusing lately more and more."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Extending dte editor</h1><p>May 31, 2023<div><p><a href=https://craigbarnes.gitlab.io/dte/><code>dte</code></a> is an interesting editor I started
7using lately more and more. Since it is using
8<a href=https://linux.die.net/man/3/execvp><code>execvp()</code></a> it can be easily extended. I
9needed comment/uncomment feature so I created a small utility that does this for
10me. Code lives on repository <a href=https://git.mitjafelicijan.com/dte-extensions.git/about/>dte
11extensions</a> but this
12utilities can be used for whatever you want. Make sure you have version 1.11 or
13above.<p>Next one will be invoking formatter based on the type of a file.<p>My config that works for me.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>set show-line-numbers true;
14</span></span><span style=display:flex><span>set tab-width 4;
15</span></span><span style=display:flex><span>set <span style=color:#00f>case</span>-sensitive-search false;
16</span></span><span style=display:flex><span>
17</span></span><span style=display:flex><span><span style=color:green># Special aliases</span>
18</span></span><span style=display:flex><span>alias m_comment <span style=color:#a31515>&#39;exec -s -i line -o buffer -e errmsg ~/.dte/bin/comment&#39;</span>
19</span></span><span style=display:flex><span>alias m_format <span style=color:#a31515>&#39;save; exec go fmt .; reload&#39;</span>
20</span></span><span style=display:flex><span>alias m_duplicate <span style=color:#a31515>&#39;copy;paste&#39;</span>;
21</span></span><span style=display:flex><span>
22</span></span><span style=display:flex><span><span style=color:green># Useful aliases.</span>
23</span></span><span style=display:flex><span>alias m_force_close <span style=color:#a31515>&#39;quit -f&#39;</span>;
24</span></span><span style=display:flex><span>alias m_reload <span style=color:#a31515>&#39;close; open $FILE&#39;</span>
25</span></span><span style=display:flex><span>
26</span></span><span style=display:flex><span><span style=color:green># Key bindings.</span>
27</span></span><span style=display:flex><span>bind M-s save;
28</span></span><span style=display:flex><span>bind M-q m_force_close;
29</span></span><span style=display:flex><span>bind M-z refresh;
30</span></span><span style=display:flex><span>bind C-down blkdown;
31</span></span><span style=display:flex><span>bind C-up blkup;
32</span></span><span style=display:flex><span>bind C-_ m_comment;
33</span></span><span style=display:flex><span>bind M-. m_format;
34</span></span><span style=display:flex><span>bind C-d m_duplicate;
35</span></span><span style=display:flex><span>
36</span></span><span style=display:flex><span><span style=color:green># Syntax highlighting.</span>
37</span></span><span style=display:flex><span>hi preproc magenta;
38</span></span><span style=display:flex><span>hi keyword red;
39</span></span><span style=display:flex><span>hi linenumber blue;
40</span></span><span style=display:flex><span>hi comment cyan;
41</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
42<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
43with me
44<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
45the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
46otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/fix-plan9-bootloader.html b/public/fix-plan9-bootloader.html
deleted file mode 100755
index 1bebdd3..0000000
--- a/public/fix-plan9-bootloader.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf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AAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Fix bootloader not being written in Plan9</title><meta name=description content="If the bootloader is not being written to a disk when installing 9front on realharware try clearing first sector of the disk with the following command."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Fix bootloader not being written in Plan9</h1><p>May 11, 2023<div><p>If the bootloader is not being written to a disk when installing 9front on real
7harware try clearing first sector of the disk with the following command.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>dd <span style=color:#00f>if</span>=/dev/zero of=/dev/sdX bs=512 count=1
8</span></span><span style=display:flex><span>
9</span></span><span style=display:flex><span><span style=color:green># If command above doesn&#39;t work try this one, wait couple of seconds and</span>
10</span></span><span style=display:flex><span><span style=color:green># press delete key to stop the command.</span>
11</span></span><span style=display:flex><span>cat &lt;/dev/zero &gt;/dev/sd*/data
12</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
13<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
14with me
15<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
16the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
17otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/fresh-9front-desktop.html b/public/fresh-9front-desktop.html
deleted file mode 100755
index f7eb39a..0000000
--- a/public/fresh-9front-desktop.html
+++ /dev/null
@@ -1,12 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAA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AAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>My brand new Plan9/9front desktop</title><meta name=description content="I have been experimenting with Plan9/9front for a week now."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>My brand new Plan9/9front desktop</h1><p>May 24, 2023<div><p>I have been experimenting with Plan9/9front for a week now. Noice! This is how
7my desktop looks like.<p><img src=/notes/9front-desktop.png alt="9front desktop"></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
8<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
9with me
10<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
11the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
12otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/from-internet-consumer-to-full-hominum-again.html b/public/from-internet-consumer-to-full-hominum-again.html
deleted file mode 100755
index 0fbaf78..0000000
--- a/public/from-internet-consumer-to-full-hominum-again.html
+++ /dev/null
@@ -1,79 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93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über consumer to being a full hominum again</title><meta name=description content="It&amp;#39;s been almost a year since I started purging all my online accounts andgoing down this rabbit hole of being almost independent of the current internetmachine."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>My journey from being an internet über consumer to being a full hominum again</h1><p>Jul 30, 2021<div><p>It's been almost a year since I started purging all my online accounts and
7going down this rabbit hole of being almost independent of the current internet
8machine. Even though I initially thought that I will have problems adapting,
9I was pleasantly surprised that the transition went so smoothly. Even better,
10it brought many benefits to my life. Such as increased focus, less stress
11about trivial things, etc.<p>It all started with me doing small changes like unsubscribing from emails that I
12have either subscribed to by accepting terms and conditions. Or even some more
13malicious emails that I was getting because I was on a shared mailing list. And
14the later ones I hate the most of all. How the hell do they keep sharing my
15email and sending me unsolicited emails and get away with it? I have a suspicion
16that these marketing people share an Excel file between them and keep
17resubscribing me when they import lists into Mailchimp or similar software.<p>It's fascinating to see how much crap you get subscribed to when you are not
18paying attention. It got so bad that my primary Gmail address is a full of junk
19and need constant monitoring and cleaning up. And because I want to have Inbox
20Zero, this presents an additional problem for me.<p>The stress that email presented for me didn't occur to me for a long time. I was
21noticing that I was unable to go through one single hour without hysterically
22refreshing email. And if somebody wrote me something, I needed to see it right
23then, even though I didn't immediately reply to it. I can only describe this
24with FOMO (fear of missing out). I have no other explanation than that. It was
25crippling, and I was constantly context switching, which I will address further
26down this post in more details.<p>This was one of the reasons why I spawned up my personal email server, and I am
27using it now as my primary and person email. I still have Gmail as my “junk”
28email that I use for throw away stuff. I log in to Gmail once a week and check
29if there are any important emails that I got, but apart from that, it's sitting
30dormant and collecting dust.<p>The more I was watching the world loose it's self with allowing anti freedom
31things to happen to it, the more I started to realize that something has to
32change. I don't have the power to change the world. And I also don't have a
33grandiose opinion of myself to even think to try it. But what I can do is to not
34subscribe to this consumer way of thinking. I will not be complicit in this. My
35moral and ethical stances won't allow it. So, this brings us to the second part
36of my journey.<p>I was using all these 3rd party services because I was either lazy or OK with
37the drawbacks of them. I watched these services and companies became more and
38privacy policies and everybody is OK with accepting them, and they pray on that
39more evil. It is evil if you sell your user's data in this manner. Nobody reads
40flaw in human nature. I really hate the hypocrisy they manage to muster. These
41companies prey on our laziness, and we are at fault here. Nobody else. And I
42truly understand the reasons why we rather accept and move on, and not object
43and have our lives a little more difficult. They have perfected this through
44years of small changes that make us a little more dependent on them. You could
45not convince a person to give away all his rights and data in one day. This was
46gradual and slow. And it caught us all in surprise. When I really stopped and
47thought about it, I felt repulsed. By really stopping and thinking about it, I
48really mean stopping and thinking about it. Thoroughly and in depth.<p>Each step I took depleted my character a bit more. Like I was trading myself bit
49by bit without understanding what it all meant. What it meant to be a full
50person, not divided by all this bought attention they want from me. They don't
51just get your data, but they also take your attention away from you. They
52scatter your and go with the divide and conquer tactic from there. And a person
53divided is a person not fully there. Not at the moment. Not alive fully.<p>I was unable to form long thoughts. Well, I thought I was. But now that I see
54what being a full person is again, I can see that I was not at my 100% back
55then.<p>A revolt was inevitable. There was no other way of continuing my story without
56it. Without taking back my attention, my thoughts, my time, and my privacy,
57regardless of how too late it maybe is.<p>This has nothing to do with conspiracy theories. Even less with changing the
58world. All I wanted was to get my life back in order and not waste the energy
59that could be spent in other, better places.<p>I started reading more. I can focus now fully on things I work on. Furthermore,
60I have the mental acuity that I never had before. My mind feels sharp. I don't
61get angry so much. I can cherish the finer things in life now without the need
62to interpret them intellectually. Not only that, but I have a feeling of
63belonging again. Sense of purpose has returned with a vengeance. And I can now
64help people without depleting myself.<p>The last step so far was to finish closing all the remaining online accounts
65that I still had. And when I was thinking what value they bring me, I wasn't
66surprised that the answer was none. I wasn't logging in them and using them. I
67stopped being afraid of FOMO. If somebody wants to get in contact me, they will
68find a way. I am one search away.<p>We are not beholden to anybody. Our lives are our own. So dare yourself to
69delete Facebook, LinkedIn. To unsubscribe. Dare yourself to take your time and
70attention back. Use that time and energy to go for a walk without thinking about
71work. Read a book instead of reading comment on social media that you will
72forget in an hour. Enrich your life instead of wasting it. It only requires a
73small step. And you will feel the benefits immediately. Lose the weight of the
74world that is crushing you without your consent.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
75<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
76with me
77<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
78the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
79otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/general/9front-cursor.png b/public/general/9front-cursor.png
deleted file mode 100644
index 1448a32..0000000
--- a/public/general/9front-cursor.png
+++ /dev/null
Binary files differ
diff --git a/public/general/9logo.png b/public/general/9logo.png
deleted file mode 100644
index b6a8f7c..0000000
--- a/public/general/9logo.png
+++ /dev/null
Binary files differ
diff --git a/public/general/alert-dark.svg b/public/general/alert-dark.svg
deleted file mode 100755
index d453564..0000000
--- a/public/general/alert-dark.svg
+++ /dev/null
@@ -1,99 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 version="1.1"
13 id="Layer_1"
14 x="0px"
15 y="0px"
16 viewBox="0 0 492.804 492.804"
17 style="enable-background:new 0 0 492.804 492.804;"
18 xml:space="preserve"
19 sodipodi:docname="alert.svg"
20 inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
21 id="metadata43"><rdf:RDF><cc:Work
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
24 id="defs41" /><sodipodi:namedview
25 pagecolor="#ffffff"
26 bordercolor="#666666"
27 borderopacity="1"
28 objecttolerance="10"
29 gridtolerance="10"
30 guidetolerance="10"
31 inkscape:pageopacity="0"
32 inkscape:pageshadow="2"
33 inkscape:window-width="782"
34 inkscape:window-height="480"
35 id="namedview39"
36 showgrid="false"
37 inkscape:zoom="0.47889223"
38 inkscape:cx="246.40199"
39 inkscape:cy="246.40199"
40 inkscape:window-x="1970"
41 inkscape:window-y="125"
42 inkscape:window-maximized="0"
43 inkscape:current-layer="g4" />
44<g
45 id="g6">
46 <g
47 id="g4">
48 <path
49 d="M482.592,381.614L288.863,69.966c-11.22-18.044-26.348-27.96-42.656-27.96c-16.32,0-31.456,9.924-42.672,27.976 L10.267,381.142c-11.216,18.04-13.316,35.268-5.94,48.564c7.432,13.38,23.36,20.728,44.864,20.752l394.608,0.3h-0.336v0.04 c19.272,0,37.56-7.316,44.984-20.652C495.824,416.89,493.808,399.666,482.592,381.614z M256.96,388.59 c-2.868,2.86-6.736,4.484-10.792,4.484c-4.048,0-7.988-1.64-10.868-4.5c-2.856-2.86-4.476-6.852-4.472-10.932 c0.008-4.056,0.956-8.024,3.82-10.86c2.924-2.888,5.404-4.54,9.26-4.54l0.72-0.008c4.04,0,8.84,1.66,11.744,4.564 c2.872,2.856,4.932,6.812,4.924,10.876C261.292,381.762,259.852,385.742,256.96,388.59z M246.216,331.398 c-4.12,0-7.94-1.6-10.852-4.512c-2.912-2.916-4.488-6.792-4.484-10.92l-1.616-139.068c0.016-8.512,5.972-15.416,13.684-15.416 h1.772c4.124,0,8.88,1.604,11.788,4.52c2.916,2.92,4.932,6.788,4.928,10.916l0.1,139.068 C261.528,324.482,254.724,331.398,246.216,331.398z"
50 id="path2"
51 style="fill:#ffffff" />
52 </g>
53</g>
54<g
55 id="g8">
56</g>
57<g
58 id="g10">
59</g>
60<g
61 id="g12">
62</g>
63<g
64 id="g14">
65</g>
66<g
67 id="g16">
68</g>
69<g
70 id="g18">
71</g>
72<g
73 id="g20">
74</g>
75<g
76 id="g22">
77</g>
78<g
79 id="g24">
80</g>
81<g
82 id="g26">
83</g>
84<g
85 id="g28">
86</g>
87<g
88 id="g30">
89</g>
90<g
91 id="g32">
92</g>
93<g
94 id="g34">
95</g>
96<g
97 id="g36">
98</g>
99</svg>
diff --git a/public/general/alert-light.svg b/public/general/alert-light.svg
deleted file mode 100755
index 86658ec..0000000
--- a/public/general/alert-light.svg
+++ /dev/null
@@ -1,99 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 version="1.1"
13 id="Layer_1"
14 x="0px"
15 y="0px"
16 viewBox="0 0 492.804 492.804"
17 style="enable-background:new 0 0 492.804 492.804;"
18 xml:space="preserve"
19 sodipodi:docname="alert.svg"
20 inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
21 id="metadata43"><rdf:RDF><cc:Work
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
24 id="defs41" /><sodipodi:namedview
25 pagecolor="#ffffff"
26 bordercolor="#666666"
27 borderopacity="1"
28 objecttolerance="10"
29 gridtolerance="10"
30 guidetolerance="10"
31 inkscape:pageopacity="0"
32 inkscape:pageshadow="2"
33 inkscape:window-width="782"
34 inkscape:window-height="480"
35 id="namedview39"
36 showgrid="false"
37 inkscape:zoom="0.47889223"
38 inkscape:cx="246.40199"
39 inkscape:cy="246.40199"
40 inkscape:window-x="1970"
41 inkscape:window-y="125"
42 inkscape:window-maximized="0"
43 inkscape:current-layer="g4" />
44<g
45 id="g6">
46 <g
47 id="g4">
48 <path
49 d="M482.592,381.614L288.863,69.966c-11.22-18.044-26.348-27.96-42.656-27.96c-16.32,0-31.456,9.924-42.672,27.976 L10.267,381.142c-11.216,18.04-13.316,35.268-5.94,48.564c7.432,13.38,23.36,20.728,44.864,20.752l394.608,0.3h-0.336v0.04 c19.272,0,37.56-7.316,44.984-20.652C495.824,416.89,493.808,399.666,482.592,381.614z M256.96,388.59 c-2.868,2.86-6.736,4.484-10.792,4.484c-4.048,0-7.988-1.64-10.868-4.5c-2.856-2.86-4.476-6.852-4.472-10.932 c0.008-4.056,0.956-8.024,3.82-10.86c2.924-2.888,5.404-4.54,9.26-4.54l0.72-0.008c4.04,0,8.84,1.66,11.744,4.564 c2.872,2.856,4.932,6.812,4.924,10.876C261.292,381.762,259.852,385.742,256.96,388.59z M246.216,331.398 c-4.12,0-7.94-1.6-10.852-4.512c-2.912-2.916-4.488-6.792-4.484-10.92l-1.616-139.068c0.016-8.512,5.972-15.416,13.684-15.416 h1.772c4.124,0,8.88,1.604,11.788,4.52c2.916,2.92,4.932,6.788,4.928,10.916l0.1,139.068 C261.528,324.482,254.724,331.398,246.216,331.398z"
50 id="path2"
51 style="fill:#000000" />
52 </g>
53</g>
54<g
55 id="g8">
56</g>
57<g
58 id="g10">
59</g>
60<g
61 id="g12">
62</g>
63<g
64 id="g14">
65</g>
66<g
67 id="g16">
68</g>
69<g
70 id="g18">
71</g>
72<g
73 id="g20">
74</g>
75<g
76 id="g22">
77</g>
78<g
79 id="g24">
80</g>
81<g
82 id="g26">
83</g>
84<g
85 id="g28">
86</g>
87<g
88 id="g30">
89</g>
90<g
91 id="g32">
92</g>
93<g
94 id="g34">
95</g>
96<g
97 id="g36">
98</g>
99</svg> \ No newline at end of file
diff --git a/public/general/index.css b/public/general/index.css
deleted file mode 100644
index d9014f7..0000000
--- a/public/general/index.css
+++ /dev/null
@@ -1 +0,0 @@
1/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mx-auto{margin-left:auto;margin-right:auto}.my-12{margin-top:3rem;margin-bottom:3rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mr-2{margin-right:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-3{height:.75rem}.h-6{height:1.5rem}.h-full{height:100%}.w-3{width:.75rem}.w-6{width:1.5rem}.w-full{width:100%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.rounded{border-radius:.25rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-16{padding-bottom:4rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}*{cursor:url(/general/9front-cursor.png),auto}.container-blog{max-width:740px}::selection{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}::-moz-selection{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.blue,a:hover{color:blue}article.single h2{margin-bottom:2rem}article.single h2,article.single.note h2{margin-top:2rem;font-size:1.5rem;line-height:2rem;font-weight:700;line-height:1.25}article.single.note h2{margin-bottom:.25rem}article.single h3{font-size:1.25rem}article.single h3,article.single h4{margin-bottom:1rem;margin-top:2rem;line-height:1.75rem;font-weight:700;line-height:1.25}article.single h4{font-size:1.125rem}article.single p{margin-bottom:1.25rem}article.single a{text-decoration-line:underline;text-underline-offset:2px}article.single .content blockquote{background-image:url(/general/alert-light.svg);background-size:30px 30px;background-repeat:no-repeat;background-position:0 5px;margin-top:2rem;margin-bottom:2rem;padding-left:3rem}article.single .content blockquote p{margin-bottom:.5rem}article.single figure{margin-top:2rem;margin-bottom:2rem}article.single figure figcaption{margin-top:.25rem;text-align:center;font-style:italic}article.single img{image-rendering:crisp-edges;image-rendering:-webkit-optimize-contrast}article.single img,article.single video{width:100%;border-radius:.25rem;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important}article.single audio{margin-bottom:1.5rem;width:100%}article.single code{background-color:rgb(254 240 138/var(--tw-bg-opacity))}article.single code,article.single.note code{border-radius:.25rem;--tw-bg-opacity:1;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500}article.single.note code{background-color:rgb(243 244 246/var(--tw-bg-opacity))}article.single pre{margin-bottom:1.5rem;overflow-x:auto;border-radius:.25rem;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important;padding:1rem;font-size:.75rem;line-height:1rem}article.single pre code,article.single.note pre code{background:unset;padding:unset;line-height:1.625}article.single table{margin-bottom:1rem;width:100%;border-collapse:collapse;border-width:1px;--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}article.single table td,article.single table th,article.single table tr{border-width:1px;padding:.5rem 1rem;text-align:left}article.single .content ul{margin-bottom:1.5rem;list-style-type:disc;padding-left:1.5rem}@media (min-width:768px){article.single .content ul{padding-left:2.5rem}}article.single .content ol{margin-bottom:1.5rem;list-style-type:decimal;padding-left:2rem}@media (min-width:768px){article.single .content ol{padding-left:2.5rem}}article.single #TableOfContents{margin-bottom:2.5rem;margin-left:1rem;line-height:1.625}article.single #TableOfContents ul{list-style-type:decimal;padding-left:1rem}@media (min-width:768px){article.single #TableOfContents ul{padding-left:1.5rem}}article.single .content ul ul{margin-bottom:auto}article.single .katex-display{margin-top:2.5rem;margin-bottom:2.5rem}article.single .ll-iframe{border-radius:.25rem;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}article.single .ll-iframe:before{display:flex;height:100%}@keyframes pulse{50%{opacity:.5}}article.single .ll-iframe:before{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;cursor:pointer;align-items:center;justify-content:center;border-radius:.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;content:"Click here to load resource…"}article.single .ll-iframe.empty:before{content:none}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width:768px){.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:inline-block{display:inline-block}.md\:w-40{width:10rem}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-0{gap:0}.md\:border{border-width:1px}.md\:border-b{border-bottom-width:1px}.md\:p-0{padding:0}.md\:p-3{padding:.75rem}.md\:hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}}@media (min-width:1024px){.lg\:block{display:block}} \ No newline at end of file
diff --git a/public/general/og-big.jpg b/public/general/og-big.jpg
deleted file mode 100644
index da8273b..0000000
--- a/public/general/og-big.jpg
+++ /dev/null
Binary files differ
diff --git a/public/general/og-big.xcf b/public/general/og-big.xcf
deleted file mode 100644
index ae0b007..0000000
--- a/public/general/og-big.xcf
+++ /dev/null
Binary files differ
diff --git a/public/general/og.jpg b/public/general/og.jpg
deleted file mode 100644
index 132f62d..0000000
--- a/public/general/og.jpg
+++ /dev/null
Binary files differ
diff --git a/public/general/og.xcf b/public/general/og.xcf
deleted file mode 100644
index 0572715..0000000
--- a/public/general/og.xcf
+++ /dev/null
Binary files differ
diff --git a/public/git-push-multiple-origins.html b/public/git-push-multiple-origins.html
deleted file mode 100755
index 1677c89..0000000
--- a/public/git-push-multiple-origins.html
+++ /dev/null
@@ -1,14 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Push to multiple origins at once in Git</title><meta name=description content="Sometimes you want to push to multiple origins at once."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Push to multiple origins at once in Git</h1><p>May 6, 2023<div><p>Sometimes you want to push to multiple origins at once. This is useful if you
7have a mirror of your repository on another server. You can do this by adding
8multiple push urls to your git config. This is a shorthand for command above.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>git config --global alias.pushall <span style=color:#a31515>&#39;!sh -c &#34;git remote | xargs -L1 git push --all&#34;&#39;</span>
9</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
10<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
11with me
12<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
13the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
14otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/golang-profiling-simplified.html b/public/golang-profiling-simplified.html
deleted file mode 100755
index c7c41ba..0000000
--- a/public/golang-profiling-simplified.html
+++ /dev/null
@@ -1,91 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Golang profiling simplified</title><meta name=description content="Many posts have been written regarding profiling in Golang and I haven’t foundproper tutorial regarding this."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Golang profiling simplified</h1><p>Mar 7, 2017<div><p>Many posts have been written regarding profiling in Golang and I haven’t found
7proper tutorial regarding this. Almost all of them are missing some part of
8important information and it gets pretty frustrating when you have a deadline
9and are not finding simple distilled solution.<p>Nevertheless, after searching and experimenting I have found a solution that
10works for me and probably should also for you.<h2 id=where-are-my-pprof-files>Where are my pprof files?</h2><p>By default pprof files are generated in /tmp/ folder. You can override folder
11where this files are generated programmatically in your golang code as we will
12see below in example.<h2 id=why-is-my-cpu-profile-empty>Why is my CPU profile empty?</h2><p>I have found out that sometimes CPU profile is empty because program was not
13executing long enough. Programs, that execute too quickly don’t produce pprof
14file in my cases. Well, file is generated but only contains 4KB of information.<h2 id=profiling>Profiling</h2><p>As you can see from examples we are executing dummy_benchmark functions to
15ensure some sort of execution. Memory profiling can be done without such a
16“complex” function. But CPU profiling needs it.<p>Both memory and CPU profiling examples are almost the same. Only parameters in
17main function when calling profile.Start are different. When we set
18profile.ProfilePath(“.”) we tell profiler to store pprof files in the same
19folder as our program.<h3 id=memory-profiling>Memory profiling</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>package</span> main
20</span></span><span style=display:flex><span>
21</span></span><span style=display:flex><span><span style=color:#00f>import</span> (
22</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;fmt&#34;</span>
23</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;time&#34;</span>
24</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;github.com/pkg/profile&#34;</span>
25</span></span><span style=display:flex><span>)
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span><span style=color:#00f>func</span> dummy_benchmark() {
28</span></span><span style=display:flex><span>
29</span></span><span style=display:flex><span> fmt.Println(<span style=color:#a31515>&#34;first set ...&#34;</span>)
30</span></span><span style=display:flex><span> <span style=color:#00f>for</span> i := 0; i &lt; 918231333; i++ {
31</span></span><span style=display:flex><span> i *= 2
32</span></span><span style=display:flex><span> i /= 2
33</span></span><span style=display:flex><span> }
34</span></span><span style=display:flex><span>
35</span></span><span style=display:flex><span> &lt;-time.After(time.Second*3)
36</span></span><span style=display:flex><span>
37</span></span><span style=display:flex><span> fmt.Println(<span style=color:#a31515>&#34;sencond set ...&#34;</span>)
38</span></span><span style=display:flex><span> <span style=color:#00f>for</span> i := 0; i &lt; 9182312232; i++ {
39</span></span><span style=display:flex><span> i *= 2
40</span></span><span style=display:flex><span> i /= 2
41</span></span><span style=display:flex><span> }
42</span></span><span style=display:flex><span>}
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span><span style=color:#00f>func</span> main() {
45</span></span><span style=display:flex><span> <span style=color:#00f>defer</span> profile.Start(profile.MemProfile, profile.ProfilePath(<span style=color:#a31515>&#34;.&#34;</span>), profile.NoShutdownHook).Stop()
46</span></span><span style=display:flex><span> dummy_benchmark()
47</span></span><span style=display:flex><span>}
48</span></span></code></pre><h3 id=cpu-profiling>CPU profiling</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>package</span> main
49</span></span><span style=display:flex><span>
50</span></span><span style=display:flex><span><span style=color:#00f>import</span> (
51</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;fmt&#34;</span>
52</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;time&#34;</span>
53</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;github.com/pkg/profile&#34;</span>
54</span></span><span style=display:flex><span>)
55</span></span><span style=display:flex><span>
56</span></span><span style=display:flex><span><span style=color:#00f>func</span> dummy_benchmark() {
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span> fmt.Println(<span style=color:#a31515>&#34;first set ...&#34;</span>)
59</span></span><span style=display:flex><span> <span style=color:#00f>for</span> i := 0; i &lt; 918231333; i++ {
60</span></span><span style=display:flex><span> i *= 2
61</span></span><span style=display:flex><span> i /= 2
62</span></span><span style=display:flex><span> }
63</span></span><span style=display:flex><span>
64</span></span><span style=display:flex><span> &lt;-time.After(time.Second*3)
65</span></span><span style=display:flex><span>
66</span></span><span style=display:flex><span> fmt.Println(<span style=color:#a31515>&#34;sencond set ...&#34;</span>)
67</span></span><span style=display:flex><span> <span style=color:#00f>for</span> i := 0; i &lt; 9182312232; i++ {
68</span></span><span style=display:flex><span> i *= 2
69</span></span><span style=display:flex><span> i /= 2
70</span></span><span style=display:flex><span> }
71</span></span><span style=display:flex><span>}
72</span></span><span style=display:flex><span>
73</span></span><span style=display:flex><span><span style=color:#00f>func</span> main() {
74</span></span><span style=display:flex><span> <span style=color:#00f>defer</span> profile.Start(profile.CPUProfile, profile.ProfilePath(<span style=color:#a31515>&#34;.&#34;</span>), profile.NoShutdownHook).Stop()
75</span></span><span style=display:flex><span> dummy_benchmark()
76</span></span><span style=display:flex><span>}
77</span></span></code></pre><h3 id=generating-profiling-reports>Generating profiling reports</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># memory profiling</span>
78</span></span><span style=display:flex><span>go build mem.go
79</span></span><span style=display:flex><span>./mem
80</span></span><span style=display:flex><span>go tool pprof -pdf ./mem mem.pprof &gt; mem.pdf
81</span></span><span style=display:flex><span>
82</span></span><span style=display:flex><span><span style=color:green># cpu profiling</span>
83</span></span><span style=display:flex><span>go build cpu.go
84</span></span><span style=display:flex><span>./cpu
85</span></span><span style=display:flex><span>go tool pprof -pdf ./cpu cpu.pprof &gt; cpu.pdf
86</span></span></code></pre><p>This will generate PDF document with visualized profile.<ul><li><a href=/assets/go-profiling/golang-profiling-mem.pdf>Memory PDF profile example</a><li><a href=/assets/go-profiling/golang-profiling-cpu.pdf>CPU PDF profile example</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
87<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
88with me
89<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
90the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
91otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/grep-to-less-maintain-colors.html b/public/grep-to-less-maintain-colors.html
deleted file mode 100755
index 7278e7c..0000000
--- a/public/grep-to-less-maintain-colors.html
+++ /dev/null
@@ -1,16 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAA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AAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Grep to Less that maintain colors</title><meta name=description content="I often use grep to search for todo&amp;#39;s in my code and other people&amp;#39;s code andthen pipe them in less and I missed having colors that grep outputs in less."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Grep to Less that maintain colors</h1><p>May 29, 2023<div><p>I often use <code>grep</code> to search for todo's in my code and other people's code and
7then pipe them in <code>less</code> and I missed having colors that grep outputs in <code>less</code>.<ul><li>Grep's <code>--color=always</code> use markers to highlight the matching strings.<li>Less's <code>-R</code> option outputs "raw" control characters.</ul><p>You could use <code>alias grep='grep --color=always'</code> and <code>alias less='less -R'</code> or
8create todo function in your <code>.bashrc</code> that accepts first argument as search
9string.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># This is where the magic happens.</span>
10</span></span><span style=display:flex><span>grep --color=always -rni <span style=color:#a31515>&#34;TODO:&#34;</span> | less -R
11</span></span></code></pre><p><img src=/notes/grep-less.png alt="Less and grep"></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
12<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
13with me
14<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
15the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
16otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/i-was-wrong-about-git-workflows.html b/public/i-was-wrong-about-git-workflows.html
deleted file mode 100755
index e71d60b..0000000
--- a/public/i-was-wrong-about-git-workflows.html
+++ /dev/null
@@ -1,51 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>I think I was completely wrong about Git workflows</title><meta name=description content="I have been using some approximation of GitFlow for years now and never reallyquestioned it to be honest."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>I think I was completely wrong about Git workflows</h1><p>May 23, 2023<div><p>I have been using some approximation of <a href=https://jeffkreeftmeijer.com/git-flow/>Git
7Flow</a> for years now and never really
8questioned it to be honest. When I create a repo I create develop branch and set
9it as default one and then merge to master from there. Seems reasonable enough.<p>One thing that I have learned is that long living branches are the devil. They
10always end up making a huge mess when they need to be merged eventually into
11master. So by that reason, what is the develop branch if not the longest living
12feature branch. And from my personal experience there was never a situation
13where I wasn’t sweating bullets when I had to merge develop back to master.<p>This realisation started to give me pause. So why the hell am I doing this, and
14is there a better way. Well the solution was always there. And it comes in a
15form of <a href=https://git-scm.com/book/en/v2/Git-Basics-Tagging>git tags</a>.<p>So what are git tags? Git tags are references to specific points in a Git
16repository's history. They are used to mark important milestones, such as
17releases or significant commits, making it easier to identify and access
18specific versions of a project.<p>Somehow we have all hijacked the meaning of the master branch that it has to be
19the most releasable version of code. And this is also where the confusing about
20versioning the software kicks in. Because master branch implicitly says that we
21are dealing with the rolling release type of a software. And by having a develop
22branch we are hacking around this confusion. With a separation of develop and
23master we lock functionalities into place and forcing a stable vs development
24version of the software.<p>But if that is true and the long living branches are the devil then why have
25develop at all. I think that most of this comes to how continuous integration is
26being done. There usually is no granular access to tags and CD software deploys
27what is present on a specific branch, may that be master for production and
28develop for staging. This is a gross simplification and by having this in place
29we have completely removed tagging as a viable option to create a fix point in
30software cycle that says, this is the production ready code.<p>One cool thing about tags are that you can checkout a specific tag. So they
31behave very similarly as branches in that regard. And you don’t have the
32overhead of having two mainstream branches.<p>So what is the solution? One approach is to use development workflow, where all
33changes are made on the smaller branches and continuously merged into
34master. Where the software is ready to be pushed to production you tag the
35master branch. This approach eliminates the need for long-lived branches and
36simplifies the development process. It also encourages developers to make small,
37incremental changes that can be tested and deployed quickly. However, this
38approach may not be suitable for all projects or teams that heavily rely on
39automated deployment based on branch names only.<p>This also requires that developers always keep production in mind. No more
40living on an island of the develop branch. All your actions and code need to be
41ready to meet production standards on a much smaller timescale.<p>I think that we have complicated the workflow in an honest attempt to make
42things more streamlined but in the process of doing this, we have inadvertently
43made our lives much more complicated.<p>In conclusion, it's important to re-evaluate our workflows from time to time to
44see if they still make sense and if there are better alternatives available.
45Long-living branches can be problematic, and using tags to mark important
46milestones can simplify the development process.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
47<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
48with me
49<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
50the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
51otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/index.html b/public/index.html
deleted file mode 100755
index a901c91..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAA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AAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Mitja Felicijan</title><meta name=description content="You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav><nav class=additional><a href=#current>current</a>
7<a href=#posts>posts</a>
8<a href=#notes>notes</a>
9<a href=#sideprojects>side projects</a></nav></header><main><div><h1>A place where I experiment and have fun!</h1><p>You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you.<p>Please <b><i>stop offering me a redesign</i></b> of this webpage. This site
10intentionally looks like it does!<h2><a name=current></a>What I am currently working on</h2><p>Semi-live status of things to keep myself honest!<table><thead><tr><th width=5><th>Project name<th>What is being worked on?<th>Last updated<tbody><tr><td class=pstatus-orange title="Somewhat works"><td><a href=https://github.com/mitjafelicijan/errand target=_blank>Errand - Task runner</a><td>Working on re-implementating the whole thing in C.<td>7th of June, 2023<tr><td class=pstatus-green title="Kinda works"><td><a href=https://github.com/mitjafelicijan/jbmafp target=_blank>JBMAFP - Generates static sites</a><td>Fixing minor issues and writing docs.<td>8th of June, 2023<tr><td class=pstatus-red title="Still in initial stage"><td><a href=https://github.com/mitjafelicijan/marionette target=_blank>Marionette - UI testing tool</a><td>Implementing HTTP server for viewing reports.<td>6th of June, 2023</table><h2><a name=posts></a>More long form, blog type of content</h2><ul><li><a href=/who-knows-what-the-world-will-look-like-tomorrow.html>Who knows what the world will look like tomorrow</a><li><a href=/bringing-all-of-my-projects-together-under-one-umbrella.html>Bringing all of my projects together under one umbrella</a><li><a href=/re-inventing-task-runner-that-i-actually-used-daily.html>Re-Inventing Task Runner That I Actually Used Daily</a><li><a href=/i-was-wrong-about-git-workflows.html>I think I was completely wrong about Git workflows</a><li><a href=/crafting-stories-in-zed-editor.html>From General Zod to Superman - Crafting Stories in Zed Editor</a><li><a href=/rekindling-my-love-for-programming.html>Rekindling my love for programming and enjoying the act of creating</a><li><a href=/trying-to-build-a-new-kind-of-terminal-emulator.html>Trying to build a New kind of terminal emulator for the modern age</a><li><a href=/that-sound-that-machine-makes-when-struggling.html>Microsoundtrack — That sound that machine makes when struggling</a><li><a href=/state-of-web-technologies-and-web-development-in-year-2022.html>State of Web Technologies and Web development in year 2022</a><li><a href=/aerial-photography-of-algae-spotted-on-river-sava.html>Aerial photography of algae spotted on river Sava</a><li><a href=/what-would-dna-sound-if-synthesized.html>What would DNA sound if synthesized to an audio file</a><li><a href=/tying-out-helix-code-editor.html>Trying out Helix code editor as my main editor</a><li><a href=/wap-mobile-web-before-the-web.html>Wireless Application Protocol and the mobile web before the web</a><li><a href=/running-golang-application-as-pid1.html>Running Golang application as PID 1 with Linux kernel</a><li><a href=/debian-based-riced-up-distribution-for-developers-and-devops-folks.html>Debian based riced up distribution for Developers and DevOps folks</a><li><a href=/linux-cheatsheet.html>List of essential Linux commands for server management</a><li><a href=/from-internet-consumer-to-full-hominum-again.html>My journey from being an internet über consumer to being a full hominum again</a><li><a href=/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html>Simple world clock with eInk display and Raspberry Pi Zero</a><li><a href=/using-goaccess-with-nginx-to-replace-google-analytics.html>Using GoAccess with Nginx to replace Google Analytics</a><li><a href=/replacing-dropbox-in-favor-of-digitalocean-spaces.html>Replacing Dropbox in favor of DigitalOcean spaces</a><li><a href=/digitalocean-spaces-to-sync-between-computers.html>Using Digitalocean Spaces to sync between computers</a><li><a href=/bind-warning-on-login-in-ubuntu.html>Fix bind warning in .profile on login in Ubuntu</a><li><a href=/esp8266-and-micropython-guide.html>Getting started with MicroPython and ESP8266</a><li><a href=/disable-mouse-wake-from-suspend-with-systemd-service.html>Disable mouse wake from suspend with systemd service</a><li><a href=/remote-work.html>Remote work and how it affects the daily lives of people</a><li><a href=/my-love-and-hate-relationship-with-nodejs.html>My love and hate relationship with Node.js</a><li><a href=/the-strange-case-of-elasticsearch-allocation-failure.html>The strange case of Elasticsearch allocation failure</a><li><a href=/create-placeholder-images-with-sharp.html>Create placeholder images with sharp Node.js image processing library</a><li><a href=/simple-server-sent-events-based-pubsub-server.html>Simple Server-Sent Events based PubSub Server</a><li><a href=/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html>Using sentiment analysis for clickbait detection in RSS feeds</a><li><a href=/simplifying-and-reducing-clutter.html>Simplifying and reducing clutter in my life and work</a><li><a href=/encoding-binary-data-into-dna-sequence.html>Encoding binary data into DNA sequence</a><li><a href=/using-digitalocean-spaces-object-storage-with-fuse.html>Using DigitalOcean Spaces Object Storage with FUSE</a><li><a href=/simple-iot-application.html>Simple IOT application supported by real-time monitoring and data history</a><li><a href=/profiling-python-web-applications-with-visual-tools.html>Profiling Python web applications with visual tools</a><li><a href=/what-i-ve-learned-developing-ad-server.html>What I've learned developing ad server</a><li><a href=/golang-profiling-simplified.html>Golang profiling simplified</a><li><a href=/software-development-pitfalls.html>Software development and my favorite pitfalls</a><li><a href=/wireless-sensor-networks.html>Wireless sensor networks</a><li><a href=/led-technology-not-so-eco.html>LED technology might not be as eco-friendly as you think</a><li><a href=/most-likely-to-succeed-in-year-of-2011.html>Most likely to succeed in the year of 2011</a></ul><h2><a name=notes></a>Notes?! Maybe useful</h2><h2></h2><ul><li><a href=/60s-ibm-computers-commercial.html>60's IBM Computers Commercial</a><li><a href=/10gui-10-finger-multitouch-user-interface.html>10/GUI 10 Finger Multitouch User Interface</a><li><a href=/alacritty-open-links-with-modifier.html>Alacritty open links with modifier</a><li><a href=/development-environments-with-nix.html>Development environments with Nix</a><li><a href=/making-cgit-look-nicer.html>Making cgit look nicer</a><li><a href=/presentations-with-markdown.html>Simple presentations with Markdown</a><li><a href=/bulk-make-thumbnails.html>Bulk thumbnails</a><li><a href=/ewd-manuscripts-ebook.html>Edsger W. Dijkstra Manuscripts ebook</a><li><a href=/extending-dte-editor.html>Extending dte editor</a><li><a href=/grep-to-less-maintain-colors.html>Grep to Less that maintain colors</a><li><a href=/easy-time-took-in-bash.html>Easy measure time took in a bash script</a><li><a href=/dcss-on-4k-display.html>Make DCSS playable on 4k displays</a><li><a href=/drawing-pixels-in-plan9.html>Drawing Pixels in Plan9</a><li><a href=/cronjobs-github-with-actions.html>Cronjobs on Github with Github Actions</a><li><a href=/dcss-new-player-guide.html>Dungeon Crawl Stone Soup - New player guide</a><li><a href=/write-iso-usb.html>Display xterm color palette</a><li><a href=/tmux-sane-defaults.html>Sane defaults for tmux with more visible statusbar</a><li><a href=/fresh-9front-desktop.html>My brand new Plan9/9front desktop</a><li><a href=/parse-rss-with-lua.html>Parse RSS feeds with Lua</a><li><a href=/extend-lua-with-custom-c.html>Extend Lua with custom C functions using Clang</a><li><a href=/non-blocking-shell-exec-csharp.html>Execute not blocking async shell command in C#</a><li><a href=/mass-set-permission.html>Change permissions of matching files recursively</a><li><a href=/preview-troff-man-pages.html>Previews how man page written in Troff will look like</a><li><a href=/convert-mkv.html>Convert all MKV files into other formats</a><li><a href=/download-youtube-videos.html>Download list of YouTube files</a><li><a href=/install-plan9port-linux.html>Install Plan9port on Linux</a><li><a href=/fix-plan9-bootloader.html>Fix bootloader not being written in Plan9</a><li><a href=/plan9-screenshot.html>Take a screenshot in Plan9</a><li><a href=/catv-weechat-config.html>#cat-v on weechat configuration</a><li><a href=/write-iso-usb.html>Write ISO to USB Key</a><li><a href=/mount-plan9-over-network.html>Mount Plan9 over network</a><li><a href=/git-push-multiple-origins.html>Push to multiple origins at once in Git</a><li><a href=/run-9front-in-qemu.html>Run 9front in Qemu</a><li><a href=/cachebusting-in-hugo.html>Cache busting in Hugo</a></ul><h2><a name=sideprojects></a>Side projects I work/worked on</h2><table><tbody><tr><td><a href=https://git.mitjafelicijan.com/cord.h.git/ target=_blank>cord.h</a><td>Small C library for handling strings<tr><td><a href=https://git.mitjafelicijan.com/mprogress.git/ target=_blank>mprogress</a><td>Tiny utility that displays progress bar in terminal<tr><td><a href=https://git.mitjafelicijan.com/journalctl-proxy.git/ target=_blank>journalctl-proxy</a><td>Exposes your systemd logs to web via web interface<tr><td><a href=https://git.mitjafelicijan.com/redis-marshal.git/ target=_blank>redis-marshal</a><td>Lightweight Redis data exploration tool<tr><td><a href=https://git.mitjafelicijan.com/dna-encoding.git/ target=_blank>dna-encoding</a><td>Tools for encoding files to DNA sequence<tr><td><a href=https://git.mitjafelicijan.com/vertex.git/ target=_blank>vertex</a><td>Create mock API's and add basic logic to simplify prototyping<tr><td><a href=https://git.mitjafelicijan.com/scarecrow.git/ target=_blank>scarecrow</a><td>Minimal configuration reverse proxy</table></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
11<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
12with me
13<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
14the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
15otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/index.xml b/public/index.xml
deleted file mode 100755
index de33fe3..0000000
--- a/public/index.xml
+++ /dev/null
@@ -1,6059 +0,0 @@
1<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
2 <channel>
3 <title>Mitja Felicijan's posts</title>
4 <link>https://mitjafelicijan.com</link>
5 <description>You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you.</description>
6 <language>en-us</language>
7
8
9
10 <item>
11 <title>Who knows what the world will look like tomorrow</title>
12 <link>https://mitjafelicijan.com/who-knows-what-the-world-will-look-like-tomorrow.html</link>
13 <pubDate>Sat, 08 Jul 2023 18:49:07 &#43;0200</pubDate>
14 <guid>https://mitjafelicijan.com/who-knows-what-the-world-will-look-like-tomorrow.html</guid>
15 <description>This site has gone through a lot of changes over the years.</description>
16 <content:encoded>&lt;p&gt;This site has gone through a lot of changes over the years. From being written
17in Flask and Bottle to moving on to static site generators. I have used and
18tested probably 10s of them my now. From homebrew solutions to the biggest and
19the baddest. From Bash scripts to Node.js disasters. I&#39;ve seen some things, no
20doubt. Not all bad.&lt;/p&gt;
21&lt;p&gt;I&#39;have been closely observing the web and where the trends are going, and I
22don&#39;t like what I see. Instead of internet being this weird place where
23experimentation is happening, it all became stale and formulized. Boring,
24actually. Really boring. And sad. Where is that old, revolutionary FU spirit I
25remember? It&#39;s still there, I know. But it&#39;s being drowned by the voices of
26mediocrity and formulaic boredom.&lt;/p&gt;
27&lt;p&gt;It almost feels like that the internet stopped for 10 years and only now
28something has started happening. With all the insanity around the world. People
29hating people without actual reasons, just because it&#39;s fashionable to hate and
30crowd is saying so. Sad state of affairs.&lt;/p&gt;
31&lt;p&gt;All this is contributing to this overall negativity masked as apathy. Everybody
32walking in lockstep. Instead of being creative are bold, we are just
33re-inventing the world and making the same mistakes. Maybe, just maybe, some
34things are good enough and there is no need to try to be too smart for our own
35good. After N-attempts, maybe something should click inside our heads to maybe
36say: &amp;quot;This thing, opinion, etc. is actually really good, and even after several
37attempts it still holds.&amp;quot;&lt;/p&gt;
38&lt;p&gt;The older I get, the more careful I am of my own thoughts and why I think the
39way I think. More and more, I try to understand people with opposite
40opinions. Far from perfect, but closer to bearable. And then I see people
41hearing or reading a thing on internet and let&#39;s fucking goooooo! Strong
42opinions are a sign of a weak and uneducated mind. I am more and more sure of
43this.&lt;/p&gt;
44&lt;p&gt;It&#39;s gotten to a point where you can with great certainty deduce a person&#39;s
45personality based on one or two opinions. How boring have we become. No wonder
46people can&#39;t talk to each other. These would be very quick conversations anyway.&lt;/p&gt;
47&lt;p&gt;I just got remembered of a song, &amp;quot;Hi Ren&amp;quot;. The ending talks about being stiff
48and not being able to dance. Such an amazing metaphor. And we as people have
49gone so far, we can&#39;t even walk or even crawl normally anymore. We have
50forgotten that the most beautiful things in life have a great deal of
51uncertainty about them. We want instant gratification. Not only that, but we
52want absolute obedience. Complete control over others, because we have zero
53control of ourselves. And all the lies we could tell ourselves will not help us
54in this situation.&lt;/p&gt;
55&lt;p&gt;It is funny how I catch myself from time to time being a complete idiot. It&#39;s
56like having an outer body experience. I can see myself being an idiot, and
57cannot stop myself. It serves as a learning lesson to stop before speaking. To
58think before saying. And to crawl before walking.&lt;/p&gt;
59&lt;p&gt;So there is still time. We can dance once more. All we need to do is stop for a
60second. Me and you. Us two is a start. Let&#39;s not try to change the world, but
61rather nudge ourselves just a tiny bit. And if we only did that. Each of us
62nudged ourselves a small, tiny bit, the world would heal. If we would just put
63down the phones and ignored Internet for a day or two. Put visiting websites
64that feed on us on hold. Listened to just one sentence and try to understand it
65from a person who we completely disagree with. I truly believe that this is
66possible.&lt;/p&gt;
67&lt;p&gt;Life is about suffering and joy. And instead of wishing suffering on others and
68excepting joy for yourselves, we should for a brief moment want suffering for
69ourselves and wish joy on others. Wouldn&#39;t that be an amazing sight to see?&lt;/p&gt;
70&lt;p&gt;I caught myself hating on Rust. And I deeply thought about it afterward. Why did
71I do it? It is obviously not for me. So why the hell was I being so negative
72towards it? I think that I know the answer. I was negative because that is
73easy. Because it&#39;s much easier to hate on things than to say to yourself: &amp;quot;Well,
74you know what? This is not for me. I will focus on creation and not
75destruction. This is who I want to be. This is what fills me with joy and
76purpose.&amp;quot; Where joy is keeping me happy and purpose scares the shit out of me
77and keeps me honest. This is who I want to be. Admit to myself when I am wrong
78and accept the faults that I have without reservation and with courage march on.&lt;/p&gt;
79&lt;p&gt;I just realized that this blog post is a sort of therapy for me. It&#39;s
80cathartic. Going thought the history of this site and remembering all the
81decisions and annoyances that came with it. When I was cursing at the tools. And
82time moved on, and the site is still here. It serves as a reminder that
83perseverance wins at the end. If we just let things go.&lt;/p&gt;
84&lt;p&gt;This came with a decision that simplifying life and removing all the unnecessary
85negativity is key. Rather than worrying about what the internet is saying, what
86the world is trying to take from you, you are the only one who can say no. And
87create instead of destroy.&lt;/p&gt;
88&lt;p&gt;I don&#39;t have an ending for this post, so I will say this. We live in the most
89amazing times in the recorded history, and we should be internally grateful for
90it. Create and study, this should be my mantra. Just create and let the world
91happen. And you feel yourself to be too certain, stop and check how deep in the
92shit you are already. Strong opinions are a sign of a weak and uneducated
93mind. Hate and disdain is for the weak.&lt;/p&gt;
94</content:encoded>
95 </item>
96
97
98
99 <item>
100 <title>Bringing all of my projects together under one umbrella</title>
101 <link>https://mitjafelicijan.com/bringing-all-of-my-projects-together-under-one-umbrella.html</link>
102 <pubDate>Sat, 01 Jul 2023 18:49:07 &#43;0200</pubDate>
103 <guid>https://mitjafelicijan.com/bringing-all-of-my-projects-together-under-one-umbrella.html</guid>
104 <description>What is the issue anyway?</description>
105 <content:encoded>&lt;h2 id=&#34;what-is-the-issue-anyway&#34;&gt;What is the issue anyway?&lt;/h2&gt;
106&lt;p&gt;Over the years, I have accumulated a bunch of virtual servers on my
107&lt;a href=&#34;https://www.digitalocean.com/&#34;&gt;DigitalOcean&lt;/a&gt; account for small experimental
108projects I dabble in. And this has resulted in quite a bill. I mean, I wouldn&#39;t
109care if these projects were actually being used. But there were just being there
110unused and wasting resources. Which makes this an unnecessary burden for me.&lt;/p&gt;
111&lt;p&gt;Most of them are just small HTML pages that have an endpoint or two to read data
112from or to, and for that reason I wrote servers left and right. To be honest,
113all of those things could have been done with &lt;a href=&#34;https://en.wikipedia.org/wiki/Common_Gateway_Interface&#34;&gt;CGI
114scripts&lt;/a&gt; and that would
115have been more than enough.&lt;/p&gt;
116&lt;p&gt;Recently, I decided to stop language hopping and focus on a simpler stack which
117includes C, Go and Lua. And I can accomplish all the things I am interested in.&lt;/p&gt;
118&lt;h2 id=&#34;finding-a-web-server-replacement&#34;&gt;Finding a web server replacement&lt;/h2&gt;
119&lt;p&gt;Usually I had &lt;a href=&#34;https://nginx.org/en/&#34;&gt;Nginx&lt;/a&gt; in front of these small web servers
120and I had to manage SSL certificates and all that jazz. I am bored with these
121things. I don&#39;t want to manage any of this bullshit anymore.&lt;/p&gt;
122&lt;p&gt;So the logical move forward was to find a solid alternative for this. I have
123ended up on &lt;a href=&#34;https://caddyserver.com/&#34;&gt;Caddy server&lt;/a&gt;. I&#39;ve used it in the past
124but kind of forgotten about it. What I really like about it is an ease of use
125and a bunch of out of the box functionalities that come with it.&lt;/p&gt;
126&lt;p&gt;These are the &lt;em&gt;pitch&lt;/em&gt; points from their website:&lt;/p&gt;
127&lt;ul&gt;
128&lt;li&gt;&lt;strong&gt;Secure by Default&lt;/strong&gt;: Caddy is the only web server that uses HTTPS by
129default. A hardened TLS stack with modern protocols preserves privacy and
130exposes MITM attacks.&lt;/li&gt;
131&lt;li&gt;&lt;strong&gt;Config API&lt;/strong&gt;: As its primary mode of configuration, Caddy&#39;s REST API makes
132it easy to automate and integrate with your apps.&lt;/li&gt;
133&lt;li&gt;&lt;strong&gt;No Dependencies&lt;/strong&gt;: Because Caddy is written in Go, its binaries are entirely
134self-contained and run on every platform, including containers without libc.&lt;/li&gt;
135&lt;li&gt;&lt;strong&gt;Modular Stack&lt;/strong&gt;: Take back control over your compute edge. Caddy can be
136extended with everything you need using plugins.&lt;/li&gt;
137&lt;/ul&gt;
138&lt;p&gt;I had just a few requirements:&lt;/p&gt;
139&lt;ul&gt;
140&lt;li&gt;Automatic SSL&lt;/li&gt;
141&lt;li&gt;Static file server&lt;/li&gt;
142&lt;li&gt;Basic authentication&lt;/li&gt;
143&lt;li&gt;CGI script support&lt;/li&gt;
144&lt;/ul&gt;
145&lt;p&gt;And the vanilla version does all of it, but CGI scripts. But that can easily be
146fixed with their modular approach. You can do this on their website and build a
147custom version of the server, or do it with Docker.&lt;/p&gt;
148&lt;p&gt;This is a &lt;code&gt;Dockerfile&lt;/code&gt; I used to build a custom server.&lt;/p&gt;
149&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;FROM&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; caddy:builder AS builder&lt;/span&gt;&lt;span style=&#34;&#34;&gt;
150&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;
151&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;RUN&lt;/span&gt; xcaddy build &lt;span style=&#34;color:#a31515&#34;&gt;\
152&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --with github.com/aksdb/caddy-cgi&lt;span style=&#34;&#34;&gt;
153&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;
154&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;FROM&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; caddy:latest&lt;/span&gt;&lt;span style=&#34;&#34;&gt;
155&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;RUN&lt;/span&gt; apk add --no-cache nano&lt;span style=&#34;&#34;&gt;
156&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;
157&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;COPY&lt;/span&gt; --from=builder /usr/bin/caddy /usr/bin/caddy&lt;span style=&#34;&#34;&gt;
158&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;getting-rid-of-all-the-unnecessary-virtual-machines&#34;&gt;Getting rid of all the unnecessary virtual machines&lt;/h2&gt;
159&lt;p&gt;The next step was to get a handle on the number of virtual servers I have all
160over the place.&lt;/p&gt;
161&lt;p&gt;I decided to move all the projects and services into two main VMs:&lt;/p&gt;
162&lt;ul&gt;
163&lt;li&gt;personal server (still Nginx)
164&lt;ul&gt;
165&lt;li&gt;git server&lt;/li&gt;
166&lt;li&gt;static file server&lt;/li&gt;
167&lt;li&gt;personal blog&lt;/li&gt;
168&lt;/ul&gt;
169&lt;/li&gt;
170&lt;li&gt;projects server (Caddy server)
171&lt;ul&gt;
172&lt;li&gt;personal experiments&lt;/li&gt;
173&lt;li&gt;other projects&lt;/li&gt;
174&lt;/ul&gt;
175&lt;/li&gt;
176&lt;/ul&gt;
177&lt;p&gt;I will focus on projects&#39; server in this post since it&#39;s more interesting.&lt;/p&gt;
178&lt;h2 id=&#34;testing-cgi-scripts&#34;&gt;Testing CGI scripts&lt;/h2&gt;
179&lt;p&gt;The first thing I tested was how CGI scripts work under Caddy. This is
180particularly import to me because almost all of my experiments and mini projects
181need this to work.&lt;/p&gt;
182&lt;p&gt;To configure Caddy server, you must provide the server with a configuration
183file. By default, it&#39;s called &lt;code&gt;Caaddyfile&lt;/code&gt;.&lt;/p&gt;
184&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
185&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;order&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;cgi&lt;/span&gt; before &lt;span style=&#34;color:#a31515&#34;&gt;respond&lt;/span&gt;
186&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
187&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
188&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;examples.mitjafelicijan.com&lt;/span&gt; {
189&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /bash-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/bash-test.sh&lt;/span&gt;
190&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /tcl-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/tcl-test.tcl&lt;/span&gt;
191&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /lua-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/lua-test.lua&lt;/span&gt;
192&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /python-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/python-test.py&lt;/span&gt;
193&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
194&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;root&lt;/span&gt; * &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples&lt;/span&gt;
195&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;file_server&lt;/span&gt;
196&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
197&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
198&lt;li&gt;The order is very important. Make sure that &lt;code&gt;order cgi before respond&lt;/code&gt; is at
199the top of the configuration file.&lt;/li&gt;
200&lt;li&gt;Also, when you run with Caddy v2, make sure you provide &lt;code&gt;adapter&lt;/code&gt; argument
201like this &lt;code&gt;/usr/bin/caddy run --watch --environ --config /etc/caddy/Caddyfile --adapter caddyfile&lt;/code&gt;. Otherwise, Caddy will try to use a different format for
202config file.&lt;/li&gt;
203&lt;/ul&gt;
204&lt;p&gt;I did a small batch of tests with &lt;a href=&#34;https://www.gnu.org/software/bash/&#34;&gt;Bash&lt;/a&gt;,
205&lt;a href=&#34;https://www.tcl-lang.org/&#34;&gt;Tcl&lt;/a&gt;, &lt;a href=&#34;https://www.lua.org/&#34;&gt;Lua&lt;/a&gt; and
206&lt;a href=&#34;https://www.python.org/&#34;&gt;Python&lt;/a&gt;. Here is a cheat sheet if you need it.&lt;/p&gt;
207&lt;p&gt;Let&#39;s get Bash out of the way first.&lt;/p&gt;
208&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/usr/bin/bash
209&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
210&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Content-type: text/plain\n\n&amp;#34;&lt;/span&gt;
211&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
212&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello from Bash\n\n&amp;#34;&lt;/span&gt;
213&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PATH_INFO [%s]\n&amp;#34;&lt;/span&gt; $PATH_INFO
214&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;QUERY_STRING [%s]\n&amp;#34;&lt;/span&gt; $QUERY_STRING
215&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;\n&amp;#34;&lt;/span&gt;
216&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
217&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i in {0..9..1}; &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
218&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; %s\n&amp;#34;&lt;/span&gt; $i
219&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
220&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
221&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exit 0
222&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This one is for Tcl script.&lt;/p&gt;
223&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;#!/usr/bin/tclsh
224&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;
225&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Content-type: text/plain\n&amp;#34;&lt;/span&gt;
226&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
227&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello from Tcl\n&amp;#34;&lt;/span&gt;
228&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PATH_INFO \[$env(PATH_INFO)\]&amp;#34;&lt;/span&gt;
229&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;QUERY_STRING \[$env(QUERY_STRING)\]&amp;#34;&lt;/span&gt;
230&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
231&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
232&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;{set&lt;/span&gt; i 0&lt;span style=&#34;color:#00f&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;{&lt;/span&gt;$i &amp;lt; 10&lt;span style=&#34;color:#00f&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;{&lt;/span&gt;incr i&lt;span style=&#34;color:#00f&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;{&lt;/span&gt;
233&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; puts &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; $i&amp;#34;&lt;/span&gt;
234&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;}&lt;/span&gt;
235&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And for all you Python enjoyers.&lt;/p&gt;
236&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;#!/usr/bin/python3&lt;/span&gt;
237&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
238&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; os
239&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
240&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Content-type: text/plain&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;)
241&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
242&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello from Python&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;)
243&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PATH_INFO [&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;]&amp;#34;&lt;/span&gt;.format(os.environ[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;PATH_INFO&amp;#39;&lt;/span&gt;]))
244&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;QUERY_STRING [&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;]&amp;#34;&lt;/span&gt;.format(os.environ[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;QUERY_STRING&amp;#39;&lt;/span&gt;]))
245&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;)
246&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
247&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; range(10):
248&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;.format(i))
249&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And for the final example, Lua.&lt;/p&gt;
250&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/usr/bin/lua&lt;/span&gt;
251&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
252&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Content-type: text/plain&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;)
253&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
254&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello from Lua&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;)
255&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(string.format(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PATH_INFO [%s]&amp;#34;&lt;/span&gt;, os.getenv(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PATH_INFO&amp;#34;&lt;/span&gt;)))
256&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(string.format(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;QUERY_STRING [%s]&amp;#34;&lt;/span&gt;, os.getenv(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;QUERY_STRING&amp;#34;&lt;/span&gt;)))
257&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print()
258&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
259&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i = 0, 9 &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
260&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(string.format(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; %d&amp;#34;&lt;/span&gt;, i))
261&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
262&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;basic-authentication&#34;&gt;Basic authentication&lt;/h2&gt;
263&lt;p&gt;One thing was also to have an option for some sort of authentication, and
264something like &lt;a href=&#34;https://en.wikipedia.org/wiki/Basic_access_authentication&#34;&gt;Basic access
265authentication&lt;/a&gt; would
266be more than enough.&lt;/p&gt;
267&lt;p&gt;Thankfully, Caddy supports this out of the box already. Below is an updated
268example.&lt;/p&gt;
269&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
270&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;order&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;cgi&lt;/span&gt; before &lt;span style=&#34;color:#a31515&#34;&gt;respond&lt;/span&gt;
271&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
272&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
273&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;examples.mitjafelicijan.com&lt;/span&gt; {
274&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /bash-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/bash-test.sh&lt;/span&gt;
275&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /tcl-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/tcl-test.tcl&lt;/span&gt;
276&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /lua-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/lua-test.lua&lt;/span&gt;
277&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;cgi&lt;/span&gt; /python-test &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples/python-test.py&lt;/span&gt;
278&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
279&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;root&lt;/span&gt; * &lt;span style=&#34;color:#a31515&#34;&gt;/opt/projects/examples&lt;/span&gt;
280&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;file_server&lt;/span&gt;
281&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
282&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;basicauth&lt;/span&gt; * {
283&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;bob&lt;/span&gt; &lt;span style=&#34;&#34;&gt;$&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;2a&lt;/span&gt;&lt;span style=&#34;&#34;&gt;$&lt;/span&gt;14&lt;span style=&#34;&#34;&gt;$&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;/wCgaf9oMnmQa20txB76u.nI1AldGMBT/1J7fXCfgOiRShwz/JOkK&lt;/span&gt;
284&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
285&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
286&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;basicauth *&lt;/code&gt; matches everything under this domain/sub-domain and protects it
287with Basic Authentication.&lt;/p&gt;
288&lt;ul&gt;
289&lt;li&gt;&lt;code&gt;bob&lt;/code&gt; is the username&lt;/li&gt;
290&lt;li&gt;&lt;code&gt;hash&lt;/code&gt; is the password&lt;/li&gt;
291&lt;/ul&gt;
292&lt;p&gt;To generate these passwords, execute &lt;code&gt;caddy hash-password&lt;/code&gt; and this will prompt
293you to insert a password twice and spit out a hashed password that you can put
294in your configuration file.&lt;/p&gt;
295&lt;p&gt;Restart the server and you are ready to go.&lt;/p&gt;
296&lt;h2 id=&#34;making-caddy-a-service-with-systemd&#34;&gt;Making Caddy a service with systemd&lt;/h2&gt;
297&lt;p&gt;After the tests were successful, I copied &lt;code&gt;caddy&lt;/code&gt; to &lt;code&gt;/usr/bin/caddy&lt;/code&gt; and copied
298&lt;code&gt;Caddyfile&lt;/code&gt; to &lt;code&gt;/etc/caddy/Caddyfile&lt;/code&gt;.&lt;/p&gt;
299&lt;p&gt;Now off to the systemd. Each systemd service requires you to create a service
300file.&lt;/p&gt;
301&lt;ul&gt;
302&lt;li&gt;I created a &lt;code&gt;/etc/systemd/system/caddy.service&lt;/code&gt; and put the following content
303in the file.&lt;/li&gt;
304&lt;/ul&gt;
305&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Unit]&lt;/span&gt;
306&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Description=&lt;span style=&#34;color:#a31515&#34;&gt;Caddy&lt;/span&gt;
307&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Documentation=&lt;span style=&#34;color:#a31515&#34;&gt;https://caddyserver.com/docs/&lt;/span&gt;
308&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;After=&lt;span style=&#34;color:#a31515&#34;&gt;network.target network-online.target&lt;/span&gt;
309&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Requires=&lt;span style=&#34;color:#a31515&#34;&gt;network-online.target&lt;/span&gt;
310&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
311&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Service]&lt;/span&gt;
312&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Type=&lt;span style=&#34;color:#a31515&#34;&gt;notify&lt;/span&gt;
313&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;User=&lt;span style=&#34;color:#a31515&#34;&gt;root&lt;/span&gt;
314&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Group=&lt;span style=&#34;color:#a31515&#34;&gt;root&lt;/span&gt;
315&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ExecStart=&lt;span style=&#34;color:#a31515&#34;&gt;/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile --adapter caddyfile&lt;/span&gt;
316&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ExecReload=&lt;span style=&#34;color:#a31515&#34;&gt;/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force --adapter caddyfile&lt;/span&gt;
317&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TimeoutStopSec=&lt;span style=&#34;color:#a31515&#34;&gt;5s&lt;/span&gt;
318&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LimitNOFILE=&lt;span style=&#34;color:#a31515&#34;&gt;1048576&lt;/span&gt;
319&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LimitNPROC=&lt;span style=&#34;color:#a31515&#34;&gt;512&lt;/span&gt;
320&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PrivateTmp=&lt;span style=&#34;color:#a31515&#34;&gt;true&lt;/span&gt;
321&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ProtectSystem=&lt;span style=&#34;color:#a31515&#34;&gt;full&lt;/span&gt;
322&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AmbientCapabilities=&lt;span style=&#34;color:#a31515&#34;&gt;CAP_NET_ADMIN CAP_NET_BIND_SERVICE&lt;/span&gt;
323&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
324&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Install]&lt;/span&gt;
325&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WantedBy=&lt;span style=&#34;color:#a31515&#34;&gt;multi-user.target&lt;/span&gt;
326&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
327&lt;li&gt;You might need to reload systemd with &lt;code&gt;systemctl daemon-reload&lt;/code&gt;.&lt;/li&gt;
328&lt;li&gt;Then I enabled the service with &lt;code&gt;systemctl enable caddy.service&lt;/code&gt;.&lt;/li&gt;
329&lt;li&gt;And then I started the service with &lt;code&gt;systemctl start caddy.service&lt;/code&gt;.&lt;/li&gt;
330&lt;/ul&gt;
331&lt;p&gt;This was about all that I needed to do to get it running. Now I can easily add
332new subdomains and domains to the main configuration file and be done with
333it. No manual Let&#39;s Encrypt shenanigans needed.&lt;/p&gt;
334</content:encoded>
335 </item>
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355 <item>
356 <title>Re-Inventing Task Runner That I Actually Used Daily</title>
357 <link>https://mitjafelicijan.com/re-inventing-task-runner-that-i-actually-used-daily.html</link>
358 <pubDate>Wed, 31 May 2023 12:21:10 &#43;0200</pubDate>
359 <guid>https://mitjafelicijan.com/re-inventing-task-runner-that-i-actually-used-daily.html</guid>
360 <description>Couple of months ago I had this brilliant idea of re-inventing the wheel bymaking an alternative for make.</description>
361 <content:encoded>&lt;p&gt;Couple of months ago I had this brilliant idea of re-inventing the wheel by
362making an alternative for make. And so I went. Boldly into the battle. And to my
363big surprise my attempt resulted in not a completely useless piece of software.&lt;/p&gt;
364&lt;p&gt;My initial requirements were quite simple but soon grow into something more
365ambitious. And looking back I should have stuck to the simple version. My
366laziness was on my side this time though. Because I haven’t implemented some of
367the features I now realise I really didn’t need them and they would bog the
368whole program and make it be something it was never meant to be.&lt;/p&gt;
369&lt;p&gt;My basic requirements were following:&lt;/p&gt;
370&lt;ul&gt;
371&lt;li&gt;Syntax should be a tiny bit inspired by Rake and Rakefiles.&lt;/li&gt;
372&lt;li&gt;Should borrow the overall feel of a unit test experience.&lt;/li&gt;
373&lt;li&gt;Using something like Python would be a bit of an overkill.&lt;/li&gt;
374&lt;li&gt;The program must be statically compiled, so it can run on same architecture
375without libc, musl dependencies or things like that.&lt;/li&gt;
376&lt;li&gt;Install ruby for rake is a bit overkill and can not be done with certain
377really lightweight distributions like Alpine Linux. This tool would be usable
378on such lightweight systems for remote debugging.&lt;/li&gt;
379&lt;li&gt;I want to use it for more than just compiling things. I want to use it as an
380entry-point into a project, and I want this to help me indirectly document the
381project as well.&lt;/li&gt;
382&lt;li&gt;It should be an abstraction over bash shell or the default system shell.
383&lt;ul&gt;
384&lt;li&gt;Each task essentially becomes its own shell instance.&lt;/li&gt;
385&lt;/ul&gt;
386&lt;/li&gt;
387&lt;li&gt;Must work on Linux and macOS systems.&lt;/li&gt;
388&lt;li&gt;By default, running &lt;code&gt;erd&lt;/code&gt; list all the available tasks (when I use make, I
389usually put a disclaimer that you should check Makefile to see all available
390target).&lt;/li&gt;
391&lt;li&gt;Should support passing arguments when you run it from a shell.&lt;/li&gt;
392&lt;li&gt;Normal variable as the same as environmental variables. There is no
393distinction. Every variable is also essentially an environment variable and
394can be used by other programs.&lt;/li&gt;
395&lt;li&gt;State between tasks is not shared, and this makes this “pure” shell instances.&lt;/li&gt;
396&lt;li&gt;Should be single-threaded for the start and later expanded with &lt;code&gt;@spawn&lt;/code&gt;
397command.&lt;/li&gt;
398&lt;li&gt;Variables behave like macros and are preprocessed before evaluation.&lt;/li&gt;
399&lt;li&gt;Should support something like &lt;code&gt;assure&lt;/code&gt; that would check if programs like C
400compiler or Python (whatever the project requires) are installed on a machine.&lt;/li&gt;
401&lt;/ul&gt;
402&lt;p&gt;Quite a reasonable list of requirements. I do this things already in my
403Makefiles or/and Bash scripts. But I would like to avoid repeating myself every
404time I start working on something new.&lt;/p&gt;
405&lt;p&gt;So I started with the following syntax.&lt;/p&gt;
406&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@env on
407&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
408&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Override the default shell.&lt;/span&gt;
409&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@shell &lt;span style=&#34;color:#a31515&#34;&gt;/bin/&lt;/span&gt;bash
410&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
411&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Assure that program is installed.&lt;/span&gt;
412&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@assure docker-compose pip python3
413&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
414&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Load local dotenv files (these are then globally available).&lt;/span&gt;
415&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@dotenv .env
416&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@dotenv .env.sample
417&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@dotenv some_other_file
418&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
419&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This are local variables but still accessible in tasks.&lt;/span&gt;
420&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@var HI = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;hey&amp;#34;&lt;/span&gt;
421&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@var TOKEN = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sometoken&amp;#34;&lt;/span&gt;
422&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@var EMAIL = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;m@m.com&amp;#34;&lt;/span&gt;
423&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@var PASSWORD = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;pass&amp;#34;&lt;/span&gt;
424&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@var EDITOR = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;vim&amp;#34;&lt;/span&gt;
425&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
426&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task dev &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Test chars .:&amp;#39;}{]!//&amp;#34;&lt;/span&gt; does
427&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;...&amp;#34;&lt;/span&gt; $HI
428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
429&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
430&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task clean &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Cleans the obj files&amp;#34;&lt;/span&gt; does
431&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; rm .obj
432&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
433&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
434&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task greet &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Greets the user&amp;#34;&lt;/span&gt; does
435&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hi user $TOKEN or $WINDOWID $EMAIL&amp;#34;&lt;/span&gt;
436&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
437&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
438&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task stack &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Starts Docker stack&amp;#34;&lt;/span&gt; does
439&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; docker-compose -f stack.yml up
440&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
441&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
442&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task todo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Shows all todos in source files and count them&amp;#34;&lt;/span&gt; does
443&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; grep -ir &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;TODO|FIXME&amp;#34;&lt;/span&gt; . | wc -l
444&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
445&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
446&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task test1 &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;For testing 1&amp;#34;&lt;/span&gt; does
447&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; unknown-command
448&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;test1&amp;#34;&lt;/span&gt;
449&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ls -lha
450&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
451&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
452&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@task test2 &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;For testing 2&amp;#34;&lt;/span&gt; does
453&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;test1&amp;#34;&lt;/span&gt;
454&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ls -lha
455&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; docker-compose -f samples/stack.yml up
456&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
457&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;One thing that I really like about Errand. Yes, this is what it is called. And
458it is available at &lt;a href=&#34;https://git.mitjafelicijan.com/errand.git/about/&#34;&gt;https://git.mitjafelicijan.com/errand.git/about/&lt;/a&gt;. Moving
459on. One thing that I really like is that a task is a persistent shell. By that I
460mean, that the whole task, even if it contains multiple command in one shell.
461In make each line in a target is that and you need to combine lines or add &lt;code&gt;\&lt;/code&gt;
462at the end of the line.&lt;/p&gt;
463&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# How you do this things in make.&lt;/span&gt;
464&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;target:
465&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; source .venv/bin/activate &lt;span style=&#34;color:#a31515&#34;&gt;\
466&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; python script.py
467&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This solves this problem. Consider each task and what is being executed in that
468task a shell that will only close when all the tasks are completed.&lt;/p&gt;
469&lt;p&gt;By self-documenting I mean that if you are in a directory with &lt;code&gt;Errandfile&lt;/code&gt; in,
470if you only type &lt;code&gt;erd&lt;/code&gt; and press enter it should by default display all the
471possible targets. In make i was doing this by having a first target be something
472like &lt;code&gt;default&lt;/code&gt; that echos the message “Check Makefile for all available target.”
473Because all of the tasks in Errand require a message I use that to display let’s
474call it table of contents.&lt;/p&gt;
475&lt;p&gt;Because I don’t use any external dependencies this whole thing can be statically
476compiled. So that also checked one of the boxes.&lt;/p&gt;
477&lt;p&gt;It works on Linux and on a Mac so that’s also a bonus. I don’t believe this
478would work on Windows machines because of the way that I use shell instances. By
479you could use something like Windows Subsystem for Linux and run it in
480there. That is a valid option.&lt;/p&gt;
481&lt;p&gt;To finish this essay off, how was it to use it in “real life”. I have to be
482honest. Some of the missing features still bother me. &lt;code&gt;@dotenv&lt;/code&gt; directive is
483still missing and I need to implement this ASAP.&lt;/p&gt;
484&lt;p&gt;Another thing that needs to happen is support for streaming output. Currently
485commands like &lt;code&gt;docker-compose&lt;/code&gt; that runs in foreground mode is not compatible
486with Errand. So commands that stream output are an issue. I need to revisit how
487I initiate shell and how I read stdout and stderr. But that shouldn’t be a
488problem.&lt;/p&gt;
489&lt;p&gt;I have been very satisfied with this thing. I am pleasantly surprised by how
490useful it is. I really wanted to test this in the wild before I commit to it. I
491have more abandoned project than Google and it’s bringing a massive shame to my
492family at this point. So I wanted to be sure that this is even useful. And it
493actually is. Quite surprised at myself.&lt;/p&gt;
494&lt;p&gt;I really need to package this now and write proper docs. And maybe rewrite
495tokeniser. Its atrocious right now. Site to behold! But that is an issue for
496another time.&lt;/p&gt;
497</content:encoded>
498 </item>
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522 <item>
523 <title>I think I was completely wrong about Git workflows</title>
524 <link>https://mitjafelicijan.com/i-was-wrong-about-git-workflows.html</link>
525 <pubDate>Tue, 23 May 2023 12:00:00 &#43;0200</pubDate>
526 <guid>https://mitjafelicijan.com/i-was-wrong-about-git-workflows.html</guid>
527 <description>I have been using some approximation of GitFlow for years now and never reallyquestioned it to be honest.</description>
528 <content:encoded>&lt;p&gt;I have been using some approximation of &lt;a href=&#34;https://jeffkreeftmeijer.com/git-flow/&#34;&gt;Git
529Flow&lt;/a&gt; for years now and never really
530questioned it to be honest. When I create a repo I create develop branch and set
531it as default one and then merge to master from there. Seems reasonable enough.&lt;/p&gt;
532&lt;p&gt;One thing that I have learned is that long living branches are the devil. They
533always end up making a huge mess when they need to be merged eventually into
534master. So by that reason, what is the develop branch if not the longest living
535feature branch. And from my personal experience there was never a situation
536where I wasn’t sweating bullets when I had to merge develop back to master.&lt;/p&gt;
537&lt;p&gt;This realisation started to give me pause. So why the hell am I doing this, and
538is there a better way. Well the solution was always there. And it comes in a
539form of &lt;a href=&#34;https://git-scm.com/book/en/v2/Git-Basics-Tagging&#34;&gt;git tags&lt;/a&gt;.&lt;/p&gt;
540&lt;p&gt;So what are git tags? Git tags are references to specific points in a Git
541repository&#39;s history. They are used to mark important milestones, such as
542releases or significant commits, making it easier to identify and access
543specific versions of a project.&lt;/p&gt;
544&lt;p&gt;Somehow we have all hijacked the meaning of the master branch that it has to be
545the most releasable version of code. And this is also where the confusing about
546versioning the software kicks in. Because master branch implicitly says that we
547are dealing with the rolling release type of a software. And by having a develop
548branch we are hacking around this confusion. With a separation of develop and
549master we lock functionalities into place and forcing a stable vs development
550version of the software.&lt;/p&gt;
551&lt;p&gt;But if that is true and the long living branches are the devil then why have
552develop at all. I think that most of this comes to how continuous integration is
553being done. There usually is no granular access to tags and CD software deploys
554what is present on a specific branch, may that be master for production and
555develop for staging. This is a gross simplification and by having this in place
556we have completely removed tagging as a viable option to create a fix point in
557software cycle that says, this is the production ready code.&lt;/p&gt;
558&lt;p&gt;One cool thing about tags are that you can checkout a specific tag. So they
559behave very similarly as branches in that regard. And you don’t have the
560overhead of having two mainstream branches.&lt;/p&gt;
561&lt;p&gt;So what is the solution? One approach is to use development workflow, where all
562changes are made on the smaller branches and continuously merged into
563master. Where the software is ready to be pushed to production you tag the
564master branch. This approach eliminates the need for long-lived branches and
565simplifies the development process. It also encourages developers to make small,
566incremental changes that can be tested and deployed quickly. However, this
567approach may not be suitable for all projects or teams that heavily rely on
568automated deployment based on branch names only.&lt;/p&gt;
569&lt;p&gt;This also requires that developers always keep production in mind. No more
570living on an island of the develop branch. All your actions and code need to be
571ready to meet production standards on a much smaller timescale.&lt;/p&gt;
572&lt;p&gt;I think that we have complicated the workflow in an honest attempt to make
573things more streamlined but in the process of doing this, we have inadvertently
574made our lives much more complicated.&lt;/p&gt;
575&lt;p&gt;In conclusion, it&#39;s important to re-evaluate our workflows from time to time to
576see if they still make sense and if there are better alternatives available.
577Long-living branches can be problematic, and using tags to mark important
578milestones can simplify the development process.&lt;/p&gt;
579</content:encoded>
580 </item>
581
582
583
584
585
586
587
588 <item>
589 <title>From General Zod to Superman - Crafting Stories in Zed Editor</title>
590 <link>https://mitjafelicijan.com/crafting-stories-in-zed-editor.html</link>
591 <pubDate>Mon, 22 May 2023 12:00:00 &#43;0200</pubDate>
592 <guid>https://mitjafelicijan.com/crafting-stories-in-zed-editor.html</guid>
593 <description>Pretentious title!</description>
594 <content:encoded>&lt;p&gt;Pretentious title! Good start! I have nothing to add to this discussion. I just
595like this editor and wanted to write something here that will remind me to use
596it again in a while when/if it becomes available for Linux.&lt;/p&gt;
597&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt; I think this code editor is very cool and has a massive potential. I
598hope they don’t mess up with adding a plugin ecosystem to it!&lt;/p&gt;
599&lt;p&gt;Out of morbid curiosity, I started using the &lt;a href=&#34;https://zed.dev/&#34;&gt;Zed editor&lt;/a&gt; on
600my Mac. Zed is a high-performance, multiplayer code editor developed by the
601creators of Atom and Tree-sitter. Written in Rust so it has to be blazingly
602fast! 😊 It&#39;s a joke, calm down.&lt;/p&gt;
603&lt;p&gt;Over the past year, I have switched between &lt;a href=&#34;https://helix-editor.com/&#34;&gt;Helix
604editor&lt;/a&gt; and &lt;a href=&#34;https://code.visualstudio.com/&#34;&gt;VS
605Code&lt;/a&gt;, but for the last couple of months, I have
606been using Helix exclusively.&lt;/p&gt;
607&lt;p&gt;I&#39;ve been genuinely impressed by Zed. When you open a file, it automatically
608detects its type and downloads the corresponding &lt;a href=&#34;https://en.wikipedia.org/wiki/Language_Server_Protocol&#34;&gt;LSP (language
609server)&lt;/a&gt;. The list of
610supported languages is not extensive, but it&#39;s still impressive. It&#39;s a great
611example of how to create a product that stays out of your way.&lt;/p&gt;
612&lt;p&gt;&lt;img src=&#34;/assets/zed/zed-1.png?style=bigimg&#34; alt=&#34;Zed editor&#34; /&gt;&lt;/p&gt;
613&lt;p&gt;For C development it downloaded &lt;a href=&#34;https://clangd.llvm.org/&#34;&gt;clangd&lt;/a&gt; and setting
614up missing dependencies in code was rather easy. For this project I use
615&lt;a href=&#34;https://www.libsdl.org/&#34;&gt;SDL2&lt;/a&gt; for rendering terminal emulator. It’s a hobby
616project, don’t worry about it.&lt;/p&gt;
617&lt;p&gt;If you are going to give this a try and you are using C, I suggest checking two
618files in the root of your project folder. If you don&#39;t have them, create them.&lt;/p&gt;
619&lt;p&gt;&lt;strong&gt;compile_flags.txt&lt;/strong&gt;&lt;/p&gt;
620&lt;pre&gt;&lt;code&gt;-I/opt/homebrew/include
621-I/opt/homebrew/include/SDL2
622&lt;/code&gt;&lt;/pre&gt;
623&lt;p&gt;Easy way of checking what the appropriate includes for a specific library is to
624use &lt;code&gt;pkg-config&lt;/code&gt; and in my case &lt;code&gt;pkg-config SDL2 --cflags-only-I&lt;/code&gt;. But this is
625nothing new to C/C&#43;&#43; devs. Just a noter for people who are using Visual Studio.&lt;/p&gt;
626&lt;p&gt;&lt;strong&gt;.clang-format&lt;/strong&gt;&lt;/p&gt;
627&lt;pre&gt;&lt;code&gt;ColumnLimit: 220
628BasedOnStyle: Mozilla
629&lt;/code&gt;&lt;/pre&gt;
630&lt;p&gt;I prefer Mozilla coding style for C so you can set that up.&lt;/p&gt;
631&lt;p&gt;They really have something special here. Although there is no version available
632for Linux yet, I will stick to Helix. This impressive piece of engineering is,
633above all, an amazing example of craftsmanship.&lt;/p&gt;
634&lt;p&gt;They have a bunch of amazing integrated functionalities like live desktop
635sharing, code sharing in a live coding session. There is a lot of pretentious
636marketing speak there but the product is still amazing!&lt;/p&gt;
637&lt;p&gt;For me the speed and the simplicity of the product was the most impressive
638thing. You get that: it just works feeling. A rare thing in 2023.&lt;/p&gt;
639&lt;p&gt;&lt;img src=&#34;/assets/zed/zed-2.png?style=bigimg&#34; alt=&#34;Zed editor&#34; /&gt;&lt;/p&gt;
640&lt;p&gt;They also managed to add &lt;a href=&#34;https://github.com/features/copilot&#34;&gt;Github Copilot&lt;/a&gt;
641in a non obtrusive way. To me, everything feels very intentional and
642specifically selected. It&#39;s minimal yet maximally effective.&lt;/p&gt;
643&lt;p&gt;&lt;video src=&#34;https://zed.dev/img/post/copilot/copilot-demo.webm&#34; autoplay loop&gt;&lt;/video&gt;&lt;/p&gt;
644&lt;p&gt;It is a perfect balance between VS Code, Jetbrains IDE’s and something like VIM
645or Helix.&lt;/p&gt;
646&lt;p&gt;I just hope they &lt;strong&gt;DON’T&lt;/strong&gt; add plugin support and keep it like it is. They as a
647vendor should add stuff to it with great deliberation and thought. And this way
648the product will stay fast and focused. That’s my two cents.&lt;/p&gt;
649&lt;p&gt;Amazing job!&lt;/p&gt;
650</content:encoded>
651 </item>
652
653
654
655
656
657
658
659 <item>
660 <title>Rekindling my love for programming and enjoying the act of creating</title>
661 <link>https://mitjafelicijan.com/rekindling-my-love-for-programming.html</link>
662 <pubDate>Tue, 16 May 2023 12:00:00 &#43;0200</pubDate>
663 <guid>https://mitjafelicijan.com/rekindling-my-love-for-programming.html</guid>
664 <description>Programming can be a challenging and rewarding experience, but sometimes it&amp;#39;seasy to feel burnt out or disinterested.</description>
665 <content:encoded>&lt;p&gt;Programming can be a challenging and rewarding experience, but sometimes it&#39;s
666easy to feel burnt out or disinterested. I have lost the passion for coding over
667the past couple of months and it looked like I will never enjoy the coding as
668much as I did.&lt;/p&gt;
669&lt;p&gt;I was feeling burnt out with programming. I thought taking a break from it and
670focusing on other activities that I enjoy might be helpful. This way, I could
671come back to programming with a fresh perspective and renewed energy. I also
672thought about learning a new programming language or technology to keep things
673interesting and challenging.&lt;/p&gt;
674&lt;p&gt;However, what I didn&#39;t realize was that learning a new language or technology
675wasn&#39;t going to solve the underlying issue. I needed to take a step back and
676re-evaluate why I had lost my passion for programming in the first place. This
677involved taking a deep look into what I was doing that resulted in this rut.&lt;/p&gt;
678&lt;p&gt;Sometimes, it&#39;s easy to get caught up in the hype of new technologies or
679languages, and we can feel like we&#39;re missing out if we&#39;re not constantly
680learning and experimenting. However, it&#39;s important to remember that the latest
681and greatest isn&#39;t always the best fit for our projects or our
682interests. Instead of constantly chasing the next big thing, it can be helpful
683to focus on what truly interests us and what we&#39;re passionate about. This can
684help us stay motivated and engaged with our work, rather than feeling like we&#39;re
685just going through the motions.&lt;/p&gt;
686&lt;p&gt;I expressed that I had lost my passion for coding over the past couple of
687months, and I realized that the reason behind it was my tendency to spread
688myself too thin and not focus on completing interesting projects. In order to
689regain my passion for coding, I need to focus on projects that truly interest me
690and give me a sense of purpose and motivation.&lt;/p&gt;
691&lt;p&gt;Recently, I have been playing World of Warcraft more frequently and have become
692interested in developing addons for the game.&lt;/p&gt;
693&lt;p&gt;This quickly resulted in me creating three addons that improve the quality of
694life, and I subsequently developed a more useful add-on that encapsulates all
695the others I made.&lt;/p&gt;
696&lt;p&gt;I found it interesting that this action sparked a new interest in me.
697Additionally, I discovered the Lua language, which reminded me that coding
698should be fun rather than just a struggle with a language. It should be pure,
699unadulterated fun.&lt;/p&gt;
700&lt;p&gt;I wasn&#39;t fighting the syntax, nor was I focused on finding the most optimal
701solution. I simply created things without the pressure of making them the best
702they could possibly be.&lt;/p&gt;
703&lt;p&gt;This made me realize that I actually adore simple languages that get out of the
704way and let you express what you want to do. It forced me to rethink a lot about
705what I use and what I actually enjoy.&lt;/p&gt;
706&lt;p&gt;I have decided to stick to the basics. For a scripting language, I will use
707Lua. For networking, I will use Golang. And for any special needs, I will rely
708on C. I do not require Rust, Nim, or Zig. This selection is more than sufficient
709for my needs. I have to stay true to this simplicity. There is something to the
710Occam&#39;s Razor.&lt;/p&gt;
711&lt;p&gt;I&#39;ve been struggling with a lack of creativity lately, but now I&#39;m experiencing
712a real change. I realized I needed to take a step back and stop actively trying
713to address the issue. I needed to stop worrying and overthinking it. I simply
714needed some time. Looking back, I don&#39;t think I&#39;ve taken any significant time
715off in the last 10 years.&lt;/p&gt;
716&lt;p&gt;Suddenly, I find myself with the energy and passion to complete multiple small
717projects. It doesn&#39;t feel like a chore at all. Who knew I needed WoW to
718kickstart everything. Inspiration really does come from the strangest places.&lt;/p&gt;
719</content:encoded>
720 </item>
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748 <item>
749 <title>Trying to build a New kind of terminal emulator for the modern age</title>
750 <link>https://mitjafelicijan.com/trying-to-build-a-new-kind-of-terminal-emulator.html</link>
751 <pubDate>Thu, 26 Jan 2023 12:00:00 &#43;0200</pubDate>
752 <guid>https://mitjafelicijan.com/trying-to-build-a-new-kind-of-terminal-emulator.html</guid>
753 <description>Over the past few weeks, I have been really thinking about terminal emulators,how we interact with computers, the separation of text-based programs and GUIones.</description>
754 <content:encoded>&lt;p&gt;Over the past few weeks, I have been really thinking about terminal emulators,
755how we interact with computers, the separation of text-based programs and GUI
756ones. To be perfectly honest, I got pissed off one evening when I was cleaning
757up files on my computer. Normally, I go into console and do &lt;code&gt;ncdu&lt;/code&gt; and check
758where the junk is. Then I start deleting stuff. Without any discrimination,
759usually. But when it comes to screenshots, I have learned that it&#39;s good to keep
760them somewhere near if I need to refer to something that I was doing. I am an
761avid screenshot taker. So at that point I checked Pictures folder and also did a
762basic search &lt;code&gt;find . -type f -name &amp;quot;*.jpg&amp;quot;&lt;/code&gt; for all the JPEG files in my home
763directory and immediately got pissed off. Why can’t I see thumbnails in my
764terminal? I know why, but why in the year of 2022 this is still a problem. I am
765used to traversing my disk via terminal. I am faster, and I am more comfortable
766this way. But when it comes to visualization, I then need to revert to GUI
767applications and again find the same file to see it. I know that programs like
768&lt;code&gt;feh&lt;/code&gt; and &lt;code&gt;sxiv&lt;/code&gt; are available, but I would just like to see the preview. Like
769&lt;a href=&#34;https://jupyter.org/&#34;&gt;Jupyter notebook&lt;/a&gt; or something similar. Just having it
770inline. Part of a result.&lt;/p&gt;
771&lt;p&gt;It also didn’t help that I was spending some time with the &lt;a href=&#34;https://plan9.io/plan9/&#34;&gt;Plan
7729&lt;/a&gt; Operating system. More specifically
773&lt;a href=&#34;http://9front.org/&#34;&gt;9FRONT&lt;/a&gt;. The way that &lt;a href=&#34;http://acme.cat-v.org/&#34;&gt;ACME editor&lt;/a&gt;
774handles text editing is just wonderful. Different and fresh somehow, even though
775it’s super old.&lt;/p&gt;
776&lt;p&gt;So, I went on a lookout for an interesting way of visualizing results of some
777query. I found these applications to be outstanding examples of how not to be a
778captive of a predetermined way of doing things.&lt;/p&gt;
779&lt;ul&gt;
780&lt;li&gt;&lt;a href=&#34;https://www.wolfram.com/mathematica/&#34;&gt;Wolfram Mathematica&lt;/a&gt;&lt;/li&gt;
781&lt;li&gt;&lt;a href=&#34;https://jupyter.org/&#34;&gt;Jupyter notebooks&lt;/a&gt;&lt;/li&gt;
782&lt;li&gt;&lt;a href=&#34;http://www.9front.org&#34;&gt;Plan 9 / 9FRONT&lt;/a&gt;&lt;/li&gt;
783&lt;li&gt;&lt;a href=&#34;https://templeos.org/&#34;&gt;Temple OS&lt;/a&gt;&lt;/li&gt;
784&lt;li&gt;&lt;a href=&#34;https://www.gnu.org/software/emacs/&#34;&gt;Emacs&lt;/a&gt;&lt;/li&gt;
785&lt;/ul&gt;
786&lt;p&gt;My idea is not as out there as ACME is, but it is a spin on the terminal
787emulators. I like the modes that Vi/Vim provides you with. I like the way the
788Emacs does its own &lt;code&gt;M-x&lt;/code&gt; &lt;code&gt;M-c&lt;/code&gt;. Furthermore, I really like how Mathematica and
789Jupyter present the data in a free flowing form. And I love how Temple OS is
790basically a C interpreter on some level.&lt;/p&gt;
791&lt;blockquote&gt;
792&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is part 1 of the journey. Nowhere finished yet. I am just
793tinkering with this at the moment. This whole thing can easily spectacularly
794fail.&lt;/p&gt;
795&lt;/blockquote&gt;
796&lt;p&gt;So I started. I knew that I wanted to have the couple of modes, but I didn’t
797like the repetition of keystrokes, so the only option was to have some sort of
798toggle and indicate to the user that they are in a special mode. Like Vi does
799for Normal and Visual mode.&lt;/p&gt;
800&lt;p&gt;These modes would for the first version be:&lt;/p&gt;
801&lt;ul&gt;
802&lt;li&gt;&lt;em&gt;Preview mode&lt;/em&gt; (toggle with Ctrl &#43; P)
803&lt;ul&gt;
804&lt;li&gt;When this mode would be enabled, the &lt;code&gt;ls&lt;/code&gt; command would try to find images
805from the results and display thumbnails from them in the terminal itself.
806No ASCII art. Proper images. In a grid!&lt;/li&gt;
807&lt;/ul&gt;
808&lt;/li&gt;
809&lt;li&gt;&lt;em&gt;Detach mode&lt;/em&gt; (toggle with Ctrl &#43; D)
810&lt;ul&gt;
811&lt;li&gt;When this mode would be enabled, every command would open a new window
812and execute that command in it. This would be useful for starting &lt;code&gt;htop&lt;/code&gt;
813in a separate window.&lt;/li&gt;
814&lt;/ul&gt;
815&lt;/li&gt;
816&lt;/ul&gt;
817&lt;p&gt;The reason for having these modes togglable is to not ask for previews every
818time. You enable a mode and until you disable it, it behaves that way. Purely
819out of ergonomic reasons.&lt;/p&gt;
820&lt;p&gt;I would like to treat every terminal I open as a session mentally. When I start
821using the terminal, I start digging deeper into the issue I am trying to
822resolve. And while I am doing this, I would like to open detached windows
823etc. A lot of these things can be done easily with something like
824&lt;a href=&#34;https://i3wm.org/&#34;&gt;i3&lt;/a&gt;, but also that pull you out of the context of what you
825were doing. I would like to orchestrate everything from one single point.&lt;/p&gt;
826&lt;p&gt;In planning for this project, I knew that I would need to use a language like C
827and a library such as &lt;a href=&#34;https://www.libsdl.org/&#34;&gt;SDL2&lt;/a&gt; in order to achieve the
828desired results. I had considered other options, but ultimately determined that
829&lt;a href=&#34;https://www.libsdl.org/&#34;&gt;SDL2&lt;/a&gt; was the best fit based on its capabilities and
830reputation in the programming community.&lt;/p&gt;
831&lt;p&gt;At first, I thought the idea of a hardware accelerated terminal was a bit of a
832joke. It seemed like such a niche and unnecessary feature, especially given the
833fact that terminal emulators have been around for decades and have always relied
834on software rendering. But to be fair, &lt;a href=&#34;https://alacritty.org/&#34;&gt;Alacritty&lt;/a&gt; is
835doing the same thing. Well, they are doing a remarkable job at it.&lt;/p&gt;
836&lt;p&gt;So, I embarked on a journey. Everything has to start somewhere. For me, it
837started with creating a window! It has to start somewhere. 🙂&lt;/p&gt;
838&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Oh, Hi Mark!
839&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Create the window, obviously.
840&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;SDL_Window *window = SDL_CreateWindow(
841&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
842&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; WINDOW_WIDTH, WINDOW_HEIGHT,
843&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
844&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I continued like this to get some text displayed on the screen.&lt;/p&gt;
845&lt;p&gt;I noted that
846&lt;a href=&#34;https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_Solid&#34;&gt;&lt;code&gt;TTF_RenderText_Solid&lt;/code&gt;&lt;/a&gt;
847rendered text really poorly. There were no antialiasing at all. In my wisdom, I
848never checked the documentation. Well, that was a fail. To uneducated like me:
849&lt;code&gt;TTF_RenderText_Solid&lt;/code&gt; renders Latin1 text at fast quality to a new 8-bit
850surface. So, that&#39;s why the texts looked like shit. No wonder.&lt;/p&gt;
851&lt;p&gt;Remarks on &lt;code&gt;TTF_RenderText_Solid&lt;/code&gt;: This function will allocate a new 8-bit,
852palettized surface. The surface&#39;s 0 pixel will be the colorkey, giving a
853transparent background. The 1 pixel will be set to the text color.&lt;/p&gt;
854&lt;p&gt;After I replaced it with
855&lt;a href=&#34;https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_LCD&#34;&gt;&lt;code&gt;TTF_RenderText_LCD&lt;/code&gt;&lt;/a&gt; which
856renders Latin1 text at LCD subpixel quality to a new ARGB surface, the text
857started looking good. Really make sure you read the documentation. It’s actually
858good. As a side note, you can find all the documentation regarding &lt;a href=&#34;https://wiki.libsdl.org/&#34;&gt;SDL2 on
859their Wiki&lt;/a&gt;.&lt;/p&gt;
860&lt;p&gt;After that was done, I started working on displaying other things like &lt;code&gt;Preview&lt;/code&gt;
861and &lt;code&gt;Detach&lt;/code&gt; modes. This wasn’t really that hard. In SDL2 you can check all the
862available events with &lt;code&gt;while (SDL_PollEvent(&amp;amp;event) &amp;gt; 0)&lt;/code&gt; and have a bunch of
863switch statements to determine which key is currently being pressed. More about
864keys, &lt;a href=&#34;https://documentation.help/SDL/sdlkey.html&#34;&gt;SDLKey&lt;/a&gt; and mroe about
865pooling the events on
866&lt;a href=&#34;https://documentation.help/SDL/sdlpollevent.html&#34;&gt;SDL_PollEvent&lt;/a&gt;.&lt;/p&gt;
867&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (SDL_PollEvent(&amp;amp;event) &amp;gt; 0)
868&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
869&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;switch&lt;/span&gt; (event.type)
870&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
871&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;case&lt;/span&gt; SDL_QUIT:
872&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; running = false;
873&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;break&lt;/span&gt;;
874&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
875&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;case&lt;/span&gt; SDL_TEXTINPUT:
876&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (!meta_key_pressed)
877&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
878&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; strncat(input_prompt_text, event.text.text, 1);
879&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; update_input_prompt = true;
880&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
881&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;break&lt;/span&gt;;
882&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
883&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
884&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After that was somewhat working correctly, I started creating a struct that
885would hold all the commands and results and I call them Cells. Yes, I stole that
886naming idea from Jupyter.&lt;/p&gt;
887&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;typedef&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;struct&lt;/span&gt;
888&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
889&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; *command;
890&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; *result;
891&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; SDL_Surface *surface;
892&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; SDL_Texture *texture;
893&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; SDL_Rect rect;
894&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;} Cell;
895&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I am at a place now where I am starting to implement scrolling. This will for
896sure be fun to code. Memory management in C is super easy. 😂&lt;/p&gt;
897&lt;p&gt;I have also added a simple &lt;a href=&#34;https://en.wikipedia.org/wiki/INI_file&#34;&gt;INI file like
898configuration&lt;/a&gt; support. It is done in an
899&lt;a href=&#34;https://github.com/nothings/stb/blob/master/docs/stb_howto.txt&#34;&gt;STB style of
900header&lt;/a&gt; and maps
901to specific options supported by the terminal. It is not universal, and the code
902below demonstrates how I will use it in the future.&lt;/p&gt;
903&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#ifndef CONFIG_H
904&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#define CONFIG_H
905&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
906&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/*
907&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This is a comment
908&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;
909&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This is the first configuration option
910&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;dettach=value11111
911&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;
912&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This is the second configuration option
913&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;preview=value22222
914&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;
915&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This is the third configuration option
916&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;debug=value33333
917&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;*/&lt;/span&gt;
918&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
919&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Define a struct to hold the configuration options
920&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;typedef&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;struct&lt;/span&gt;
921&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
922&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; dettach[256];
923&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; preview[256];
924&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; debug[256];
925&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;} Config;
926&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
927&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Read the configuration file and return the options as a struct
928&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;extern&lt;/span&gt; Config read_config_file(&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; *filename)
929&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
930&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Create a struct to hold the configuration options
931&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; Config config = {0};
932&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
933&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Open the configuration file
934&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; FILE *file = fopen(filename, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;r&amp;#34;&lt;/span&gt;);
935&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
936&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Read each line from the file
937&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; line[256];
938&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (fgets(line, &lt;span style=&#34;color:#00f&#34;&gt;sizeof&lt;/span&gt;(line), file))
939&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
940&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Check if this line is a comment or empty
941&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (line[0] == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#&amp;#39;&lt;/span&gt; || line[0] == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt;)
942&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;continue&lt;/span&gt;;
943&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
944&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Parse the line to get the option and value
945&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; option[128], value[128];
946&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (sscanf(line, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;%[^=]=%s&amp;#34;&lt;/span&gt;, option, value) != 2)
947&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;continue&lt;/span&gt;;
948&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
949&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Set the value of the appropriate option in the config struct
950&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (strcmp(option, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;dettach&amp;#34;&lt;/span&gt;) == 0)
951&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
952&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; strncpy(config.option1, value, &lt;span style=&#34;color:#00f&#34;&gt;sizeof&lt;/span&gt;(config.option1));
953&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (strcmp(option, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;preview&amp;#34;&lt;/span&gt;) == 0)
955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
956&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; strncpy(config.option2, value, &lt;span style=&#34;color:#00f&#34;&gt;sizeof&lt;/span&gt;(config.option2));
957&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
958&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (strcmp(option, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;debug&amp;#34;&lt;/span&gt;) == 0)
959&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
960&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; strncpy(config.option3, value, &lt;span style=&#34;color:#00f&#34;&gt;sizeof&lt;/span&gt;(config.option3));
961&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
962&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
963&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
964&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Close the configuration file
965&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; fclose(file);
966&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
967&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Return the configuration options
968&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; config;
969&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
970&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
971&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#endif
972&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is as far as I managed to get for now. I have a daily job and this
973prohibits me to work on these things full time. But I should probably get back
974and finish this. At least have a simple version working out, so I can start
975testing it on my machines. Fingers crossed. 🕵️‍♂️&lt;/p&gt;
976</content:encoded>
977 </item>
978
979
980
981 <item>
982 <title>Microsoundtrack — That sound that machine makes when struggling</title>
983 <link>https://mitjafelicijan.com/that-sound-that-machine-makes-when-struggling.html</link>
984 <pubDate>Sun, 16 Oct 2022 12:00:00 &#43;0200</pubDate>
985 <guid>https://mitjafelicijan.com/that-sound-that-machine-makes-when-struggling.html</guid>
986 <description>A couple of months ago, I got an idea about micro soundtracks.</description>
987 <content:encoded>&lt;p&gt;A couple of months ago, I got an idea about micro soundtracks. In this concept,
988you are the observer, director, and audience in this tiny movies.&lt;/p&gt;
989&lt;p&gt;What you do is to attempt to imagine what would be happening around you based on
990a title of the song and let the song help you fill the void in your story.&lt;/p&gt;
991&lt;p&gt;I made these songs is Logic Pro X. Every year or so I do this kind of thing and
992make a couple of songs similar to this. But this is the first time I am posting
993about it.&lt;/p&gt;
994&lt;p&gt;You can listen to the whole set on
995&lt;a href=&#34;https://www.youtube.com/watch?v=_5oXBhSmF3c&#34;&gt;Youtube&lt;/a&gt; or scroll down the page
996and there are embedded players for each song.&lt;/p&gt;
997&lt;h2 id=&#34;a-bunch-of-inter-dimensional-people-with-loud-clocks&#34;&gt;A bunch of inter-dimensional people with loud clocks&lt;/h2&gt;
998&lt;p&gt;A group of inter-dimensional people are going up and down the elevator with you
999while having loud clocks around their necks. Each clock ticks on a different
1000frequency. A lot of other sounds are getting drawn into your dimension,
1001resulting in a strange merging of dimensions.&lt;/p&gt;
1002&lt;iframe style=&#34;border: 0; width: 100%; height: 42px;&#34; src=&#34;https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1349272965/transparent=true/&#34; seamless title=&#34;Bandcamp&#34;&gt;&lt;a href=&#34;https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling&#34;&gt;That sound that machine makes when struggling by Mitja Felicijan&lt;/a&gt;&lt;/iframe&gt;
1003&lt;h2 id=&#34;two-black-holes-conversing-about-the-weather&#34;&gt;Two black holes conversing about the weather&lt;/h2&gt;
1004&lt;p&gt;You are a traveler in a spaceship flying very close to two colliding black holes
1005having a discussion about the weather while tearing each other apart. During all
1006this your ship is getting pulled into the event horizon of both black holes,
1007putting a lot of strain on your spaceship.&lt;/p&gt;
1008&lt;iframe style=&#34;border: 0; width: 100%; height: 42px;&#34; src=&#34;https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1756714200/transparent=true/&#34; seamless title=&#34;Bandcamp&#34;&gt;&lt;a href=&#34;https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling&#34;&gt;That sound that machine makes when struggling by Mitja Felicijan&lt;/a&gt;&lt;/iframe&gt;
1009&lt;h2 id=&#34;a-planet-where-every-organism-is-a-plant&#34;&gt;A planet where every organism is a plant&lt;/h2&gt;
1010&lt;p&gt;You land on a planet where every living organism is a plant and among those
1011plants some of them are highly intelligent, and you were asked to make first
1012contact with the native species. Your visit takes place in a giant cave where
1013you are meeting these plants, and they are talking to you.&lt;/p&gt;
1014&lt;iframe style=&#34;border: 0; width: 100%; height: 42px;&#34; src=&#34;https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=3710973979/transparent=true/&#34; seamless title=&#34;Bandcamp&#34;&gt;&lt;a href=&#34;https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling&#34;&gt;That sound that machine makes when struggling by Mitja Felicijan&lt;/a&gt;&lt;/iframe&gt;
1015&lt;h2 id=&#34;bio-implants-having-a-fit-and-reprogramming-your-brain&#34;&gt;Bio implants having a fit and reprogramming your brain&lt;/h2&gt;
1016&lt;p&gt;In a distant future where everybody has bio implants, you have just received
1017your first one, which happens to be a brain implant. Something goes wrong, and
1018your implant is starting to misbehave, and you are experiencing brain
1019malfunctions. You are on the streets at night a couple of hours after your
1020procedure. You can feel your sanity breaking down.&lt;/p&gt;
1021&lt;iframe style=&#34;border: 0; width: 100%; height: 42px;&#34; src=&#34;https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1157430581/transparent=true/&#34; seamless title=&#34;Bandcamp&#34;&gt;&lt;a href=&#34;https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling&#34;&gt;That sound that machine makes when struggling by Mitja Felicijan&lt;/a&gt;&lt;/iframe&gt;
1022&lt;h2 id=&#34;cow-animation&#34;&gt;Cow animation&lt;/h2&gt;
1023&lt;p&gt;I also made this little cow animation. Go into full screen to see the effects in
1024more details.&lt;/p&gt;
1025&lt;p&gt;&lt;video src=&#34;/assets/microsoundtrack/cow.m4v&#34; controls loop&gt;&lt;/video&gt;&lt;/p&gt;
1026</content:encoded>
1027 </item>
1028
1029
1030
1031 <item>
1032 <title>State of Web Technologies and Web development in year 2022</title>
1033 <link>https://mitjafelicijan.com/state-of-web-technologies-and-web-development-in-year-2022.html</link>
1034 <pubDate>Thu, 06 Oct 2022 12:00:00 &#43;0200</pubDate>
1035 <guid>https://mitjafelicijan.com/state-of-web-technologies-and-web-development-in-year-2022.html</guid>
1036 <description>Initial thoughtsThis post is a critique on the current state of web development.</description>
1037 <content:encoded>&lt;h2 id=&#34;initial-thoughts&#34;&gt;Initial thoughts&lt;/h2&gt;
1038&lt;p&gt;&lt;em&gt;This post is a critique on the current state of web development. It is an
1039opinionated post! I will learn more about this in the future, and probably
1040slightly change my mind about some of the things I criticize.&lt;/em&gt;&lt;/p&gt;
1041&lt;p&gt;I have started working on a hobby project about two weeks ago, and I wanted to
1042use that situation as a learning one. Trying new things, new technologies, new
1043tools. I always considered myself to be an adventurous person when it comes to
1044technology. I never shy away from trying new languages, new operating systems
1045etc. Likewise, I find the whole experience satisfying, and it tickles that part
1046of my brain that finds discovery the highest of the mountains to climb.&lt;/p&gt;
1047&lt;p&gt;What I always wanted to make was a coding game, that you would play in a browser
1048(just to eliminate building binaries for each operating system) where you would
1049level up your character and go into these scriptable battles. You know, RPG
1050elements.&lt;/p&gt;
1051&lt;p&gt;So, the natural way to go would be some sort of SPA (single page application)
1052with basic routing and some state management. Nothing crazy.&lt;/p&gt;
1053&lt;blockquote&gt;
1054&lt;p&gt;&lt;strong&gt;Before we move on&lt;/strong&gt;, I have to be transparent. Take my views on this with
1055a grain of salt. I have only scratched the surface with these technologies,
1056and my knowledge is full of gaps. This is my experience using some of these
1057products for the first time or in a limited capacity.&lt;/p&gt;
1058&lt;/blockquote&gt;
1059&lt;p&gt;Having this out of the way, I got myself a fresh pot of coffee and down the
1060rabbit hole I went.&lt;/p&gt;
1061&lt;h2 id=&#34;giving-react-js-a-spin&#34;&gt;Giving React JS a spin&lt;/h2&gt;
1062&lt;p&gt;I first tried &lt;a href=&#34;https://reactjs.org/&#34;&gt;React JS&lt;/a&gt;. I kind of like it. Furthermore,
1063I have worked with libraries like this in the past and also wrote a couple of
1064them (nothing compared to that level), but I had the basic understanding of what
1065was going on. I rolled up a project quickly and had basic things done in a
1066matter of two hours, which was impressive.&lt;/p&gt;
1067&lt;p&gt;I prefer using &lt;a href=&#34;https://tailwindcss.com/&#34;&gt;Tailwind CSS&lt;/a&gt; for my styling
1068pleasures, and integrating that was also a painless experience. It was actually
1069nice to see that some things got better with time. In about 2 minutes I got
1070Tailwind working, and I was able to use classes at my disposal. All that
1071&lt;code&gt;postcss&lt;/code&gt; stuff was taken care of by adding a couple of things in config files
1072(all described really well in their documentation).&lt;/p&gt;
1073&lt;p&gt;It is not that different from Vue which I have had more encounters with in the
1074past People will probably call me a lunatic for saying this. But you know, it is
1075the truth. Same same, but different. I still believe that using libraries like
1076this is beneficial. I am not a JavaScript purist. They all have their quirks,
1077but at the end of the day, I truly believe it’s worth it.&lt;/p&gt;
1078&lt;h2 id=&#34;bundlers-and-transpilers&#34;&gt;Bundlers and Transpilers&lt;/h2&gt;
1079&lt;p&gt;I still reject calling &lt;a href=&#34;https://www.typescriptlang.org/&#34;&gt;Typescript&lt;/a&gt; to
1080&lt;a href=&#34;https://www.javascript.com/&#34;&gt;JavaScript&lt;/a&gt; conversion a &amp;quot;compilation process&amp;quot;. I
1081call them &lt;a href=&#34;https://devopedia.org/transpiler&#34;&gt;transpilers&lt;/a&gt;, and I don’t care! 😈&lt;/p&gt;
1082&lt;p&gt;And if you want to fight this, take a look at this little chart and be mad at
1083it!&lt;/p&gt;
1084&lt;p&gt;&lt;img src=&#34;/assets/state-of-web/compiling-vs-transpiling.png&#34; alt=&#34;Compiling vs Transpiling&#34; /&gt;&lt;/p&gt;
1085&lt;p&gt;The first one that I ever used was &lt;a href=&#34;https://webpack.js.org/&#34;&gt;webpack&lt;/a&gt;, and it
1086was an absolute horrific experience. Saying this, it is an absolutely fantastic
1087tool. I felt more like a config editor than actually a programmer. To be fair,
1088I am a huge fan of &lt;a href=&#34;https://www.gnu.org/software/make/&#34;&gt;make&lt;/a&gt;, and you can do as
1089you wish with this information. I like my build systems simple.&lt;/p&gt;
1090&lt;p&gt;Also, isn’t it interesting that we need something like
1091&lt;a href=&#34;https://babeljs.io/&#34;&gt;Babel&lt;/a&gt; to make JavaScript code work in a browser that has
1092only one client side scripting available, which is by no accident also
1093JavaScript. Why? I know why it’s needed, but seriously, why.&lt;/p&gt;
1094&lt;p&gt;I haven’t used Babel for years now. Or if I did, it was packaged together by
1095some other bundler thingy. Which does not make things better, but at least I
1096didn’t need to worry about it.&lt;/p&gt;
1097&lt;p&gt;I really don’t like complicated build systems. I really don’t like abstracting
1098code and making things appear magical. The older I get, the more I appreciate
1099clear and clean, expressive code. No one-liners, if possible.&lt;/p&gt;
1100&lt;p&gt;But I have to give props to &lt;a href=&#34;https://vitejs.dev/&#34;&gt;Vite&lt;/a&gt;! This was one of the
1101best developer experiences I have ever had. Granted, it still has magical
1102properties. And yes, it still is a bundler and abstracts things to the nth
1103degree. But at least it didn’t force me to configure 700 lines of JSON. And I
1104know that this makes me a hypocrite. You can’t have it all. Nonetheless, my
1105reasoning here is, if using bundlers is inevitable, then at least they should
1106provide an excellent developer experience.&lt;/p&gt;
1107&lt;p&gt;I also noticed that now the catch-all phrase is “blazingly fast” and “lightning
1108fast” and “next generation” and stuff like that. I mean, yeah, tools should get
1109faster with time. But saying that starting a project now takes 2 seconds instead
1110of 20 seconds is something that is a break it or make it kind of a deal is
1111ridiculous. I don’t mind waiting a couple of seconds every couple of days. I
1112also don’t create 700 projects every day, and also who does? This argument has
1113no bite. All I want is a decent reload time (~100ms is more than good enough for
1114me) and that is it.&lt;/p&gt;
1115&lt;p&gt;You don’t need to sell me benefits if I only get them when I start a fresh
1116project, and then try to convince me that this is somehow changing the fate of
1117the universe. First of all, it is not. And second, if this is your only argument
1118for your tool, I would advise you to maybe re-focus your efforts to something
1119else. Vite says that startup times are really fast. And if that would be the
1120only thing differentiating it from other tools, I would ignore it. But it has
1121some really compelling features like &lt;a href=&#34;https://www.geeksforgeeks.org/reactjs-hot-module-replacement/&#34;&gt;Hot Module
1122Replacement&lt;/a&gt; that
1123really works well. It was a joy to use.&lt;/p&gt;
1124&lt;p&gt;So, I will be definitely using Vite in the future.&lt;/p&gt;
1125&lt;h2 id=&#34;jam-stack-mach-stack-no-snack&#34;&gt;Jam Stack, Mach Stack no snack&lt;/h2&gt;
1126&lt;p&gt;Let&#39;s get a couple of the acronyms out of the way, so we all know what we are
1127talking about:&lt;/p&gt;
1128&lt;ul&gt;
1129&lt;li&gt;Jam Stack - JavaScript, API and Markup&lt;/li&gt;
1130&lt;li&gt;Mach Stack - Microservices, API-first, Cloud-Native SaaS, Headless&lt;/li&gt;
1131&lt;/ul&gt;
1132&lt;p&gt;It is so hard to follow all these new trendy things happening around you, that
1133it makes you have a massive &lt;strong&gt;FOMO&lt;/strong&gt; all the time. But on the other hand, you
1134also don’t want to be that old fart that doesn’t move with the times and still
1135writes his trusty jQuery code while listening to Blink 182 All the small things
1136on full blast. It’s a good song, don’t get me wrong, but there are other songs
1137out there.&lt;/p&gt;
1138&lt;p&gt;I have to admit. &lt;a href=&#34;https://vercel.com/&#34;&gt;Vercel&lt;/a&gt; is really cool! Love the
1139simplicity of the service. You could compare it to
1140&lt;a href=&#34;https://www.netlify.com/&#34;&gt;Netlify&lt;/a&gt;. I haven’t tried Netlify extensively, but
1141from a couple of experimental deployments I still prefer Vercel. It is much more
1142streamlined, but maybe this is bias in me. I really like Vercel’s Analytics,
1143which give you a &lt;a href=&#34;https://web.dev/vitals/&#34;&gt;Core Web Vitals report&lt;/a&gt; in their
1144admin console. Kind of cool, I’m not going to lie.&lt;/p&gt;
1145&lt;p&gt;This whole idea about frontend and backend merging into &lt;a href=&#34;https://www.debugbear.com/blog/server-side-rendering&#34;&gt;SSR (server-side
1146rendering)&lt;/a&gt; looks so good
1147on paper. It almost doesn’t come with any major flaws.&lt;/p&gt;
1148&lt;p&gt;But when it comes to the actual implementation, there is much to be desired.
1149I’m going to lump &lt;a href=&#34;https://nextjs.org/&#34;&gt;Next.js&lt;/a&gt; and
1150&lt;a href=&#34;https://nuxtjs.org/&#34;&gt;Nuxt.js&lt;/a&gt; together because they are essentially the same
1151thing, just a different library.&lt;/p&gt;
1152&lt;p&gt;Now comes the reality. Mixing backend and frontend in this manner creates this
1153weird mental model where you kind of rely on magical properties of these
1154libraries. You relinquish control over to them for better developer experience.
1155But is that really true? Initially, I was so stoked about it. However, the more
1156I used them, the more I felt uncomfortable. I felt dirty, actually. Maybe this
1157is because I come from old ways of doing things where you control every step of
1158request, and allowing something to hijack it feels like blasphemy.&lt;/p&gt;
1159&lt;p&gt;More than that, some pretty significant technical issues arose from this. How do
1160you do JWT token authentication? You put it in &lt;code&gt;api&lt;/code&gt; folder and then do some
1161fetching and storing into local state management. But doing this also requires
1162some tinkering with await/async stuff on the React/Vue side of things. And then
1163you need to write middleware for it. And the more I look at it, the more I see
1164that this whole thing was not meant to be used like this, and it all feels and
1165looks like a huge hack.&lt;/p&gt;
1166&lt;p&gt;The issue I have with this is that they over-promise and under-deliver. They
1167want to be an all-in-one replacement for everything, and they don’t deliver on
1168this promise. And how could they?! We have to be fair. It is an impossible task.&lt;/p&gt;
1169&lt;p&gt;They sell you &lt;a href=&#34;https://www.geeksforgeeks.org/overview-of-noops/&#34;&gt;NoOps&lt;/a&gt;, but
1170when you need to accomplish something a little bit more out of the scope of
1171Hello World, you have to make hacky decisions to make it work. And having a
1172deployment strategy that relies on many moving parts is never a good idea.
1173Abstracting too much is usually a sign of bad architecture.&lt;/p&gt;
1174&lt;p&gt;Lately, this has become a huge trend that will for sure bite us in the future.
1175And let’s not get it twisted. By doing this, PaaS providers like
1176&lt;a href=&#34;https://aws.amazon.com/&#34;&gt;AWS&lt;/a&gt;, &lt;a href=&#34;https://cloud.google.com/&#34;&gt;GCS&lt;/a&gt;, etc. obscure
1177their billing, and you end up paying more than you really should. And even if
1178that is not an issue, it comes down to the principle of things. AWS is known for
1179having multiple “currencies“ inside their projects like write operations, read
1180operations, etc. which add up, and it creates this impossible to track billing
1181scheme. It all behaves suspiciously like a pay-to-win game you could find on
1182mobile phones that scams you out of your money.&lt;/p&gt;
1183&lt;p&gt;And as far as I am concerned, the most important thing was me not coding the
1184functionalities for the game I want to make. I was battling libraries and cloud
1185providers. How to deploy, what settings are relevant. Bad documentation or
1186multiple versions of achieving the same thing. You are getting bombarded by all
1187this information, and you don’t really have any control over it.
1188Production-ready code becomes a joke, essentially. Especially if you tend to
1189work on that project for a prolonged period of time.&lt;/p&gt;
1190&lt;p&gt;All of these options end up creating a fatigue. What to choose, what not to
1191choose. Unnecessary worrying about if the stack will still be deemed worthy in
1192six months. There is elegance in simplicity.&lt;/p&gt;
1193&lt;blockquote&gt;
1194&lt;p&gt;JavaScript UI frameworks and libraries work in cycles. Every six months or
1195so, a new one pops up, claiming that it has revolutionized UI development.
1196Thousands of developers adopt it into their new projects, blog posts are
1197written, Stack Overflow questions are asked and answered, and then a newer
1198(and even more revolutionary) framework pops up to usurp the throne.
1199— Ian Allen&lt;/p&gt;
1200&lt;/blockquote&gt;
1201&lt;p&gt;&lt;img src=&#34;/assets/state-of-web/2008-vs-2020.png&#34; alt=&#34;To many options&#34; /&gt;&lt;/p&gt;
1202&lt;p&gt;And this jab at these libraries and cloud providers is not done out of malice.
1203It is a real concern that I have about them. In my life, I have seen
1204technologies come and go, but the basics always stick around. So surrendering
1205all the power you have to a library or a cloud provider is in my opinion a
1206stupid move.&lt;/p&gt;
1207&lt;h2 id=&#34;tailwind-css-still-rocks&#34;&gt;Tailwind CSS still rocks!&lt;/h2&gt;
1208&lt;p&gt;You know, many people say negative things about Tailwind. And after a lot of
1209deliberation, I came to the conclusion that Tailwind is good for two types of
1210developers. Tailwind is good for a complete noob or a senior developer. A
1211complete noob doesn’t really care about inner workings of CSS, and a senior
1212developer also doesn’t care about CSS. Well, at least, not anymore. And
1213developers in between usually have the biggest issues with it. Not always of
1214course, but in a lot of cases.&lt;/p&gt;
1215&lt;p&gt;I like the creature comforts of Tailwind. Being utility first would make me
1216argue that it is actually more similar to &lt;a href=&#34;https://sass-lang.com/&#34;&gt;Sass&lt;/a&gt; or
1217&lt;a href=&#34;https://lesscss.org/&#34;&gt;Less&lt;/a&gt; than something like Bootstrap. Not technically, but
1218ideologically. After I started using it, I never looked back. I use it every
1219time I need to do something web related.&lt;/p&gt;
1220&lt;p&gt;Writing CSS for general things feels like going several steps back. Instead of
1221focusing on what you are actually trying to achieve, you focus on notations like
1222&lt;a href=&#34;https://en.bem.info/methodology/css/&#34;&gt;BEM&lt;/a&gt;, code structuring, optimizing HTML
1223size. Just doing things that make 0.1% difference. You know that saying: Early
1224optimization is the root of all evil. Exactly that.&lt;/p&gt;
1225&lt;p&gt;I am also not saying that Tailwind is the cure for everything. Sometimes custom
1226CSS is necessary. But from what I found out in using it for almost two years in
1227a production environment (on a site getting quite a lot of traffic and
1228constantly being changed), I can say without any reservations that Tailwind
1229saved our asses countless times. We would be rewriting CSS all the time without
1230it. And I don’t really think writing CSS is the best way to spend my time.&lt;/p&gt;
1231&lt;p&gt;I have also noticed that people who criticize Tailwind the most never actually
1232used it in a real project that has a long lifetime with plenty of changes that
1233will happen in the future.&lt;/p&gt;
1234&lt;p&gt;But you know, whatever floats your boat!&lt;/p&gt;
1235&lt;h2 id=&#34;code-maintainability&#34;&gt;Code maintainability&lt;/h2&gt;
1236&lt;p&gt;Somehow, people also stopped talking about maintenance. If you constantly try to
1237catch the latest and greatest train, you are by that logic always trying new
1238things. Which is a good thing if you want to learn about technologies and try
1239them. But for the production environment, you have to have a stable stack that
1240doesn’t change every 6 months.&lt;/p&gt;
1241&lt;p&gt;You can lock dependencies for sure. Nevertheless, the hype train moves along
1242anyway. And the mindset this breeds goes against locking the code. This
1243bleeding-edge rolling release cycle is not helping. That is why enterprise
1244solutions usually look down on these popular stacks and only do bare minimum to
1245appear hip and cool.&lt;/p&gt;
1246&lt;p&gt;With that said, I still think that progress is good, but should be taken with a
1247grain of salt. If your project is something that should be built once and then
1248rarely updated, going with the latest stack is a possible way to go. But, if you
1249are working on a project that lasts for years, you should probably approach it
1250with some level of caution. Web development is often times too volatile.&lt;/p&gt;
1251&lt;h2 id=&#34;web-development-has-a-marketing-issue&#34;&gt;Web development has a marketing issue&lt;/h2&gt;
1252&lt;p&gt;I noticed that almost every project now has this marketing spin put on it.
1253Everything is blazingly fast now. I get it, they are competing for your
1254attention, but what happened to just being truthful and not inflating reality.&lt;/p&gt;
1255&lt;p&gt;And in order to appeal to mass market, they leave things out of their marketing
1256materials. These open-source projects are now behaving more and more like
1257companies do. Which is a scary thought on its self.&lt;/p&gt;
1258&lt;p&gt;And we are also seeing a rise in a concept of building a company in the open,
1259which is a good thing, don&#39;t get me wrong. But when it is using open-source to
1260lure people and then lock them in their ecosystem, there is where I have issues
1261with it.&lt;/p&gt;
1262&lt;p&gt;This might be because I have been using GNU/Linux for 20 years now and have been
1263so beholden for my success to open-source that I see issues when open-source is
1264being used to trick people into a false sense of security that these projects
1265are built in the spirit of open-source. Because there is a difference. They are
1266NOT! They have a really specific goal in mind. And the open-source is being used
1267as a delivery system. Which is in my opinion disgusting!&lt;/p&gt;
1268&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
1269&lt;p&gt;I will end my post with this. Web development is running now in circles. People
1270are discovering &lt;a href=&#34;https://www.tutorialspoint.com/remote-procedure-call-rpc&#34;&gt;RPC&lt;/a&gt;
1271now and this is the now the next big thing. &lt;a href=&#34;https://graphql.org/&#34;&gt;GraphQL&lt;/a&gt; is
1272so passé. And I am so tired of it all. Of blazingly fast libraries, of all these
1273new technologies that are actually just a remake of old ones. Of just the
1274general spirit of the web. I will just use what I already know. Which worked 10
1275years ago and will work 10 years after this. I will adopt a couple of little
1276tools like Vite. But I will not waste my time on this anymore.&lt;/p&gt;
1277&lt;p&gt;It was a good exercise to get in touch with what’s new now. Nothing really
1278changed that much. FOMO is now cured! Now I have to get my ass back to actually
1279code and make the project that I wanted to make in the first place.&lt;/p&gt;
1280</content:encoded>
1281 </item>
1282
1283
1284
1285
1286
1287 <item>
1288 <title>Aerial photography of algae spotted on river Sava</title>
1289 <link>https://mitjafelicijan.com/aerial-photography-of-algae-spotted-on-river-sava.html</link>
1290 <pubDate>Sat, 13 Aug 2022 12:00:00 &#43;0200</pubDate>
1291 <guid>https://mitjafelicijan.com/aerial-photography-of-algae-spotted-on-river-sava.html</guid>
1292 <description>This is a bit of a different post than I usually write, but quite interestingone to me.</description>
1293 <content:encoded>&lt;p&gt;This is a bit of a different post than I usually write, but quite interesting
1294one to me. River Sava has plenty of hydropower plants located down the stream.
1295This makes regulating the strength of a current easier than normally. Because of
1296lower stream strength and high temperatures, algae has formed on the river.
1297This is the first time I&#39;ve seen something like this in my whole life.&lt;/p&gt;
1298&lt;p&gt;Below are some photographs taken from a DJI drone capturing the event.&lt;/p&gt;
1299&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-0.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1300&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-1.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1301&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-2.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1302&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-3.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1303&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-4.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1304&lt;p&gt;&lt;img src=&#34;/assets/algae-sava/dji-algae-5.jpg&#34; alt=&#34;Algae on Sava&#34; /&gt;&lt;/p&gt;
1305&lt;p&gt;I will try to get more photos of this in the future days and if something
1306intriguing shows up will post it again on the blog.&lt;/p&gt;
1307</content:encoded>
1308 </item>
1309
1310
1311
1312 <item>
1313 <title>What would DNA sound if synthesized to an audio file</title>
1314 <link>https://mitjafelicijan.com/what-would-dna-sound-if-synthesized.html</link>
1315 <pubDate>Tue, 05 Jul 2022 12:00:00 &#43;0200</pubDate>
1316 <guid>https://mitjafelicijan.com/what-would-dna-sound-if-synthesized.html</guid>
1317 <description>IntroductionLately, I have been thinking a lot about the nature of life, what are thefoundation blocks of life and things like that.</description>
1318 <content:encoded>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
1319&lt;p&gt;Lately, I have been thinking a lot about the nature of life, what are the
1320foundation blocks of life and things like that. It&#39;s remarkable how complex and
1321on the other hand simple the creation is when you look at it. The miracle of
1322life keeps us grounded when our imagination goes wild. If the DNA are the blocks
1323of life, you could consider them to be an API nature provided us to better
1324understand all of this chaos masquerading as order.&lt;/p&gt;
1325&lt;p&gt;I have been reading a lot about superintelligence and our somehow misguided path
1326to create general artificial intelligence. What would the building blocks or our
1327creation look like? Is the compression really the ultimate storage of
1328information? Will our creation also ponder this questions when creating new
1329worlds for themselves, or will we just disappear into the vastness of
1330possibilities? It is a little offensive that we are playing God whilst being
1331completely ignorant of our own reality. Who knows! Like many other
1332breakthroughs, this one will also come at a cost not known to us when it finally
1333happens.&lt;/p&gt;
1334&lt;p&gt;To keep things a bit lighter, I decided to convert some popular DNA sequences
1335into an audio files for us to listen to. I am not the first one, nor I will be
1336the last one to do this. But it is an interesting exercise in better
1337understanding the relationship between art and science. Maybe listening to DNA
1338instead of parsing it will find a way into better understanding, or at least
1339enjoying the creation and cryptic nature of life.&lt;/p&gt;
1340&lt;h2 id=&#34;dna-encoding-and-primer-example&#34;&gt;DNA encoding and primer example&lt;/h2&gt;
1341&lt;p&gt;I have been exploring DNA in the past in my post from about 3 years ago in
1342&lt;a href=&#34;/encoding-binary-data-into-dna-sequence.html&#34;&gt;Encoding binary data into DNA
1343sequence&lt;/a&gt; where I have been
1344converting all sorts of data into DNA sequences.&lt;/p&gt;
1345&lt;p&gt;This will be a similar exercise but instead of converting to DNA, I will be
1346generating tones from Nucleotides.&lt;/p&gt;
1347&lt;table&gt;
1348&lt;thead&gt;
1349&lt;tr&gt;
1350&lt;th&gt;Nucleotides&lt;/th&gt;
1351&lt;th&gt;Note&lt;/th&gt;
1352&lt;th&gt;Frequency&lt;/th&gt;
1353&lt;/tr&gt;
1354&lt;/thead&gt;
1355&lt;tbody&gt;
1356&lt;tr&gt;
1357&lt;td&gt;&lt;strong&gt;A&lt;/strong&gt; (Adenine)&lt;/td&gt;
1358&lt;td&gt;A&lt;/td&gt;
1359&lt;td&gt;440 Hz&lt;/td&gt;
1360&lt;/tr&gt;
1361&lt;tr&gt;
1362&lt;td&gt;&lt;strong&gt;C&lt;/strong&gt; (Cytosine)&lt;/td&gt;
1363&lt;td&gt;C&lt;/td&gt;
1364&lt;td&gt;783.99 Hz&lt;/td&gt;
1365&lt;/tr&gt;
1366&lt;tr&gt;
1367&lt;td&gt;&lt;strong&gt;G&lt;/strong&gt; (Guanine)&lt;/td&gt;
1368&lt;td&gt;G&lt;/td&gt;
1369&lt;td&gt;523.25 Hz&lt;/td&gt;
1370&lt;/tr&gt;
1371&lt;tr&gt;
1372&lt;td&gt;&lt;strong&gt;T&lt;/strong&gt; (Thymine)&lt;/td&gt;
1373&lt;td&gt;D&lt;/td&gt;
1374&lt;td&gt;587.33 Hz&lt;/td&gt;
1375&lt;/tr&gt;
1376&lt;/tbody&gt;
1377&lt;/table&gt;
1378&lt;p&gt;Since we do not have T in equal-tempered scale, I choose D to represent T note.&lt;/p&gt;
1379&lt;p&gt;You can check &lt;a href=&#34;https://pages.mtu.edu/~suits/notefreqs.html&#34;&gt;Frequencies for equal-tempered scale, A4 = 440
1380Hz&lt;/a&gt;. For this tuning, we also
1381choose &lt;code&gt;Speed of Sound = 345 m/s = 1130 ft/s = 770 miles/hr&lt;/code&gt;.&lt;/p&gt;
1382&lt;p&gt;Now that we have this out of the way, we can also brush up on the DNA sequencing
1383a bit. This is a famous quote I also used for the encoding tests, and it goes
1384like this.&lt;/p&gt;
1385&lt;blockquote&gt;
1386&lt;p&gt;How wonderful that we have met with a paradox. Now we have some hope of
1387making progress.
1388― Niels Bohr&lt;/p&gt;
1389&lt;/blockquote&gt;
1390&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt;SEQ1
1391&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA
1392&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA
1393&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA
1394&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT
1395&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT
1396&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC
1397&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC
1398&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AACC
1399&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is what we gonna work with to get things rolling forward, when creating
1400parser and waveform generator.&lt;/p&gt;
1401&lt;h2 id=&#34;parsing-dna-data&#34;&gt;Parsing DNA data&lt;/h2&gt;
1402&lt;p&gt;This step is rather simple one. All we need to do is parse input DNA sequence in
1403&lt;a href=&#34;https://en.wikipedia.org/wiki/FASTA_format&#34;&gt;FASTA format&lt;/a&gt; well known in
1404&lt;a href=&#34;https://en.wikipedia.org/wiki/Bioinformatics&#34;&gt;Bioinformatics&lt;/a&gt; to extract single
1405Nucleotides that will be converted into separate tones based on equal-tempered
1406scale explained above.&lt;/p&gt;
1407&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nucleotide_tone_map = {
1408&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;: 440,
1409&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;: 523.25,
1410&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;G&amp;#39;&lt;/span&gt;: 783.99,
1411&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;T&amp;#39;&lt;/span&gt;: 587.33, &lt;span style=&#34;color:#008000&#34;&gt;# converted to D&lt;/span&gt;
1412&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1413&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1414&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; split(word):
1415&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; [char &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; char &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; word]
1416&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1417&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; generate_from_dna_sequence(sequence):
1418&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; nucleotide &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; split(sequence):
1419&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(nucleotide, nucleotide_tone_map[nucleotide])
1420&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;generating-sine-wave&#34;&gt;Generating sine wave&lt;/h2&gt;
1421&lt;p&gt;Because we are essentially creating a long stream of notes we will be appending
1422sine notes to a global array we will later use for creating a WAV file out of
1423it.&lt;/p&gt;
1424&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; math
1425&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1426&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; append_sinewave(freq=440.0, duration_milliseconds=500, volume=1.0):
1427&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;global&lt;/span&gt; audio
1428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1429&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; num_samples = duration_milliseconds * (sample_rate / 1000.0)
1430&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1431&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; x &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; range(int(num_samples)):
1432&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; audio.append(volume * math.sin(2 * math.pi * freq * (x / sample_rate)))
1433&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1434&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt;
1435&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The sine wave generated here is the standard beep. If you want something more
1436aggressive, you could try a square or saw tooth waveform.&lt;/p&gt;
1437&lt;h2 id=&#34;generating-a-wav-file-from-accumulated-sine-waves&#34;&gt;Generating a WAV file from accumulated sine waves&lt;/h2&gt;
1438&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; wave
1439&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; struct
1440&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1441&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; save_wav(file_name):
1442&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; wav_file = wave.open(file_name, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;w&amp;#39;&lt;/span&gt;)
1443&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; nchannels = 1
1444&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sampwidth = 2
1445&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1446&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; nframes = len(audio)
1447&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; comptype = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;NONE&amp;#39;&lt;/span&gt;
1448&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; compname = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;not compressed&amp;#39;&lt;/span&gt;
1449&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; wav_file.setparams((nchannels, sampwidth, sample_rate, nframes, comptype, compname))
1450&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1451&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; sample &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; audio:
1452&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; wav_file.writeframes(struct.pack(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;h&amp;#39;&lt;/span&gt;, int(sample * 32767.0)))
1453&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1454&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; wav_file.close()
1455&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;44100 is the industry standard sample rate - CD quality. If you need to save on
1456file size, you can adjust it downwards. The standard for low quality is, 8000 or
14578kHz.&lt;/p&gt;
1458&lt;p&gt;WAV files here are using short, 16 bit, signed integers for the sample size.
1459So, we multiply the floating-point data we have by 32767, the maximum value for
1460a short integer.&lt;/p&gt;
1461&lt;blockquote&gt;
1462&lt;p&gt;It is theoretically possible to use the floating point -1.0 to 1.0 data
1463directly in a WAV file, but not obvious how to do that using the wave module
1464in Python.&lt;/p&gt;
1465&lt;/blockquote&gt;
1466&lt;h2 id=&#34;generating-spectograms&#34;&gt;Generating Spectograms&lt;/h2&gt;
1467&lt;p&gt;I have tried two methods of doing this and both were just fine. I however opted
1468out to use the &lt;a href=&#34;https://linux.die.net/man/1/sox&#34;&gt;SoX - Sound eXchange, the Swiss Army knife of audio
1469manipulation&lt;/a&gt; one because it didn&#39;t require
1470anything else.&lt;/p&gt;
1471&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sox output.wav -n spectrogram -o spectrogram.png
1472&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.&lt;/p&gt;
1473&lt;audio controls&gt;
1474 &lt;source src=&#34;/assets/dna-synthesized/symphony-no6-1st-movement.mp3&#34; type=&#34;audio/mpeg&#34;&gt;
1475&lt;/audio&gt;
1476&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/symphony-no6-1st-movement.png&#34; alt=&#34;Ludwig van Beethoven Symphony No. 6 First movement&#34; /&gt;&lt;/p&gt;
1477&lt;p&gt;The other option could also be in combination with
1478&lt;a href=&#34;http://www.gnuplot.info/&#34;&gt;gnuplot&lt;/a&gt;. This would require an intermediary step,
1479however.&lt;/p&gt;
1480&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sox output.wav audio.dat
1481&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tail -n&#43;3 audio.dat &amp;gt; audio_only.dat
1482&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gnuplot audio.gpi
1483&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And input file &lt;code&gt;audio.gpi&lt;/code&gt; that would be passed to gnuplot looks something like
1484this.&lt;/p&gt;
1485&lt;pre&gt;&lt;code&gt;# set output format and size
1486set term png size 1000,280
1487
1488# set output file
1489set output &amp;quot;audio.png&amp;quot;
1490
1491# set y range
1492set yr [-1:1]
1493
1494# we want just the data
1495unset key
1496unset tics
1497unset border
1498set lmargin 0
1499set rmargin 0
1500set tmargin 0
1501set bmargin 0
1502
1503# draw rectangle to change background color
1504set obj 1 rectangle behind from screen 0,0 to screen 1,1
1505set obj 1 fillstyle solid 1.0 fillcolor rgbcolor &amp;quot;#ffffff&amp;quot;
1506
1507# draw data with foreground color
1508plot &amp;quot;audio_only.dat&amp;quot; with lines lt rgb &#39;red&#39;
1509&lt;/code&gt;&lt;/pre&gt;
1510&lt;h2 id=&#34;pre-generated-sequences&#34;&gt;Pre-generated sequences&lt;/h2&gt;
1511&lt;p&gt;What I did was take interesting parts from an animal&#39;s genome and feed it to a
1512tone generator script. This then generated a WAV file and I converted those to
1513MP3, so they can be played in a browser. The last step was creating a
1514spectrogram based on a WAV file.&lt;/p&gt;
1515&lt;h3 id=&#34;niels-bohr-quote&#34;&gt;Niels Bohr quote&lt;/h3&gt;
1516&lt;audio controls&gt;
1517 &lt;source src=&#34;/assets/dna-synthesized/quote/out.mp3&#34; type=&#34;audio/mpeg&#34;&gt;
1518&lt;/audio&gt;
1519&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/quote/spectogram.png&#34; alt=&#34;Spectogram&#34; /&gt;&lt;/p&gt;
1520&lt;h3 id=&#34;mouse&#34;&gt;Mouse&lt;/h3&gt;
1521&lt;p&gt;This is part of a mouse genome &lt;code&gt;Mus_musculus.GRCm39.dna.nonchromosomal&lt;/code&gt;. You
1522can get &lt;a href=&#34;http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/&#34;&gt;genom data
1523here&lt;/a&gt;.&lt;/p&gt;
1524&lt;audio controls&gt;
1525 &lt;source src=&#34;/assets/dna-synthesized/mouse/out.mp3&#34; type=&#34;audio/mpeg&#34;&gt;
1526&lt;/audio&gt;
1527&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/mouse/spectogram.png&#34; alt=&#34;Spectogram&#34; /&gt;&lt;/p&gt;
1528&lt;h3 id=&#34;bison&#34;&gt;Bison&lt;/h3&gt;
1529&lt;p&gt;This is part of a bison genome &lt;code&gt;Bison_bison_bison.Bison_UMD1.0.cdna&lt;/code&gt;. You can
1530get &lt;a href=&#34;http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/&#34;&gt;genom data
1531here&lt;/a&gt;.&lt;/p&gt;
1532&lt;audio controls&gt;
1533 &lt;source src=&#34;/assets/dna-synthesized/bison/out.mp3&#34; type=&#34;audio/mpeg&#34;&gt;
1534&lt;/audio&gt;
1535&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/bison/spectogram.png&#34; alt=&#34;Spectogram&#34; /&gt;&lt;/p&gt;
1536&lt;h3 id=&#34;taurus&#34;&gt;Taurus&lt;/h3&gt;
1537&lt;p&gt;This is part of a taurus genome &lt;code&gt;Bos_taurus.ARS-UCD1.2.cdna&lt;/code&gt;. You can get
1538&lt;a href=&#34;http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/&#34;&gt;genom data
1539here&lt;/a&gt;.&lt;/p&gt;
1540&lt;audio controls&gt;
1541 &lt;source src=&#34;/assets/dna-synthesized/taurus/out.mp3&#34; type=&#34;audio/mpeg&#34;&gt;
1542&lt;/audio&gt;
1543&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/taurus/spectogram.png&#34; alt=&#34;Spectogram&#34; /&gt;&lt;/p&gt;
1544&lt;h2 id=&#34;making-a-drummer-out-of-a-dna-sequence&#34;&gt;Making a drummer out of a DNA sequence&lt;/h2&gt;
1545&lt;p&gt;To make things even more interesting, I decided to send this data via MIDI to my
1546&lt;a href=&#34;https://www.elektron.se/en/model-samples&#34;&gt;Elektron Model:Samples&lt;/a&gt;. This is a
1547really cool piece of equipment that supports MIDI in via USB and 3.5 mm audio
1548jack.&lt;/p&gt;
1549&lt;p&gt;Elektron is connected to my MacBook via USB cable and audio out is patched to a
1550Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn&#39;t
1551have internal speakers.&lt;/p&gt;
1552&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/elektron/IMG_0619.jpg&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
1553&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/elektron/IMG_0620.jpg&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
1554&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/elektron/IMG_0622.jpg&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
1555&lt;p&gt;For communicating with Elektron, I choose &lt;code&gt;pygame&lt;/code&gt; Python module that has MIDI
1556built in. With this, it was rather simple to send notes to the device. All I did
1557was map MIDI notes to the actual Nucleotides.&lt;/p&gt;
1558&lt;p&gt;Before all of this I also checked Audio MIDI Setup app under MacOS and checked
1559MIDI Studio by pressing ⌘-2.&lt;/p&gt;
1560&lt;p&gt;&lt;img src=&#34;/assets/dna-synthesized/elektron/midi-studio.jpg&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
1561&lt;p&gt;The whole script that parses and send notes to the Elektron looks like this.&lt;/p&gt;
1562&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; pygame.midi
1563&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; time
1564&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1565&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pygame.midi.init()
1566&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1567&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(pygame.midi.get_default_output_id())
1568&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(pygame.midi.get_device_info(0))
1569&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1570&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;player = pygame.midi.Output(1)
1571&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;player.set_instrument(2)
1572&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1573&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; send_note(note, velocity):
1574&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;global&lt;/span&gt; player
1575&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; player.note_on(note, velocity)
1576&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; time.sleep(0.3)
1577&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; player.note_off(note, velocity)
1578&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1579&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1580&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nucleotide_midi_map = {
1581&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;: 60,
1582&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;: 90,
1583&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;G&amp;#39;&lt;/span&gt;: 160,
1584&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;T&amp;#39;&lt;/span&gt;: 180, &lt;span style=&#34;color:#008000&#34;&gt;# is D&lt;/span&gt;
1585&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1586&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1587&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;with&lt;/span&gt; open(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;quote.fa&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#00f&#34;&gt;as&lt;/span&gt; f:
1588&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sequence = f.read().replace(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;)
1589&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1590&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; nucleotide &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; [char &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; char &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; sequence]:
1591&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Playing nucleotide &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; with MIDI note &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;.format(
1592&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; nucleotide, nucleotide_midi_map[nucleotide]))
1593&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; send_note(nucleotide_midi_map[nucleotide], 127)
1594&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1595&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;del&lt;/span&gt; player
1596&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pygame.midi.quit()
1597&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;video src=&#34;/assets/dna-synthesized/elektron/elektron.mp4&#34; controls&gt;&lt;/video&gt;&lt;/p&gt;
1598&lt;p&gt;All of this could be made much more interesting if I choose different
1599instruments for different Nucleotides, or doing more funky stuff with Elektron.
1600But for now, this should be enough. It is just a proof of concept. Something to
1601play around with.&lt;/p&gt;
1602&lt;h2 id=&#34;going-even-further&#34;&gt;Going even further&lt;/h2&gt;
1603&lt;p&gt;As you probably notice, the end results are quite similar to each other. This is
1604to be expected because we are operating only with 4 notes essentially. What
1605could make this more interesting is using something like
1606&lt;a href=&#34;https://supercollider.github.io/&#34;&gt;Supercollider&lt;/a&gt; to create more interesting
1607sounds. By transposing notes or using effects based on repeated data in a
1608sequence. Possibilities are endless.&lt;/p&gt;
1609&lt;p&gt;It is really astonishing what can be achieved with a little bit of code and an
1610idea. I could see this becoming an interesting background soundscape instrument
1611if done properly. It could replace random note generator with something more
1612intriguing, biological, natural.&lt;/p&gt;
1613&lt;p&gt;I actually find the results fascinating. I took some time and listened to this
1614music of nature. Even though it&#39;s quite the same, it&#39;s also quite different.
1615The subtle differences on repeat kind of creates music on its own. Makes you
1616wonder. It kind of puts Occam’s Razor in its place. Nature for sure loves to
1617make things as energy efficient as possible.&lt;/p&gt;
1618</content:encoded>
1619 </item>
1620
1621
1622
1623 <item>
1624 <title>Trying out Helix code editor as my main editor</title>
1625 <link>https://mitjafelicijan.com/tying-out-helix-code-editor.html</link>
1626 <pubDate>Thu, 30 Jun 2022 12:00:00 &#43;0200</pubDate>
1627 <guid>https://mitjafelicijan.com/tying-out-helix-code-editor.html</guid>
1628 <description>I have been searching for a lightweight code editor for quite some time.</description>
1629 <content:encoded>&lt;p&gt;I have been searching for a lightweight code editor for quite some time. One of
1630the main reasons was that I wanted something that doesn&#39;t burn through CPU and
1631RAM usage is not through the roof. I have been mostly using Visual Studio Code.
1632It&#39;s been an outstanding editor. I have no quarrel with it at all. It&#39;s just
1633time to spice life up with something new.&lt;/p&gt;
1634&lt;p&gt;I have been on this search for a couple of years. I have tried Vim, Neovim,
1635Emacs, Doom Emacs, Micro and couple more. Among most of them, I liked Micro and
1636Doom Emacs the most. Micro editor was a little too basic for me. And Doom Emacs
1637was a bit too hardcore. This does not reflect on any of the editors. It&#39;s just
1638my personal preference.&lt;/p&gt;
1639&lt;blockquote&gt;
1640&lt;p&gt;I tried Helix Editor about a year ago. But I didn&#39;t pay attention to it.
1641Tried it and saw it&#39;s similar to Vi and just said no. I was premature to
1642dismiss it.&lt;/p&gt;
1643&lt;/blockquote&gt;
1644&lt;p&gt;One of the things I actually miss is line wrapping for certain files. When
1645writing Markdown, line wrapping would be very helpful. Editing such a document
1646is frustrating to say the least. Some of the Markdown to HTML converters don&#39;t
1647take kindly of new lines between sentences. Not paragraphs, sentences. And I use
1648Markdown to write this blog you are reading.&lt;/p&gt;
1649&lt;p&gt;But other than this, I have been extremely satisfied by it. It&#39;s been a pleasant
1650surprise. There have been zero issues with the editor.&lt;/p&gt;
1651&lt;p&gt;One thing to do before you are able to use autocompletion and make use Language
1652Server support is to install the language server with NPM.&lt;/p&gt;
1653&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install -g typescript typescript-language-server
1654&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I am still getting used to the keyboard shortcuts and getting better. What Helix
1655does really well is packing in sane defaults and even though because currently
1656there is no plugin support I haven&#39;t found any need for them. It has all that
1657you would need. It goes to extreme measures to show a user what is going on with
1658popups that show you what the keyboard shortcuts are.&lt;/p&gt;
1659&lt;p&gt;And it comes us packed with many
1660&lt;a href=&#34;https://github.com/helix-editor/helix/wiki/Themes&#34;&gt;really good themes&lt;/a&gt;.&lt;/p&gt;
1661&lt;p&gt;&lt;img src=&#34;/assets/helix-editor/editor.png&#34; alt=&#34;Editor&#34; /&gt;&lt;/p&gt;
1662&lt;p&gt;It&#39;s still young but has this mature feeling to it. It has sane defaults and
1663mimics Vim (works a bit differently, but the overall idea is similar).&lt;/p&gt;
1664</content:encoded>
1665 </item>
1666
1667
1668
1669 <item>
1670 <title>Wireless Application Protocol and the mobile web before the web</title>
1671 <link>https://mitjafelicijan.com/wap-mobile-web-before-the-web.html</link>
1672 <pubDate>Thu, 30 Dec 2021 12:00:00 &#43;0200</pubDate>
1673 <guid>https://mitjafelicijan.com/wap-mobile-web-before-the-web.html</guid>
1674 <description>A little stroll down the history laneAbout two weeks ago, I watched this outstanding documentary on YouTubeSpringboard: the secret history of the first realsmartphone about the history ofsmartphones and phones in general.</description>
1675 <content:encoded>&lt;h2 id=&#34;a-little-stroll-down-the-history-lane&#34;&gt;A little stroll down the history lane&lt;/h2&gt;
1676&lt;p&gt;About two weeks ago, I watched this outstanding documentary on YouTube
1677&lt;a href=&#34;https://www.youtube.com/watch?v=b9_Vh9h3Ohw&#34;&gt;Springboard: the secret history of the first real
1678smartphone&lt;/a&gt; about the history of
1679smartphones and phones in general. It brought back so many memories. I never had
1680an actual smartphone before the Android. The closest to smartphone was &lt;a href=&#34;https://www.gsmarena.com/sony_ericsson_p1-1982.php&#34;&gt;Sony
1681Ericsson P1&lt;/a&gt;. A fantastic
1682phone and I broke it in Prague after a party and that was one of those rare
1683occasions where I was actually mad at myself. But nevertheless, after that
1684phone, the next one was an Android one.&lt;/p&gt;
1685&lt;p&gt;Before that, I only owned normal phones from Nokia and Siemens etc. Nothing
1686special, actually. These are the phones we are talking about. Before 2007.
1687Apple and Android phones didn&#39;t exist yet.&lt;/p&gt;
1688&lt;p&gt;These phones were rocking:&lt;/p&gt;
1689&lt;ul&gt;
1690&lt;li&gt;No selfie cameras.&lt;/li&gt;
1691&lt;li&gt;~2 inch displays.&lt;/li&gt;
1692&lt;li&gt;~120 MHz beast CPU&#39;s.&lt;/li&gt;
1693&lt;li&gt;144p main cameras.&lt;/li&gt;
1694&lt;li&gt;But they had a headphone jack.&lt;/li&gt;
1695&lt;/ul&gt;
1696&lt;p&gt;Let&#39;s take a look at these beauties.&lt;/p&gt;
1697&lt;p&gt;&lt;img src=&#34;/assets/wap/phones.gif&#34; alt=&#34;Old phones&#34; /&gt;&lt;/p&gt;
1698&lt;h2 id=&#34;wap---wireless-application-protocol&#34;&gt;WAP - Wireless Application Protocol&lt;/h2&gt;
1699&lt;p&gt;Not that one! We are talking about Wireless Application Protocol and not Cardi
1700B&#39;s song 😃&lt;/p&gt;
1701&lt;p&gt;WAP stands for Wireless Application Protocol. It is a protocol designed for
1702micro-browsers, and it enables the access of internet in the mobile devices. It
1703uses the mark-up language WML (Wireless Markup Language and not HTML), WML is
1704defined as XML 1.0 application. Furthermore, it enables creating web
1705applications for mobile devices. In 1998, WAP Forum was founded by Ericson,
1706Motorola, Nokia and Unwired Planet whose aim was to standardize the various
1707wireless technologies via protocols.
1708&lt;a href=&#34;https://www.geeksforgeeks.org/wireless-application-protocol/&#34;&gt;(source)&lt;/a&gt;&lt;/p&gt;
1709&lt;p&gt;WAP protocol was resulted by the joint efforts of the various members of WAP
1710Forum. In 2002, WAP forum was merged with various other forums of the industry,
1711resulting in the formation of Open Mobile Alliance (OMA).
1712&lt;a href=&#34;https://www.geeksforgeeks.org/wireless-application-protocol/&#34;&gt;(source)&lt;/a&gt;&lt;/p&gt;
1713&lt;p&gt;These were some wild times. Devices had tiny screens and data transmission rates
1714were abominable. But they were capable of rendering WML (Wireless Markup
1715Language). This was very similar to HTML, actually. It is a markup language,
1716after all.&lt;/p&gt;
1717&lt;p&gt;These pages could be served by &lt;a href=&#34;https://apache.org/&#34;&gt;Apache&lt;/a&gt; and could be
1718generated by CGI scripts on the backend. The only difference was the limited
1719markup language.&lt;/p&gt;
1720&lt;h2 id=&#34;wml---wireless-markup-language&#34;&gt;WML - Wireless Markup Language&lt;/h2&gt;
1721&lt;p&gt;Just like web browsers use HTML for content structure, older mobile device
1722browsers use WML - if you need to support really old mobile phones using WML
1723browsers, you will need to know about it. WML is XML-based (an XML vocabulary
1724just like XHTML and MathML, but not HTML) and does not use the same metaphor as
1725HTML. HTML is a single document with some metadata packed away in the head, and
1726a body encapsulating the visible page. With WML, the metaphor does not envisage
1727a page, but rather a deck of cards. A WML file might have several pages or cards
1728contained within it.
1729&lt;a href=&#34;https://www.w3.org/wiki/Introduction_to_mobile_web&#34;&gt;(source)&lt;/a&gt;&lt;/p&gt;
1730&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;&lt;/span&gt;
1731&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE wml PUBLIC &amp;#34;-//WAPFORUM//DTD WML 1.1//EN&amp;#34; &amp;#34;http://www.wapforum.org/DTD/wml_1.1.xml&amp;#34;&amp;gt;&lt;/span&gt;
1732&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;wml&amp;gt;
1733&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;card id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;home&amp;#34;&lt;/span&gt; title=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Example Homepage&amp;#34;&lt;/span&gt;&amp;gt;
1734&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;Welcome to the Example homepage&amp;lt;/p&amp;gt;
1735&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/card&amp;gt;
1736&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/wml&amp;gt;
1737&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There is an amazing tutorial on &lt;a href=&#34;https://www.tutorialspoint.com/wml/index.htm&#34;&gt;Tutorialpoint about
1738WML&lt;/a&gt;.&lt;/p&gt;
1739&lt;h2 id=&#34;converting-digg-to-wml&#34;&gt;Converting Digg to WML&lt;/h2&gt;
1740&lt;p&gt;This task is completely useless and not really feasible nowadays, but I had to
1741give it a try for old-time sake. Since the data is already there in a form of
1742RSS feed, I could take this feed and parse it and create a WML version of the
1743homepage.&lt;/p&gt;
1744&lt;p&gt;We will need:&lt;/p&gt;
1745&lt;ul&gt;
1746&lt;li&gt;Python3 &#43; Pip&lt;/li&gt;
1747&lt;li&gt;ImageMagick&lt;/li&gt;
1748&lt;li&gt;feedparser and mako templating&lt;/li&gt;
1749&lt;/ul&gt;
1750&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# for fedora 35&lt;/span&gt;
1751&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo dnf install ImageMagick python3-pip
1752&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1753&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# tempalting engine for python&lt;/span&gt;
1754&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install mako --user
1755&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1756&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# for parsing rss feeds&lt;/span&gt;
1757&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install feedparser --user
1758&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Project folder structure should look like the following.&lt;/p&gt;
1759&lt;pre&gt;&lt;code&gt;12:43:53 m@khan wap → tree -L 1
1760.
1761├── generate.py
1762└── template.wml
1763
1764&lt;/code&gt;&lt;/pre&gt;
1765&lt;p&gt;After that, I created a small template for the homepage.&lt;/p&gt;
1766&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;&lt;/span&gt;
1767&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE wml PUBLIC &amp;#34;-//WAPFORUM//DTD WML 1.2//EN&amp;#34; &amp;#34;http://www.wapforum.org/DTD/wml_1.2.xml&amp;#34;&amp;gt;&lt;/span&gt;
1768&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1769&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;wml&amp;gt;
1770&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1771&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;card title=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Digg - What the Internet is talking about right now&amp;#34;&lt;/span&gt;&amp;gt;
1772&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1773&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; % for item in entries:
1774&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;&amp;lt;img src=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/images/${item.id}.jpg&amp;#34;&lt;/span&gt; width=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;175&amp;#34;&lt;/span&gt; height=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;95&amp;#34;&lt;/span&gt; alt=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;${item.title}&amp;#34;&lt;/span&gt; /&amp;gt;&amp;lt;/p&amp;gt;
1775&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;&amp;lt;small&amp;gt;${item.kicker}&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;
1776&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;&amp;lt;big&amp;gt;&amp;lt;b&amp;gt;${item.title}&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/p&amp;gt;
1777&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;${item.description}&amp;lt;/p&amp;gt;
1778&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; % endfor
1779&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1780&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/card&amp;gt;
1781&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1782&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/wml&amp;gt;
1783&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And the parser that parses RSS feed looks like this.&lt;/p&gt;
1784&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; os
1785&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; feedparser
1786&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; mako.template &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; Template
1787&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1788&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;os.system(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;mkdir -p www/images&amp;#39;&lt;/span&gt;)
1789&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1790&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;template = Template(filename=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;template.wml&amp;#39;&lt;/span&gt;)
1791&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1792&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;feed = feedparser.parse(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;https://digg.com/rss/top.xml&amp;#39;&lt;/span&gt;)
1793&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1794&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;entries = feed.entries[:15]
1795&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1796&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; entry &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; entries:
1797&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Processing image with id &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&lt;/span&gt;.format(entry.id))
1798&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; os.system(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;wget -q -O www/images/&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;.jpg &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;#39;&lt;/span&gt;.format(entry.id, entry.links[1].href))
1799&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; os.system(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;convert www/images/&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;.jpg -type Grayscale -resize 175x -depth 3 -quality 30 www/images/&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;.jpg&amp;#39;&lt;/span&gt;.format(entry.id, entry.id))
1800&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1801&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;html = template.render(entries = entries)
1802&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1803&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;with&lt;/span&gt; open(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;www/index.wml&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;w&#43;&amp;#39;&lt;/span&gt;) &lt;span style=&#34;color:#00f&#34;&gt;as&lt;/span&gt; fp:
1804&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fp.write(html)
1805&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This script will create a folder &lt;code&gt;www&lt;/code&gt; and in the folder &lt;code&gt;www/images&lt;/code&gt; for
1806storing resized images.&lt;/p&gt;
1807&lt;blockquote&gt;
1808&lt;p&gt;Be sure you don&#39;t use SSL and use just normal HTTP for serving the content.
1809These old phones will have problems with TLS 1.3 etc.&lt;/p&gt;
1810&lt;/blockquote&gt;
1811&lt;p&gt;If you look at the python file, I convert all the images into tiny B&amp;amp;W images.
1812They should be WBMP (Wireless BitMaP) but I choose JPEGs for this, and it seems
1813to work properly.&lt;/p&gt;
1814&lt;p&gt;Because I currently don&#39;t have a phone old enough to test it on, I used an
1815emulator. And it was really hard to find one. I found &lt;a href=&#34;http://wap-proof.sharewarejunction.com/&#34;&gt;WAP
1816Proof&lt;/a&gt; on shareware junction, and it
1817did the job well enough. I will try to find and actual device to test it on.&lt;/p&gt;
1818&lt;p&gt;&lt;video src=&#34;/assets/wap/emulator.mp4&#34; controls&gt;&lt;/video&gt;&lt;/p&gt;
1819&lt;p&gt;If you are using Nginx to serve the contents, add a directive to the hosts file
1820that will automatically server &lt;code&gt;index.wml&lt;/code&gt; file.&lt;/p&gt;
1821&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;server&lt;/span&gt; {
1822&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;index&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;index.wml&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;index.html&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;index.htm&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;index.nginx-debian.html&lt;/span&gt;;
1823&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1824&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
1825&lt;p&gt;Well, this was pointless, but very fun! I hope you enjoyed it as much as I did.
1826I will try to find an old phone to test it on. If you have any questions, feel
1827free to ask in the comments.&lt;/p&gt;
1828</content:encoded>
1829 </item>
1830
1831
1832
1833 <item>
1834 <title>Running Golang application as PID 1 with Linux kernel</title>
1835 <link>https://mitjafelicijan.com/running-golang-application-as-pid1.html</link>
1836 <pubDate>Sat, 25 Dec 2021 12:00:00 &#43;0200</pubDate>
1837 <guid>https://mitjafelicijan.com/running-golang-application-as-pid1.html</guid>
1838 <description>Unikernels, kernels, and alikeI have been reading a lot aboutunikernernels lately and found themvery intriguing.</description>
1839 <content:encoded>&lt;h2 id=&#34;unikernels-kernels-and-alike&#34;&gt;Unikernels, kernels, and alike&lt;/h2&gt;
1840&lt;p&gt;I have been reading a lot about
1841&lt;a href=&#34;https://en.wikipedia.org/wiki/Unikernel&#34;&gt;unikernernels&lt;/a&gt; lately and found them
1842very intriguing. When you push away all the marketing speak and look at the
1843idea, it makes a lot of sense.&lt;/p&gt;
1844&lt;blockquote&gt;
1845&lt;p&gt;A unikernel is a specialized, single address space machine image constructed
1846by using library operating systems. (&lt;a href=&#34;https://en.wikipedia.org/wiki/Unikernel&#34;&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;
1847&lt;/blockquote&gt;
1848&lt;p&gt;I really like the explanation from the article
1849&lt;a href=&#34;https://queue.acm.org/detail.cfm?id=2566628&#34;&gt;Unikernels: Rise of the Virtual Library Operating System&lt;/a&gt;.
1850Really worth a read.&lt;/p&gt;
1851&lt;p&gt;If we compare a normal operating system to a unikernel side by side, they would
1852look something like this.&lt;/p&gt;
1853&lt;p&gt;&lt;img src=&#34;/assets/pid1/unikernels.png&#34; alt=&#34;Virtual machines vs Containers vs Unikernels&#34; /&gt;&lt;/p&gt;
1854&lt;p&gt;From this image, we can see how the complexity significantly decreases with
1855the use of Unikernels. This comes with a price, of course. Unikernels are hard
1856to get running and require a lot of work since you don&#39;t have an actual proper
1857kernel running in the background providing network access and drivers etc.&lt;/p&gt;
1858&lt;p&gt;So as a half step to make the stack simpler, I started looking into using
1859Linux kernel as a base and going from there. I came across this
1860&lt;a href=&#34;https://www.youtube.com/watch?v=Sk9TatW9ino&#34;&gt;Youtube video talking about Building the Simplest Possible Linux System&lt;/a&gt;
1861by &lt;a href=&#34;https://landley.net&#34;&gt;Rob Landley&lt;/a&gt; and apart from statically compiling the
1862application to be run as PID1 there was really no other obstacles.&lt;/p&gt;
1863&lt;h2 id=&#34;what-is-pid-1&#34;&gt;What is PID 1?&lt;/h2&gt;
1864&lt;p&gt;PID 1 is the first process that Linux kernel starts after the boot process.
1865It also has a couple of unique properties that are unique to it.&lt;/p&gt;
1866&lt;ul&gt;
1867&lt;li&gt;When the process with PID 1 dies for any reason, all other processes are
1868killed with KILL signal.&lt;/li&gt;
1869&lt;li&gt;When any process having children dies for any reason, its children are
1870re-parented to process with PID 1.&lt;/li&gt;
1871&lt;li&gt;Many signals which have default action of Term do not have one for PID 1.&lt;/li&gt;
1872&lt;li&gt;When the process with PID 1 dies for any reason, kernel panics, which
1873result in system crash.&lt;/li&gt;
1874&lt;/ul&gt;
1875&lt;p&gt;PID 1 is considered as an Init application which takes care of running other
1876and handling services like:&lt;/p&gt;
1877&lt;ul&gt;
1878&lt;li&gt;sshd,&lt;/li&gt;
1879&lt;li&gt;nginx,&lt;/li&gt;
1880&lt;li&gt;pulseaudio,&lt;/li&gt;
1881&lt;li&gt;etc.&lt;/li&gt;
1882&lt;/ul&gt;
1883&lt;p&gt;If you are on a Linux machine, you can check what your process is with PID 1
1884by running the following.&lt;/p&gt;
1885&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cat /proc/1/status
1886&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Name: systemd
1887&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Umask: 0000
1888&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;State: S (sleeping)
1889&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Tgid: 1
1890&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Ngid: 0
1891&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Pid: 1
1892&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PPid: 0
1893&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
1894&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As we can see on my machine the process with id of 1 is &lt;a href=&#34;https://systemd.io/&#34;&gt;systemd&lt;/a&gt;
1895which is a software suite that provides an array of system components for Linux
1896operating systems. If you look closely you can also see that the &lt;code&gt;PPid&lt;/code&gt;
1897(process id of the parent process) is &lt;code&gt;0&lt;/code&gt; which additionally confirms that
1898this process doesn&#39;t have a parent.&lt;/p&gt;
1899&lt;h2 id=&#34;so-why-even-run-application-as-pid-1-instead-of-just-using-a-container&#34;&gt;So why even run application as PID 1 instead of just using a container?&lt;/h2&gt;
1900&lt;p&gt;Containers are wonderful, but they come with a lot of baggage. And because they
1901are in their nature layered, the images require quite a lot of space and also a
1902lot of additional software to handle them. They are not as lightweight as they
1903seem, and many popular images require 500 MB plus disk space.&lt;/p&gt;
1904&lt;p&gt;The idea of running this as PID 1 would result in a significantly smaller footprint,
1905as we will see later in the post.&lt;/p&gt;
1906&lt;blockquote&gt;
1907&lt;p&gt;You could run a simple init system inside Docker container described more
1908in this article &lt;a href=&#34;https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/&#34;&gt;Docker and the PID 1 zombie reaping problem&lt;/a&gt;.&lt;/p&gt;
1909&lt;/blockquote&gt;
1910&lt;h2 id=&#34;the-master-plan&#34;&gt;The master plan&lt;/h2&gt;
1911&lt;ol&gt;
1912&lt;li&gt;Compile Linux kernel with the default definitions.&lt;/li&gt;
1913&lt;li&gt;Prepare a Hello World application in Golang that is statically compiled.&lt;/li&gt;
1914&lt;li&gt;Run it with &lt;a href=&#34;https://www.qemu.org/&#34;&gt;QEMU&lt;/a&gt; and providing Golang application
1915as init application / PID 1.&lt;/li&gt;
1916&lt;/ol&gt;
1917&lt;p&gt;For the sake of simplicity we will not be cross-compiling any of it and just
1918use the 64bit version.&lt;/p&gt;
1919&lt;h2 id=&#34;compiling-linux-kernel&#34;&gt;Compiling Linux kernel&lt;/h2&gt;
1920&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.7.tar.xz
1921&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ tar xf linux-5.15.7.tar.xz
1922&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1923&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd linux-5.15.7
1924&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1925&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ make clean
1926&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1927&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# read more about this https://stackoverflow.com/a/41886394&lt;/span&gt;
1928&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ make defconfig
1929&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1930&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ time make -j &lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;nproc&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;
1931&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1932&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd ..
1933&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point we have kernel image that is located in &lt;code&gt;arch/x86_64/boot/bzImage&lt;/code&gt;.
1934We will use this in QEMU later.&lt;/p&gt;
1935&lt;p&gt;To make our lives a bit easier lets move the kernel image to another place.
1936Lets create a folder &lt;code&gt;bin/&lt;/code&gt; in the root of our project with &lt;code&gt;mkdir -p bin&lt;/code&gt;.&lt;/p&gt;
1937&lt;p&gt;At this point we can copy &lt;code&gt;bzImage&lt;/code&gt; to &lt;code&gt;bin/&lt;/code&gt; folder with
1938&lt;code&gt;cp linux-5.15.7/arch/x86_64/boot/bzImage bin/bzImage&lt;/code&gt;.&lt;/p&gt;
1939&lt;p&gt;The folder structure of this experiment should look like this.&lt;/p&gt;
1940&lt;pre&gt;&lt;code&gt;pid1/
1941 bin/
1942 bzImage
1943 linux-5.15.7/
1944 linux-5.15.7.tar.xz
1945&lt;/code&gt;&lt;/pre&gt;
1946&lt;h2 id=&#34;preparing-pid-1-application-in-golang&#34;&gt;Preparing PID 1 application in Golang&lt;/h2&gt;
1947&lt;p&gt;This step is relatively easy. The only thing we must have in mind that we will
1948need to compile the binary as a static one.&lt;/p&gt;
1949&lt;p&gt;Let&#39;s create &lt;code&gt;init.go&lt;/code&gt; file in the root of the project.&lt;/p&gt;
1950&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;package&lt;/span&gt; main
1951&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1952&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; (
1953&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
1954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;
1955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)
1956&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1957&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;func&lt;/span&gt; main() {
1958&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; {
1959&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fmt.Println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello from Golang&amp;#34;&lt;/span&gt;)
1960&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; time.Sleep(1 * time.Second)
1961&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
1962&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1963&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you notice, we have a forever loop in the main, with a simple sleep of 1
1964second to not overwhelm the CPU. This is because PID 1 should never complete
1965and/or exit. That would result in a kernel panic. Which is BAD!&lt;/p&gt;
1966&lt;p&gt;There are two ways of compiling Golang application. Statically and dynamically.&lt;/p&gt;
1967&lt;p&gt;To statically compile the binary, use the following command.&lt;/p&gt;
1968&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ go build -ldflags=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;-extldflags=-static&amp;#34;&lt;/span&gt; init.go
1969&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We can also check if the binary is statically compiled with:&lt;/p&gt;
1970&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ file init
1971&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=Ypu8Zw_4NBxm1Yxg2OYO/H5x721rQ9uTPiDVh-VqP/vZN7kXfGG1zhX_qdHMgH/9vBfmK81tFrygfOXDEOo, not stripped
1972&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1973&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ ldd init
1974&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;not a dynamic executable
1975&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, we need to create &lt;a href=&#34;https://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html&#34;&gt;initramfs&lt;/a&gt;
1976(abbreviated from &amp;quot;initial RAM file system&amp;quot;, is the successor of initrd. It
1977is a cpio archive of the initial file system that gets loaded into memory
1978during the Linux startup process).&lt;/p&gt;
1979&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ echo init | cpio -o --format=newc &amp;gt; initramfs
1980&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mv initramfs bin/initramfs
1981&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The projects at this stage should look like this.&lt;/p&gt;
1982&lt;pre&gt;&lt;code&gt;pid1/
1983 bin/
1984 bzImage
1985 initramfs
1986 linux-5.15.7/
1987 linux-5.15.7.tar.xz
1988 init.go
1989&lt;/code&gt;&lt;/pre&gt;
1990&lt;h2 id=&#34;running-all-of-it-with-qemu&#34;&gt;Running all of it with QEMU&lt;/h2&gt;
1991&lt;p&gt;&lt;a href=&#34;https://www.qemu.org/&#34;&gt;QEMU&lt;/a&gt; is a free and open-source hypervisor. It emulates
1992the machine&#39;s processor through dynamic binary translation and provides a set
1993of different hardware and device models for the machine, enabling it to run a
1994variety of guest operating systems.&lt;/p&gt;
1995&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ qemu-system-x86_64 -serial stdio -kernel bin/bzImage -initrd bin/initramfs -append &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;console=ttyS0&amp;#34;&lt;/span&gt; -m 128
1996&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ qemu-system-x86_64 -serial stdio -kernel bin/bzImage -initrd bin/initramfs -append &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;console=ttyS0&amp;#34;&lt;/span&gt; -m 128
1997&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] Linux version 5.15.7 (m@khan) (gcc (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7), GNU ld version 2.37-10.fc35) &lt;span style=&#34;color:#008000&#34;&gt;#7 SMP Mon Dec 13 10:23:25 CET 2021&lt;/span&gt;
1998&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] Command line: console=ttyS0
1999&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
2000&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] signal: max sigframe size: 1440
2001&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-provided physical RAM map:
2002&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
2003&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
2004&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
2005&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
2006&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
2007&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
2008&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] NX (Execute Disable) protection: active
2009&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] SMBIOS 2.8 present.
2010&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] DMI: QEMU Standard PC (i440FX &#43; PIIX, 1996), BIOS 1.14.0-6.fc35 04/01/2014
2011&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 0.000000] tsc: Fast TSC calibration failed
2012&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
2013&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.016106] ALSA device list:
2014&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.016329] No soundcards found.
2015&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.053176] Freeing unused kernel image (initmem) memory: 1368K
2016&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.056095] Write protecting the kernel read-only data: 20480k
2017&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.058248] Freeing unused kernel image (text/rodata gap) memory: 2032K
2018&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.058811] Freeing unused kernel image (rodata/data gap) memory: 500K
2019&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.059164] Run /init as init process
2020&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hello from Golang
2021&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.386879] tsc: Refined TSC clocksource calibration: 3192.032 MHz
2022&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.387114] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e02e31fa14, max_idle_ns: 440795264947 ns
2023&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.387380] clocksource: Switched to clocksource tsc
2024&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[ 2.587895] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
2025&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hello from Golang
2026&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hello from Golang
2027&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hello from Golang
2028&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The whole &lt;a href=&#34;/assets/pid1/qemu.log&#34;&gt;log file here&lt;/a&gt;.&lt;/p&gt;
2029&lt;h2 id=&#34;size-comparison&#34;&gt;Size comparison&lt;/h2&gt;
2030&lt;p&gt;The cool thing about this approach is that the Linux kernel and the application
2031together only take around 12 MB, which is impressive as hell. And we need to
2032also know that the size of bzImage (Linux kernel) could be greatly decreased
2033by going into &lt;code&gt;make menuconfig&lt;/code&gt; and removing a ton of features from the kernel,
2034making the size even smaller. I managed to get kernel size down to 2 MB and
2035still working properly.&lt;/p&gt;
2036&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;total 12M
2037&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-rw-r--r--. 1 m m 9.3M Dec 13 10:24 bzImage
2038&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-rw-r--r--. 1 m m 1.9M Dec 27 01:19 initramfs
2039&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;creating-iso-image-and-running-it-with-gnome-boxes&#34;&gt;Creating ISO image and running it with Gnome Boxes&lt;/h2&gt;
2040&lt;p&gt;First we need to create proper folder structure with &lt;code&gt;mkdir -p iso/boot/grub&lt;/code&gt;.&lt;/p&gt;
2041&lt;p&gt;Then we need to download the &lt;a href=&#34;https://github.com/littleosbook/littleosbook/raw/master/files/stage2_eltorito&#34;&gt;grub binary&lt;/a&gt;.
2042You can read more about this program on &lt;a href=&#34;https://github.com/littleosbook/littleosbook&#34;&gt;https://github.com/littleosbook/littleosbook&lt;/a&gt;.&lt;/p&gt;
2043&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ wget -O iso/boot/grub/stage2_eltorito https://github.com/littleosbook/littleosbook/raw/master/files/stage2_eltorito
2044&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ tree iso/boot/
2045&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;iso/boot/
2046&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── bzImage
2047&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── grub
2048&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── menu.lst
2049&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── stage2_eltorito
2050&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── initramfs
2051&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&#39;s copy files into proper folders.&lt;/p&gt;
2052&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cp stage2_eltorito iso/boot/grub/
2053&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cp bin/bzImage iso/boot/
2054&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cp bin/initramfs iso/boot/
2055&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Lets create a GRUB config file at &lt;code&gt;nano iso/boot/grub/menu.lst&lt;/code&gt; with contents.&lt;/p&gt;
2056&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;default=&lt;span style=&#34;color:#a31515&#34;&gt;0&lt;/span&gt;
2057&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;timeout=&lt;span style=&#34;color:#a31515&#34;&gt;5&lt;/span&gt;
2058&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2059&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;title GoAsPID1
2060&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kernel /boot/bzImage
2061&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd /boot/initramfs
2062&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&#39;s create iso file by using genisoimage:&lt;/p&gt;
2063&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;genisoimage -R &lt;span style=&#34;color:#a31515&#34;&gt;\
2064&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -b boot/grub/stage2_eltorito &lt;span style=&#34;color:#a31515&#34;&gt;\
2065&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -no-emul-boot &lt;span style=&#34;color:#a31515&#34;&gt;\
2066&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -boot-load-size 4 &lt;span style=&#34;color:#a31515&#34;&gt;\
2067&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -A os &lt;span style=&#34;color:#a31515&#34;&gt;\
2068&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -input-charset utf8 &lt;span style=&#34;color:#a31515&#34;&gt;\
2069&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -quiet &lt;span style=&#34;color:#a31515&#34;&gt;\
2070&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -boot-info-table &lt;span style=&#34;color:#a31515&#34;&gt;\
2071&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -o GoAsPID1.iso &lt;span style=&#34;color:#a31515&#34;&gt;\
2072&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; iso
2073&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will produce &lt;code&gt;GoAsPID1.iso&lt;/code&gt; which you can use with &lt;a href=&#34;https://www.virtualbox.org/&#34;&gt;Virtualbox&lt;/a&gt;
2074or &lt;a href=&#34;https://apps.gnome.org/app/org.gnome.Boxes/&#34;&gt;Gnome Boxes&lt;/a&gt;.&lt;/p&gt;
2075&lt;p&gt;&lt;video src=&#34;/assets/pid1/boxes.mp4&#34; controls&gt;&lt;/video&gt;&lt;/p&gt;
2076&lt;h2 id=&#34;is-running-applications-as-pid-1-even-worth-it&#34;&gt;Is running applications as PID 1 even worth it?&lt;/h2&gt;
2077&lt;p&gt;Well, the answer to this is not as simple as one would think. Sometimes it is
2078and sometimes it&#39;s not. For embedded systems and very specialized applications
2079it is worth for sure. But in normal uses, I don&#39;t think so. It was an interesting
2080exercise in compiling kernels and looking at the guts of the Linux kernel,
2081but sticking to containers for most of the things is a better option in my
2082opinion.&lt;/p&gt;
2083&lt;p&gt;An interesting experiment would be creating an image that supports networking
2084and could be deployed to AWS as an EC2 instance and observing how it fares.
2085But in that case, we would need to write some sort of supervisor that would
2086run on a separate EC2 that would check if other EC2 instances are running
2087properly. Remember that if your application fails, kernel panics and the
2088whole machine is inoperable in this case.&lt;/p&gt;
2089</content:encoded>
2090 </item>
2091
2092
2093
2094 <item>
2095 <title>Debian based riced up distribution for Developers and DevOps folks</title>
2096 <link>https://mitjafelicijan.com/debian-based-riced-up-distribution-for-developers-and-devops-folks.html</link>
2097 <pubDate>Fri, 03 Dec 2021 12:00:00 &#43;0200</pubDate>
2098 <guid>https://mitjafelicijan.com/debian-based-riced-up-distribution-for-developers-and-devops-folks.html</guid>
2099 <description>IntroductionI have been using Ubuntu for quite a longtime now.</description>
2100 <content:encoded>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
2101&lt;p&gt;I have been using &lt;a href=&#34;https://ubuntu.com/&#34;&gt;Ubuntu&lt;/a&gt; for quite a longtime now. I have
2102used &lt;a href=&#34;https://www.debian.org/&#34;&gt;Debian&lt;/a&gt; in the past and
2103&lt;a href=&#34;https://manjaro.org/&#34;&gt;Manjaro&lt;/a&gt;. Also had &lt;a href=&#34;https://archlinux.org/&#34;&gt;Arch&lt;/a&gt; for
2104some time and even ran &lt;a href=&#34;https://www.gentoo.org/&#34;&gt;Gentoo&lt;/a&gt; way back.&lt;/p&gt;
2105&lt;p&gt;What I learned from all this is that I prefer running a bit older versions and
2106having them be stable than run bleeding edge rolling release. For that reason, I
2107stuck with Ubuntu for a couple of years now. I am also at a point in my life
2108where I just don&#39;t care what is cool or hip anymore. I just want a stable system
2109that doesn&#39;t get in my way.&lt;/p&gt;
2110&lt;p&gt;During all this, I noticed that these distributions were getting very bloated
2111and a lot of software got included that I usually uninstall on fresh
2112installation. Maybe this is my OCD speaking, but why do I have to give fresh
2113installation min 1 GB of ram out of the box just to have a blank screen in front
2114of me? I get it, there are many things included in the distro to make my life
2115easier. I understand. But at this point I have a feeling that modern Linux
2116distributions are becoming similar to &lt;a href=&#34;https://devhumor.com/content/uploads/images/August2017/node-modules.jpg&#34;&gt;Node.js project with
2117node_modules&lt;/a&gt;.
2118Just a crazy number of packages serving very little or no purpose, just
2119supporting other software.&lt;/p&gt;
2120&lt;p&gt;I felt I needed a fresh start. To start over with something minimal and clean.
2121Something that would put a little more joy into using a computer again.&lt;/p&gt;
2122&lt;p&gt;For the first version, I wanted to target the following machines I have at home
2123that I want this thing to work on.&lt;/p&gt;
2124&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# My main stationary work machine&lt;/span&gt;
2125&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Resolution: 3840x1080 (Super Ultrawide Monitor 32:9)
2126&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CPU: Intel i7-8700 (12) @ 4.600GHz
2127&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
2128&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Memory: 32020MiB
2129&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Thinkpad x220 for testing things and goofing around&lt;/span&gt;
2130&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Resolution: 1366x768
2131&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CPU: Intel i5-2520M (4) @ 3.200GHz
2132&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GPU: Intel 2nd Generation Core Processor Family
2133&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Memory: 15891MiB
2134&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;how-should-i-approach-this&#34;&gt;How should I approach this?&lt;/h2&gt;
2135&lt;p&gt;I knew I wanted to use &lt;a href=&#34;https://www.debian.org/CD/netinst/&#34;&gt;minimal Debian netinst
2136&lt;/a&gt; for the base to give myself a head
2137start. No reason to go through changing the installer and also testing all that
2138behemoth of a thing. So, some sort of ricing was the only logical option to get
2139this thing of the grounds somewhat quickly.&lt;/p&gt;
2140&lt;blockquote&gt;
2141&lt;p&gt;&lt;strong&gt;What is ricing anyway?&lt;/strong&gt;
2142The term “RICE” stands for Race Inspired Cosmetic Enhancement. A group of
2143people (could be one, idk) decided to see if they could tweak their own
2144distros like they/others did their cars. This gave rise to a community of
2145Linux/Unix enthusiasts trying to make their distros look cooler and better
2146than others... For more information, read this article
2147&lt;a href=&#34;https://pesos.github.io/2020/07/14/what-is-ricing.html&#34;&gt;What in the world is ricing!?&lt;/a&gt;.&lt;/p&gt;
2148&lt;/blockquote&gt;
2149&lt;p&gt;I didn&#39;t want this to just be a set of config files for theming purpose. I
2150wanted this to include a set of pre-installed tools and services that are being
2151used all the time by a modern developer. Theming is just a tiny part of it.
2152Fonts being applied across the distro and things like that.&lt;/p&gt;
2153&lt;p&gt;First, I choose terminal installer and left it to load additional components.
2154Avoid using graphical installer in this case.&lt;/p&gt;
2155&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-00.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2156&lt;p&gt;After that I selected hostname and created a normal user and set password for
2157that user and root user and choose guided mode for disk partitioning.&lt;/p&gt;
2158&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-01.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2159&lt;p&gt;I left it run to install all the things required for the base system and opted
2160out of scanning additional media for use by the package manager. Those will be
2161downloaded from the internet during installation.&lt;/p&gt;
2162&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-02.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2163&lt;p&gt;I opted out of the popularity contest, and &lt;strong&gt;now comes the important part&lt;/strong&gt;.
2164Uncheck all the boxes in Software selection and only leave &#39;standard system
2165utilities&#39;. I also left an SSH server, so I was able to log in to the machine
2166from my main PC.&lt;/p&gt;
2167&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-03.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2168&lt;p&gt;At this point, I installed GRUB bootloader on the disk where I installed the
2169system.&lt;/p&gt;
2170&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-04.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2171&lt;p&gt;That concluded the installation of base Debian and after restarting the computer
2172I was prompted with the login screen.&lt;/p&gt;
2173&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/install-05.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2174&lt;p&gt;Now that I had the base installation, it was time to choose what software do I
2175want to include in this so-called distribution. I wanted out of the box
2176developer experience, so I had plenty to choose.&lt;/p&gt;
2177&lt;p&gt;Let&#39;s not waste time and go through the list.&lt;/p&gt;
2178&lt;h2 id=&#34;desktop-environments&#34;&gt;Desktop environments&lt;/h2&gt;
2179&lt;p&gt;I have been using &lt;a href=&#34;https://www.gnome.org/&#34;&gt;Gnome&lt;/a&gt; for my whole Linux life. From
2180version 2 forward. It&#39;s been quite a ride. I hated version 3 when it came out
2181and replaced version 2. But I got used to it. And now with version 40&#43; they also
2182made couple of changes which I found both frustrating and presently surprised.&lt;/p&gt;
2183&lt;p&gt;The amount of vertical space you loose because of the beefy title bars on
2184windows is ridiculous. And then in case of
2185&lt;a href=&#34;https://gnunn1.github.io/tilix-web/&#34;&gt;Tilix&lt;/a&gt; you also have tabs, and you are
2186100px deep. Vertical space is one of the most important things for a
2187developer. The more real estate you have, the more code you can have in a
2188viewport.&lt;/p&gt;
2189&lt;p&gt;But on the other hand, I still love how Gnome feels and looks. I gotta give them
2190that. They really are trying to make Gnome feel unified and modern.&lt;/p&gt;
2191&lt;p&gt;Regardless of all the nice things Gnome has, I was looking at the tiling window
2192managers for some time, but never had the nerve to actually go with it. But now
2193was the ideal time to give it a go. No guts, no glory kind of a thing.&lt;/p&gt;
2194&lt;p&gt;One of the requirements for me was easy custom layouts because I use a really
2195strange monitor with aspect ratio of 32:9. So relying on included layouts most
2196of them have is a non-starter.&lt;/p&gt;
2197&lt;p&gt;What I was doing in Gnome was having windows in a layout like the diagram
2198below. This is my common practice. And if you look at it you can clearly see I
2199was replicating tiling window manager setup in Gnome.&lt;/p&gt;
2200&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/layout.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2201&lt;p&gt;That made me look into a bunch of tiling window managers and then tested them
2202out. Candidates I was looking at were:&lt;/p&gt;
2203&lt;ul&gt;
2204&lt;li&gt;&lt;a href=&#34;https://i3wm.org/&#34;&gt;i3&lt;/a&gt;&lt;/li&gt;
2205&lt;li&gt;&lt;a href=&#34;https://github.com/baskerville/bspwm&#34;&gt;bspwm&lt;/a&gt;&lt;/li&gt;
2206&lt;li&gt;&lt;a href=&#34;https://awesomewm.org/index.html&#34;&gt;awesome&lt;/a&gt;&lt;/li&gt;
2207&lt;li&gt;&lt;a href=&#34;https://xmonad.org/&#34;&gt;XMonad&lt;/a&gt;&lt;/li&gt;
2208&lt;li&gt;&lt;a href=&#34;https://swaywm.org/&#34;&gt;sway&lt;/a&gt;&lt;/li&gt;
2209&lt;li&gt;&lt;a href=&#34;http://www.qtile.org/&#34;&gt;Qtile&lt;/a&gt;&lt;/li&gt;
2210&lt;li&gt;&lt;a href=&#34;https://dwm.suckless.org/&#34;&gt;dwm&lt;/a&gt;&lt;/li&gt;
2211&lt;/ul&gt;
2212&lt;p&gt;You can also check article &lt;a href=&#34;https://www.tecmint.com/best-tiling-window-managers-for-linux/&#34;&gt;13 Best Tiling Window Managers for
2213Linux&lt;/a&gt; I was
2214referencing while testing them out.&lt;/p&gt;
2215&lt;p&gt;While all of them provided what I needed, I liked i3 the most. What particular
2216caught my eye was the ease to use and tree based layouts which allows flexible
2217layouts. I know others can be set up also to have custom layouts other than&lt;br /&gt;
2218spiral, dwindle etc. I think i3 is a good entry-level window manager for
2219somebody like me.&lt;/p&gt;
2220&lt;h2 id=&#34;batteries-included&#34;&gt;Batteries included&lt;/h2&gt;
2221&lt;p&gt;The source for the whole thing is located on Github
2222&lt;a href=&#34;https://github.com/mitjafelicijan/dfd-rice&#34;&gt;https://github.com/mitjafelicijan/dfd-rice&lt;/a&gt;.&lt;/p&gt;
2223&lt;p&gt;Currenly included:&lt;/p&gt;
2224&lt;ul&gt;
2225&lt;li&gt;&lt;code&gt;non-free&lt;/code&gt; (enables non-free packages in apt)&lt;/li&gt;
2226&lt;li&gt;&lt;code&gt;sudo&lt;/code&gt; (adds sudo and adds user to sudo group)&lt;/li&gt;
2227&lt;li&gt;&lt;code&gt;essentials&lt;/code&gt; (gcc, htop, zip, curl, etc...)&lt;/li&gt;
2228&lt;li&gt;&lt;code&gt;wifi&lt;/code&gt; (network manager nmtui)&lt;/li&gt;
2229&lt;li&gt;&lt;code&gt;desktop&lt;/code&gt; (i3, dmenu, fonts, configurations)&lt;/li&gt;
2230&lt;li&gt;&lt;code&gt;pulseaudio&lt;/code&gt; (pulseaudio with pavucontrol)&lt;/li&gt;
2231&lt;li&gt;&lt;code&gt;code-editors&lt;/code&gt; (vim, micro, vscode)&lt;/li&gt;
2232&lt;li&gt;&lt;code&gt;ohmybash&lt;/code&gt; (make bash pretty)&lt;/li&gt;
2233&lt;li&gt;&lt;code&gt;file-managers&lt;/code&gt; (mc)&lt;/li&gt;
2234&lt;li&gt;&lt;code&gt;git-ui&lt;/code&gt; (terminal git gui)&lt;/li&gt;
2235&lt;li&gt;&lt;code&gt;meld&lt;/code&gt; (diff tool)&lt;/li&gt;
2236&lt;li&gt;&lt;code&gt;profiling&lt;/code&gt; (kcachegrind, valgrind, strace, ltrace)&lt;/li&gt;
2237&lt;li&gt;&lt;code&gt;browsers&lt;/code&gt; (brave, firefox, chromium)&lt;/li&gt;
2238&lt;li&gt;programming languages:
2239&lt;ul&gt;
2240&lt;li&gt;&lt;code&gt;python&lt;/code&gt;&lt;/li&gt;
2241&lt;li&gt;&lt;code&gt;golang&lt;/code&gt;&lt;/li&gt;
2242&lt;li&gt;&lt;code&gt;nodejs&lt;/code&gt;&lt;/li&gt;
2243&lt;li&gt;&lt;code&gt;rust&lt;/code&gt;&lt;/li&gt;
2244&lt;li&gt;&lt;code&gt;nim&lt;/code&gt;&lt;/li&gt;
2245&lt;li&gt;&lt;code&gt;php&lt;/code&gt;&lt;/li&gt;
2246&lt;li&gt;&lt;code&gt;ruby&lt;/code&gt;&lt;/li&gt;
2247&lt;/ul&gt;
2248&lt;/li&gt;
2249&lt;li&gt;&lt;code&gt;docker&lt;/code&gt; (with docker-compose)&lt;/li&gt;
2250&lt;li&gt;&lt;code&gt;ansible&lt;/code&gt;&lt;/li&gt;
2251&lt;/ul&gt;
2252&lt;p&gt;Install script also allows you to install only specific packages (example for:
2253essentials ohmybash docker rust).&lt;/p&gt;
2254&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;su - root &lt;span style=&#34;color:#a31515&#34;&gt;\
2255&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; bash -c &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;wget -q https://raw.github.com/mitjafelicijan/dfd-rice/master/tools/install.sh -O -&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; -- &lt;span style=&#34;color:#a31515&#34;&gt;\
2256&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; essentials ohmybash docker rust
2257&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Currently, most of these recipes use what Debian and this is totally fine with
2258me since I never use bleeding edge features of a package. But if something major
2259would come to light, I will replace it with a possible compilation script or
2260something similar.&lt;/p&gt;
2261&lt;p&gt;This is some of the output from the installation script.&lt;/p&gt;
2262&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/script.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2263&lt;p&gt;Let&#39;s take a look at some examples in the installation script.&lt;/p&gt;
2264&lt;h3 id=&#34;docker-recipe&#34;&gt;Docker recipe&lt;/h3&gt;
2265&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# docker&lt;/span&gt;
2266&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print_header &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Installing Docker&amp;#34;&lt;/span&gt;
2267&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
2268&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;deb [arch=&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;dpkg --print-architecture&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian &lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;lsb_release -cs&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; stable&amp;#34;&lt;/span&gt; | tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null
2269&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt update
2270&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt -y install docker-ce docker-ce-cli containerd.io docker-compose
2271&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2272&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl start docker
2273&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl enable docker
2274&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl status docker --no-pager
2275&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2276&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/sbin/usermod -aG docker $USERNAME
2277&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;making-bash-pretty&#34;&gt;Making bash pretty&lt;/h3&gt;
2278&lt;p&gt;I really like &lt;a href=&#34;https://ohmyz.sh/&#34;&gt;Oh My Zsh&lt;/a&gt;, but I don&#39;t like zsh shell. When
2279I used it, I constantly needed to be aware of it and running bash scripts was a
2280pain. So, I was really delighted when I found out that a version for bash
2281existed called &lt;a href=&#34;https://ohmybash.nntoan.com/&#34;&gt;Oh My Bash&lt;/a&gt;. Let&#39;s take a look at
2282the recipe for installing it.&lt;/p&gt;
2283&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# ohmybash&lt;/span&gt;
2284&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print_header &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Enabling OhMyBash&amp;#34;&lt;/span&gt;
2285&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo -u $USERNAME sh -c &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;curl -fsSL https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; &amp;amp;
2286&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;T1=&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;!&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;
2287&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wait &lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;T1&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;
2288&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Because OhMyBash does &lt;code&gt;exec bash&lt;/code&gt; at the end, this traps our script inside
2289another shell and our script cannot continue. For that reason, I executed this
2290in background. But that presents a new problem. Because this is executed in
2291background, we lose track of progress naturally. And that strange trick with
2292&lt;code&gt;T1=${!}&lt;/code&gt; and &lt;code&gt;wait ${T1}&lt;/code&gt; waits for the background process to finish before
2293continuing to another task in bash script.&lt;/p&gt;
2294&lt;p&gt;Check &lt;a href=&#34;https://www.cloudsavvyit.com/12277/how-to-use-multi-threaded-processing-in-bash-scripts/&#34;&gt;Multi-Threaded Processing in Bash Scripts&lt;/a&gt;
2295for more details.&lt;/p&gt;
2296&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
2297&lt;p&gt;Take a look at
2298&lt;a href=&#34;https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh&#34;&gt;https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh&lt;/a&gt; script
2299to get familiar with it. This is just a first iteration and I will continue to
2300update it because I need this in my life.&lt;/p&gt;
2301&lt;p&gt;The current version boots in 4s to the login prompt, and after you log in, the
2302desktop environment loads in 2s. So, its fast, very fast. And on clean boot, I
2303measured ~230 MB of RAM usage.&lt;/p&gt;
2304&lt;p&gt;And this is how it looks with two terminals side by side. I really like the
2305simplicity and clean interface. I will polish the colors and stuff like that,
2306but I really do like the results.&lt;/p&gt;
2307&lt;p&gt;&lt;img src=&#34;/assets/dfd-rice/desktop.png&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
2308</content:encoded>
2309 </item>
2310
2311
2312
2313 <item>
2314 <title>List of essential Linux commands for server management</title>
2315 <link>https://mitjafelicijan.com/linux-cheatsheet.html</link>
2316 <pubDate>Sun, 01 Aug 2021 12:00:00 &#43;0200</pubDate>
2317 <guid>https://mitjafelicijan.com/linux-cheatsheet.html</guid>
2318 <description>Generate SSH keyssh-keygen -t ed25519 -C &amp;#34;your_email@example.</description>
2319 <content:encoded>&lt;p&gt;&lt;strong&gt;Generate SSH key&lt;/strong&gt;&lt;/p&gt;
2320&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-keygen -t ed25519 -C &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;your_email@example.com&amp;#34;&lt;/span&gt;
2321&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2322&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# when no support for Ed25519 present&lt;/span&gt;
2323&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-keygen -t rsa -b 4096 -C &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;your_email@example.com&amp;#34;&lt;/span&gt;
2324&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: By default SSH keys get stored to &lt;code&gt;/home/&amp;lt;username&amp;gt;/.ssh/&lt;/code&gt; folder.&lt;/p&gt;
2325&lt;p&gt;&lt;strong&gt;Login to host via SSH&lt;/strong&gt;&lt;/p&gt;
2326&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# connect to host as your local username&lt;/span&gt;
2327&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh host
2328&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2329&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# connect to host as user&lt;/span&gt;
2330&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh &amp;lt;user&amp;gt;@&amp;lt;host&amp;gt;
2331&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2332&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# connect to host using port&lt;/span&gt;
2333&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh -p &amp;lt;port&amp;gt; &amp;lt;user&amp;gt;@&amp;lt;host&amp;gt;
2334&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Execute command on a server through SSH&lt;/strong&gt;&lt;/p&gt;
2335&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# execute one command&lt;/span&gt;
2336&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh root@100.100.100.100 &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;ls /root&amp;#34;&lt;/span&gt;
2337&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2338&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# execute many commands&lt;/span&gt;
2339&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh root@100.100.100.100 &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;cd /root;touch file.txt&amp;#34;&lt;/span&gt;
2340&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays currently logged in users in the system&lt;/strong&gt;&lt;/p&gt;
2341&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;w
2342&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays Linux system information&lt;/strong&gt;&lt;/p&gt;
2343&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;uname
2344&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays kernel release information&lt;/strong&gt;&lt;/p&gt;
2345&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;uname -r
2346&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Shows the system hostname&lt;/strong&gt;&lt;/p&gt;
2347&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hostname
2348&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Shows system reboot history&lt;/strong&gt;&lt;/p&gt;
2349&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;last reboot
2350&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays information about the user&lt;/strong&gt;&lt;/p&gt;
2351&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install finger
2352&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;finger &amp;lt;username&amp;gt;
2353&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays IP addresses and all the network interfaces&lt;/strong&gt;&lt;/p&gt;
2354&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ip addr show
2355&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Downloads a file from an online source&lt;/strong&gt;&lt;/p&gt;
2356&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://example.com/example.tgz
2357&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: If URL contains ?, &amp;amp; enclose the URL in double quotes.&lt;/p&gt;
2358&lt;p&gt;&lt;strong&gt;Compress a file with gzip&lt;/strong&gt;&lt;/p&gt;
2359&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# will not keep the original file&lt;/span&gt;
2360&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gzip file.txt
2361&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2362&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# will keep the original file&lt;/span&gt;
2363&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gzip --keep file.txt
2364&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Interactive disk usage analyzer&lt;/strong&gt;&lt;/p&gt;
2365&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install ncdu
2366&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2367&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ncdu
2368&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ncdu &amp;lt;path/to/directory&amp;gt;
2369&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Install Node.js using the Node Version Manager&lt;/strong&gt;&lt;/p&gt;
2370&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
2371&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;source ~/.bashrc
2372&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2373&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvm install v13
2374&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Too long; didn&#39;t read&lt;/strong&gt;&lt;/p&gt;
2375&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install -g tldr
2376&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2377&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tldr tar
2378&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Combine all Nginx access logs to one big log file&lt;/strong&gt;&lt;/p&gt;
2379&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zcat -f /var/log/nginx/access.log* &amp;gt; /var/log/nginx/access-all.log
2380&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Set up Redis server&lt;/strong&gt;&lt;/p&gt;
2381&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install redis-server redis-tools
2382&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2383&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# check if server is running&lt;/span&gt;
2384&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo service redis status
2385&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2386&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# set and get a key value&lt;/span&gt;
2387&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;redis-cli set mykey myvalue
2388&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;redis-cli get mykey
2389&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2390&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# interactive shell&lt;/span&gt;
2391&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;redis-cli
2392&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Generate statistics of your webserver&lt;/strong&gt;&lt;/p&gt;
2393&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install goaccess
2394&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2395&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# check if installed&lt;/span&gt;
2396&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;goaccess -v
2397&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2398&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# combine logs&lt;/span&gt;
2399&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zcat -f /var/log/nginx/access.log* &amp;gt; /var/log/nginx/access-all.log
2400&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2401&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# export to single html&lt;/span&gt;
2402&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;goaccess &lt;span style=&#34;color:#a31515&#34;&gt;\
2403&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --log-file=/var/log/nginx/access-all.log &lt;span style=&#34;color:#a31515&#34;&gt;\
2404&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --log-format=COMBINED &lt;span style=&#34;color:#a31515&#34;&gt;\
2405&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --exclude-ip=0.0.0.0 &lt;span style=&#34;color:#a31515&#34;&gt;\
2406&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --ignore-crawlers &lt;span style=&#34;color:#a31515&#34;&gt;\
2407&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --real-os &lt;span style=&#34;color:#a31515&#34;&gt;\
2408&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --output=/var/www/html/stats.html
2409&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2410&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# cleanup afterwards&lt;/span&gt;
2411&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm /var/log/nginx/access-all.log
2412&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Search for a given pattern in files&lt;/strong&gt;&lt;/p&gt;
2413&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grep -r ‘pattern’ files
2414&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Find proccess ID for a specific program&lt;/strong&gt;&lt;/p&gt;
2415&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pgrep nginx
2416&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Print name of current/working directory&lt;/strong&gt;&lt;/p&gt;
2417&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pwd
2418&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Creates a blank new file&lt;/strong&gt;&lt;/p&gt;
2419&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;touch newfile.txt
2420&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays first lines in a file&lt;/strong&gt;&lt;/p&gt;
2421&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -n &amp;lt;x&amp;gt; presents the number of lines (10 by default)&lt;/span&gt;
2422&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;head -n 20 somefile.txt
2423&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays last lines in a file&lt;/strong&gt;&lt;/p&gt;
2424&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -n &amp;lt;x&amp;gt; presents the number of lines (10 by default)&lt;/span&gt;
2425&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tail -n 20 somefile.txt
2426&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2427&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -f follows the changes in file (doesn&amp;#39;t closes)&lt;/span&gt;
2428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tail -f somefile.txt
2429&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Count lines in a file&lt;/strong&gt;&lt;/p&gt;
2430&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wc -l somefile.txt
2431&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Find all instances of the file&lt;/strong&gt;&lt;/p&gt;
2432&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install mlocate
2433&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2434&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;locate somefile.txt
2435&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Find file names that begin with ‘index’ in /home folder&lt;/strong&gt;&lt;/p&gt;
2436&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find /home/ -name &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;index&amp;#34;&lt;/span&gt;
2437&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Find files larger than 100MB in the home folder&lt;/strong&gt;&lt;/p&gt;
2438&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find /home -size &#43;100M
2439&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays block devices related information&lt;/strong&gt;&lt;/p&gt;
2440&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;lsblk
2441&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays free space on mounted systems&lt;/strong&gt;&lt;/p&gt;
2442&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df -h
2443&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays free and used memory in the system&lt;/strong&gt;&lt;/p&gt;
2444&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;free -h
2445&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Displays all active listening ports&lt;/strong&gt;&lt;/p&gt;
2446&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install net-tools
2447&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2448&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;netstat -pnltu
2449&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Kill a process violently&lt;/strong&gt;&lt;/p&gt;
2450&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kill -9 &amp;lt;pid&amp;gt;
2451&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;List files opened by user&lt;/strong&gt;&lt;/p&gt;
2452&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;lsof -u &amp;lt;user&amp;gt;
2453&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Execute &amp;quot;df -h&amp;quot;, showing periodic updates&lt;/strong&gt;&lt;/p&gt;
2454&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -n 1 means every second&lt;/span&gt;
2455&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;watch -n 1 df -h
2456&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
2457 </item>
2458
2459
2460
2461 <item>
2462 <title>My journey from being an internet über consumer to being a full hominum again</title>
2463 <link>https://mitjafelicijan.com/from-internet-consumer-to-full-hominum-again.html</link>
2464 <pubDate>Fri, 30 Jul 2021 12:00:00 &#43;0200</pubDate>
2465 <guid>https://mitjafelicijan.com/from-internet-consumer-to-full-hominum-again.html</guid>
2466 <description>It&amp;#39;s been almost a year since I started purging all my online accounts andgoing down this rabbit hole of being almost independent of the current internetmachine.</description>
2467 <content:encoded>&lt;p&gt;It&#39;s been almost a year since I started purging all my online accounts and
2468going down this rabbit hole of being almost independent of the current internet
2469machine. Even though I initially thought that I will have problems adapting,
2470I was pleasantly surprised that the transition went so smoothly. Even better,
2471it brought many benefits to my life. Such as increased focus, less stress
2472about trivial things, etc.&lt;/p&gt;
2473&lt;p&gt;It all started with me doing small changes like unsubscribing from emails that I
2474have either subscribed to by accepting terms and conditions. Or even some more
2475malicious emails that I was getting because I was on a shared mailing list. And
2476the later ones I hate the most of all. How the hell do they keep sharing my
2477email and sending me unsolicited emails and get away with it? I have a suspicion
2478that these marketing people share an Excel file between them and keep
2479resubscribing me when they import lists into Mailchimp or similar software.&lt;/p&gt;
2480&lt;p&gt;It&#39;s fascinating to see how much crap you get subscribed to when you are not
2481paying attention. It got so bad that my primary Gmail address is a full of junk
2482and need constant monitoring and cleaning up. And because I want to have Inbox
2483Zero, this presents an additional problem for me.&lt;/p&gt;
2484&lt;p&gt;The stress that email presented for me didn&#39;t occur to me for a long time. I was
2485noticing that I was unable to go through one single hour without hysterically
2486refreshing email. And if somebody wrote me something, I needed to see it right
2487then, even though I didn&#39;t immediately reply to it. I can only describe this
2488with FOMO (fear of missing out). I have no other explanation than that. It was
2489crippling, and I was constantly context switching, which I will address further
2490down this post in more details.&lt;/p&gt;
2491&lt;p&gt;This was one of the reasons why I spawned up my personal email server, and I am
2492using it now as my primary and person email. I still have Gmail as my “junk”
2493email that I use for throw away stuff. I log in to Gmail once a week and check
2494if there are any important emails that I got, but apart from that, it&#39;s sitting
2495dormant and collecting dust.&lt;/p&gt;
2496&lt;p&gt;The more I was watching the world loose it&#39;s self with allowing anti freedom
2497things to happen to it, the more I started to realize that something has to
2498change. I don&#39;t have the power to change the world. And I also don&#39;t have a
2499grandiose opinion of myself to even think to try it. But what I can do is to not
2500subscribe to this consumer way of thinking. I will not be complicit in this. My
2501moral and ethical stances won&#39;t allow it. So, this brings us to the second part
2502of my journey.&lt;/p&gt;
2503&lt;p&gt;I was using all these 3rd party services because I was either lazy or OK with
2504the drawbacks of them. I watched these services and companies became more and
2505privacy policies and everybody is OK with accepting them, and they pray on that
2506more evil. It is evil if you sell your user&#39;s data in this manner. Nobody reads
2507flaw in human nature. I really hate the hypocrisy they manage to muster. These
2508companies prey on our laziness, and we are at fault here. Nobody else. And I
2509truly understand the reasons why we rather accept and move on, and not object
2510and have our lives a little more difficult. They have perfected this through
2511years of small changes that make us a little more dependent on them. You could
2512not convince a person to give away all his rights and data in one day. This was
2513gradual and slow. And it caught us all in surprise. When I really stopped and
2514thought about it, I felt repulsed. By really stopping and thinking about it, I
2515really mean stopping and thinking about it. Thoroughly and in depth.&lt;/p&gt;
2516&lt;p&gt;Each step I took depleted my character a bit more. Like I was trading myself bit
2517by bit without understanding what it all meant. What it meant to be a full
2518person, not divided by all this bought attention they want from me. They don&#39;t
2519just get your data, but they also take your attention away from you. They
2520scatter your and go with the divide and conquer tactic from there. And a person
2521divided is a person not fully there. Not at the moment. Not alive fully.&lt;/p&gt;
2522&lt;p&gt;I was unable to form long thoughts. Well, I thought I was. But now that I see
2523what being a full person is again, I can see that I was not at my 100% back
2524then.&lt;/p&gt;
2525&lt;p&gt;A revolt was inevitable. There was no other way of continuing my story without
2526it. Without taking back my attention, my thoughts, my time, and my privacy,
2527regardless of how too late it maybe is.&lt;/p&gt;
2528&lt;p&gt;This has nothing to do with conspiracy theories. Even less with changing the
2529world. All I wanted was to get my life back in order and not waste the energy
2530that could be spent in other, better places.&lt;/p&gt;
2531&lt;p&gt;I started reading more. I can focus now fully on things I work on. Furthermore,
2532I have the mental acuity that I never had before. My mind feels sharp. I don&#39;t
2533get angry so much. I can cherish the finer things in life now without the need
2534to interpret them intellectually. Not only that, but I have a feeling of
2535belonging again. Sense of purpose has returned with a vengeance. And I can now
2536help people without depleting myself.&lt;/p&gt;
2537&lt;p&gt;The last step so far was to finish closing all the remaining online accounts
2538that I still had. And when I was thinking what value they bring me, I wasn&#39;t
2539surprised that the answer was none. I wasn&#39;t logging in them and using them. I
2540stopped being afraid of FOMO. If somebody wants to get in contact me, they will
2541find a way. I am one search away.&lt;/p&gt;
2542&lt;p&gt;We are not beholden to anybody. Our lives are our own. So dare yourself to
2543delete Facebook, LinkedIn. To unsubscribe. Dare yourself to take your time and
2544attention back. Use that time and energy to go for a walk without thinking about
2545work. Read a book instead of reading comment on social media that you will
2546forget in an hour. Enrich your life instead of wasting it. It only requires a
2547small step. And you will feel the benefits immediately. Lose the weight of the
2548world that is crushing you without your consent.&lt;/p&gt;
2549</content:encoded>
2550 </item>
2551
2552
2553
2554 <item>
2555 <title>Simple world clock with eInk display and Raspberry Pi Zero</title>
2556 <link>https://mitjafelicijan.com/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html</link>
2557 <pubDate>Sat, 26 Jun 2021 12:00:00 &#43;0200</pubDate>
2558 <guid>https://mitjafelicijan.com/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html</guid>
2559 <description>Our team is spread across the world, from the USA all the way to Australia, sohaving some sort of world clock makes sense.</description>
2560 <content:encoded>&lt;p&gt;Our team is spread across the world, from the USA all the way to Australia, so
2561having some sort of world clock makes sense.&lt;/p&gt;
2562&lt;p&gt;Currently, I am using an extension for Gnome called &lt;a href=&#34;https://extensions.gnome.org/extension/2657/timezones-extension/&#34;&gt;Timezone
2563extension&lt;/a&gt;,
2564and it serves the purpose quite well.&lt;/p&gt;
2565&lt;p&gt;But I also have a bunch of electronics that I bought through the time, and I am
2566not using any of them, and it&#39;s time to stop hording this stuff and use it in a
2567project.&lt;/p&gt;
2568&lt;p&gt;A while ago I bought a small eInk display &lt;a href=&#34;https://shop.pimoroni.com/products/inky-phat?variant=12549254217811&#34;&gt;Inky
2569pHAT&lt;/a&gt; and I
2570have a bunch of &lt;a href=&#34;https://www.raspberrypi.org/products/raspberry-pi-zero/&#34;&gt;Raspberry Pi&#39;s
2571Zero&lt;/a&gt; lying around that
2572I really need to use.&lt;/p&gt;
2573&lt;p&gt;&lt;img src=&#34;/assets/world-clock/hardware.jpg&#34; alt=&#34;Inky pHAT, Raspberry Pi Zero&#34; /&gt;&lt;/p&gt;
2574&lt;p&gt;Since the Inky &lt;a href=&#34;https://shop.pimoroni.com/products/inky-phat?variant=12549254217811&#34;&gt;Inky
2575pHAT&lt;/a&gt; is
2576essentially a HAT, it can easily be added on top of the &lt;a href=&#34;https://www.raspberrypi.org/products/raspberry-pi-zero/&#34;&gt;Raspberry Pi
2577Zero&lt;/a&gt;.&lt;/p&gt;
2578&lt;p&gt;First, I installed the necessary software on Raspberry Pi with &lt;code&gt;pip3 install inky&lt;/code&gt;.&lt;/p&gt;
2579&lt;p&gt;And then I created a file &lt;code&gt;clock.py&lt;/code&gt; in home directory &lt;code&gt;/home/pi&lt;/code&gt;.&lt;/p&gt;
2580&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;#!/usr/bin/env python&lt;/span&gt;
2581&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
2582&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2583&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; sys
2584&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; os
2585&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; inky.auto &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; auto
2586&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; PIL &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; Image, ImageFont, ImageDraw
2587&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; font_fredoka_one &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; FredokaOne
2588&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2589&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;clocks = [
2590&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;America/New_York&amp;#39;&lt;/span&gt;,
2591&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Europe/Ljubljana&amp;#39;&lt;/span&gt;,
2592&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Australia/Brisbane&amp;#39;&lt;/span&gt;,
2593&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]
2594&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2595&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;board = auto()
2596&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;board.set_border(board.WHITE)
2597&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;board.rotation = 90
2598&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2599&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;img = Image.new(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;P&amp;#39;&lt;/span&gt;, (board.WIDTH, board.HEIGHT))
2600&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;draw = ImageDraw.Draw(img)
2601&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2602&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;big_font = ImageFont.truetype(FredokaOne, 18)
2603&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;small_font = ImageFont.truetype(FredokaOne, 13)
2604&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2605&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;x = board.WIDTH / 3
2606&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;y = board.HEIGHT / 3
2607&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2608&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;idx = 1
2609&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; clock &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; clocks:
2610&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ctime = os.popen(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;TZ=&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34; date &#43;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%a&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;,%H:%M&amp;#34;&amp;#39;&lt;/span&gt;.format(clock))
2611&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ctime = ctime.read().strip().split(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;)
2612&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; city = clock.split(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;)[1].replace(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;_&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39; &amp;#39;&lt;/span&gt;)
2613&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2614&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; draw.text((15, (idx*y)-y&#43;10), city, fill=board.BLACK, font=small_font)
2615&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; draw.text((110, (idx*y)-y&#43;7), str(ctime[0]), fill=board.BLACK, font=big_font)
2616&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; draw.text((155, (idx*y)-y&#43;7), str(ctime[1]), fill=board.BLACK, font=big_font)
2617&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2618&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; idx &#43;= 1
2619&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2620&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;board.set_image(img)
2621&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;board.show()
2622&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And because eInk displays are rather slow to refresh and the clock requires
2623refreshing only once a minute, this can be done through cronjob.&lt;/p&gt;
2624&lt;p&gt;Before we add this job to cron we need to make &lt;code&gt;clock.py&lt;/code&gt; executable with &lt;code&gt;chmod &#43;x clock.py&lt;/code&gt;.&lt;/p&gt;
2625&lt;p&gt;Then we add a cronjob with &lt;code&gt;crontab -e&lt;/code&gt;.&lt;/p&gt;
2626&lt;pre&gt;&lt;code&gt;* * * * * /home/pi/clock.py
2627&lt;/code&gt;&lt;/pre&gt;
2628&lt;p&gt;So, we end up with a result like this.&lt;/p&gt;
2629&lt;p&gt;&lt;img src=&#34;/assets/world-clock/world-clock.jpg&#34; alt=&#34;World Clock&#34; /&gt;&lt;/p&gt;
2630&lt;p&gt;And for the enclosure that can be 3D printed, but I haven&#39;t yet something like
2631this can be used.&lt;/p&gt;
2632&lt;iframe id=&#34;vs_iframe&#34; src=&#34;https://www.viewstl.com/?embedded&amp;url=https%3A%2F%2Fmitjafelicijan.com%2Fassets%2Fworld-clock%2Fenclosure.stl&amp;color=gray&amp;bgcolor=white&amp;edges=no&amp;orientation=front&amp;noborder=no&#34; style=&#34;border:0;margin:0;width:100%;height:400px;&#34;&gt;&lt;/iframe&gt;
2633&lt;p&gt;You can download my &lt;a href=&#34;/assets/world-clock/enclosure.stl&#34;&gt;STL file for the enclosure
2634here&lt;/a&gt;, but make sure that dimensions make
2635sense and also opening for USB port should be added or just use a drill and some
2636hot glue to make it stick in the enclosure.&lt;/p&gt;
2637</content:encoded>
2638 </item>
2639
2640
2641
2642 <item>
2643 <title>Using GoAccess with Nginx to replace Google Analytics</title>
2644 <link>https://mitjafelicijan.com/using-goaccess-with-nginx-to-replace-google-analytics.html</link>
2645 <pubDate>Mon, 25 Jan 2021 12:00:00 &#43;0200</pubDate>
2646 <guid>https://mitjafelicijan.com/using-goaccess-with-nginx-to-replace-google-analytics.html</guid>
2647 <description>IntroductionI know!</description>
2648 <content:encoded>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
2649&lt;p&gt;I know! You cannot simply replace Google Analytics with parsing access logs and
2650displaying a couple of charts. But to be honest, I actually never used Google
2651Analytics to the fullest extent and was usually interested in seeing page hits
2652and which pages were visited most often.&lt;/p&gt;
2653&lt;p&gt;I recently moved my blog from Firebase to a VPS and also decided to remove
2654Google Analytics tracking code from the site since its quite malicious and
2655tracks users across other pages also and is creating a profile of a user, and
2656I&#39;ve had it. But I also need some insight of what is happening on a server and
2657which content is being read the most etc.&lt;/p&gt;
2658&lt;p&gt;I have looked at many existing solutions like:&lt;/p&gt;
2659&lt;ul&gt;
2660&lt;li&gt;&lt;a href=&#34;https://umami.is/&#34;&gt;Umami&lt;/a&gt;&lt;/li&gt;
2661&lt;li&gt;&lt;a href=&#34;https://github.com/sheshbabu/freshlytics&#34;&gt;Freshlytics&lt;/a&gt;&lt;/li&gt;
2662&lt;li&gt;&lt;a href=&#34;https://matomo.org/&#34;&gt;Matomo&lt;/a&gt;&lt;/li&gt;
2663&lt;/ul&gt;
2664&lt;p&gt;But the more I looked at them the more I noticed that I am replacing one evil
2665with another one. Don&#39;t get me wrong. Some of these solutions are absolutely
2666fantastic but would require installation of databases and something like PHP or
2667Node. And I was not ready to put those things on my fresh server. Also having
2668Docker installed is out of the question.&lt;/p&gt;
2669&lt;h2 id=&#34;opting-for-log-parsing&#34;&gt;Opting for log parsing&lt;/h2&gt;
2670&lt;p&gt;So, I defaulted to parsing already existing logs and generating HTML reports
2671from this data.&lt;/p&gt;
2672&lt;p&gt;I found this amazing software &lt;a href=&#34;https://goaccess.io/&#34;&gt;GoAccess&lt;/a&gt; which provides
2673all the functionalities I need, and it&#39;s a single binary. Written in Go.&lt;/p&gt;
2674&lt;p&gt;GoAccess can be used in two different modes.&lt;/p&gt;
2675&lt;p&gt;&lt;img src=&#34;/assets/goaccess/goaccess-dash-term.png&#34; alt=&#34;GoAccess Terminal&#34; /&gt;&lt;/p&gt;
2676&lt;center&gt;&lt;i&gt;Running in a terminal&lt;/i&gt;&lt;/center&gt;
2677&lt;p&gt;&lt;img src=&#34;/assets/goaccess/goaccess-dash-html.png&#34; alt=&#34;GoAccess HTML&#34; /&gt;&lt;/p&gt;
2678&lt;center&gt;&lt;i&gt;Running in a browser&lt;/i&gt;&lt;/center&gt;
2679&lt;p&gt;I, however, need this to run in a browser. So, the second option is the way to
2680go. The Idea is to periodically run cronjob and export this report into a folder
2681that gets then server by Nginx behind a Basic authentication.&lt;/p&gt;
2682&lt;h2 id=&#34;getting-nginx-ready&#34;&gt;Getting Nginx ready&lt;/h2&gt;
2683&lt;p&gt;I choose Ubuntu on &lt;a href=&#34;https://www.digitalocean.com/&#34;&gt;DigitalOcean&lt;/a&gt;. First I
2684installed &lt;a href=&#34;https://nginx.org/en/&#34;&gt;Nginx&lt;/a&gt;, and
2685&lt;a href=&#34;https://letsencrypt.org/getting-started/&#34;&gt;Letsencrypt&lt;/a&gt; certbot and all the
2686necessary dependencies.&lt;/p&gt;
2687&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# log in as root user&lt;/span&gt;
2688&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo su -
2689&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2690&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# first let&amp;#39;s update the system&lt;/span&gt;
2691&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt update &amp;amp;&amp;amp; apt upgrade -y
2692&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2693&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# let&amp;#39;s install&lt;/span&gt;
2694&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt install nginx certbot python3-certbot-nginx apache2-utils
2695&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After all this is installed we can create a new configuration for a statistics.
2696Stats will be available at &lt;code&gt;stats.domain.com&lt;/code&gt;.&lt;/p&gt;
2697&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# creates directory where html will be hosted&lt;/span&gt;
2698&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p /var/www/html/stats.domain.com
2699&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2700&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp /etc/nginx/sites-available/default /etc/nginx/sites-available/stats.domain.com
2701&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nano /etc/nginx/sites-available/stats.domain.com
2702&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;server&lt;/span&gt; {
2703&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;root&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/var/www/html/stats.domain.com&lt;/span&gt;;
2704&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;server_name&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;stats.domain.com&lt;/span&gt;;
2705&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2706&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;index&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;index.html&lt;/span&gt;;
2707&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;location&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/&lt;/span&gt; {
2708&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;try_files&lt;/span&gt; $uri $uri/ =404;
2709&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
2710&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
2711&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now we check if the configuration is ok. We can do this with &lt;code&gt;nginx -t&lt;/code&gt;. If all
2712is ok, we can restart Nginx with &lt;code&gt;service nginx restart&lt;/code&gt;.&lt;/p&gt;
2713&lt;p&gt;After all that you should add A record for this domain that points to IP of a
2714droplet.&lt;/p&gt;
2715&lt;p&gt;Before enabling SSL you should test if DNS records have propagated with &lt;code&gt;curl stats.domain.com&lt;/code&gt;.&lt;/p&gt;
2716&lt;p&gt;Now, it&#39;s time to provision TLS certificate. To achieve this, you execute
2717command &lt;code&gt;certbot --nginx&lt;/code&gt;. Follow the wizard and when you are asked about
2718redirection always choose 2 (always redirect to HTTPS).&lt;/p&gt;
2719&lt;p&gt;When this is done you can visit &lt;a href=&#34;https://stats.domain.com&#34;&gt;https://stats.domain.com&lt;/a&gt; and you should get 404
2720not found error which is correct.&lt;/p&gt;
2721&lt;h2 id=&#34;getting-goaccess-ready&#34;&gt;Getting GoAccess ready&lt;/h2&gt;
2722&lt;p&gt;If you are using Debian like system GoAccess should be available in repository.
2723Otherwise refer to the official website.&lt;/p&gt;
2724&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt install goaccess
2725&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To enable Geo location we also need one additiona thing.&lt;/p&gt;
2726&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /var/www/html/stats.stats.com
2727&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb
2728&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now we create a shell script that will be executed every 10 minutes.&lt;/p&gt;
2729&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nano /var/www/html/stats.domain.com/generate-stats.sh
2730&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Contents of this file should look like this.&lt;/p&gt;
2731&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/bin/sh
2732&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
2733&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zcat -f /var/log/nginx/access.log* &amp;gt; /var/log/nginx/access-all.log
2734&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2735&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;goaccess &lt;span style=&#34;color:#a31515&#34;&gt;\
2736&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --log-file=/var/log/nginx/access-all.log &lt;span style=&#34;color:#a31515&#34;&gt;\
2737&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --log-format=COMBINED &lt;span style=&#34;color:#a31515&#34;&gt;\
2738&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --exclude-ip=0.0.0.0 &lt;span style=&#34;color:#a31515&#34;&gt;\
2739&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --geoip-database=/var/www/html/stats.domain.com/GeoLite2-City.mmdb &lt;span style=&#34;color:#a31515&#34;&gt;\
2740&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --ignore-crawlers &lt;span style=&#34;color:#a31515&#34;&gt;\
2741&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --real-os &lt;span style=&#34;color:#a31515&#34;&gt;\
2742&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; --output=/var/www/html/stats.domain.com/index.html
2743&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2744&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm /var/log/nginx/access-all.log
2745&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Because after a while nginx creates multiple files with access logs we use
2746&lt;a href=&#34;https://linux.die.net/man/1/zcat&#34;&gt;&lt;code&gt;zcat&lt;/code&gt;&lt;/a&gt; to extract Gziped contents and create
2747a file that has all the access logs. After this file is used we delete it.&lt;/p&gt;
2748&lt;p&gt;If you want to exclude your home IP&#39;s result look at the &lt;code&gt;--exclude-ip&lt;/code&gt; option
2749in script and instead of &lt;code&gt;0.0.0.0&lt;/code&gt; add your own home IP address. You can find
2750your home IP by executing &lt;code&gt;curl ifconfig.me&lt;/code&gt; from your local machine and NOT
2751from the droplet.&lt;/p&gt;
2752&lt;p&gt;Test the script by executing &lt;code&gt;sh /var/www/html/stats.domain.com/generate-stats.sh&lt;/code&gt; and then checking
2753&lt;code&gt;https://stats.domain.com&lt;/code&gt;. If you can see stats instead of 404 than you are
2754set.&lt;/p&gt;
2755&lt;p&gt;It&#39;s time to add this script to cron with &lt;code&gt;cron -e&lt;/code&gt;.&lt;/p&gt;
2756&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*/10 * * * * sh /&lt;span style=&#34;color:#00f&#34;&gt;var&lt;/span&gt;/www/html/stats.domain.com/generate-stats.sh
2757&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;securing-with-basic-authentication&#34;&gt;Securing with Basic authentication&lt;/h2&gt;
2758&lt;p&gt;You probably don&#39;t want stats to be publicly available, so we should create a
2759user and a password for Basic authentication.&lt;/p&gt;
2760&lt;p&gt;First we create a password for a user &lt;code&gt;stats&lt;/code&gt; with &lt;code&gt;htpasswd -c /etc/nginx/.htpasswd stats&lt;/code&gt;.&lt;/p&gt;
2761&lt;p&gt;Now we update config file with &lt;code&gt;nano /etc/nginx/sites-available/stats.domain.com&lt;/code&gt;. You probably noticed that the
2762file looks a bit different from before. This is because &lt;code&gt;certbot&lt;/code&gt; added
2763additional rules for SSL.&lt;/p&gt;
2764&lt;p&gt;Your location portion the config file should now look like. You should add
2765&lt;code&gt;auth_basic&lt;/code&gt; and &lt;code&gt;auth_basic_user_file&lt;/code&gt; lines to the file.&lt;/p&gt;
2766&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;location&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/&lt;/span&gt; {
2767&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;try_files&lt;/span&gt; $uri $uri/ =404;
2768&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;auth_basic&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Private&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;Property&amp;#34;&lt;/span&gt;;
2769&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;auth_basic_user_file&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/etc/nginx/.htpasswd&lt;/span&gt;;
2770&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
2771&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Test if config is still ok with &lt;code&gt;nginx -t&lt;/code&gt; and if it is you can restart Nginx
2772with &lt;code&gt;service nginx restart&lt;/code&gt;.&lt;/p&gt;
2773&lt;p&gt;If you now visit &lt;code&gt;https://stats.domain.com&lt;/code&gt; you should be prompted for username
2774and password. If not, try reopening your browser.&lt;/p&gt;
2775&lt;p&gt;That is all. You now have analytics for your server that gets refreshed every 10
2776minutes.&lt;/p&gt;
2777</content:encoded>
2778 </item>
2779
2780
2781
2782 <item>
2783 <title>Replacing Dropbox in favor of DigitalOcean spaces</title>
2784 <link>https://mitjafelicijan.com/replacing-dropbox-in-favor-of-digitalocean-spaces.html</link>
2785 <pubDate>Sun, 24 Jan 2021 12:00:00 &#43;0200</pubDate>
2786 <guid>https://mitjafelicijan.com/replacing-dropbox-in-favor-of-digitalocean-spaces.html</guid>
2787 <description>A few months ago I experimented with DigitalOcean spaces as my backup solutionthat could replace Dropboxeventually.</description>
2788 <content:encoded>&lt;p&gt;A few months ago I experimented with DigitalOcean spaces as my backup solution
2789that could &lt;a href=&#34;/digitalocean-spaces-to-sync-between-computers.html&#34;&gt;replace Dropbox
2790eventually&lt;/a&gt;. That solution
2791worked quite nicely, and I was amazed how smashing together a couple of existing
2792solutions would work this fine.&lt;/p&gt;
2793&lt;p&gt;I have been running that solution in the background for a couple of months now
2794and kind of forgot about it. But recent developments around deplatforming and
2795having us people hostages of technology and big companies speed up my goals to
2796become less dependent on
2797&lt;a href=&#34;https://edition.cnn.com/2020/12/17/tech/google-antitrust-lawsuit/index.html&#34;&gt;Google&lt;/a&gt;,
2798&lt;a href=&#34;https://www.pcworld.com/article/2048680/dropbox-takes-a-peek-at-files.html&#34;&gt;Dropbox&lt;/a&gt;
2799etc and take back some control.&lt;/p&gt;
2800&lt;p&gt;I am not a conspiracy theory nut, but to be honest, what these companies are
2801doing lately is out of control. It is a matter of principle at this point. I
2802have almost completely degoogled my life all the way from ditching Gmail,
2803YouTube and most of the services surrounding Google. And I must tell you, I feel
2804so good. I haven&#39;t felt this way for a long time.&lt;/p&gt;
2805&lt;p&gt;&lt;strong&gt;Anyways. Let&#39;s get to the meat of things.&lt;/strong&gt;&lt;/p&gt;
2806&lt;p&gt;Before you continue you should read my post about &lt;a href=&#34;/digitalocean-spaces-to-sync-between-computers.html&#34;&gt;syncing to
2807Dropbox&lt;/a&gt;.&lt;/p&gt;
2808&lt;blockquote&gt;
2809&lt;p&gt;Also to note, I am using Linux on my machine with Gnome desktop environment.
2810This should work on MacOS too. To use this on Windows I suggest using
2811&lt;a href=&#34;https://docs.microsoft.com/en-us/windows/wsl/install-win10&#34;&gt;Subsystem for Linux&lt;/a&gt;
2812or &lt;a href=&#34;https://www.cygwin.com/&#34;&gt;Cygwin&lt;/a&gt;.&lt;/p&gt;
2813&lt;/blockquote&gt;
2814&lt;h2 id=&#34;folder-structure&#34;&gt;Folder structure&lt;/h2&gt;
2815&lt;p&gt;I liked structure from Dropbox. One folder where everything is located and
2816synced. So, that&#39;s why adopted this also for my sync setup.&lt;/p&gt;
2817&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;~&lt;/span&gt;/Vault
2818&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;&#34;&gt;↳&lt;/span&gt; backup
2819&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;&#34;&gt;↳&lt;/span&gt; bin
2820&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;&#34;&gt;↳&lt;/span&gt; documents
2821&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;&#34;&gt;↳&lt;/span&gt; projects
2822&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All of my code is located in &lt;code&gt;~/Vault/projects&lt;/code&gt; folder. And most of the projects
2823are Git repositories. I do not use this sync method for backup per see but in
2824case I reinstall my machine I can easily recreate all the important folder
2825structure with one quick command. No external drives needed that can fail etc.&lt;/p&gt;
2826&lt;h2 id=&#34;sync-script&#34;&gt;Sync script&lt;/h2&gt;
2827&lt;p&gt;My sync script is located in &lt;code&gt;~/Vault/bin/vault-backup.sh&lt;/code&gt;&lt;/p&gt;
2828&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/bin/bash
2829&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
2830&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# dconf load /com/gexperts/Tilix/ &amp;lt; tilix.dconf&lt;/span&gt;
2831&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# 0 2 * * * sh ~/Vault/bin/vault-backup.sh&lt;/span&gt;
2832&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2833&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/Vault/backup/dotfiles
2834&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2835&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MACHINE=&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;whoami&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;@&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;hostname&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;
2836&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p $MACHINE
2837&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd $MACHINE
2838&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2839&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.config/VSCodium/User/settings.json settings.json
2840&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.s3cfg s3cfg
2841&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.bash_extended bash_extended
2842&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.ssh ssh -rf
2843&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2844&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;codium --list-extensions &amp;gt; vscode-extension.txt
2845&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dconf dump /com/gexperts/Tilix/ &amp;gt; tilix.dconf
2846&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2847&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/Vault
2848&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s3cmd sync --delete-removed --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;node_modules/*&amp;#39;&lt;/span&gt; --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;.git/*&amp;#39;&lt;/span&gt; --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;.venv/*&amp;#39;&lt;/span&gt; ./ s3://bucket-name/backup/
2849&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2850&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;date &#43;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;%D %T&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt; &amp;gt;&amp;gt; ~/.vault.log
2851&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
2852&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;notify-send &lt;span style=&#34;color:#a31515&#34;&gt;\
2853&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -u normal &lt;span style=&#34;color:#a31515&#34;&gt;\
2854&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -i /usr/share/icons/Adwaita/96x96/status/security-medium-symbolic.symbolic.png &lt;span style=&#34;color:#a31515&#34;&gt;\
2855&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Vault sync succeded at `date &#43;&amp;#34;&lt;/span&gt;%D %T&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;`&amp;#34;&lt;/span&gt;
2856&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This script also backups some of the dotfiles I use and sends notification to
2857Gnome notification center. It is a straightforward solution. Nothing special
2858going on.&lt;/p&gt;
2859&lt;blockquote&gt;
2860&lt;p&gt;One obvious benefit of this is that I can omit syncing Node&#39;s &lt;code&gt;node_modules&lt;/code&gt;
2861or Python&#39;s &lt;code&gt;.venv&lt;/code&gt; and &lt;code&gt;.git&lt;/code&gt; folders.&lt;/p&gt;
2862&lt;/blockquote&gt;
2863&lt;p&gt;You can use this script in a combination with &lt;a href=&#34;https://en.wikipedia.org/wiki/Cron&#34;&gt;Cron&lt;/a&gt;.&lt;/p&gt;
2864&lt;pre&gt;&lt;code&gt;0 2 * * * sh ~/Vault/bin/vault-backup.sh
2865&lt;/code&gt;&lt;/pre&gt;
2866&lt;p&gt;When you start syncing your local stuff with a remote server you can review your
2867items on DigitalOcean.&lt;/p&gt;
2868&lt;p&gt;&lt;img src=&#34;/assets/dropbox-sync/dropbox-spaces.png&#34; alt=&#34;Dropbox Spaces&#34; /&gt;&lt;/p&gt;
2869&lt;p&gt;I have been using this script now for quite some time, and it&#39;s working
2870flawlessly. I also uninstalled Dropbox and stopped using it completely.&lt;/p&gt;
2871&lt;p&gt;All I need to do is write a Bash script that does the reverse and downloads from
2872remote server to local folder. This could be another post.&lt;/p&gt;
2873</content:encoded>
2874 </item>
2875
2876
2877
2878 <item>
2879 <title>Using Digitalocean Spaces to sync between computers</title>
2880 <link>https://mitjafelicijan.com/digitalocean-spaces-to-sync-between-computers.html</link>
2881 <pubDate>Wed, 09 Sep 2020 12:00:00 &#43;0200</pubDate>
2882 <guid>https://mitjafelicijan.com/digitalocean-spaces-to-sync-between-computers.html</guid>
2883 <description>I&amp;#39;ve been using Dropbox for probably 10&#43; yearsnow and I-ve became so used to it that it runs in the background that I don&amp;#39;teven imagine a world without it.</description>
2884 <content:encoded>&lt;p&gt;I&#39;ve been using &lt;a href=&#34;https://www.dropbox.com/&#34;&gt;Dropbox&lt;/a&gt; for probably &lt;strong&gt;10&#43; years&lt;/strong&gt;
2885now and I-ve became so used to it that it runs in the background that I don&#39;t
2886even imagine a world without it. But it&#39;s not without problems.&lt;/p&gt;
2887&lt;p&gt;At first I had problems with &lt;code&gt;.venv&lt;/code&gt; environments for Python and the only
2888solution for excluding synchronization for this folder was to manually exclude a
2889specific folder which is not really scalable. FYI, my whole project folder is
2890synced on &lt;a href=&#34;https://www.dropbox.com/&#34;&gt;Dropbox&lt;/a&gt;. This of course introduced a lot
2891of syncing of files and folders that are not needed or even break things on
2892other machines. In the case of &lt;strong&gt;Python&lt;/strong&gt;, I couldn&#39;t use that on my second
2893machine. I needed to delete &lt;code&gt;.venv&lt;/code&gt; folder and pip it again which synced files
2894again to the main machine. This was very frustrating. &lt;strong&gt;Nodejs&lt;/strong&gt; handles this
2895much nicer and I can just run the scripts without deleting &lt;code&gt;node_modules&lt;/code&gt; again
2896and reinstalling. However, &lt;code&gt;node_modules&lt;/code&gt; is a beast of its own. It creates so
2897many files that OS has a problem counting them when you check the folder
2898contents for size.&lt;/p&gt;
2899&lt;p&gt;I wanted something similar to Dropbox. I could without the instant syncing but
2900it would need to be fast and had the option for me to exclude folders like
2901&lt;code&gt;node_modules, .venv, .git&lt;/code&gt; and folders like that.&lt;/p&gt;
2902&lt;p&gt;I went on a hunt for an alternative to &lt;a href=&#34;https://www.dropbox.com/&#34;&gt;Dropbox&lt;/a&gt;
2903and found:&lt;/p&gt;
2904&lt;ul&gt;
2905&lt;li&gt;&lt;a href=&#34;https://tresorit.com/&#34;&gt;Tresorit&lt;/a&gt;&lt;/li&gt;
2906&lt;li&gt;&lt;a href=&#34;https://sync.com&#34;&gt;Sync.com&lt;/a&gt;&lt;/li&gt;
2907&lt;li&gt;&lt;a href=&#34;https://www.box.com/&#34;&gt;Box&lt;/a&gt;&lt;/li&gt;
2908&lt;/ul&gt;
2909&lt;p&gt;You know, the usual list of suspects. I didn&#39;t include &lt;a href=&#34;https://drive.google.com&#34;&gt;Google
2910drive&lt;/a&gt; or &lt;a href=&#34;https://onedrive.live.com/&#34;&gt;One drive&lt;/a&gt;
2911since they are even more draconian than Dropbox.&lt;/p&gt;
2912&lt;blockquote&gt;
2913&lt;p&gt;All this does not stem from me being paranoid but recently these companies
2914have became more and more aggressive and they keep violating our privacy when
2915they share our data with 3rd party services. It is getting out of control.&lt;/p&gt;
2916&lt;/blockquote&gt;
2917&lt;p&gt;So, my main problem was still there. No way of excluding a specific folder from
2918syncing. And before we go into &amp;quot;&lt;em&gt;But you have git, isn&#39;t that enough?&lt;/em&gt;&amp;quot;, I must
2919say, that many of the files (PDFs, spreadsheets, etc) I have in a &lt;code&gt;git&lt;/code&gt; repo
2920don&#39;t get pushed upstream to Git and I still want to have them synced across my
2921computers.&lt;/p&gt;
2922&lt;p&gt;I initially wanted to use &lt;a href=&#34;https://linux.die.net/man/1/rsync&#34;&gt;rsync&lt;/a&gt; but I would
2923need to then have a remote VPS or transfer between my computers directly. I
2924wanted a solution where all my files could be accessible to me without my
2925machine.&lt;/p&gt;
2926&lt;blockquote&gt;
2927&lt;p&gt;&lt;strong&gt;WARNING: This solution will cost you money!&lt;/strong&gt; DigitalOcean Spaces are $5 per
2928month and there are some bandwidth limitations and if you go beyond that you get
2929billed additionally.&lt;/p&gt;
2930&lt;/blockquote&gt;
2931&lt;p&gt;Then I remembered that I could use something like
2932&lt;a href=&#34;https://en.wikipedia.org/wiki/Amazon_S3&#34;&gt;S3&lt;/a&gt; since it has versioning and is
2933fully managed. I didn&#39;t want to go down the AWS rabbit hole with this so I
2934choose &lt;a href=&#34;https://www.digitalocean.com/products/spaces/&#34;&gt;DigitalOcean Spaces&lt;/a&gt;.&lt;/p&gt;
2935&lt;p&gt;Then I needed a command-line tool to sync between source and target. I found
2936this nice tool &lt;a href=&#34;https://s3tools.org/s3cmd&#34;&gt;s3cmd&lt;/a&gt; and it is in the Ubuntu
2937repositories.&lt;/p&gt;
2938&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install s3cmd
2939&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After installation will I create a new Space bucket on DigitalOcean. Remember
2940the zone you will choose because you will need it when you will configure
2941&lt;code&gt;s3cmd&lt;/code&gt;.&lt;/p&gt;
2942&lt;p&gt;Then I visited &lt;a href=&#34;https://cloud.digitalocean.com/account/api/tokens&#34;&gt;Digitalocean Applications &amp;amp;
2943API&lt;/a&gt; and generated &lt;strong&gt;Spaces
2944access keys&lt;/strong&gt;. Save both key and secret somewhere safe because when you will
2945leave the page secret will not be available anymore to you and you will need to
2946re-generate it.&lt;/p&gt;
2947&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# enter your key and secret and correct endpoint&lt;/span&gt;
2948&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# my endpoint is ams3.digitaloceanspaces.com because&lt;/span&gt;
2949&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# I created my bucket in Amsterdam regiin&lt;/span&gt;
2950&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s3cmd --configure
2951&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After that I played around with options for &lt;code&gt;s3cmd&lt;/code&gt; and got to the following
2952command.&lt;/p&gt;
2953&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# I executed this command from my projects folder&lt;/span&gt;
2954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd projects
2955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s3cmd sync --delete-removed --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;node_modules/*&amp;#39;&lt;/span&gt; --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;.git/*&amp;#39;&lt;/span&gt; --exclude &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;.venv/*&amp;#39;&lt;/span&gt; ./ s3://my-bucket-name/projects/
2956&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When syncing int he other direction you will need to change the order of the
2957&lt;code&gt;SOURCE&lt;/code&gt; and &lt;code&gt;TARGET&lt;/code&gt; to &lt;code&gt;s3://my-bucket-name/projects/&lt;/code&gt; and &lt;code&gt;./&lt;/code&gt;.&lt;/p&gt;
2958&lt;blockquote&gt;
2959&lt;p&gt;Be sure that all the paths have trailing slash so that sync knows that this
2960are directories.&lt;/p&gt;
2961&lt;/blockquote&gt;
2962&lt;p&gt;I am planning to implement some sort of a &lt;code&gt;.ignore&lt;/code&gt; file that will enable me to
2963have a project-specific exclude options.&lt;/p&gt;
2964&lt;p&gt;I am currently running this every hour as a cronjob which is perfectly fine for
2965now when I am testing how this whole thing works and how it all will turn out.&lt;/p&gt;
2966&lt;p&gt;I have also created a small Gnome extension which is still very unstable, but
2967when/if this whole experiment pays of I will share on Github.&lt;/p&gt;
2968</content:encoded>
2969 </item>
2970
2971
2972
2973 <item>
2974 <title>Fix bind warning in .profile on login in Ubuntu</title>
2975 <link>https://mitjafelicijan.com/bind-warning-on-login-in-ubuntu.html</link>
2976 <pubDate>Tue, 08 Sep 2020 12:00:00 &#43;0200</pubDate>
2977 <guid>https://mitjafelicijan.com/bind-warning-on-login-in-ubuntu.html</guid>
2978 <description>Recently I moved back to bash as mydefault shell.</description>
2979 <content:encoded>&lt;p&gt;Recently I moved back to &lt;a href=&#34;https://www.gnu.org/software/bash/&#34;&gt;bash&lt;/a&gt; as my
2980default shell. I was previously using &lt;a href=&#34;https://fishshell.com/&#34;&gt;fish&lt;/a&gt; and got
2981used to the cool features it has. But, regardless of that, I wanted to move to a
2982more standard shell because I was hopping back and forth with exporting
2983variables and stuff like that which got pretty annoying.&lt;/p&gt;
2984&lt;p&gt;So I embarked on a mission to make &lt;a href=&#34;https://www.gnu.org/software/bash/&#34;&gt;bash&lt;/a&gt;
2985more like &lt;a href=&#34;https://fishshell.com/&#34;&gt;fish&lt;/a&gt; and in the process found that I really
2986missed autosuggest with TAB on changing directories.&lt;/p&gt;
2987&lt;p&gt;I found a nice alternative that emulates &lt;a href=&#34;http://zsh.sourceforge.net/&#34;&gt;zsh&lt;/a&gt; like
2988autosuggestion and autocomplete so I added the following to my &lt;code&gt;.bashrc&lt;/code&gt; file.&lt;/p&gt;
2989&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;TAB:menu-complete&amp;#34;&lt;/span&gt;
2990&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set show-all-if-ambiguous on&amp;#34;&lt;/span&gt;
2991&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set completion-ignore-case on&amp;#34;&lt;/span&gt;
2992&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set menu-complete-display-prefix on&amp;#34;&lt;/span&gt;
2993&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&amp;#34;\e[Z&amp;#34;:menu-complete-backward&amp;#39;&lt;/span&gt;
2994&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I haven&#39;t noticed anything wrong with this and all was working fine until I
2995restarted my machine and then I got this error.&lt;/p&gt;
2996&lt;p&gt;&lt;img src=&#34;/assets/profile-bind-error/error.jpg&#34; alt=&#34;Profile bind error&#34; /&gt;&lt;/p&gt;
2997&lt;p&gt;When I pressed OK, I got into the &lt;a href=&#34;https://wiki.gnome.org/Projects/GnomeShell&#34;&gt;Gnome
2998shell&lt;/a&gt; and all was working fine, but
2999the error was still bugging me. I started looking for the reason why this is
3000happening and found a solution to this error on &lt;a href=&#34;https://superuser.com/a/892682&#34;&gt;Remote SSH Commands - bash bind
3001warning: line editing not enabled&lt;/a&gt;.&lt;/p&gt;
3002&lt;p&gt;So I added a simple &lt;code&gt;if [ -t 1 ]&lt;/code&gt; around &lt;code&gt;bind&lt;/code&gt; statements to avoid running
3003commands that presume the session is interactive when it isn&#39;t.&lt;/p&gt;
3004&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; [ -t 1 ]; &lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
3005&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;TAB:menu-complete&amp;#34;&lt;/span&gt;
3006&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set show-all-if-ambiguous on&amp;#34;&lt;/span&gt;
3007&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set completion-ignore-case on&amp;#34;&lt;/span&gt;
3008&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;set menu-complete-display-prefix on&amp;#34;&lt;/span&gt;
3009&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bind &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&amp;#34;\e[Z&amp;#34;:menu-complete-backward&amp;#39;&lt;/span&gt;
3010&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;fi&lt;/span&gt;
3011&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After logging out and back in the problem was gone.&lt;/p&gt;
3012</content:encoded>
3013 </item>
3014
3015
3016
3017 <item>
3018 <title>Getting started with MicroPython and ESP8266</title>
3019 <link>https://mitjafelicijan.com/esp8266-and-micropython-guide.html</link>
3020 <pubDate>Sun, 06 Sep 2020 12:00:00 &#43;0200</pubDate>
3021 <guid>https://mitjafelicijan.com/esp8266-and-micropython-guide.html</guid>
3022 <description>IntroductionA while ago I bought someESP8266 andESP32 dev boards to playaround with and I finally found a project to try it out.</description>
3023 <content:encoded>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
3024&lt;p&gt;A while ago I bought some
3025&lt;a href=&#34;https://www.espressif.com/en/products/socs/esp8266&#34;&gt;ESP8266&lt;/a&gt; and
3026&lt;a href=&#34;https://www.espressif.com/en/products/socs/esp32&#34;&gt;ESP32&lt;/a&gt; dev boards to play
3027around with and I finally found a project to try it out.&lt;/p&gt;
3028&lt;p&gt;For my project, I used &lt;a href=&#34;https://www.espressif.com/en/products/socs/esp32&#34;&gt;ESP32&lt;/a&gt;
3029but I could easily choose
3030&lt;a href=&#34;https://www.espressif.com/en/products/socs/esp8266&#34;&gt;ESP8266&lt;/a&gt;. This guide
3031contains which tools I use and how I prepared my workspace to code for
3032&lt;a href=&#34;https://www.espressif.com/en/products/socs/esp8266&#34;&gt;ESP8266&lt;/a&gt;.&lt;/p&gt;
3033&lt;p&gt;&lt;img src=&#34;/assets/esp8366-micropython/boards.jpg&#34; alt=&#34;ESP8266 and ESP32 boards&#34; /&gt;&lt;/p&gt;
3034&lt;p&gt;This guide covers:&lt;/p&gt;
3035&lt;ul&gt;
3036&lt;li&gt;flashing SOC&lt;/li&gt;
3037&lt;li&gt;install proper tooling&lt;/li&gt;
3038&lt;li&gt;deploying a simple script&lt;/li&gt;
3039&lt;/ul&gt;
3040&lt;blockquote&gt;
3041&lt;p&gt;Make sure that you are using &lt;strong&gt;a good USB cable&lt;/strong&gt;. I had some problems with
3042mine and once I replaced it everything started to work.&lt;/p&gt;
3043&lt;/blockquote&gt;
3044&lt;h2 id=&#34;flashing-the-soc&#34;&gt;Flashing the SOC&lt;/h2&gt;
3045&lt;p&gt;Plug your ESP8266 to USB port and check if the device was recognized with
3046executing &lt;code&gt;dmesg | grep ch341-uart&lt;/code&gt;.&lt;/p&gt;
3047&lt;p&gt;Then check if the device is available under &lt;code&gt;/dev/&lt;/code&gt; by running &lt;code&gt;ls /dev/ttyUSB*&lt;/code&gt;.&lt;/p&gt;
3048&lt;blockquote&gt;
3049&lt;p&gt;&lt;strong&gt;Linux users&lt;/strong&gt;: if a device is not available be sure you are in &lt;code&gt;dialout&lt;/code&gt;
3050group. You can check this by executing &lt;code&gt;groups $USER&lt;/code&gt;. You can add a user to
3051&lt;code&gt;dialout&lt;/code&gt; group with &lt;code&gt;sudo adduser $USER dialout&lt;/code&gt;.&lt;/p&gt;
3052&lt;/blockquote&gt;
3053&lt;p&gt;After these conditions are meet go to the navigate to
3054&lt;a href=&#34;https://micropython.org/download/esp8266/&#34;&gt;https://micropython.org/download/esp8266/&lt;/a&gt;
3055and download &lt;code&gt;esp8266-20200902-v1.13.bin&lt;/code&gt;.&lt;/p&gt;
3056&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir esp8266-test
3057&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd esp8266-test
3058&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3059&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://micropython.org/resources/firmware/esp8266-20200902-v1.13.bin
3060&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After obtaining firmware we will need some tooling to flash the firmware to the
3061board.&lt;/p&gt;
3062&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pip3 install esptool
3063&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can read more about &lt;code&gt;esptool&lt;/code&gt; at
3064&lt;a href=&#34;https://github.com/espressif/esptool/&#34;&gt;https://github.com/espressif/esptool/&lt;/a&gt;.&lt;/p&gt;
3065&lt;p&gt;Before flashing the firmware we need to erase the flash on device. Substitute
3066&lt;code&gt;USB0&lt;/code&gt; with the device listed in output of &lt;code&gt;ls /dev/ttyUSB*&lt;/code&gt;.&lt;/p&gt;
3067&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;esptool.py --port /dev/ttyUSB0 erase_flash
3068&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If flash was successfully erased it is now time to flash the new firmware to it.&lt;/p&gt;
3069&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20200902-v1.13.bin
3070&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If everything went ok you can try accessing MicroPython REPL with &lt;code&gt; screen /dev/ttyUSB0 115200&lt;/code&gt; or &lt;code&gt;picocom /dev/ttyUSB0 -b115200&lt;/code&gt;.&lt;/p&gt;
3071&lt;blockquote&gt;
3072&lt;p&gt;Sometimes you will need to press &lt;code&gt;ENTER&lt;/code&gt; in &lt;code&gt;screen&lt;/code&gt; or &lt;code&gt;picocom&lt;/code&gt; to access
3073REPL.&lt;/p&gt;
3074&lt;/blockquote&gt;
3075&lt;p&gt;When you are in REPL you can test if all is working properly following steps.&lt;/p&gt;
3076&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; machine
3077&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; machine.freq()
3078&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This should output a number representing a frequency of the CPU (mine was
3079&lt;code&gt;80000000&lt;/code&gt;).&lt;/p&gt;
3080&lt;p&gt;When you are in &lt;code&gt;screen&lt;/code&gt; or &lt;code&gt;picocom&lt;/code&gt; these can help you a bit.&lt;/p&gt;
3081&lt;table&gt;
3082&lt;thead&gt;
3083&lt;tr&gt;
3084&lt;th&gt;Key&lt;/th&gt;
3085&lt;th&gt;Command&lt;/th&gt;
3086&lt;/tr&gt;
3087&lt;/thead&gt;
3088&lt;tbody&gt;
3089&lt;tr&gt;
3090&lt;td&gt;CTRL&#43;d&lt;/td&gt;
3091&lt;td&gt;preforms soft reboot&lt;/td&gt;
3092&lt;/tr&gt;
3093&lt;tr&gt;
3094&lt;td&gt;CTRL&#43;a x&lt;/td&gt;
3095&lt;td&gt;exits picocom&lt;/td&gt;
3096&lt;/tr&gt;
3097&lt;tr&gt;
3098&lt;td&gt;CTRL&#43;a \&lt;/td&gt;
3099&lt;td&gt;exits screen&lt;/td&gt;
3100&lt;/tr&gt;
3101&lt;/tbody&gt;
3102&lt;/table&gt;
3103&lt;h2 id=&#34;install-better-tooling&#34;&gt;Install better tooling&lt;/h2&gt;
3104&lt;p&gt;Now, to make our lives a little bit easier there are couple of additional tools
3105that will make this whole experience a little more bearable.&lt;/p&gt;
3106&lt;p&gt;There are twq cool ways of uploading local files to SOC flash.&lt;/p&gt;
3107&lt;ul&gt;
3108&lt;li&gt;ampy → &lt;a href=&#34;https://github.com/scientifichackers/ampy&#34;&gt;https://github.com/scientifichackers/ampy&lt;/a&gt;&lt;/li&gt;
3109&lt;li&gt;rshell → &lt;a href=&#34;https://github.com/dhylands/rshell&#34;&gt;https://github.com/dhylands/rshell&lt;/a&gt;&lt;/li&gt;
3110&lt;/ul&gt;
3111&lt;h3 id=&#34;ampy&#34;&gt;ampy&lt;/h3&gt;
3112&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# installing ampy&lt;/span&gt;
3113&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pip3 install adafruit-ampy
3114&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Listed below are some common commands I used.&lt;/p&gt;
3115&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3116&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# uploads file to flash&lt;/span&gt;
3117&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ampy --delay 2 --port /dev/ttyUSB0 put boot.py
3118&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3119&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# lists file on flash&lt;/span&gt;
3120&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ampy --delay 2 --port /dev/ttyUSB0 ls
3121&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3122&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# outputs contents of file on flash&lt;/span&gt;
3123&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ampy --delay 2 --port /dev/ttyUSB0 cat boot.py
3124&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
3125&lt;p&gt;I added &lt;code&gt;delay&lt;/code&gt; of 2 seconds because I had problems with executing commands.&lt;/p&gt;
3126&lt;/blockquote&gt;
3127&lt;h3 id=&#34;rshell&#34;&gt;rshell&lt;/h3&gt;
3128&lt;p&gt;Even though &lt;code&gt;ampy&lt;/code&gt; is a cool tool I opted with &lt;code&gt;rshell&lt;/code&gt; in the end since it&#39;s
3129much more polished and feature rich.&lt;/p&gt;
3130&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# installing ampy&lt;/span&gt;
3131&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pip3 install rshell
3132&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now that &lt;code&gt;rshell&lt;/code&gt; is installed we can connect to the board.&lt;/p&gt;
3133&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rshell --buffer-size=30 -p /dev/ttyUSB0 -a
3134&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will open a shell inside bash and from here you can execute multiple
3135commands. You can check what is supported with &lt;code&gt;help&lt;/code&gt; once you are inside of a
3136shell.&lt;/p&gt;
3137&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;m@turing ~/Junk/esp8266-test
3138&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rshell --buffer-size=30 -p /dev/ttyUSB0 -a
3139&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3140&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Using buffer-size of 30
3141&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Connecting to /dev/ttyUSB0 (buffer-size 30)...
3142&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Trying to connect to REPL connected
3143&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Testing &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; ubinascii.unhexlify exists ... Y
3144&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Retrieving root directories ... /boot.py/
3145&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Setting time ... Sep 06, 2020 23:54:28
3146&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Evaluating board_name ... pyboard
3147&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Retrieving time epoch ... Jan 01, 2000
3148&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Welcome to rshell. Use Control-D (or the exit command) to exit rshell.
3149&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/home/m/Junk/esp8266-test&amp;gt; help
3150&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3151&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Documented commands (type help &amp;lt;topic&amp;gt;):
3152&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;========================================
3153&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;args cat connect date edit filesize help mkdir rm shell
3154&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;boards cd cp echo exit filetype ls repl rsync
3155&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3156&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use Control-D (or the exit command) to exit rshell.
3157&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
3158&lt;p&gt;Inside a shell &lt;code&gt;ls&lt;/code&gt; will display list of files on your machine. To get list
3159of files on flash folder &lt;code&gt;/pyboard&lt;/code&gt; is remapped inside the shell. To list files
3160on flash you must perform &lt;code&gt;ls /pyboard&lt;/code&gt;.&lt;/p&gt;
3161&lt;/blockquote&gt;
3162&lt;h4 id=&#34;moving-files-to-flash&#34;&gt;Moving files to flash&lt;/h4&gt;
3163&lt;p&gt;To avoid copying files all the time I used &lt;code&gt;rsync&lt;/code&gt; function from the inside of
3164&lt;code&gt;rshell&lt;/code&gt;.&lt;/p&gt;
3165&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rsync . /pyboard
3166&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;executing-scripts&#34;&gt;Executing scripts&lt;/h4&gt;
3167&lt;p&gt;It is a pain to continuously reboot the device to trigger &lt;code&gt;/pyboard/boot.py&lt;/code&gt; and
3168there is a better way of testing local scripts on remote device.&lt;/p&gt;
3169&lt;p&gt;Lets assume we have &lt;code&gt;src/freq.py&lt;/code&gt; file that displays CPU frequency of a remote
3170device.&lt;/p&gt;
3171&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# src/freq.py&lt;/span&gt;
3172&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3173&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; machine
3174&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(machine.freq())
3175&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now lets upload this and execute it.&lt;/p&gt;
3176&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# syncs files to remove device&lt;/span&gt;
3177&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rsync ./src /pyboard
3178&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3179&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# goes into REPL&lt;/span&gt;
3180&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repl
3181&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3182&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we import file by importing it without .py extension and this will run the script&lt;/span&gt;
3183&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; import freq
3184&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3185&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# CTRL&#43;x will exit REPL&lt;/span&gt;
3186&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;additional-resources&#34;&gt;Additional resources&lt;/h2&gt;
3187&lt;ul&gt;
3188&lt;li&gt;&lt;a href=&#34;https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/&#34;&gt;https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/&lt;/a&gt;&lt;/li&gt;
3189&lt;li&gt;&lt;a href=&#34;http://docs.micropython.org/en/latest/esp8266/quickref.html&#34;&gt;http://docs.micropython.org/en/latest/esp8266/quickref.html&lt;/a&gt;&lt;/li&gt;
3190&lt;/ul&gt;
3191</content:encoded>
3192 </item>
3193
3194
3195
3196 <item>
3197 <title>Disable mouse wake from suspend with systemd service</title>
3198 <link>https://mitjafelicijan.com/disable-mouse-wake-from-suspend-with-systemd-service.html</link>
3199 <pubDate>Sat, 15 Aug 2020 12:00:00 &#43;0200</pubDate>
3200 <guid>https://mitjafelicijan.com/disable-mouse-wake-from-suspend-with-systemd-service.html</guid>
3201 <description>I recently bought ThinkPadX220 just as ajoke on eBay to test Linux distributions and play around with things and notdestroy my main machine.</description>
3202 <content:encoded>&lt;p&gt;I recently bought &lt;a href=&#34;https://www.laptopmag.com/reviews/laptops/lenovo-thinkpad-x220&#34;&gt;ThinkPad
3203X220&lt;/a&gt; just as a
3204joke on eBay to test Linux distributions and play around with things and not
3205destroy my main machine. Little to my knowledge I felt in love with it. Man,
3206they really made awesome machines back then.&lt;/p&gt;
3207&lt;p&gt;After changing disk that came with it to SSD and installing Ubuntu to test if 
3208everything works I noticed that even after a single touch of my external mouse
3209the system would wake up from sleep even though the lid was shut down.&lt;/p&gt;
3210&lt;p&gt;I wouldn&#39;t even noticed it if laptop didn&#39;t have &lt;a href=&#34;https://support.lenovo.com/lk/en/solutions/~/media/Images/ContentImages/p/pd025386_x1_status_03.ashx?w=426&amp;amp;h=262&#34;&gt;LED
3211sleep indicator&lt;/a&gt;.
3212I already had a bad experience with Linux and it&#39;s power management. I had a
3213&lt;a href=&#34;https://www.pcmag.com/reviews/dell-inspiron-15-7537&#34;&gt;Dell Inspiron 7537&lt;/a&gt; laptop
3214with a touchscreen and while traveling it decided to wake up and started cooking
3215in my backpack to the point that the digitizer responsible for touch actually
3216glue off and the whole screen got wrecked. So, I am a bit touchy about this.&lt;/p&gt;
3217&lt;p&gt;I went on solution hunting and to my surprise there is no easy way to disable
3218specific devices to perform wake up. Why is this not under the power management 
3219tab in setting is really strange.&lt;/p&gt;
3220&lt;p&gt;After googling for a solution I found &lt;a href=&#34;https://codetrips.com/2020/03/18/ubuntu-disable-mouse-wake-from-suspend/&#34;&gt;this nice article describing the
3221solution&lt;/a&gt;
3222that worked for me. The only problem with this solution was that he added his
3223solution to &lt;code&gt;.bashrc&lt;/code&gt; and this triggers &lt;code&gt;sudo&lt;/code&gt; that asks for a password each
3224time new terminal is opened, which get annoying quickly since I open a lot of
3225terminals all the time.&lt;/p&gt;
3226&lt;p&gt;I followed his instructions and got to solution &lt;code&gt;sudo sh -c &amp;quot;echo &#39;disabled&#39; &amp;gt; /sys/bus/usb/devices/2-1.1/power/wakeup&amp;quot;&lt;/code&gt;.&lt;/p&gt;
3227&lt;p&gt;I created a system service file &lt;code&gt;sudo nano /etc/systemd/system/disable-mouse-wakeup.service&lt;/code&gt; and removed &lt;code&gt;sudo&lt;/code&gt; and
3228replaced &lt;code&gt;sh&lt;/code&gt; with &lt;code&gt;/usr/bin/sh&lt;/code&gt; and pasted all that in &lt;code&gt;ExecStart&lt;/code&gt;.&lt;/p&gt;
3229&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Unit]&lt;/span&gt;
3230&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Description=&lt;span style=&#34;color:#a31515&#34;&gt;Disables wakeup on mouse event&lt;/span&gt;
3231&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;After=&lt;span style=&#34;color:#a31515&#34;&gt;network.target&lt;/span&gt;
3232&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;StartLimitIntervalSec=&lt;span style=&#34;color:#a31515&#34;&gt;0&lt;/span&gt;
3233&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3234&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Service]&lt;/span&gt;
3235&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Type=&lt;span style=&#34;color:#a31515&#34;&gt;simple&lt;/span&gt;
3236&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Restart=&lt;span style=&#34;color:#a31515&#34;&gt;always&lt;/span&gt;
3237&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RestartSec=&lt;span style=&#34;color:#a31515&#34;&gt;1&lt;/span&gt;
3238&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;User=&lt;span style=&#34;color:#a31515&#34;&gt;root&lt;/span&gt;
3239&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ExecStart=&lt;span style=&#34;color:#a31515&#34;&gt;/usr/bin/sh -c &amp;#34;echo &amp;#39;disabled&amp;#39; &amp;gt; /sys/bus/usb/devices/2-1.1/power/wakeup&amp;#34;&lt;/span&gt;
3240&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3241&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;[Install]&lt;/span&gt;
3242&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WantedBy=&lt;span style=&#34;color:#a31515&#34;&gt;multi-user.target&lt;/span&gt;
3243&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After that I enabled, started and checked status of service.&lt;/p&gt;
3244&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl enable disable-mouse-wakeup.service
3245&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl start disable-mouse-wakeup.service
3246&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl status disable-mouse-wakeup.service
3247&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will permanently disable that device from wakeing up you computer on boot.
3248If you have many devices you would like to surpress from waking up your machine
3249I would create a shell script and call that instead of direclty doing it in
3250service file.&lt;/p&gt;
3251</content:encoded>
3252 </item>
3253
3254
3255
3256 <item>
3257 <title>Remote work and how it affects the daily lives of people</title>
3258 <link>https://mitjafelicijan.com/remote-work.html</link>
3259 <pubDate>Tue, 05 May 2020 12:00:00 &#43;0200</pubDate>
3260 <guid>https://mitjafelicijan.com/remote-work.html</guid>
3261 <description>I have been working remotely for the past 5 years.</description>
3262 <content:encoded>&lt;p&gt;I have been working remotely for the past 5 years. I love it. Love the freedom
3263and make your schedule thingy.&lt;/p&gt;
3264&lt;h2 id=&#34;you-work-more-not-less&#34;&gt;You work more not less&lt;/h2&gt;
3265&lt;p&gt;I&#39;ve heard from people things like: &amp;quot;Oh, you are so lucky, working from home,
3266having all the free time you want&amp;quot;. It was obvious they had no clue what means
3267working remotely. They had this romantic idea of remote work. You can watch TV
3268whenever you like, you can go outside for a picnic if you want and stuff like
3269that.&lt;/p&gt;
3270&lt;p&gt;This may be true if you work a day or two in a week from home. But if you go
3271completely remote all these changes completely. I take some time to acclimate
3272but then you start feeling the consequences of going fully remote. And it&#39;s not
3273all rainbows and unicorns. Rather the opposite.&lt;/p&gt;
3274&lt;h2 id=&#34;feeling-lost&#34;&gt;Feeling lost&lt;/h2&gt;
3275&lt;p&gt;At first, I remembered I felt lost. I was not used to this kind of environment.
3276It felt disoriented and a part of you that is used to procrastinate turns on.
3277You start thinking of a workday as a whole day. And soon this idea of &amp;quot;I can do
3278this later&amp;quot; starts creeping in. Well, I have the whole day ahead of me. I can do
3279this a bit later.&lt;/p&gt;
3280&lt;h2 id=&#34;hyper-performance&#34;&gt;Hyper-performance&lt;/h2&gt;
3281&lt;p&gt;As a direct result, you become more focused on your work since you don&#39;t have
3282all the interruptions common in the workplace. And you can quickly get used to
3283this hyper-performance. But this mode requires also a lot of peace and quiet.&lt;/p&gt;
3284&lt;p&gt;And here we come to the ugly parts of all this. &lt;strong&gt;People rarely have the
3285self-control&lt;/strong&gt; to not waste other people&#39;s time. It is paralyzing when people
3286start calling you, sending you chat messages, etc. The thing is, that when I
3287achieve this hyper-performance mode I am completely embroiled in the problem I
3288am solving and this kind of interruptions mess with your head. I need an hour at
3289least to get back in the zone. Sometimes not achieving the same focus the whole
3290day.&lt;/p&gt;
3291&lt;p&gt;I know that life is not how you want it to be and takes its route but from what
3292I&#39;ve learned this kind of interruptions can be avoided in 90% of the case easily
3293just by closing any chat programs and putting your phone in a drawer.&lt;/p&gt;
3294&lt;h2 id=&#34;suggestion-to-all-the-new-remote-workers&#34;&gt;Suggestion to all the new remote workers&lt;/h2&gt;
3295&lt;ul&gt;
3296&lt;li&gt;Stop wasting other people&#39;s time. You don&#39;t bother people at their desks in
3297the office either.&lt;/li&gt;
3298&lt;li&gt;Do not replace daily chats in the hallways with instant messaging software.
3299It will only interrupt people. Nothing good will come of it.&lt;/li&gt;
3300&lt;li&gt;Set your working hours and try to not allow it to bleed outside these
3301boundaries and maintain your routine.&lt;/li&gt;
3302&lt;li&gt;Be prepared that hours will be longer regardless of your good intentions and
3303your well thought of routine.&lt;/li&gt;
3304&lt;li&gt;Try to be hyper-focused and do only one thing at the time. Multitasking is the
3305enemy of progress.&lt;/li&gt;
3306&lt;li&gt;Avoid long meetings and if possible eliminate them. Rather take time to write
3307them out and allow others to respond in their own time. Meetings are usually a
3308large waste of time and most of the people attending them are there just
3309because the manager said so.&lt;/li&gt;
3310&lt;li&gt;The software will not solve your problems. And throwing money at problems
3311neither.&lt;/li&gt;
3312&lt;li&gt;If you are in a managerial position don&#39;t supervise any single minute of
3313workers. They are probably giving you more hours anyways. Track progress
3314weekly not daily. You hired them and give them the benefit of the doubt that
3315they will deliver what you agreed upon.&lt;/li&gt;
3316&lt;/ul&gt;
3317</content:encoded>
3318 </item>
3319
3320
3321
3322 <item>
3323 <title>My love and hate relationship with Node.js</title>
3324 <link>https://mitjafelicijan.com/my-love-and-hate-relationship-with-nodejs.html</link>
3325 <pubDate>Mon, 30 Mar 2020 12:00:00 &#43;0200</pubDate>
3326 <guid>https://mitjafelicijan.com/my-love-and-hate-relationship-with-nodejs.html</guid>
3327 <description>Previous project I was working on was being coded inGolang.</description>
3328 <content:encoded>&lt;p&gt;Previous project I was working on was being coded in
3329&lt;a href=&#34;https://golang.org/&#34;&gt;Golang&lt;/a&gt;. Also was my first project using it. And damn,
3330that was an awesome experience. The whole thing is just superb. From how errors
3331are handled. The C-like way you handle compiling. The way the language is
3332structured making it incredibly versatile and easy to learn.&lt;/p&gt;
3333&lt;p&gt;It may cause some pain for somebody that is not used of using interfaces to map
3334JSON and doing the recompilation all the time. But we have tools like
3335&lt;a href=&#34;http://eradman.com/entrproject/&#34;&gt;entr&lt;/a&gt; and
3336&lt;a href=&#34;https://www.gnu.org/software/make/&#34;&gt;make&lt;/a&gt; to fix that.&lt;/p&gt;
3337&lt;p&gt;But we are not here to talk about my undying love for &lt;strong&gt;Golang&lt;/strong&gt;. Only in some
3338way we probably should. It is an excellent example of how modern language should
3339be designed. And because I have used it extensively in the last couple of years
3340this probably taints my views of other languages. And is doing me a great
3341disservice. Nevertheless, here we are.&lt;/p&gt;
3342&lt;p&gt;About two years ago I started flirting with &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;Node.js&lt;/a&gt;
3343for a project I started working on. What I wanted was to have things written in
3344a language that is widely used, and we could get additional developers for. As
3345much as &lt;strong&gt;Golang&lt;/strong&gt; is amazing it&#39;s really hard to get developers for it. Even
3346now. And after playing around with it for a week I felt in love with the speed
3347of iteration and massive package ecosystem. Do you want SSO? You got it! Do you
3348want some esoteric library for something? There is a strong chance somebody
3349wrote it. It is so extensive that you find yourself evaluating packages based on
3350&lt;strong&gt;GitHub stars&lt;/strong&gt; and number of contributors. You get swallowed by the vanity
3351metrics and that potentially will become the downfall of Node.js.&lt;/p&gt;
3352&lt;p&gt;Because of the sheer amount of choice I often got anxiety when choosing
3353libraries. Will I choose the correct one? Is this library something that will be
3354supported for a foreseeable future or not? I am used of using libraries that are
3355being in development for 10 years plus (Python, C) and that gave me some sort of
3356comfort. And it is probably unfair to Node.js and community to expect same
3357dedication.&lt;/p&gt;
3358&lt;p&gt;Moving forward ... Work started and things were great. &lt;strong&gt;Speed of iteration was
3359insane&lt;/strong&gt;. For some feature that I would need a day in Golang only took me hour
3360or two. I became lazy! Using packages all over the place. Falling into the same
3361trap as others. Packages on top of packages. And &lt;a href=&#34;https://www.npmjs.com/&#34;&gt;npm&lt;/a&gt;
3362didn&#39;t help at all. The way that the package manager works is just
3363horrendous. And not allowing to have node_modules outside the project is also
3364the stupidest idea ever.&lt;/p&gt;
3365&lt;p&gt;So at that point I started feeling the technical debt that comes with Node.js
3366and the whole ecosystem. What nobody tells you is that &lt;strong&gt;structuring large
3367Node.js apps&lt;/strong&gt; is more problematic than one would think. And going microservice
3368for every single thing is also a bad idea. The amount of networking you
3369introduce with that approach always ends up being a pain in the ass. And I don&#39;t
3370even want to go into system administration here. The overhead is
3371insane. Package-lock.json made many days feel like living hell for me. And I
3372would eat the cost of all this if it meant for better development
3373experience. Well, it didn&#39;t.&lt;/p&gt;
3374&lt;p&gt;The &lt;strong&gt;lack of Typescript&lt;/strong&gt; support in the interpreter is still mind boggling to
3375me. Why haven&#39;t they added native support yet for this is beyond me?! That would
3376have solved so many problems. Lack of type safety became a problem somewhere in
3377the middle of the project where the codebase was sufficiently large enough to
3378present problems. We started adding arguments to functions and there was &lt;strong&gt;no
3379way to implicitly define argument types&lt;/strong&gt;. And because at that point there were
3380a lot of functions, it became impossible to know what each one accepts,
3381development became more and more trial and error based.&lt;/p&gt;
3382&lt;p&gt;I tried &lt;strong&gt;implementing Typescript&lt;/strong&gt;, but that would present a large refactor
3383that we were not willing to do at that point. The benefits were not enough. I
3384also tried &lt;a href=&#34;https://flow.org/&#34;&gt;Flow - static type checker&lt;/a&gt; but implementation
3385was also horrible. What Typescript and Flow forces you is to have src folder and
3386then &lt;strong&gt;transpile&lt;/strong&gt; your code into dist folder and run it with node. WTH is that
3387all about. Why can&#39;t this be done in memory or some virtual file system? Why? I
3388see no reason why this couldn&#39;t be done like this. But it is what it is. I
3389abandoned all hope for static type checking.&lt;/p&gt;
3390&lt;p&gt;One of the problems that resulted from not having interfaces or types was
3391inability to model out our data from &lt;strong&gt;Elasticsearch&lt;/strong&gt;. I could have done a
3392&lt;strong&gt;pedestrian implementation&lt;/strong&gt; of it, but there must be a better way of doing
3393this without resorting to some hack basically. Or maybe I haven&#39;t found a
3394solution, which is also a possibility. I have looked, though. No juice!&lt;/p&gt;
3395&lt;p&gt;&lt;strong&gt;Error handling?&lt;/strong&gt; Is that a joke?&lt;/p&gt;
3396&lt;p&gt;Thank god for &lt;strong&gt;await/async&lt;/strong&gt;. Without it, I would have probably just abandoned
3397the whole thing and went with something else like Python. That&#39;s all I am going
3398to say about this :)&lt;/p&gt;
3399&lt;p&gt;I started asking myself a question if Node.js is actually ready to be used in a
3400&lt;strong&gt;large scale applications&lt;/strong&gt;? And this was a totally wrong question. What I
3401should have been asking myself was, how to use Node.js in large scale
3402application. And you don&#39;t get this in &lt;strong&gt;marketing material&lt;/strong&gt; for Express or Koa
3403etc. They never tell you this. Making Node.js scale on infrastructure or in
3404codebase is really &lt;strong&gt;more of an art than a science&lt;/strong&gt;. And just like with the
3405whole JavaScript ecosystem:&lt;/p&gt;
3406&lt;ul&gt;
3407&lt;li&gt;impossible to master,&lt;/li&gt;
3408&lt;li&gt;half of your time you work on your tooling,&lt;/li&gt;
3409&lt;li&gt;just accept transpilers that convert one code into another (holly smokes),&lt;/li&gt;
3410&lt;li&gt;error handling is a joke,&lt;/li&gt;
3411&lt;li&gt;standards? What standards?&lt;/li&gt;
3412&lt;/ul&gt;
3413&lt;p&gt;But on the other hand. As I did, you will also learn to love it. Learn to use it
3414quickly and do impossible things in crazy limited time.&lt;/p&gt;
3415&lt;p&gt;I hate to admit it. But I love Node.js. Dammit, I love it :)&lt;/p&gt;
3416&lt;p&gt;2023 Update: I hate Node.js!&lt;/p&gt;
3417</content:encoded>
3418 </item>
3419
3420
3421
3422 <item>
3423 <title>The strange case of Elasticsearch allocation failure</title>
3424 <link>https://mitjafelicijan.com/the-strange-case-of-elasticsearch-allocation-failure.html</link>
3425 <pubDate>Sun, 29 Mar 2020 12:00:00 &#43;0200</pubDate>
3426 <guid>https://mitjafelicijan.com/the-strange-case-of-elasticsearch-allocation-failure.html</guid>
3427 <description>I&amp;#39;ve been using Elasticsearch in production for 5 years now and never had asingle problem with it.</description>
3428 <content:encoded>&lt;p&gt;I&#39;ve been using Elasticsearch in production for 5 years now and never had a
3429single problem with it. Hell, never even known there could be a problem. Just
3430worked. All this time. The first node that I deployed is still being used in
3431production, never updated, upgraded, touched in anyway.&lt;/p&gt;
3432&lt;p&gt;All this bliss came to an abrupt end this Friday when I got notification that
3433Elasticsearch cluster went warm. Well, warm is not that bad right? Wrong!
3434Quickly after that I got another email which sent chills down my spine. Cluster
3435is now red. RED! Now, shit really hit the fan!&lt;/p&gt;
3436&lt;p&gt;I tried googling what could be the problem and after executing allocation
3437function noticed that some shards were unassigned and 5 attempts were already
3438made (which is BTW to my luck the maximum) and that meant I am basically fucked.
3439They also applied that one should wait for cluster to re-balance itself. So, I
3440waited. One hour, two hours, several hours. Nothing, still RED.&lt;/p&gt;
3441&lt;p&gt;The strangest thing about it all was, that queries were still being fulfilled.
3442Data was coming out. On the outside it looked like nothing was wrong but
3443everybody that would look at the cluster would know immediately that something
3444was very very wrong and we were living on borrowed time here.&lt;/p&gt;
3445&lt;blockquote&gt;
3446&lt;p&gt;&lt;strong&gt;Please, DO NOT do what I did.&lt;/strong&gt; Seriously! Please ask someone on official
3447forums or if you know an expert please consult him. There could be million of
3448reasons and these solution fit my problem. Maybe in your case it would
3449disastrous. I had all the data backed up and even if I would fail spectacularly
3450I would be able to restore the data. It would be a huge pain and I would loose
3451couple of days but I had a plan B.&lt;/p&gt;
3452&lt;/blockquote&gt;
3453&lt;p&gt;Executing allocation and told me what the problem was but no clear solution yet.&lt;/p&gt;
3454&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GET /_cat/allocation?format=json
3455&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I got a message that &lt;code&gt;ALLOCATION_FAILED&lt;/code&gt; with additional info &lt;code&gt;failed to create shard, failure ioexception[failed to obtain in-memory shard lock]&lt;/code&gt;. Well
3456splendid! I must also say that our cluster is capable more than enough to handle
3457the traffic. Also JVM memory pressure never was an issue. So what happened
3458really then?&lt;/p&gt;
3459&lt;p&gt;I tried also re-routing failed ones with no success due to AWS restrictions on
3460having managed Elasticsearch cluster (they lock some of the functions).&lt;/p&gt;
3461&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;POST /_cluster/reroute?retry_failed=true
3462&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I got a message that significantly reduced my options.&lt;/p&gt;
3463&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
3464&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;Message&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Your request: &amp;#39;/_cluster/reroute&amp;#39; is not allowed.&amp;#34;&lt;/span&gt;
3465&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
3466&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After that I went on a hunt again. I won&#39;t bother you with all the details
3467because hours/days went by until I was finally able to re-index the problematic
3468index and hoped for the best. Until that moment even re-indexing was giving me
3469errors.&lt;/p&gt;
3470&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;POST _reindex
3471&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
3472&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;source&amp;#34;: {
3473&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;index&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;myindex&amp;#34;&lt;/span&gt;
3474&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
3475&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;dest&amp;#34;: {
3476&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;index&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;myindex-new&amp;#34;&lt;/span&gt;
3477&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3478&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
3479&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I needed to do this multiple times to get all the documents re-indexed. Then I
3480dropped the original one with the following command.&lt;/p&gt;
3481&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DELETE /myindex
3482&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And re-indexed again new one in the original one (well by name only).&lt;/p&gt;
3483&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;POST _reindex
3484&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
3485&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;source&amp;#34;: {
3486&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;index&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;myindex-new&amp;#34;&lt;/span&gt;
3487&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
3488&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;dest&amp;#34;: {
3489&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;index&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;myindex&amp;#34;&lt;/span&gt;
3490&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3491&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
3492&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On the surface it looks like all is working but I have a long road in front of
3493me to get all the things working again. Cluster now shows that it is in Green
3494mode but I am also getting a notification that the cluster has processing status
3495which could mean million of things.&lt;/p&gt;
3496&lt;p&gt;Godspeed!&lt;/p&gt;
3497</content:encoded>
3498 </item>
3499
3500
3501
3502 <item>
3503 <title>Create placeholder images with sharp Node.js image processing library</title>
3504 <link>https://mitjafelicijan.com/create-placeholder-images-with-sharp.html</link>
3505 <pubDate>Fri, 27 Mar 2020 12:00:00 &#43;0200</pubDate>
3506 <guid>https://mitjafelicijan.com/create-placeholder-images-with-sharp.html</guid>
3507 <description>I have been searching for a solution to pre-generate some placeholder images forimage server I needed to develop that resizes images on S3.</description>
3508 <content:encoded>&lt;p&gt;I have been searching for a solution to pre-generate some placeholder images for
3509image server I needed to develop that resizes images on S3. I though this would
3510be a 15min job and quickly found out how very mistaken I was.&lt;/p&gt;
3511&lt;p&gt;Even though Node.js is not really the best way to do this kind of things (surely
3512something written in C or Rust or even Golang would be the correct way to do
3513this but we didn&#39;t need the speed in our case) I found an excellent library
3514&lt;a href=&#34;https://github.com/lovell/sharp&#34;&gt;sharp - High performance Node.js image
3515processing&lt;/a&gt;.&lt;/p&gt;
3516&lt;p&gt;Getting things running was a breeze.&lt;/p&gt;
3517&lt;h2 id=&#34;fetch-image-from-s3-and-save-resized&#34;&gt;Fetch image from S3 and save resized&lt;/h2&gt;
3518&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; sharp = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;sharp&amp;#39;&lt;/span&gt;);
3519&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; aws = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;aws-sdk&amp;#39;&lt;/span&gt;);
3520&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3521&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; x,y = 100;
3522&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; s3 = &lt;span style=&#34;color:#00f&#34;&gt;new&lt;/span&gt; aws.S3({});
3523&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3524&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;aws.config.update({
3525&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; secretAccessKey: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;secretAccessKey&amp;#39;&lt;/span&gt;,
3526&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; accessKeyId: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;accessKeyId&amp;#39;&lt;/span&gt;,
3527&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; region: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;region&amp;#39;&lt;/span&gt;
3528&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3529&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3530&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; originalImage = &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; s3.getObject({
3531&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Bucket: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;some-bucket-name&amp;#39;&lt;/span&gt;,
3532&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Key: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;image.jpg&amp;#39;&lt;/span&gt;,
3533&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}).promise();
3534&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3535&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; resizedImage = &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; sharp(originalImage.Body)
3536&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .resize(x, y)
3537&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .jpeg({ progressive: &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt; })
3538&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .toBuffer();
3539&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3540&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s3.putObject({
3541&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Bucket: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;some-bucket-name&amp;#39;&lt;/span&gt;,
3542&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Key: &lt;span style=&#34;color:#a31515&#34;&gt;`optimized/&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;x&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;x&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;y&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;/image.jpg`&lt;/span&gt;,
3543&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Body: resizedImage,
3544&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ContentType: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;image/jpeg&amp;#39;&lt;/span&gt;,
3545&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ACL: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;public-read&amp;#39;&lt;/span&gt;
3546&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}).promise();
3547&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All this code was wrapped inside a web service with some additional security
3548checks and defensive coding to detect if key is missing on S3.&lt;/p&gt;
3549&lt;p&gt;And at that point I needed to return placeholder images as a response in case
3550key is missing or x,y are not allowed by the server etc. I could have created
3551PNG in Gimp and just serve them but I wanted to respect aspect ratio and I
3552didn&#39;t want to return some mangled images.&lt;/p&gt;
3553&lt;blockquote&gt;
3554&lt;p&gt;Main problem with finding a clean solution I could copy and paste and change a
3555bit was a task. API is changing constantly and there weren&#39;t clear examples or
3556I was unable to find them.&lt;/p&gt;
3557&lt;/blockquote&gt;
3558&lt;h2 id=&#34;generating-placeholder-images-using-svg&#34;&gt;Generating placeholder images using SVG&lt;/h2&gt;
3559&lt;p&gt;What I ended up was using SVG to generate text and created image with sharp and
3560used composition to combine both layers. Response returned by this function is a
3561buffer you can use to either upload to S3 or save to local file.&lt;/p&gt;
3562&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; generatePlaceholderImageWithText = &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (width, height, message) =&amp;gt; {
3563&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; overlay = &lt;span style=&#34;color:#a31515&#34;&gt;`&amp;lt;svg width=&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;width - 20&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34; height=&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;height - 20&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt;
3564&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; &amp;lt;text x=&amp;#34;50%&amp;#34; y=&amp;#34;50%&amp;#34; font-family=&amp;#34;sans-serif&amp;#34; font-size=&amp;#34;16&amp;#34; text-anchor=&amp;#34;middle&amp;#34;&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;message&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;lt;/text&amp;gt;
3565&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; &amp;lt;/svg&amp;gt;`&lt;/span&gt;;
3566&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3567&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; sharp({
3568&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; create: {
3569&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; width: width,
3570&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; height: height,
3571&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; channels: 4,
3572&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; background: { r: 230, g: 230, b: 230, alpha: 1 }
3573&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3574&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; })
3575&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .composite([{
3576&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; input: Buffer.from(overlay),
3577&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; gravity: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;center&amp;#39;&lt;/span&gt;,
3578&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }])
3579&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .jpeg()
3580&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .toBuffer();
3581&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
3582&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That is about it. Nothing more to it. You can change the color of the image by
3583changing &lt;code&gt;background&lt;/code&gt; and if you want to change text styling you can adapt SVG
3584to your needs.&lt;/p&gt;
3585&lt;blockquote&gt;
3586&lt;p&gt;Also be careful about the length of the text. This function positions text at
3587the center and adds &lt;code&gt;20px&lt;/code&gt; padding on all sides. If text is longer than the
3588image it will get cut.&lt;/p&gt;
3589&lt;/blockquote&gt;
3590</content:encoded>
3591 </item>
3592
3593
3594
3595 <item>
3596 <title>Simple Server-Sent Events based PubSub Server</title>
3597 <link>https://mitjafelicijan.com/simple-server-sent-events-based-pubsub-server.html</link>
3598 <pubDate>Sun, 22 Mar 2020 12:00:00 &#43;0200</pubDate>
3599 <guid>https://mitjafelicijan.com/simple-server-sent-events-based-pubsub-server.html</guid>
3600 <description>Before we continue .</description>
3601 <content:encoded>&lt;h2 id=&#34;before-we-continue-&#34;&gt;Before we continue ...&lt;/h2&gt;
3602&lt;p&gt;Publisher Subscriber model is nothing new and there are many amazing solutions
3603out there, so writing a new one would be a waste of time if other solutions
3604wouldn&#39;t have quite complex install procedures and weren&#39;t so hard to maintain.
3605But to be fair, comparing this simple server with something like
3606&lt;a href=&#34;https://kafka.apache.org/&#34;&gt;Kafka&lt;/a&gt; or &lt;a href=&#34;https://www.rabbitmq.com/&#34;&gt;RabbitMQ&lt;/a&gt; is
3607laughable at the least. Those solutions are enterprise grade and have many
3608mechanisms there to ensure messages aren&#39;t lost and much more. Regardless of
3609these drawbacks, this method has been tested on a large website and worked until
3610now without any problems. So now, that we got that cleared up, let&#39;s continue.&lt;/p&gt;
3611&lt;p&gt;&lt;em&gt;&lt;strong&gt;Wiki definition:&lt;/strong&gt; Publish/subscribe messaging, or pub/sub messaging, is a
3612form of asynchronous service-to-service communication used in serverless and
3613microservices architectures. In a pub/sub model, any message published to a
3614topic is immediately received by all the subscribers to the topic.&lt;/em&gt;&lt;/p&gt;
3615&lt;h2 id=&#34;general-goals&#34;&gt;General goals&lt;/h2&gt;
3616&lt;ul&gt;
3617&lt;li&gt;provide a simple server that relays messages to all the connected clients,&lt;/li&gt;
3618&lt;li&gt;messages can be posted on specific topics,&lt;/li&gt;
3619&lt;li&gt;messages get sent via &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events&#34;&gt;Server-Sent
3620Events&lt;/a&gt;
3621to all the subscribers.&lt;/li&gt;
3622&lt;/ul&gt;
3623&lt;h2 id=&#34;how-exactly-does-the-pubsub-model-work&#34;&gt;How exactly does the pub/sub model work?&lt;/h2&gt;
3624&lt;p&gt;The easiest way to explain this is with diagram bellow. Basic function is
3625simple. We have subscribers that receive messages, and we have publishers that
3626create and post messages. Similar model is also well know pattern that works on
3627a premise of consumers and producers, and they take similar roles.&lt;/p&gt;
3628&lt;p&gt;&lt;img src=&#34;/assets/simple-pubsub-server/pubsub-overview.png&#34; alt=&#34;How PubSub works&#34; /&gt;&lt;/p&gt;
3629&lt;p&gt;&lt;strong&gt;These are some naive characteristics we want to achieve:&lt;/strong&gt;&lt;/p&gt;
3630&lt;ul&gt;
3631&lt;li&gt;producer is publishing messages to subscribe topic,&lt;/li&gt;
3632&lt;li&gt;consumer is receiving messages from subscribed topic,&lt;/li&gt;
3633&lt;li&gt;servers is also known as Broker,&lt;/li&gt;
3634&lt;li&gt;broker does not store messages or tracks success,&lt;/li&gt;
3635&lt;li&gt;broker uses
3636&lt;a href=&#34;https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)&#34;&gt;FIFO&lt;/a&gt; method
3637for delivering messages,&lt;/li&gt;
3638&lt;li&gt;if consumer wants to receive messages from a topic, producer and consumer
3639topics must match,&lt;/li&gt;
3640&lt;li&gt;consumer can subscribe to multiple topics,&lt;/li&gt;
3641&lt;li&gt;producer can publish to multiple topics,&lt;/li&gt;
3642&lt;li&gt;each message has a messageId.&lt;/li&gt;
3643&lt;/ul&gt;
3644&lt;p&gt;&lt;strong&gt;Known drawbacks:&lt;/strong&gt;&lt;/p&gt;
3645&lt;ul&gt;
3646&lt;li&gt;messages will not be stored in a persistent queue or unreceived messages like
3647&lt;a href=&#34;https://en.wikipedia.org/wiki/Dead_letter_queue&#34;&gt;DeadLetterQueue&lt;/a&gt; so old
3648messages could be lost on server restart,&lt;/li&gt;
3649&lt;li&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events&#34;&gt;Server-Sent
3650Events&lt;/a&gt;
3651opens a long-running connection between the client and the server so make sure
3652if your setup is load balanced that the load balancer in this case can have
3653long opened connection,&lt;/li&gt;
3654&lt;li&gt;no system moderation due to the dynamic nature of creating queues.&lt;/li&gt;
3655&lt;/ul&gt;
3656&lt;h2 id=&#34;server-sent-events&#34;&gt;Server-Sent Events&lt;/h2&gt;
3657&lt;p&gt;Read more about it on &lt;a href=&#34;https://html.spec.whatwg.org/multipage/server-sent-events.html&#34;&gt;official specification
3658page&lt;/a&gt;.&lt;/p&gt;
3659&lt;h3 id=&#34;current-browser-support&#34;&gt;Current browser support&lt;/h3&gt;
3660&lt;p&gt;&lt;img src=&#34;/assets/simple-pubsub-server/caniuse.png&#34; alt=&#34;Browser support&#34; /&gt;&lt;/p&gt;
3661&lt;p&gt;Check
3662&lt;a href=&#34;https://caniuse.com/#feat=eventsource&#34;&gt;https://caniuse.com/#feat=eventsource&lt;/a&gt;
3663for latest information about browser support.&lt;/p&gt;
3664&lt;h3 id=&#34;known-issues&#34;&gt;Known issues&lt;/h3&gt;
3665&lt;ul&gt;
3666&lt;li&gt;Firefox 52 and below do not support EventSource in web/shared workers&lt;/li&gt;
3667&lt;li&gt;In Firefox prior to version 36 server-sent events do not reconnect
3668automatically in case of a connection interrupt (bug)&lt;/li&gt;
3669&lt;li&gt;Reportedly, CORS in EventSource is currently supported in Firefox 10&#43;, Opera
367012&#43;, Chrome 26&#43;, Safari 7.0&#43;.&lt;/li&gt;
3671&lt;li&gt;Antivirus software may block the event streaming data chunks.&lt;/li&gt;
3672&lt;/ul&gt;
3673&lt;p&gt;Source: &lt;a href=&#34;https://caniuse.com/#feat=eventsource&#34;&gt;https://caniuse.com/#feat=eventsource&lt;/a&gt;&lt;/p&gt;
3674&lt;h3 id=&#34;message-format&#34;&gt;Message format&lt;/h3&gt;
3675&lt;p&gt;The simplest message that can be sent is only with data attribute:&lt;/p&gt;
3676&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data: this is a simple message
3677&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;blank line&amp;gt;
3678&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can send message IDs to be used if the connection is dropped:&lt;/p&gt;
3679&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;id: 33
3680&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data: this is line one
3681&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data: this is line two
3682&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;blank line&amp;gt;
3683&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And you can specify your own event types (the above messages will all trigger
3684the message event):&lt;/p&gt;
3685&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;id: 36
3686&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;event: price
3687&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data: 103.34
3688&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;blank line&amp;gt;
3689&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;server-requirements&#34;&gt;Server requirements&lt;/h3&gt;
3690&lt;p&gt;The important thing is how you send headers and which headers are sent by the
3691server that triggers browser to threat response as a EventStream.&lt;/p&gt;
3692&lt;p&gt;Headers responsible for this are:&lt;/p&gt;
3693&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Content-Type: text/event-stream
3694&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Cache-Control: no-cache
3695&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Connection: keep-alive
3696&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;debugging-with-google-chrome&#34;&gt;Debugging with Google Chrome&lt;/h3&gt;
3697&lt;p&gt;Google Chrome provides build-in debugging and exploration tool for &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events&#34;&gt;Server-Sent
3698Events&lt;/a&gt;
3699which is quite nice and available from Developer Tools under Network tab.&lt;/p&gt;
3700&lt;blockquote&gt;
3701&lt;p&gt;You can debug only client side events that get received and not the server
3702ones. For debugging server events add &lt;code&gt;console.log&lt;/code&gt; to &lt;code&gt;server.js&lt;/code&gt; code and
3703print out events.&lt;/p&gt;
3704&lt;/blockquote&gt;
3705&lt;p&gt;&lt;img src=&#34;/assets/simple-pubsub-server/chrome-debugging.png&#34; alt=&#34;Google Chrome Developer Tools EventStream&#34; /&gt;&lt;/p&gt;
3706&lt;h2 id=&#34;server-implementation&#34;&gt;Server implementation&lt;/h2&gt;
3707&lt;p&gt;For the sake of this example we will use &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;Node.js&lt;/a&gt; with
3708&lt;a href=&#34;https://expressjs.com&#34;&gt;Express&lt;/a&gt; as our router since this is the easiest way to
3709get started and we will use already written SSE library for node
3710&lt;a href=&#34;https://www.npmjs.com/package/sse-pubsub&#34;&gt;sse-pubsub&lt;/a&gt; so we don&#39;t reinvent the
3711wheel.&lt;/p&gt;
3712&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm init --yes
3713&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3714&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install express
3715&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install body-parser
3716&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install sse-pubsub
3717&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Basic implementation of a server (&lt;code&gt;server.js&lt;/code&gt;):&lt;/p&gt;
3718&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; express = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;express&amp;#39;&lt;/span&gt;);
3719&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; bodyParser = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;body-parser&amp;#39;&lt;/span&gt;);
3720&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; SSETopic = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;sse-pubsub&amp;#39;&lt;/span&gt;);
3721&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3722&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; app = express();
3723&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; port = process.env.PORT || 4000;
3724&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3725&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// topics container
3726&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; sseTopics = {};
3727&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3728&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app.use(bodyParser.json());
3729&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3730&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// open for all cors
3731&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.all(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;, (req, res, next) =&amp;gt; {
3732&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Access-Control-Allow-Origin&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;);
3733&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Access-Control-Allow-Headers&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;X-Requested-With, Content-Type&amp;#39;&lt;/span&gt;);
3734&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; next();
3735&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3736&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3737&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// preflight request error fix
3738&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.options(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (req, res) =&amp;gt; {
3739&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Access-Control-Allow-Origin&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;);
3740&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Access-Control-Allow-Headers&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;X-Requested-With, Content-Type&amp;#39;&lt;/span&gt;);
3741&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.send(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;OK&amp;#39;&lt;/span&gt;);
3742&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3743&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3744&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// serve the event streams
3745&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.get(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/stream/:topic&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (req, res, next) =&amp;gt; {
3746&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; topic = req.params.topic;
3747&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3748&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (!(topic &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; sseTopics)) {
3749&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sseTopics[topic] = &lt;span style=&#34;color:#00f&#34;&gt;new&lt;/span&gt; SSETopic({
3750&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; pingInterval: 0,
3751&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; maxStreamDuration: 15000,
3752&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3753&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3754&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3755&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// subscribing client to topic
3756&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; sseTopics[topic].subscribe(req, res);
3757&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3758&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3759&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// accepts new messages into topic
3760&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.post(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/publish&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (req, res) =&amp;gt; {
3761&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;let&lt;/span&gt; body = req.body;
3762&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;let&lt;/span&gt; status = 200;
3763&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3764&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Incoming message:&amp;#39;&lt;/span&gt;, req.body);
3765&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3766&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (
3767&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body.hasOwnProperty(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;topic&amp;#39;&lt;/span&gt;) &amp;amp;&amp;amp;
3768&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body.hasOwnProperty(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;event&amp;#39;&lt;/span&gt;) &amp;amp;&amp;amp;
3769&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body.hasOwnProperty(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;message&amp;#39;&lt;/span&gt;)
3770&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ) {
3771&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; topic = req.body.topic;
3772&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; event = req.body.event;
3773&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; message = req.body.message;
3774&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3775&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (topic &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; sseTopics) {
3776&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// sends message to all the subscribers
3777&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; sseTopics[topic].publish(message, event);
3778&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3779&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; } &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; {
3780&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = 400;
3781&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
3782&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3783&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.status(status).send({
3784&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status,
3785&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3786&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3787&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3788&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// returns JSON object of all opened topics
3789&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.get(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/status&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (req, res) =&amp;gt; {
3790&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.send(sseTopics);
3791&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3792&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3793&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// health-check endpoint
3794&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.get(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (req, res) =&amp;gt; {
3795&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.send(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;OK&amp;#39;&lt;/span&gt;);
3796&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3797&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3798&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// return a 404 if no routes match
3799&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.use((req, res, next) =&amp;gt; {
3800&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.set(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Cache-Control&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;private, no-store&amp;#39;&lt;/span&gt;);
3801&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res.status(404).end(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Not found&amp;#39;&lt;/span&gt;);
3802&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3803&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3804&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// starts the server
3805&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;app.listen(port, () =&amp;gt; {
3806&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(&lt;span style=&#34;color:#a31515&#34;&gt;`PubSub server running on http://localhost:&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;port&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;);
3807&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
3808&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;our-custom-message-format&#34;&gt;Our custom message format&lt;/h3&gt;
3809&lt;p&gt;Each message posted on a server must be in a specific format that out server
3810accepts. Having structure like this allows us to have multiple separated type of
3811events on each topic.&lt;/p&gt;
3812&lt;p&gt;With this we can separate streams and only receive events that belong to the
3813topic.&lt;/p&gt;
3814&lt;p&gt;One example would be, that we have index page and we want to receive messages
3815about new upvotes or new subscribers but we don&#39;t want to follow events for
3816other pages. This reduces clutter and overall network. And structure is much
3817nicer and maintanable.&lt;/p&gt;
3818&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
3819&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;topic&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-topic&amp;#34;&lt;/span&gt;,
3820&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;event&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-event&amp;#34;&lt;/span&gt;,
3821&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;message&amp;#34;: { &amp;#34;name&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;John&amp;#34;&lt;/span&gt; }
3822&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
3823&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;publisher-and-subscriber-clients&#34;&gt;Publisher and subscriber clients&lt;/h2&gt;
3824&lt;h3 id=&#34;publisher-and-subscriber-in-action&#34;&gt;Publisher and subscriber in action&lt;/h3&gt;
3825&lt;p&gt;&lt;video src=&#34;/assets/simple-pubsub-server/clients.m4v&#34; controls&gt;&lt;/video&gt;&lt;/p&gt;
3826&lt;p&gt;You can download &lt;a href=&#34;../simple-pubsub-server/sse-pubsub-server.zip&#34;&gt;the code&lt;/a&gt; and
3827follow along.&lt;/p&gt;
3828&lt;h3 id=&#34;publisher&#34;&gt;Publisher&lt;/h3&gt;
3829&lt;p&gt;As talked about above publisher is the one that send messages to the
3830broker/server. Message inside the payload can be whatever you want (string,
3831object, array). I would however personally avoid send large chunks of data like
3832blobs and such.&lt;/p&gt;
3833&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
3834&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html lang=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;en&amp;#34;&lt;/span&gt;&amp;gt;
3835&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3836&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;head&amp;gt;
3837&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta charset=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;UTF-8&amp;#34;&lt;/span&gt;&amp;gt;
3838&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta name=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;viewport&amp;#34;&lt;/span&gt; content=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;width=device-width, initial-scale=1.0&amp;#34;&lt;/span&gt;&amp;gt;
3839&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;title&amp;gt;Publisher&amp;lt;/title&amp;gt;
3840&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/head&amp;gt;
3841&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3842&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;body&amp;gt;
3843&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3844&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;h1&amp;gt;Publisher&amp;lt;/h1&amp;gt;
3845&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3846&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;fieldset&amp;gt;
3847&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3848&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Server:&amp;lt;/label&amp;gt;
3849&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;server&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;http://localhost:4000&amp;#34;&lt;/span&gt;&amp;gt;
3850&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3851&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3852&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Topic:&amp;lt;/label&amp;gt;
3853&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;topic&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-topic&amp;#34;&lt;/span&gt;&amp;gt;
3854&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3855&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3856&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Event:&amp;lt;/label&amp;gt;
3857&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;event&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-event&amp;#34;&lt;/span&gt;&amp;gt;
3858&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3859&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3860&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Message:&amp;lt;/label&amp;gt;
3861&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;{&amp;#34;name&amp;#34;: &amp;#34;John&amp;#34;}&amp;#39;&lt;/span&gt;&amp;gt;
3862&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3863&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3864&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;button type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;button&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;button&amp;#34;&lt;/span&gt;&amp;gt;Publish message to topic&amp;lt;/button&amp;gt;
3865&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3866&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/fieldset&amp;gt;
3867&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3868&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script&amp;gt;
3869&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3870&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; button = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#button&amp;#39;&lt;/span&gt;);
3871&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; server = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#server&amp;#39;&lt;/span&gt;);
3872&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; topic = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#topic&amp;#39;&lt;/span&gt;);
3873&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; event = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#event&amp;#39;&lt;/span&gt;);
3874&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; message = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#message&amp;#39;&lt;/span&gt;);
3875&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3876&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; button.addEventListener(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (evt) =&amp;gt; {
3877&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; req = &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; fetch(&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;server.value&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;/publish`&lt;/span&gt;, {
3878&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; method: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;post&amp;#39;&lt;/span&gt;,
3879&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; headers: {
3880&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Accept&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;,
3881&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Content-Type&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;,
3882&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
3883&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body: JSON.stringify({
3884&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; topic: topic.value,
3885&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; event: event.value,
3886&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; message: JSON.parse(message.value),
3887&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }),
3888&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3889&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3890&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; res = &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; req.json();
3891&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(res);
3892&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3893&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3894&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/script&amp;gt;
3895&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3896&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/body&amp;gt;
3897&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3898&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;
3899&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;subscriber&#34;&gt;Subscriber&lt;/h3&gt;
3900&lt;p&gt;Subscriber is responsible for receiving new messages that come from server via
3901publisher. The code bellow is very rudimentary but works and follows the
3902implementation guidelines for EventSource.&lt;/p&gt;
3903&lt;p&gt;You can use either Developer Tools Console to see incoming messages or you can
3904defer to Debugging with Google Chrome section above to see all EventStream
3905messages.&lt;/p&gt;
3906&lt;blockquote&gt;
3907&lt;p&gt;Don&#39;t be alarmed if the subscriber gets disconnected from the server every so
3908often. The code we have here resets connection every 15s but it automatically
3909get reconnected and fetches all messages up to last received message id. This
3910setting can be adjusted in &lt;code&gt;server.js&lt;/code&gt; file; search for the
3911&lt;code&gt;maxStreamDuration&lt;/code&gt; variable.&lt;/p&gt;
3912&lt;/blockquote&gt;
3913&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
3914&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html lang=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;en&amp;#34;&lt;/span&gt;&amp;gt;
3915&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3916&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;head&amp;gt;
3917&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta charset=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;UTF-8&amp;#34;&lt;/span&gt;&amp;gt;
3918&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta name=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;viewport&amp;#34;&lt;/span&gt; content=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;width=device-width, initial-scale=1.0&amp;#34;&lt;/span&gt;&amp;gt;
3919&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;title&amp;gt;Subscriber&amp;lt;/title&amp;gt;
3920&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;link rel=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; href=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;style.css&amp;#34;&lt;/span&gt;&amp;gt;
3921&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/head&amp;gt;
3922&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3923&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;body&amp;gt;
3924&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3925&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;h1&amp;gt;Subscriber&amp;lt;/h1&amp;gt;
3926&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3927&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;fieldset&amp;gt;
3928&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3929&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Server:&amp;lt;/label&amp;gt;
3930&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;server&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;http://localhost:4000&amp;#34;&lt;/span&gt;&amp;gt;
3931&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3932&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3933&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Topic:&amp;lt;/label&amp;gt;
3934&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;topic&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-topic&amp;#34;&lt;/span&gt;&amp;gt;
3935&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3936&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3937&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;label&amp;gt;Event:&amp;lt;/label&amp;gt;
3938&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;input type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;event&amp;#34;&lt;/span&gt; value=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sample-event&amp;#34;&lt;/span&gt;&amp;gt;
3939&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3940&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;p&amp;gt;
3941&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;button type=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;button&amp;#34;&lt;/span&gt; id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;button&amp;#34;&lt;/span&gt;&amp;gt;Subscribe to topic&amp;lt;/button&amp;gt;
3942&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/p&amp;gt;
3943&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/fieldset&amp;gt;
3944&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3945&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script&amp;gt;
3946&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3947&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; button = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#button&amp;#39;&lt;/span&gt;);
3948&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; server = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#server&amp;#39;&lt;/span&gt;);
3949&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; topic = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#topic&amp;#39;&lt;/span&gt;);
3950&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; event = document.querySelector(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#event&amp;#39;&lt;/span&gt;);
3951&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3952&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; button.addEventListener(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; (evt) =&amp;gt; {
3953&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;let&lt;/span&gt; es = &lt;span style=&#34;color:#00f&#34;&gt;new&lt;/span&gt; EventSource(&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;server.value&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;/stream/&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;topic.value&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;);
3955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3956&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; es.addEventListener(event.value, &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; (evt) {
3957&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(&lt;span style=&#34;color:#a31515&#34;&gt;`incoming message`&lt;/span&gt;, JSON.parse(evt.data));
3958&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3959&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3960&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; es.addEventListener(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;open&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; (evt) {
3961&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;connected&amp;#39;&lt;/span&gt;, evt);
3962&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3963&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3964&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; es.addEventListener(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;error&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; (evt) {
3965&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; console.log(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;error&amp;#39;&lt;/span&gt;, evt);
3966&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3967&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3968&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
3969&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3970&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/script&amp;gt;
3971&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3972&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/body&amp;gt;
3973&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
3974&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;
3975&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;reading-further&#34;&gt;Reading further&lt;/h2&gt;
3976&lt;ul&gt;
3977&lt;li&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events&#34;&gt;Using server-sent events&lt;/a&gt;&lt;/li&gt;
3978&lt;li&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2018/02/sse-websockets-data-flow-http2/&#34;&gt;Using SSE Instead Of WebSockets For Unidirectional Data Flow Over HTTP/2&lt;/a&gt;&lt;/li&gt;
3979&lt;li&gt;&lt;a href=&#34;https://apifriends.com/api-streaming/server-sent-events/&#34;&gt;What is Server-Sent Events?&lt;/a&gt;&lt;/li&gt;
3980&lt;li&gt;&lt;a href=&#34;https://tools.ietf.org/id/draft-xie-bidirectional-messaging-01.html&#34;&gt;An HTTP/2 extension for bidirectional messaging communication&lt;/a&gt;&lt;/li&gt;
3981&lt;li&gt;&lt;a href=&#34;https://developers.google.com/web/fundamentals/performance/http2&#34;&gt;Introduction to HTTP/2&lt;/a&gt;&lt;/li&gt;
3982&lt;li&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API&#34;&gt;The WebSocket API (WebSockets)&lt;/a&gt;&lt;/li&gt;
3983&lt;/ul&gt;
3984</content:encoded>
3985 </item>
3986
3987
3988
3989 <item>
3990 <title>Using sentiment analysis for clickbait detection in RSS feeds</title>
3991 <link>https://mitjafelicijan.com/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html</link>
3992 <pubDate>Sat, 19 Oct 2019 12:00:00 &#43;0200</pubDate>
3993 <guid>https://mitjafelicijan.com/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html</guid>
3994 <description>Initial thoughtsOne of the things that interested me for a while now is if major wellestablished news sites use click bait titles to drive additional traffic totheir sites and generate additional impressions.</description>
3995 <content:encoded>&lt;h2 id=&#34;initial-thoughts&#34;&gt;Initial thoughts&lt;/h2&gt;
3996&lt;p&gt;One of the things that interested me for a while now is if major well
3997established news sites use click bait titles to drive additional traffic to
3998their sites and generate additional impressions.&lt;/p&gt;
3999&lt;p&gt;Goal is to see how article titles and actual content of article differ from each
4000other and see if titles are clickbaited.&lt;/p&gt;
4001&lt;h2 id=&#34;preparing-and-cleaning-data&#34;&gt;Preparing and cleaning data&lt;/h2&gt;
4002&lt;p&gt;For this example I opted to just use RSS feed from a new website and decided to
4003go with &lt;a href=&#34;https://www.theguardian.com&#34;&gt;The Guardian&lt;/a&gt; World news. While this gets
4004us limited data (~40) articles and also description (actual content) is trimmed
4005this really doesn&#39;t reflect the actual article contents.&lt;/p&gt;
4006&lt;p&gt;To get better content I could use web scraping and use RSS as link list and
4007fetch contents directly from website, but for this simple example this will
4008suffice.&lt;/p&gt;
4009&lt;p&gt;There are couple of requirements we need to install before we continue:&lt;/p&gt;
4010&lt;ul&gt;
4011&lt;li&gt;&lt;code&gt;pip3 install feedparser&lt;/code&gt; (parses RSS feed from url)&lt;/li&gt;
4012&lt;li&gt;&lt;code&gt;pip3 install vaderSentiment&lt;/code&gt; (does sentiment polarity analysis)&lt;/li&gt;
4013&lt;li&gt;&lt;code&gt;pip3 install matplotlib&lt;/code&gt; (plots chart of results)&lt;/li&gt;
4014&lt;/ul&gt;
4015&lt;p&gt;So first we need to fetch RSS data and sanitize HTML content from description.&lt;/p&gt;
4016&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; re
4017&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; feedparser
4018&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4019&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;feed_url = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://www.theguardian.com/world/rss&amp;#34;&lt;/span&gt;
4020&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;feed = feedparser.parse(feed_url)
4021&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4022&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# sanitize html&lt;/span&gt;
4023&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; item &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; feed.entries:
4024&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; item.description = re.sub(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&amp;lt;[^&amp;lt;]&#43;?&amp;gt;&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;, item.description)
4025&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;perform-sentiment-analysis&#34;&gt;Perform sentiment analysis&lt;/h2&gt;
4026&lt;p&gt;Since we now have cleaned up data in our &lt;code&gt;feed.entries&lt;/code&gt; object we can start with
4027performing sentiment analysis.&lt;/p&gt;
4028&lt;p&gt;There are many sentiment analysis libraries available that range from rule-based
4029sentiment analysis up to machine learning supported analysis. To keep things
4030simple I decided to use rule-based analysis library
4031&lt;a href=&#34;https://github.com/cjhutto/vaderSentiment&#34;&gt;vaderSentiment&lt;/a&gt; from
4032&lt;a href=&#34;https://github.com/cjhutto&#34;&gt;C.J. Hutto&lt;/a&gt;. Really nice library and quite easy to
4033use.&lt;/p&gt;
4034&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; vaderSentiment.vaderSentiment &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; SentimentIntensityAnalyzer
4035&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;analyser = SentimentIntensityAnalyzer()
4036&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4037&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sentiment_results = []
4038&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; item &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; feed.entries:
4039&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sentiment_title = analyser.polarity_scores(item.title)
4040&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sentiment_description = analyser.polarity_scores(item.description)
4041&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sentiment_results.append([sentiment_title[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;compound&amp;#39;&lt;/span&gt;], sentiment_description[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;compound&amp;#39;&lt;/span&gt;]])
4042&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now that we have this data in a shape that is compatible with matplotlib we can
4043plot results to see the difference between title and description sentiment of an
4044article.&lt;/p&gt;
4045&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; matplotlib.pyplot &lt;span style=&#34;color:#00f&#34;&gt;as&lt;/span&gt; plt
4046&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4047&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.rcParams[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;figure.figsize&amp;#39;&lt;/span&gt;] = (15, 3)
4048&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.plot(sentiment_results, drawstyle=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;steps&amp;#39;&lt;/span&gt;)
4049&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.title(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;Sentiment analysis relationship between title and description (Guardian World News)&amp;#39;&lt;/span&gt;)
4050&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.legend([&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;description&amp;#39;&lt;/span&gt;])
4051&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.show()
4052&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;results-and-assets&#34;&gt;Results and assets&lt;/h2&gt;
4053&lt;ol&gt;
4054&lt;li&gt;Because of the small sample size further conclusions are impossible to make.&lt;/li&gt;
4055&lt;li&gt;Rule-based approach may not be the best way of doing this. By using deep
4056learning we would be able to get better insights.&lt;/li&gt;
4057&lt;li&gt;&lt;strong&gt;Next step would be to&lt;/strong&gt; periodically fetch RSS items and store them over a
4058longer period of time and then perform analysis again and use either machine
4059learning or deep learning on top of it.&lt;/li&gt;
4060&lt;/ol&gt;
4061&lt;p&gt;&lt;img src=&#34;/assets/sentiment-analysis/guardian-sa-title-desc-relationship.png&#34; alt=&#34;Relationship between title and description&#34; /&gt;&lt;/p&gt;
4062&lt;p&gt;Figure above displays difference between title and description sentiment for
4063specific RSS feed item. 1 means positive and -1 means negative sentiment.&lt;/p&gt;
4064&lt;p&gt;&lt;a href=&#34;/assets/sentiment-analysis/sentiment-analysis.ipynb&#34;&gt;» Download Jupyter Notebook&lt;/a&gt;&lt;/p&gt;
4065&lt;h2 id=&#34;going-further&#34;&gt;Going further&lt;/h2&gt;
4066&lt;ul&gt;
4067&lt;li&gt;&lt;a href=&#34;https://github.com/bswiss/news_mood&#34;&gt;Twitter Sentiment Analysis by Bryan Schwierzke&lt;/a&gt;&lt;/li&gt;
4068&lt;li&gt;&lt;a href=&#34;https://github.com/thisandagain/sentiment&#34;&gt;AFINN-based sentiment analysis for Node.js by Andrew Sliwinski&lt;/a&gt;&lt;/li&gt;
4069&lt;li&gt;&lt;a href=&#34;https://github.com/adeshpande3/LSTM-Sentiment-Analysis&#34;&gt;Sentiment Analysis with LSTMs in Tensorflow by Adit Deshpande&lt;/a&gt;&lt;/li&gt;
4070&lt;li&gt;&lt;a href=&#34;https://github.com/abdulfatir/twitter-sentiment-analysis&#34;&gt;Sentiment analysis on tweets using Naive Bayes, SVM, CNN, LSTM, etc. by Abdul Fatir&lt;/a&gt;&lt;/li&gt;
4071&lt;/ul&gt;
4072</content:encoded>
4073 </item>
4074
4075
4076
4077 <item>
4078 <title>Simplifying and reducing clutter in my life and work</title>
4079 <link>https://mitjafelicijan.com/simplifying-and-reducing-clutter.html</link>
4080 <pubDate>Mon, 14 Oct 2019 12:00:00 &#43;0200</pubDate>
4081 <guid>https://mitjafelicijan.com/simplifying-and-reducing-clutter.html</guid>
4082 <description>I recently moved my main working machine back from Hachintosh to Linux.</description>
4083 <content:encoded>&lt;p&gt;I recently moved my main working machine back from Hachintosh to Linux. Well the
4084experiment was interesting and I have done some great work on macOS but it was
4085time to move back.&lt;/p&gt;
4086&lt;p&gt;I actually really missed Linux. The simplicity of &lt;code&gt;apt-get&lt;/code&gt; or just the amount
4087of software that exists for Linux should be a no-brainer. I spent most of my
4088time on macOS finding solutions to make things work. Using
4089&lt;a href=&#34;https://brew.sh/&#34;&gt;Brew&lt;/a&gt; was just a horrible experience and far from package
4090managers of Linux. At least they managed to get that &lt;code&gt;sudo&lt;/code&gt; debacle sorted.&lt;/p&gt;
4091&lt;p&gt;Not all was bad. macOS in general was a perfectly good environment. Things like
4092Docker and tooling like this worked without any hiccups. My normal tools like
4093coding IDE worked flawlessly and the whole look and feel is just superb. I have
4094been using MacBook Air for couple of years so I was used to the system but never
4095as a daily driver.&lt;/p&gt;
4096&lt;p&gt;One of the things I did after I installed Linux back on my machine was cleaning
4097up my Dropbox folder. I have everything on Dropbox. Even projects folder. I
4098write code for living so my whole life revolves around couple of megs of code
4099(with assets). So it&#39;s not like I have huge files on my machine. I don&#39;t have
4100movies or music or pictures on my PC. All of that stuff is in cloud. I use
4101Google music and I have Netflix account which is more than enough for me.&lt;/p&gt;
4102&lt;p&gt;I also went and deleted some of the repositories on my Github account. I have
4103deleted more code than deployed. People find this strange but for me deleting
4104something feels so cathartic and also forces me to write better code next time
4105around when I am faced with similar problem. That was a huge relief if I am
4106being totally honest.&lt;/p&gt;
4107&lt;p&gt;Next step was to do something with my webpage. I have been using some scripts I
4108wrote a while ago to generate static pages from markdown source posts. I kept on
4109adding and adding stuff on top of it and it became a source of a
4110frustration. And this is just a simple blog and I was using gulp and npm.
4111Anyways after couple of hours of searching and testing static generators I found
4112an interesting one
4113&lt;a href=&#34;https://github.com/piranha/gostatic&#34;&gt;https://github.com/piranha/gostatic&lt;/a&gt; and I
4114just decided to use this one. It was the only one that had a simple templating
4115engine, not that I really need one. But others had this convoluted way of trying
4116to solve everything and at the end just required quite bigger learning curve I
4117was ready to go with. So I deleted couple of old posts, simplified HTML, trashed
4118most of the CSS and went with
4119&lt;a href=&#34;https://motherfuckingwebsite.com/&#34;&gt;https://motherfuckingwebsite.com/&lt;/a&gt;
4120aesthetics. Yeah, the previous site was more visually stimulating but all I
4121really care is the content at this point. And Times New Roman font is kind of
4122awesome.&lt;/p&gt;
4123&lt;p&gt;I stopped working on most of the projects in the past couple of months because
4124the overhead was just too insane. There comes a point when you stretch yourself
4125too much and then you stop progressing and with that comes dissatisfaction.&lt;/p&gt;
4126&lt;p&gt;So that&#39;s about it. Moving forward minimal style.&lt;/p&gt;
4127</content:encoded>
4128 </item>
4129
4130
4131
4132 <item>
4133 <title>Encoding binary data into DNA sequence</title>
4134 <link>https://mitjafelicijan.com/encoding-binary-data-into-dna-sequence.html</link>
4135 <pubDate>Thu, 03 Jan 2019 12:00:00 &#43;0200</pubDate>
4136 <guid>https://mitjafelicijan.com/encoding-binary-data-into-dna-sequence.html</guid>
4137 <description>Initial thoughtsImagine a world where you could go outside and take a leaf from a tree and putit through your personal DNA sequencer and get data like music, videos orcomputer programs from it.</description>
4138 <content:encoded>&lt;h2 id=&#34;initial-thoughts&#34;&gt;Initial thoughts&lt;/h2&gt;
4139&lt;p&gt;Imagine a world where you could go outside and take a leaf from a tree and put
4140it through your personal DNA sequencer and get data like music, videos or
4141computer programs from it. Well, this is all possible now. It was not done on a
4142large scale because it is quite expensive to create DNA strands but it&#39;s
4143possible.&lt;/p&gt;
4144&lt;p&gt;Encoding data into DNA sequence is relatively simple process once you understand
4145the relationship between binary data and nucleotides and scientists have been
4146making large leaps in this field in order to provide viable long-term storage
4147solution for our data that would potentially survive our specie if case of
4148global disaster. We could imprint all the world&#39;s knowledge into plants and
4149ensure the survival of our knowledge.&lt;/p&gt;
4150&lt;p&gt;More optimistic usage for this technology would be easier storage of ever
4151growing data we produce every day. Once machines for sequencing DNA become fast
4152enough and cheaper this could mean the next evolution of storing data and
4153abandoning classical hard and solid state drives in data warehouses.&lt;/p&gt;
4154&lt;p&gt;As we currently stand this is still not viable but it is quite an amazing and
4155cool technology.&lt;/p&gt;
4156&lt;p&gt;My interests in this field are purely in encoding processes and experimental
4157testing mainly because I don&#39;t have the access to this expensive machines. My
4158initial goal was to create a toolkit that can be used by everybody to encode
4159their data into a proper DNA sequence.&lt;/p&gt;
4160&lt;h2 id=&#34;glossary&#34;&gt;Glossary&lt;/h2&gt;
4161&lt;p&gt;&lt;strong&gt;deoxyribose&lt;/strong&gt; A five-carbon sugar molecule with a hydrogen atom rather than a
4162hydroxyl group in the 2′ position; the sugar component of DNA nucleotides.&lt;/p&gt;
4163&lt;p&gt;&lt;strong&gt;double helix&lt;/strong&gt; The molecular shape of DNA in which two strands of nucleotides
4164wind around each other in a spiral shape.&lt;/p&gt;
4165&lt;p&gt;&lt;strong&gt;nitrogenous base&lt;/strong&gt; A nitrogen-containing molecule that acts as a base; often
4166referring to one of the purine or pyrimidine components of nucleic acids.&lt;/p&gt;
4167&lt;p&gt;&lt;strong&gt;phosphate group&lt;/strong&gt; A molecular group consisting of a central phosphorus atom
4168bound to four oxygen atoms.&lt;/p&gt;
4169&lt;p&gt;&lt;strong&gt;RGB&lt;/strong&gt; The RGB color model is an additive color model in which red, green and
4170blue light are added together in various ways to reproduce a broad array of
4171colors.&lt;/p&gt;
4172&lt;p&gt;&lt;strong&gt;GCC&lt;/strong&gt; The GNU Compiler Collection is a compiler system produced by the GNU
4173Project supporting various programming languages.&lt;/p&gt;
4174&lt;h2 id=&#34;data-encoding&#34;&gt;Data encoding&lt;/h2&gt;
4175&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Encoding involves the use of a code to change original data into a
4176form that can be used by an external process.&lt;/p&gt;
4177&lt;p&gt;Encoding is the process of converting data into a format required for a number
4178of information processing needs, including:&lt;/p&gt;
4179&lt;ul&gt;
4180&lt;li&gt;Program compiling and execution&lt;/li&gt;
4181&lt;li&gt;Data transmission, storage and compression/decompression&lt;/li&gt;
4182&lt;li&gt;Application data processing, such as file conversion&lt;/li&gt;
4183&lt;/ul&gt;
4184&lt;p&gt;Encoding can have two meanings:&lt;/p&gt;
4185&lt;ul&gt;
4186&lt;li&gt;In computer technology, encoding is the process of applying a specific code,
4187such as letters, symbols and numbers, to data for conversion into an
4188equivalent cipher.&lt;/li&gt;
4189&lt;li&gt;In electronics, encoding refers to analog to digital conversion.&lt;/li&gt;
4190&lt;/ul&gt;
4191&lt;h2 id=&#34;quick-history-of-dna&#34;&gt;Quick history of DNA&lt;/h2&gt;
4192&lt;ul&gt;
4193&lt;li&gt;&lt;strong&gt;1869&lt;/strong&gt; - Friedrich Miescher identifies &amp;quot;nuclein&amp;quot;.&lt;/li&gt;
4194&lt;li&gt;&lt;strong&gt;1900s&lt;/strong&gt; - The Eugenics Movement.&lt;/li&gt;
4195&lt;li&gt;&lt;strong&gt;1900&lt;/strong&gt; – Mendel&#39;s theories are rediscovered by researchers.&lt;/li&gt;
4196&lt;li&gt;&lt;strong&gt;1944&lt;/strong&gt; - Oswald Avery identifies DNA as the &#39;transforming principle&#39;.&lt;/li&gt;
4197&lt;li&gt;&lt;strong&gt;1952&lt;/strong&gt; - Rosalind Franklin photographs crystallized DNA fibres.&lt;/li&gt;
4198&lt;li&gt;&lt;strong&gt;1953&lt;/strong&gt; - James Watson and Francis Crick discover the double helix structure of DNA.&lt;/li&gt;
4199&lt;li&gt;&lt;strong&gt;1965&lt;/strong&gt; - Marshall Nirenberg is the first person to sequence the bases in each codon.&lt;/li&gt;
4200&lt;li&gt;&lt;strong&gt;1983&lt;/strong&gt; - Huntington&#39;s disease is the first mapped genetic disease.&lt;/li&gt;
4201&lt;li&gt;&lt;strong&gt;1990&lt;/strong&gt; - The Human Genome Project begins.&lt;/li&gt;
4202&lt;li&gt;&lt;strong&gt;1995&lt;/strong&gt; - Haemophilus Influenzae is the first bacterium genome sequenced.&lt;/li&gt;
4203&lt;li&gt;&lt;strong&gt;1996&lt;/strong&gt; - Dolly the sheep is cloned.&lt;/li&gt;
4204&lt;li&gt;&lt;strong&gt;1999&lt;/strong&gt; - First human chromosome is decoded.&lt;/li&gt;
4205&lt;li&gt;&lt;strong&gt;2000&lt;/strong&gt; – Genetic code of the fruit fly is decoded.&lt;/li&gt;
4206&lt;li&gt;&lt;strong&gt;2002&lt;/strong&gt; – Mouse is the first mammal to have its genome decoded.&lt;/li&gt;
4207&lt;li&gt;&lt;strong&gt;2003&lt;/strong&gt; – The Human Genome Project is completed.&lt;/li&gt;
4208&lt;li&gt;&lt;strong&gt;2013&lt;/strong&gt; – DNA Worldwide and Eurofins Forensic discover identical twins have differences in their genetic makeup.&lt;/li&gt;
4209&lt;/ul&gt;
4210&lt;h2 id=&#34;what-is-dna&#34;&gt;What is DNA?&lt;/h2&gt;
4211&lt;p&gt;Deoxyribonucleic acid, a self-replicating material which is &lt;strong&gt;present in nearly
4212all living organisms&lt;/strong&gt; as the main constituent of chromosomes. It is the
4213&lt;strong&gt;carrier of genetic information&lt;/strong&gt;.&lt;/p&gt;
4214&lt;blockquote&gt;
4215&lt;p&gt;The nitrogen in our DNA, the calcium in our teeth, the iron in our blood,
4216the carbon in our apple pies were made in the interiors of collapsing stars.
4217We are made of starstuff.
4218&lt;strong&gt;-- Carl Sagan, Cosmos&lt;/strong&gt;&lt;/p&gt;
4219&lt;/blockquote&gt;
4220&lt;p&gt;The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases
4221(cytosine (C), thymine (T), adenine (A), guanine (G)), and a phosphate.
4222Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine
4223bases. The sugar and the base together are called a nucleoside.&lt;/p&gt;
4224&lt;p&gt;&lt;img src=&#34;/assets/dna-sequence/dna-basics.jpg&#34; alt=&#34;DNA&#34; /&gt;&lt;/p&gt;
4225&lt;p&gt;&lt;em&gt;DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and
4226cytosine pairs with guanine. (credit a: modification of work by Jerome Walker,
4227Dennis Myts)&lt;/em&gt;&lt;/p&gt;
4228&lt;h2 id=&#34;encode-binary-data-into-dna-sequence&#34;&gt;Encode binary data into DNA sequence&lt;/h2&gt;
4229&lt;p&gt;As an input file you can use any file you want:&lt;/p&gt;
4230&lt;ul&gt;
4231&lt;li&gt;ASCII files,&lt;/li&gt;
4232&lt;li&gt;Compiled programs,&lt;/li&gt;
4233&lt;li&gt;Multimedia files (MP3, MP4, MVK, etc),&lt;/li&gt;
4234&lt;li&gt;Images,&lt;/li&gt;
4235&lt;li&gt;Database files,&lt;/li&gt;
4236&lt;li&gt;etc.&lt;/li&gt;
4237&lt;/ul&gt;
4238&lt;p&gt;Note: If you would copy all the bytes from RAM to file or pipe data to file you
4239could encode also this data as long as you provide file pointer to the encoder.&lt;/p&gt;
4240&lt;h3 id=&#34;basic-encoding&#34;&gt;Basic Encoding&lt;/h3&gt;
4241&lt;p&gt;As already mentioned, the Basic Encoding is based on a simple mapping. Since DNA
4242is composed of 4 nucleotides (Adenine, Cytosine, Guanine, Thymine; usually
4243referred using the first letter). Using this technique we can encode&lt;/p&gt;
4244&lt;p&gt;$$ log_2(4) = log_2(2^2) = 2 bits $$&lt;/p&gt;
4245&lt;p&gt;using a single nucleotide. In this way, we are able to use the 4 bases that
4246compose the DNA strand to encode each byte of data.&lt;/p&gt;
4247&lt;table&gt;
4248&lt;thead&gt;
4249&lt;tr&gt;
4250&lt;th&gt;Two bits&lt;/th&gt;
4251&lt;th&gt;Nucleotides&lt;/th&gt;
4252&lt;/tr&gt;
4253&lt;/thead&gt;
4254&lt;tbody&gt;
4255&lt;tr&gt;
4256&lt;td&gt;00&lt;/td&gt;
4257&lt;td&gt;&lt;strong&gt;A&lt;/strong&gt; (Adenine)&lt;/td&gt;
4258&lt;/tr&gt;
4259&lt;tr&gt;
4260&lt;td&gt;10&lt;/td&gt;
4261&lt;td&gt;&lt;strong&gt;G&lt;/strong&gt; (Guanine)&lt;/td&gt;
4262&lt;/tr&gt;
4263&lt;tr&gt;
4264&lt;td&gt;01&lt;/td&gt;
4265&lt;td&gt;&lt;strong&gt;C&lt;/strong&gt; (Cytosine)&lt;/td&gt;
4266&lt;/tr&gt;
4267&lt;tr&gt;
4268&lt;td&gt;11&lt;/td&gt;
4269&lt;td&gt;&lt;strong&gt;T&lt;/strong&gt; (Thymine)&lt;/td&gt;
4270&lt;/tr&gt;
4271&lt;/tbody&gt;
4272&lt;/table&gt;
4273&lt;p&gt;With this in mind we can simply encode any data by using two-bit to Nucleotides
4274conversion.&lt;/p&gt;
4275&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{ Algorithm 1: Naive byte array to DNA encode }
4276&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;procedure EncodeToDNASequence(f) string
4277&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;begin
4278&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enc string
4279&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;not&lt;/span&gt; eof(f) do
4280&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c byte := buffer[0] { Read 1 byte &lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; buffer }
4281&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bin integer := sprintf(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;08b&amp;#39;&lt;/span&gt;, c) { Convert to string binary }
4282&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; e &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; range[0, 2, 4, 6] do
4283&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; e[0] == 48 &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; e[1] == 48 then { 0x00 - A (Adenine) }
4284&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enc &#43;= &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;
4285&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; e[0] == 48 &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; e[1] == 49 then { 0x01 - G (Guanine) }
4286&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enc &#43;= &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;G&amp;#39;&lt;/span&gt;
4287&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; e[0] == 49 &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; e[1] == 48 then { 0x10 - C (Cytosine) }
4288&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enc &#43;= &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;
4289&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; e[0] == 49 &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; e[1] == 49 then { 0x11 - T (Thymine) }
4290&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enc &#43;= &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;T&amp;#39;&lt;/span&gt;
4291&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; enc { Return DNA sequence }
4292&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;end
4293&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Another encoding would be &lt;strong&gt;Goldman encoding&lt;/strong&gt;. Using this encoding helps with
4294Nonsense mutation (amino acids replaced by a stop codon) that occurs and is the
4295most problematic during translation because it leads to truncated amino acid
4296sequences, which in turn results in truncated proteins.&lt;/p&gt;
4297&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=a4PiGWNsIEU&#34;&gt;Where to store big data? In DNA: Nick Goldman at TEDxPrague&lt;/a&gt;&lt;/p&gt;
4298&lt;h3 id=&#34;fasta-file-format&#34;&gt;FASTA file format&lt;/h3&gt;
4299&lt;p&gt;In bioinformatics, FASTA format is a text-based format for representing either
4300nucleotide sequences or peptide sequences, in which nucleotides or amino acids
4301are represented using single-letter codes. The format also allows for sequence
4302names and comments to precede the sequences. The format originates from the
4303FASTA software package, but has now become a standard in the field of
4304bioinformatics.&lt;/p&gt;
4305&lt;p&gt;The first line in a FASTA file started either with a &amp;quot;&amp;gt;&amp;quot; (greater-than) symbol
4306or, less frequently, a &amp;quot;;&amp;quot; (semicolon) was taken as a comment. Subsequent lines
4307starting with a semicolon would be ignored by software. Since the only comment
4308used was the first, it quickly became used to hold a summary description of the
4309sequence, often starting with a unique library accession number, and with time
4310it has become commonplace to always use &amp;quot;&amp;gt;&amp;quot; for the first line and to not use
4311&amp;quot;;&amp;quot; comments (which would otherwise be ignored).&lt;/p&gt;
4312&lt;pre&gt;&lt;code&gt;;LCBO - Prolactin precursor - Bovine
4313; a sample sequence in FASTA format
4314MDSKGSSQKGSRLLLLLVVSNLLLCQGVVSTPVCPNGPGNCQVSLRDLFDRAVMVSHYIHDLSS
4315EMFNEFDKRYAQGKGFITMALNSCHTSSLPTPEDKEQAQQTHHEVLMSLILGLLRSWNDPLYHL
4316VTEVRGMKGAPDAILSRAIEIEEENKRLLEGMEMIFGQVIPGAKETEPYPVWSGLPSLQTKDED
4317ARYSAFYNLLHCLRRDSSKIDTYLKLLNCRIIYNNNC*
4318
4319&amp;gt;MCHU - Calmodulin - Human, rabbit, bovine, rat, and chicken
4320ADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTID
4321FPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREA
4322DIDGDGQVNYEEFVQMMTAK*
4323
4324&amp;gt;gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
4325LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
4326EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
4327LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
4328GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
4329IENY
4330&lt;/code&gt;&lt;/pre&gt;
4331&lt;p&gt;FASTA format was extended by &lt;a href=&#34;https://en.wikipedia.org/wiki/FASTQ_format&#34;&gt;FASTQ&lt;/a&gt;
4332format from the &lt;a href=&#34;https://www.sanger.ac.uk/&#34;&gt;Sanger Centre&lt;/a&gt; in Cambridge.&lt;/p&gt;
4333&lt;h3 id=&#34;png-encoded-dna-sequence&#34;&gt;PNG encoded DNA sequence&lt;/h3&gt;
4334&lt;table&gt;
4335&lt;thead&gt;
4336&lt;tr&gt;
4337&lt;th&gt;Nucleotides&lt;/th&gt;
4338&lt;th&gt;RGB&lt;/th&gt;
4339&lt;th&gt;Color name&lt;/th&gt;
4340&lt;/tr&gt;
4341&lt;/thead&gt;
4342&lt;tbody&gt;
4343&lt;tr&gt;
4344&lt;td&gt;A ➞ Adenine&lt;/td&gt;
4345&lt;td&gt;(0,0,255)&lt;/td&gt;
4346&lt;td&gt;Blue&lt;/td&gt;
4347&lt;/tr&gt;
4348&lt;tr&gt;
4349&lt;td&gt;G ➞ Guanine&lt;/td&gt;
4350&lt;td&gt;(0,100,0)&lt;/td&gt;
4351&lt;td&gt;Green&lt;/td&gt;
4352&lt;/tr&gt;
4353&lt;tr&gt;
4354&lt;td&gt;C ➞ Cytosine&lt;/td&gt;
4355&lt;td&gt;(255,0,0)&lt;/td&gt;
4356&lt;td&gt;Red&lt;/td&gt;
4357&lt;/tr&gt;
4358&lt;tr&gt;
4359&lt;td&gt;T ➞ Thymine&lt;/td&gt;
4360&lt;td&gt;(255,255,0)&lt;/td&gt;
4361&lt;td&gt;Yellow&lt;/td&gt;
4362&lt;/tr&gt;
4363&lt;/tbody&gt;
4364&lt;/table&gt;
4365&lt;p&gt;With this in mind we can create a simple algorithm to create PNG representation
4366of a DNA sequence.&lt;/p&gt;
4367&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{ Algorithm 2: Naive DNA to PNG encode &lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; FASTA file }
4368&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;procedure EncodeDNASequenceToPNG(f)
4369&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;begin
4370&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i image
4371&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;not&lt;/span&gt; eof(f) do
4372&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c char := buffer[0] { Read 1 char &lt;span style=&#34;color:#00f&#34;&gt;from&lt;/span&gt; buffer }
4373&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; case c of
4374&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;: color := RGB(0, 0, 255) { Blue }
4375&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;G&amp;#39;&lt;/span&gt;: color := RGB(0, 100, 0) { Green }
4376&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;: color := RGB(255, 0, 0) { Red }
4377&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;T&amp;#39;&lt;/span&gt;: color := RGB(255, 255, 0) { Yellow }
4378&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; drawRect(i, [x, y], color)
4379&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; save(i) { Save PNG image }
4380&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;end
4381&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;encoding-text-file-in-practice&#34;&gt;Encoding text file in practice&lt;/h2&gt;
4382&lt;p&gt;In this example we will take a simple text file as our input stream for
4383encoding. This file will have a quote from Niels Bohr and saved as txt file.&lt;/p&gt;
4384&lt;blockquote&gt;
4385&lt;p&gt;How wonderful that we have met with a paradox. Now we have some hope of
4386making progress.
4387― Niels Bohr&lt;/p&gt;
4388&lt;/blockquote&gt;
4389&lt;p&gt;First we encode text file into FASTA file.&lt;/p&gt;
4390&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./dnae-encode -i quote.txt -o quote.fa
4391&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Gathering input file stats
4392&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Starting encoding ...
4393&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 106 B / 106 B [==================================] 100.00% 0s
4394&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Saving to FASTA file ...
4395&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Output FASTA file length is 438 B
4396&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Process took 987.263µs
4397&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:38:29 Done ...
4398&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Output of &lt;code&gt;quote.fa&lt;/code&gt; file contains the encoded DNA sequence in ASCII format.&lt;/p&gt;
4399&lt;pre&gt;&lt;code&gt;&amp;gt;SEQ1
4400GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA
4401GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA
4402ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA
4403ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT
4404GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT
4405GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC
4406AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC
4407AACC
4408&lt;/code&gt;&lt;/pre&gt;
4409&lt;p&gt;Then we encode FASTA file from previous operation to encode this data into PNG.&lt;/p&gt;
4410&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./dnae-png -i quote.fa -o quote.png
4411&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Gathering input file stats ...
4412&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Deconstructing FASTA file ...
4413&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Compositing image file ...
4414&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 424 / 424 [==================================] 100.00% 0s
4415&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Saving output file ...
4416&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Output image file length is 1.1 kB
4417&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Process took 19.036117ms
4418&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2019/01/10 00:40:09 Done ...
4419&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After encoding into PNG format this file looks like this.&lt;/p&gt;
4420&lt;p&gt;&lt;img src=&#34;/assets/dna-sequence/quote.png&#34; alt=&#34;Encoded Quote in PNG format&#34; /&gt;&lt;/p&gt;
4421&lt;p&gt;The larger the input stream is the larger the PNG file would be.&lt;/p&gt;
4422&lt;p&gt;Compiled basic Hello World C program with
4423&lt;a href=&#34;https://www.gnu.org/software/gcc/&#34;&gt;GCC&lt;/a&gt; would &lt;a href=&#34;/assets/dna-sequence/sample.png&#34;&gt;look
4424like&lt;/a&gt;.&lt;/p&gt;
4425&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// gcc -O3 -o sample sample.c
4426&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
4427&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
4428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;main() {
4429&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello, world!&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;);
4430&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; 0;
4431&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
4432&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;toolkit-for-encoding-data&#34;&gt;Toolkit for encoding data&lt;/h2&gt;
4433&lt;p&gt;I have created a toolkit with two main programs:&lt;/p&gt;
4434&lt;ul&gt;
4435&lt;li&gt;dnae-encode (encodes file into FASTA file)&lt;/li&gt;
4436&lt;li&gt;dnae-png (encodes FASTA file into PNG)&lt;/li&gt;
4437&lt;/ul&gt;
4438&lt;p&gt;Toolkit with full source code is available on
4439&lt;a href=&#34;https://github.com/mitjafelicijan/dna-encoding&#34;&gt;github.com/mitjafelicijan/dna-encoding&lt;/a&gt;.&lt;/p&gt;
4440&lt;h3 id=&#34;dnae-encode&#34;&gt;dnae-encode&lt;/h3&gt;
4441&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; ./dnae-encode --help
4442&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;usage: dnae-encode --input=INPUT [&amp;lt;flags&amp;gt;]
4443&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4444&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A command-line application that encodes file into DNA sequence.
4445&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4446&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Flags:
4447&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --help Show context-sensitive help (also try --help-long and --help-man).
4448&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -i, --input=INPUT Input file (ASCII or binary) which will be encoded into DNA sequence.
4449&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -o, --output=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;out.fa&amp;#34;&lt;/span&gt; Output file which stores DNA sequence in FASTA format.
4450&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -s, --sequence=SEQ1 The description line (defline) or header/identifier line, gives a name and/or a unique identifier &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; the sequence.
4451&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -c, --columns=60 Row characters length (no more than 120 characters). Devices preallocate fixed line sizes in software.
4452&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --version Show application version.
4453&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;dnae-png&#34;&gt;dnae-png&lt;/h3&gt;
4454&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; ./dnae-png --help
4455&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;usage: dnae-png --input=INPUT [&amp;lt;flags&amp;gt;]
4456&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4457&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A command-line application that encodes FASTA file into PNG image.
4458&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4459&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Flags:
4460&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --help Show context-sensitive help (also try --help-long and --help-man).
4461&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -i, --input=INPUT Input FASTA file which will be encoded into PNG image.
4462&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -o, --output=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;out.png&amp;#34;&lt;/span&gt; Output file in PNG format that represents DNA sequence in graphical way.
4463&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -s, --size=10 Size of pairings of DNA bases on image in pixels (lower resolution lower file size).
4464&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; --version Show application version.
4465&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;benchmarks&#34;&gt;Benchmarks&lt;/h2&gt;
4466&lt;p&gt;First we generate some binary sample data with dd.&lt;/p&gt;
4467&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=&amp;lt;(openssl enc -aes-256-ctr -pass pass:&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/urandom bs=128 count=1 2&amp;gt;/dev/null | base64&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; -nosalt &amp;lt; /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock
4468&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Our freshly generated 1KB file looks something like this (its full of garbage
4469data as intended).&lt;/p&gt;
4470&lt;p&gt;&lt;img src=&#34;/assets/dna-sequence/sample-binary-file.png&#34; alt=&#34;Sample binary file 1KB&#34; /&gt;&lt;/p&gt;
4471&lt;p&gt;We create following binary files:&lt;/p&gt;
4472&lt;ul&gt;
4473&lt;li&gt;1KB.bin&lt;/li&gt;
4474&lt;li&gt;10KB.bin&lt;/li&gt;
4475&lt;li&gt;100KB.bin&lt;/li&gt;
4476&lt;li&gt;1MB.bin&lt;/li&gt;
4477&lt;li&gt;10MB.bin&lt;/li&gt;
4478&lt;li&gt;100MB.bin&lt;/li&gt;
4479&lt;/ul&gt;
4480&lt;p&gt;After this we create FASTA files for all the binary files by encoding them
4481into DNA sequence.&lt;/p&gt;
4482&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./dnae-encode -i 100MB.bin -o 100MB.fa
4483&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then we GZIP all the FASTA files to see how much the can be compressed.&lt;/p&gt;
4484&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gzip -9 &amp;lt; 10MB.fa &amp;gt; 10MB.fa.gz
4485&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;/dna-sequence/benchmarks.ods&#34;&gt;Download ODS file with benchmarks&lt;/a&gt;.&lt;/p&gt;
4486&lt;p&gt;&lt;img src=&#34;/assets/dna-sequence/chart-1.png&#34; alt=&#34;Sample binary file 1KB&#34; /&gt;&lt;/p&gt;
4487&lt;p&gt;&lt;img src=&#34;/assets/dna-sequence/chart-2.png&#34; alt=&#34;Sample binary file 1KB&#34; /&gt;&lt;/p&gt;
4488&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
4489&lt;ul&gt;
4490&lt;li&gt;&lt;a href=&#34;https://www.techopedia.com/definition/948/encoding&#34;&gt;https://www.techopedia.com/definition/948/encoding&lt;/a&gt;&lt;/li&gt;
4491&lt;li&gt;&lt;a href=&#34;https://www.dna-worldwide.com/resource/160/history-dna-timeline&#34;&gt;https://www.dna-worldwide.com/resource/160/history-dna-timeline&lt;/a&gt;&lt;/li&gt;
4492&lt;li&gt;&lt;a href=&#34;https://opentextbc.ca/biology/chapter/9-1-the-structure-of-dna/&#34;&gt;https://opentextbc.ca/biology/chapter/9-1-the-structure-of-dna/&lt;/a&gt;&lt;/li&gt;
4493&lt;li&gt;&lt;a href=&#34;https://arxiv.org/abs/1801.04774&#34;&gt;https://arxiv.org/abs/1801.04774&lt;/a&gt;&lt;/li&gt;
4494&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/FASTA_format&#34;&gt;https://en.wikipedia.org/wiki/FASTA_format&lt;/a&gt;&lt;/li&gt;
4495&lt;/ul&gt;
4496</content:encoded>
4497 </item>
4498
4499
4500
4501 <item>
4502 <title>Using DigitalOcean Spaces Object Storage with FUSE</title>
4503 <link>https://mitjafelicijan.com/using-digitalocean-spaces-object-storage-with-fuse.html</link>
4504 <pubDate>Tue, 16 Jan 2018 12:00:00 &#43;0200</pubDate>
4505 <guid>https://mitjafelicijan.com/using-digitalocean-spaces-object-storage-with-fuse.html</guid>
4506 <description>Couple of months ago DigitalOcean introduced newproduct calledSpaces whichis Object Storage very similar to Amazon&amp;#39;s S3.</description>
4507 <content:encoded>&lt;p&gt;Couple of months ago &lt;a href=&#34;https://www.digitalocean.com&#34;&gt;DigitalOcean&lt;/a&gt; introduced new
4508product called
4509&lt;a href=&#34;https://blog.digitalocean.com/introducing-spaces-object-storage/&#34;&gt;Spaces&lt;/a&gt; which
4510is Object Storage very similar to Amazon&#39;s S3. This really peaked my interest,
4511because this was something I was missing and even the thought of going over the
4512internet for such functionality was in no interest to me. Also in fashion with
4513their previous pricing this also is very cheap and pricing page is a no-brainer
4514compared to AWS or GCE. &lt;a href=&#34;https://www.digitalocean.com/pricing/&#34;&gt;Prices are clearly and precisely defined and
4515outlined&lt;/a&gt;. You must love them for that
4516:)&lt;/p&gt;
4517&lt;h2 id=&#34;initial-requirements&#34;&gt;Initial requirements&lt;/h2&gt;
4518&lt;ul&gt;
4519&lt;li&gt;Is it possible to use them as a mounted drive with FUSE? (tl;dr YES)&lt;/li&gt;
4520&lt;li&gt;Will the performance degrade over time and over different sizes of objects?
4521(tl;dr NO&amp;amp;YES)&lt;/li&gt;
4522&lt;li&gt;Can storage be mounted on multiple machines at the same time and be writable?
4523(tl;dr YES)&lt;/li&gt;
4524&lt;/ul&gt;
4525&lt;blockquote&gt;
4526&lt;p&gt;Let me be clear. This scripts I use are made just for benchmarking and are not
4527intended to be used in real-life situations. Besides that, I am looking into
4528using this approaches but adding caching service in front of it and then
4529dumping everything as an object to storage. This could potentially be some
4530interesting post of itself. But in case you would need real-time data without
4531eventual consistency please take this scripts as they are: not usable in such
4532situations.&lt;/p&gt;
4533&lt;/blockquote&gt;
4534&lt;h2 id=&#34;is-it-possible-to-use-them-as-a-mounted-drive-with-fuse&#34;&gt;Is it possible to use them as a mounted drive with FUSE?&lt;/h2&gt;
4535&lt;p&gt;Well, actually they can be used in such manor. Because they are similar to &lt;a href=&#34;https://aws.amazon.com/s3/&#34;&gt;AWS
4536S3&lt;/a&gt; many tools are available and you can find many
4537articles and &lt;a href=&#34;https://stackoverflow.com/search?q=s3&#43;fuse&#34;&gt;Stackoverflow items&lt;/a&gt;.&lt;/p&gt;
4538&lt;p&gt;To make this work you will need DigitalOcean account. If you don&#39;t have one you
4539will not be able to test this code. But if you have an account then you go and
4540&lt;a href=&#34;https://cloud.digitalocean.com/droplets/new?size=s-1vcpu-1gb&amp;amp;region=ams3&amp;amp;distro=debian&amp;amp;distroImage=debian-9-x64&amp;amp;options=private_networking,install_agent&#34;&gt;create new
4541Droplet&lt;/a&gt;.
4542If you click on this link you will already have preselected Debian 9 with
4543smallest VM option.&lt;/p&gt;
4544&lt;ul&gt;
4545&lt;li&gt;Please be sure to add you SSH key, because we will login to this machine
4546remotely.&lt;/li&gt;
4547&lt;li&gt;If you change your region please remember which one you choose because we will
4548need this information when we try to mount space to our machine.&lt;/li&gt;
4549&lt;/ul&gt;
4550&lt;p&gt;Instuctions on how to use SSH keys and how to setup them are available in
4551article &lt;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets&#34;&gt;How To Use SSH Keys with DigitalOcean
4552Droplets&lt;/a&gt;.&lt;/p&gt;
4553&lt;p&gt;&lt;img src=&#34;/assets/do-fuse/fuse-droplets.png&#34; alt=&#34;DigitalOcean Droplets&#34; /&gt;&lt;/p&gt;
4554&lt;p&gt;After we created Droplet it&#39;s time to create new Space. This is done by clicking
4555on a button &lt;a href=&#34;https://cloud.digitalocean.com/spaces/new&#34;&gt;Create&lt;/a&gt; (right top
4556corner) and selecting Spaces. Choose pronounceable &lt;code&gt;Unique name&lt;/code&gt; because we
4557will use it in examples below. You can either choose Private or Public, it
4558doesn&#39;t matter in our case. And you can always change that in the future.&lt;/p&gt;
4559&lt;p&gt;When you have created new Space we should &lt;a href=&#34;https://cloud.digitalocean.com/settings/api/tokens&#34;&gt;generate Access
4560key&lt;/a&gt;. This link will guide
4561to the page when you can generate this key. After you create new one, please
4562save provided Key and Secret because Secret will not be shown again.&lt;/p&gt;
4563&lt;p&gt;&lt;img src=&#34;/assets/do-fuse/fuse-spaces.png&#34; alt=&#34;DigitalOcean Spaces&#34; /&gt;&lt;/p&gt;
4564&lt;p&gt;Now that we have new Space and Access key we should SSH into our machine.&lt;/p&gt;
4565&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# replace IP with the ip of your newly created droplet&lt;/span&gt;
4566&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh root@IP
4567&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4568&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this will install utilities for mounting storage objects as FUSE&lt;/span&gt;
4569&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt install s3fs
4570&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4571&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we now need to provide credentials (access key we created earlier)&lt;/span&gt;
4572&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# replace KEY and SECRET with your own credentials but leave the colon between them&lt;/span&gt;
4573&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we also need to set proper permissions&lt;/span&gt;
4574&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;KEY:SECRET&amp;#34;&lt;/span&gt; &amp;gt; .passwd-s3fs
4575&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chmod 600 .passwd-s3fs
4576&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4577&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we mount space to our machine&lt;/span&gt;
4578&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# replace UNIQUE-NAME with the name you choose earlier&lt;/span&gt;
4579&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# if you choose different region for your space be careful about -ourl option (ams3)&lt;/span&gt;
4580&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s3fs UNIQUE-NAME /mnt/ -ourl=https://ams3.digitaloceanspaces.com -ouse_cache=/tmp
4581&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4582&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we try to create a file&lt;/span&gt;
4583&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# once you mount it may take a couple of seconds to retrieve data&lt;/span&gt;
4584&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Hello cruel world&amp;#34;&lt;/span&gt; &amp;gt; /mnt/hello.txt
4585&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After all this you can return to your browser and go to &lt;a href=&#34;https://cloud.digitalocean.com/spaces&#34;&gt;DigitalOcean
4586Spaces&lt;/a&gt; and click on your created
4587space. If file hello.txt is present you have successfully mounted space to your
4588machine and wrote data to it.&lt;/p&gt;
4589&lt;p&gt;I choose the same region for my Droplet and my Space but you don&#39;t have to. You
4590can have different regions. What this actually does to performance I don&#39;t know.&lt;/p&gt;
4591&lt;p&gt;Additional information on FUSE:&lt;/p&gt;
4592&lt;ul&gt;
4593&lt;li&gt;&lt;a href=&#34;https://github.com/s3fs-fuse/s3fs-fuse&#34;&gt;Github project page for s3fs&lt;/a&gt;&lt;/li&gt;
4594&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Filesystem_in_Userspace&#34;&gt;FUSE - Filesystem in Userspace&lt;/a&gt;&lt;/li&gt;
4595&lt;/ul&gt;
4596&lt;h2 id=&#34;will-the-performance-degrade-over-time-and-over-different-sizes-of-objects&#34;&gt;Will the performance degrade over time and over different sizes of objects?&lt;/h2&gt;
4597&lt;p&gt;For this task I didn&#39;t want to just read and write text files or uploading
4598images. I actually wanted to figure out if using something like SQlite is viable
4599in this case.&lt;/p&gt;
4600&lt;h3 id=&#34;measurement-experiment-1-file-copy&#34;&gt;Measurement experiment 1: File copy&lt;/h3&gt;
4601&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# first we create some dummy files at different sizes&lt;/span&gt;
4602&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/zero of=10KB.dat bs=1024 count=10 &lt;span style=&#34;color:#008000&#34;&gt;#10KB&lt;/span&gt;
4603&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/zero of=100KB.dat bs=1024 count=100 &lt;span style=&#34;color:#008000&#34;&gt;#100KB&lt;/span&gt;
4604&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/zero of=1MB.dat bs=1024 count=1024 &lt;span style=&#34;color:#008000&#34;&gt;#1MB&lt;/span&gt;
4605&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/zero of=10MB.dat bs=1024 count=10240 &lt;span style=&#34;color:#008000&#34;&gt;#10MB&lt;/span&gt;
4606&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4607&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we set time command to only return real&lt;/span&gt;
4608&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TIMEFORMAT=%R
4609&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4610&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now lets test it&lt;/span&gt;
4611&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(time cp 10KB.dat /mnt/) |&amp;amp; tee -a 10KB.results.txt
4612&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4613&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# and now we automate&lt;/span&gt;
4614&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this will perform the same operation 100 times&lt;/span&gt;
4615&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this will output results into separated files based on objecty size&lt;/span&gt;
4616&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;n=0; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (( n&#43;&#43; &amp;lt; 100 )); &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt; (time cp 10KB.dat /mnt/10KB.$n.dat) |&amp;amp; tee -a 10KB.results.txt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
4617&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;n=0; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (( n&#43;&#43; &amp;lt; 100 )); &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt; (time cp 100KB.dat /mnt/100KB.$n.dat) |&amp;amp; tee -a 100KB.results.txt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
4618&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;n=0; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (( n&#43;&#43; &amp;lt; 100 )); &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt; (time cp 1MB.dat /mnt/1MB.$n.dat) |&amp;amp; tee -a 1MB.results.txt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
4619&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;n=0; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (( n&#43;&#43; &amp;lt; 100 )); &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt; (time cp 10MB.dat /mnt/10MB.$n.dat) |&amp;amp; tee -a 10MB.results.txt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
4620&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Files of size 100MB were not successfully transferred and ended up displaying
4621error (cp: failed to close &#39;/mnt/100MB.1.dat&#39;: Operation not permitted).&lt;/p&gt;
4622&lt;p&gt;As I suspected, object size is not really that important. Sadly I don&#39;t have the
4623time to test performance over periods of time. But if some of you would do it
4624please send me your data. I would be interested in seeing results.&lt;/p&gt;
4625&lt;p&gt;&lt;strong&gt;Here are plotted results&lt;/strong&gt;&lt;/p&gt;
4626&lt;p&gt;You can download &lt;a href=&#34;/assets/do-fuse/copy-benchmarks.tsv&#34;&gt;raw result here&lt;/a&gt;.
4627Measurements are in seconds.&lt;/p&gt;
4628&lt;script src=&#34;//cdn.plot.ly/plotly-latest.min.js&#34;&gt;&lt;/script&gt;
4629&lt;div id=&#34;copy-benchmarks&#34;&gt;&lt;/div&gt;
4630&lt;script&gt;
4631(function(){
4632 var request = new XMLHttpRequest();
4633 request.open(&#34;GET&#34;, &#34;/assets/do-fuse/copy-benchmarks.tsv&#34;, true);
4634 request.onload = function() {
4635 if (request.status &gt;= 200 &amp;&amp; request.status &lt; 400) {
4636 var payload = request.responseText.trim();
4637 var tsv = payload.split(&#34;\n&#34;);
4638 for (var i=0; i&lt;tsv.length; i&#43;&#43;) { tsv[i] = tsv[i].split(&#34;\t&#34;); }
4639 var traces = [];
4640 var headers = tsv[0];
4641 tsv.shift();
4642 Array.prototype.forEach.call(headers, function(el, idx) {
4643 var x = [];
4644 var y = [];
4645 for (var j=0; j&lt;tsv.length; j&#43;&#43;) {
4646 x.push(j);
4647 y.push(parseFloat(tsv[j][idx].replace(&#34;,&#34;, &#34;.&#34;)));
4648 }
4649 traces.push({ x: x, y: y, type: &#34;scatter&#34;, name: el, line: { width: 1, shape: &#34;spline&#34; } });
4650 });
4651 var copy = Plotly.newPlot(&#34;copy-benchmarks&#34;, traces, { legend: {&#34;orientation&#34;: &#34;h&#34;}, height: 400, margin: { l: 40, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: &#34;execution time in seconds&#34;, titlefont: { size: 12 } }, xaxis: { title: &#34;fn(i)&#34;, titlefont: { size: 12 } } });
4652 } else { }
4653 };
4654 request.onerror = function() { };
4655 request.send(null);
4656})();
4657&lt;/script&gt;
4658&lt;p&gt;As far as these tests show, performance is quite stable and can be predicted
4659which is fantastic. But this is a small test and spans only over couple of
4660hours. So you should not completely trust them.&lt;/p&gt;
4661&lt;h3 id=&#34;measurement-experiment-2-sqlite-performanse&#34;&gt;Measurement experiment 2: SQLite performanse&lt;/h3&gt;
4662&lt;p&gt;I was unable to use database file directly from mounted drive so this is a no-go
4663as I suspected. So I executed code below on a local disk just to get some
4664benchmarks. I inserted 1000 records with DROPTABLE, CREATETABLE, INSERTMANY,
4665FETCHALL, COMMIT for 1000 times to generate statistics. As you can see
4666performance of SQLite is quite amazing. You could then potentially just copy
4667file to mounted drive and be done with it.&lt;/p&gt;
4668&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; time
4669&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; sqlite3
4670&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; sys
4671&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4672&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; len(sys.argv) &amp;lt; 3:
4673&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;usage: python sqlite-benchmark.py DB_PATH NUM_RECORDS REPEAT&amp;#34;&lt;/span&gt;)
4674&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; exit()
4675&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4676&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; data_iter(x):
4677&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; range(x):
4678&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;yield&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;m&amp;#34;&lt;/span&gt; &#43; str(i), &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;f&amp;#34;&lt;/span&gt; &#43; str(i*i)
4679&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4680&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;header_line = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%s&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; % (&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;DROPTABLE&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;CREATETABLE&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;INSERTMANY&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;FETCHALL&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;COMMIT&amp;#34;&lt;/span&gt;)
4681&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;with&lt;/span&gt; open(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sqlite-benchmarks.tsv&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;w&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#00f&#34;&gt;as&lt;/span&gt; fp:
4682&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fp.write(header_line)
4683&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4684&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start_time = time.time()
4685&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;conn = sqlite3.connect(sys.argv[1])
4686&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;c = conn.cursor()
4687&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;end_time = time.time()
4688&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;result_time = CONNECT = end_time - start_time
4689&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;CONNECT: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4690&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4691&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start_time = time.time()
4692&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PRAGMA journal_mode=WAL&amp;#34;&lt;/span&gt;)
4693&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PRAGMA temp_store=MEMORY&amp;#34;&lt;/span&gt;)
4694&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PRAGMA synchronous=OFF&amp;#34;&lt;/span&gt;)
4695&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;result_time = PRAGMA = end_time - start_time
4696&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;PRAGMA: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4697&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4698&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; range(int(sys.argv[3])):
4699&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;#&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%i&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; % (i))
4700&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4701&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; start_time = time.time()
4702&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;drop table if exists test&amp;#34;&lt;/span&gt;)
4703&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; end_time = time.time()
4704&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result_time = DROPTABLE = end_time - start_time
4705&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;DROPTABLE: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4706&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4707&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; start_time = time.time()
4708&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;create table if not exists test(a,b)&amp;#34;&lt;/span&gt;)
4709&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; end_time = time.time()
4710&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result_time = CREATETABLE = end_time - start_time
4711&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;CREATETABLE: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4712&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4713&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; start_time = time.time()
4714&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c.executemany(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;INSERT INTO test VALUES (?, ?)&amp;#34;&lt;/span&gt;, data_iter(int(sys.argv[2])))
4715&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; end_time = time.time()
4716&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result_time = INSERTMANY = end_time - start_time
4717&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;INSERTMANY: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4718&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4719&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; start_time = time.time()
4720&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; c.execute(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;select count(*) from test&amp;#34;&lt;/span&gt;)
4721&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; res = c.fetchall()
4722&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; end_time = time.time()
4723&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result_time = FETCHALL = end_time - start_time
4724&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;FETCHALL: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4725&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4726&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; start_time = time.time()
4727&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; conn.commit()
4728&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; end_time = time.time()
4729&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result_time = COMMIT = end_time - start_time
4730&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;COMMIT: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4731&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4732&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print
4733&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; log_line = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%f&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%f&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%f&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%f&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\t&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%f&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\n&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; % (DROPTABLE, CREATETABLE, INSERTMANY, FETCHALL, COMMIT)
4734&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;with&lt;/span&gt; open(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sqlite-benchmarks.tsv&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#00f&#34;&gt;as&lt;/span&gt; fp:
4735&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fp.write(log_line)
4736&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4737&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start_time = time.time()
4738&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;conn.close()
4739&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;end_time = time.time()
4740&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;result_time = CLOSE = end_time - start_time
4741&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;CLOSE: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%g&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt; % (result_time))
4742&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can download &lt;a href=&#34;/assets/do-fuse/sqlite-benchmarks.tsv&#34;&gt;raw result here&lt;/a&gt;. And
4743again, these results are done on a local block storage and do not represent
4744capabilities of object storage. With my current approach and state of the test
4745code these can not be done. I would need to make Python code much more robust
4746and check locking etc.&lt;/p&gt;
4747&lt;div id=&#34;sqlite-benchmarks&#34;&gt;&lt;/div&gt;
4748&lt;script&gt;
4749(function(){
4750 var request = new XMLHttpRequest();
4751 request.open(&#34;GET&#34;, &#34;/assets/do-fuse/sqlite-benchmarks.tsv&#34;, true);
4752 request.onload = function() {
4753 if (request.status &gt;= 200 &amp;&amp; request.status &lt; 400) {
4754 var payload = request.responseText.trim();
4755 var tsv = payload.split(&#34;\n&#34;);
4756 for (var i=0; i&lt;tsv.length; i&#43;&#43;) { tsv[i] = tsv[i].split(&#34;\t&#34;); }
4757 var traces = [];
4758 var headers = tsv[0];
4759 tsv.shift();
4760 Array.prototype.forEach.call(headers, function(el, idx) {
4761 var x = [];
4762 var y = [];
4763 for (var j=0; j&lt;tsv.length; j&#43;&#43;) {
4764 x.push(j);
4765 y.push(parseFloat(tsv[j][idx].replace(&#34;,&#34;, &#34;.&#34;)));
4766 }
4767 traces.push({ x: x, y: y, type: &#34;scatter&#34;, name: el, line: { width: 1, shape: &#34;spline&#34; } });
4768 });
4769 var sqlite = Plotly.newPlot(&#34;sqlite-benchmarks&#34;, traces, { legend: {&#34;orientation&#34;: &#34;h&#34;}, height: 400, margin: { l: 50, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: &#34;execution time in seconds&#34;, titlefont: { size: 12 } } });
4770 } else { }
4771 };
4772 request.onerror = function() { };
4773 request.send(null);
4774})();
4775&lt;/script&gt;
4776&lt;h2 id=&#34;can-storage-be-mounted-on-multiple-machines-at-the-same-time-and-be-writable&#34;&gt;Can storage be mounted on multiple machines at the same time and be writable?&lt;/h2&gt;
4777&lt;p&gt;Well, this one didn&#39;t take long to test. And the answer is &lt;strong&gt;YES&lt;/strong&gt;. I mounted
4778space on both machines and measured same performance on both machines. But
4779because file is downloaded before write and then uploaded on complete there
4780could potentially be problems is another process is trying to access the same
4781file.&lt;/p&gt;
4782&lt;h2 id=&#34;observations-and-conslusion&#34;&gt;Observations and conslusion&lt;/h2&gt;
4783&lt;p&gt;Using Spaces in this way makes it easier to access and manage files. But besides
4784that you would need to write additional code to make this one play nice with you
4785applications.&lt;/p&gt;
4786&lt;p&gt;Nevertheless, this was extremely simple to setup and use and this is just
4787another excellent product in DigitalOcean product line. I found this exercise
4788very valuable and am thinking about implementing some sort of mechanism for
4789SQLite, so data can be stored on Spaces and accessed by many VM&#39;s. For a project
4790where data doesn&#39;t need to be accessible in real-time and can have couple of
4791minutes old data this would be very interesting. If any of you find this
4792proposal interesting please write in a comment box below or shoot me an email
4793and I will keep you posted.&lt;/p&gt;
4794</content:encoded>
4795 </item>
4796
4797
4798
4799 <item>
4800 <title>Simple IOT application supported by real-time monitoring and data history</title>
4801 <link>https://mitjafelicijan.com/simple-iot-application.html</link>
4802 <pubDate>Fri, 11 Aug 2017 12:00:00 &#43;0200</pubDate>
4803 <guid>https://mitjafelicijan.com/simple-iot-application.html</guid>
4804 <description>Initial thoughtsI have been developing these kind of application for the better part of my last5 years and people keep asking me how to approach developing such applicationand I will give a try explaining it here.</description>
4805 <content:encoded>&lt;h2 id=&#34;initial-thoughts&#34;&gt;Initial thoughts&lt;/h2&gt;
4806&lt;p&gt;I have been developing these kind of application for the better part of my last
48075 years and people keep asking me how to approach developing such application
4808and I will give a try explaining it here.&lt;/p&gt;
4809&lt;p&gt;IOT applications are really no different than any other kind of applications.
4810We have data that needs to be collected and visualized in some form of tables or
4811charts. The main difference here is that most of the times these data is
4812collected by some kind of device foreign to developer that mainly operates in
4813web domain. But fear not, it&#39;s not that different than writing some JavaScript.&lt;/p&gt;
4814&lt;p&gt;There are many devices able to transmit data via wireless or wired network by
4815default but for the sake of example we will be using commonly known Arduino with
4816wireless module already on the board → &lt;a href=&#34;https://store.arduino.cc/arduino-mkr1000&#34;&gt;Arduino
4817MKR1000&lt;/a&gt;.&lt;/p&gt;
4818&lt;p&gt;In order to make this little project as accessible to others as possible I will
4819try to make it as inexpensive as possible. And by this I mean that I will avoid
4820using hosted virtual servers and will be using my own laptop as a server. But
4821you must buy Arduino MKR1000 to follow steps below. But if you would want to
4822deploy this software I would suggest using
4823&lt;a href=&#34;https://www.digitalocean.com&#34;&gt;DigitalOcean&lt;/a&gt; → smallest VPS is only per month
4824making this one of the most affordable option out there. Please notice that this
4825software will not run on stock web hosting that only supports LAMP (Linux,
4826Apache, MySQL, and PHP).&lt;/p&gt;
4827&lt;p&gt;But before we begin please take notice that this is strictly experimental code
4828and not well optimized and there are much better ways in handling some aspects
4829of the application but that requires much deeper knowledge of technology that is
4830not needed for an example like this.&lt;/p&gt;
4831&lt;p&gt;&lt;strong&gt;Development steps&lt;/strong&gt;&lt;/p&gt;
4832&lt;ol&gt;
4833&lt;li&gt;Simple Python API that will receive and store incoming data.&lt;/li&gt;
4834&lt;li&gt;Prototype C&#43;&#43; code that will read &amp;quot;sensor data&amp;quot; and transmit it to API.&lt;/li&gt;
4835&lt;li&gt;Data visualization with charts → extends Python web application.&lt;/li&gt;
4836&lt;/ol&gt;
4837&lt;p&gt;Step 1. and 3. will share the same web application. One route will be dedicated
4838to API and another to serving HTML with chart.&lt;/p&gt;
4839&lt;p&gt;Schema below represents what we will try to achieve and how different parts
4840correlates to each other.&lt;/p&gt;
4841&lt;p&gt;&lt;img src=&#34;/assets/iot-application/simple-iot-application-overview.svg&#34; alt=&#34;Overview&#34; /&gt;&lt;/p&gt;
4842&lt;h2 id=&#34;simple-python-api&#34;&gt;Simple Python API&lt;/h2&gt;
4843&lt;p&gt;I have always been a fan of simplicity so we will be using &lt;a href=&#34;https://bottlepy.org/docs/dev/&#34;&gt;Bottle: Python Web
4844Framework&lt;/a&gt;. It is a single file web framework
4845that seriously simplifies working with routes, templating and has built-in web
4846server that satisfies our need in this case.&lt;/p&gt;
4847&lt;p&gt;First we need to install bottle package. This can be done by downloading
4848&lt;code&gt;bottle.py&lt;/code&gt; and placing it in the root of your application or by using pip
4849software &lt;code&gt;pip install bottle --user&lt;/code&gt;.&lt;/p&gt;
4850&lt;p&gt;If you are using Linux or MacOS then Python is already installed. If you will
4851try to test this on Windows please install &lt;a href=&#34;https://www.python.org/downloads/windows/&#34;&gt;Python for
4852Windows&lt;/a&gt;. There may be some problems
4853with path when you will try to launch &lt;code&gt;python webapp.py&lt;/code&gt; so please take care
4854of this before you continue.&lt;/p&gt;
4855&lt;h3 id=&#34;basic-web-application&#34;&gt;Basic web application&lt;/h3&gt;
4856&lt;p&gt;Most basic bottle application is quite simple. Paste code below in
4857&lt;code&gt;webapp.py&lt;/code&gt; file and save.&lt;/p&gt;
4858&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
4859&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4860&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; bottle
4861&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4862&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# initializing bottle app&lt;/span&gt;
4863&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app = bottle.Bottle()
4864&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4865&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# triggered when / is accessed from browser&lt;/span&gt;
4866&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# only accepts GET → no POST allowed&lt;/span&gt;
4867&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt;, method=[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt;])
4868&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; route_default():
4869&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;howdy from python&amp;#34;&lt;/span&gt;
4870&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4871&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# starting server on http://0.0.0.0:5000&lt;/span&gt;
4872&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; __name__ == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:
4873&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bottle.run(
4874&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app = app,
4875&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; host = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;0.0.0.0&amp;#34;&lt;/span&gt;,
4876&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; port = 5000,
4877&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; debug = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4878&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; reloader = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4879&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; catchall = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4880&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; )
4881&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To run this simple application you should open command prompt or terminal on
4882your machine and go to the folder containing your file and type &lt;code&gt;python webapp.py&lt;/code&gt;. If everything goes ok then open your web browser and point it to
4883&lt;code&gt;http://0.0.0.0:5000&lt;/code&gt;.&lt;/p&gt;
4884&lt;p&gt;If you would like change the port of your application (like port 80) and not use
4885root to run your app this will present a problem. The TCP/IP port numbers below
48861024 are privileged ports → this is a security feature. So in order of
4887simplicity and security use a port number above 1024 like I have used port 5000.&lt;/p&gt;
4888&lt;p&gt;If this fails at any time please fix it before you continue, because nothing
4889below will work otherwise.&lt;/p&gt;
4890&lt;p&gt;We use 0.0.0.0 as default host so that this app is available over your local
4891network. If you find your local ip &lt;code&gt;ifconfig&lt;/code&gt; and try accessing this site
4892with your phone (if on same network/router as your machine) this should work as
4893well (example of such ip &lt;code&gt;http://192.168.1.15:5000&lt;/code&gt;). This is a must have
4894because Arduino will be accessing this application to send it&#39;s data.&lt;/p&gt;
4895&lt;h3 id=&#34;web-application-security&#34;&gt;Web application security&lt;/h3&gt;
4896&lt;p&gt;There is a lot to be said about security and is a topic of many books. Of course
4897all this can not be written here but to just establish some basic security → you
4898should always use SSL with your application. Some fantastic free certificates
4899are available by &lt;a href=&#34;https://letsencrypt.org&#34;&gt;Let&#39;s Encrypt - Free SSL/TLS
4900Certificates&lt;/a&gt;. With SSL certificate installed you
4901should then make use of HTTP headers and send your &amp;quot;API key&amp;quot; via a header. If
4902your key is send via header then this key is encrypted by SSL and send encrypted
4903over the network. Never send your api keys by GET parameter like
4904&lt;code&gt;http://example.com/?api_key=somekeyvalue&lt;/code&gt;. The problem that this kind of
4905sending presents is that this key is visible in logs and by network sniffers.&lt;/p&gt;
4906&lt;p&gt;There is a fantastic article describing some aspects about security: &lt;a href=&#34;https://www.keycdn.com/blog/web-application-security-best-practices/&#34;&gt;11 Web
4907Application Security Best
4908Practices&lt;/a&gt;. Please
4909check it out.&lt;/p&gt;
4910&lt;h3 id=&#34;simple-api-for-writing-data-points&#34;&gt;Simple API for writing data-points&lt;/h3&gt;
4911&lt;p&gt;We will now be using boilerplate code from example above and extend it to be
4912SQLite3 because it plays well with Python and can store quite large amount of
4913able to write data received by API to local storage. For example use I will use
4914data. I have been using it to collect gigabytes of data in a single database
4915without any corruption or problems → your experience may vary.&lt;/p&gt;
4916&lt;p&gt;To avoid learning SQLite I will be using &lt;a href=&#34;https://dataset.readthedocs.io/en/latest/index.html&#34;&gt;Dataset: databases for lazy
4917people&lt;/a&gt;. This package
4918abstracts SQL and simplifies writing and reading data from database. You should
4919install this package with pip software &lt;code&gt;pip install dataset --user&lt;/code&gt;.&lt;/p&gt;
4920&lt;p&gt;Because API will use POST method I will be testing if code works correctly by
4921using &lt;a href=&#34;https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm&#34;&gt;Restlet Client for Google
4922Chrome&lt;/a&gt;.
4923This software also allows you to set headers → for basic security with API_KEY.&lt;/p&gt;
4924&lt;p&gt;To quickly generate passwords or API keys I usually use this nifty website
4925&lt;a href=&#34;https://randomkeygen.com/&#34;&gt;RandomKeygen&lt;/a&gt;.&lt;/p&gt;
4926&lt;p&gt;Copy and paste code below over your previous code in file &lt;code&gt;webapp.py&lt;/code&gt;.&lt;/p&gt;
4927&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
4928&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4929&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; time
4930&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; bottle
4931&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; random
4932&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; dataset
4933&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4934&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# initializing bottle app&lt;/span&gt;
4935&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app = bottle.Bottle()
4936&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4937&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# connects to sqlite database&lt;/span&gt;
4938&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# check_same_thread=False allows using it in multi-threaded mode&lt;/span&gt;
4939&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;dsn&amp;#34;&lt;/span&gt;] = dataset.connect(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sqlite:///data.db?check_same_thread=False&amp;#34;&lt;/span&gt;)
4940&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4941&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# api key that will be used in Arduino code&lt;/span&gt;
4942&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;api_key&amp;#34;&lt;/span&gt;] = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;JtF2aUE5SGHfVJBCG5SH&amp;#34;&lt;/span&gt;
4943&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4944&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# triggered when /api is accessed from browser&lt;/span&gt;
4945&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# only accepts POST → no GET allowed&lt;/span&gt;
4946&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/api&amp;#34;&lt;/span&gt;, method=[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;])
4947&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; route_default():
4948&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = 400
4949&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ts = int(time.time()) &lt;span style=&#34;color:#008000&#34;&gt;# current timestamp&lt;/span&gt;
4950&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; value = bottle.request.body.read() &lt;span style=&#34;color:#008000&#34;&gt;# data from device&lt;/span&gt;
4951&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; api_key = bottle.request.get_header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Api_Key&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#008000&#34;&gt;# api key from header&lt;/span&gt;
4952&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4953&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# outputs to console received data for debug reason&lt;/span&gt;
4954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; :: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;.format(value, api_key)
4955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4956&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# if api_key is correct and value is present&lt;/span&gt;
4957&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# then writes attribute to point table&lt;/span&gt;
4958&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; api_key == app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;api_key&amp;#34;&lt;/span&gt;] &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; value:
4959&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;dsn&amp;#34;&lt;/span&gt;][&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;point&amp;#34;&lt;/span&gt;].insert(dict(ts=ts, value=value))
4960&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = 200
4961&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4962&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# we only need to return status&lt;/span&gt;
4963&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; bottle.HTTPResponse(status=status, body=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;)
4964&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
4965&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# starting server on http://0.0.0.0:5000&lt;/span&gt;
4966&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; __name__ == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:
4967&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bottle.run(
4968&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app = app,
4969&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; host = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;0.0.0.0&amp;#34;&lt;/span&gt;,
4970&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; port = 5000,
4971&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; debug = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4972&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; reloader = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4973&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; catchall = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
4974&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; )
4975&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To run this simply go to folder containing python file and run &lt;code&gt;python webapp.py&lt;/code&gt; from terminal. If everything goes ok you should have simple API
4976available via POST method on /api route.&lt;/p&gt;
4977&lt;p&gt;After testing the service with Restlet Client you should be able to view your
4978data in a database file &lt;code&gt;data.db&lt;/code&gt;.&lt;/p&gt;
4979&lt;p&gt;&lt;img src=&#34;/assets/iot-application/iot-rest-example.png&#34; alt=&#34;REST settings example&#34; /&gt;&lt;/p&gt;
4980&lt;p&gt;You can also check the contents of new database file by using desktop client
4981for SQLite → &lt;a href=&#34;http://sqlitebrowser.org/&#34;&gt;DB Browser for SQLite&lt;/a&gt;.&lt;/p&gt;
4982&lt;p&gt;&lt;img src=&#34;/assets/iot-application/iot-sqlite-db.png&#34; alt=&#34;SQLite database example&#34; /&gt;&lt;/p&gt;
4983&lt;p&gt;Table structure is as simple as it can be. We have ts (timestamp) and value
4984(value from Arduino). As you can see timestamp is generated on API side. If you
4985would happen to have atomic clock on Arduino it would be then better to generate
4986and send timestamp with the value. This would be particularity useful if we
4987would be collecting sensor data at a higher frequency and then sending this data
4988in bulk to API.&lt;/p&gt;
4989&lt;p&gt;If you will deploy this app with uWSGI and multi-threaded, use DSN (Data Source
4990Name) url with &lt;code&gt;?check_same_thread=False&lt;/code&gt;.&lt;/p&gt;
4991&lt;p&gt;Ok, now that we have some sort of a working API with some basic security so
4992unwanted people can not post data to your database can we proceed further and
4993try to program Arduino to send data to API.&lt;/p&gt;
4994&lt;h2 id=&#34;sending-data-to-api-with-arduino-mkr1000&#34;&gt;Sending data to API with Arduino MKR1000&lt;/h2&gt;
4995&lt;p&gt;First of all you should have MKR1000 module and microUSB cable to proceed. If
4996you have ever done any work with Arduino you should know that you also need
4997&lt;a href=&#34;https://www.arduino.cc/en/Main/Software&#34;&gt;Arduino IDE&lt;/a&gt;. On provided link you
4998should be able to download and install IDE. Once that task is completed and you
4999have successfully run blink example you should proceed to the next step.&lt;/p&gt;
5000&lt;p&gt;In order to use wireless capabilities of MKR1000 you need to first install
5001&lt;a href=&#34;https://www.arduino.cc/en/Reference/WiFi101&#34;&gt;WiFi101 library&lt;/a&gt; in Arduino IDE.
5002Please check before you install, you may already have it installed.&lt;/p&gt;
5003&lt;p&gt;Code below is a working example that sends data to API. Before you try to test
5004your code make sure you have run Python web application. Then change settings
5005for wifi, api endpoint and api_key. If by some reason code bellow doesn&#39;t work
5006for you please leave a comment and I&#39;ll try to help.&lt;/p&gt;
5007&lt;p&gt;Once you have opened IDE and copied this code try to compile and upload it.
5008Then open &amp;quot;Serial monitor&amp;quot; to see if any output is presented by Arduino.&lt;/p&gt;
5009&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;WiFi101.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
5010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
5011&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// wifi settings
5012&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; ssid[] = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;ssid-name&amp;#34;&lt;/span&gt;;
5013&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; pass[] = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;ssid-password&amp;#34;&lt;/span&gt;;
5014&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5015&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// api server enpoint
5016&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;char&lt;/span&gt; server[] = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;192.168.6.22&amp;#34;&lt;/span&gt;;
5017&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;int&lt;/span&gt; port = 5000;
5018&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5019&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// api key that must be the same as the one in Python code
5020&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;String api_key = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;JtF2aUE5SGHfVJBCG5SH&amp;#34;&lt;/span&gt;;
5021&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5022&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// frequency data is sent in ms - every 5 seconds
5023&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;int&lt;/span&gt; timeout = 1000 * 5;
5024&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5025&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;int&lt;/span&gt; status = WL_IDLE_STATUS;
5026&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5027&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;void&lt;/span&gt; setup() {
5028&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5029&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// initialize serial and wait for port to open:
5030&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; Serial.begin(9600);
5031&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; delay(1000);
5032&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5033&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// check for the presence of the shield
5034&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (WiFi.status() == WL_NO_SHIELD) {
5035&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;WiFi shield not present&amp;#34;&lt;/span&gt;);
5036&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (true);
5037&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5038&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5039&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// attempt to connect to wifi network
5040&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; (status != WL_CONNECTED) {
5041&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Attempting to connect to SSID: &amp;#34;&lt;/span&gt;);
5042&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(ssid);
5043&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = WiFi.begin(ssid, pass);
5044&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// wait 10 seconds for connection
5045&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; delay(10000);
5046&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5047&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5048&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// output wifi status to serial monitor
5049&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; Serial.print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;SSID: &amp;#34;&lt;/span&gt;);
5050&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(WiFi.SSID());
5051&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5052&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; IPAddress ip = WiFi.localIP();
5053&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;IP Address: &amp;#34;&lt;/span&gt;);
5054&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(ip);
5055&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5056&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;long&lt;/span&gt; rssi = WiFi.RSSI();
5057&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;signal strength (RSSI):&amp;#34;&lt;/span&gt;);
5058&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.print(rssi);
5059&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34; dBm&amp;#34;&lt;/span&gt;);
5060&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5061&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5062&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;void&lt;/span&gt; loop() {
5063&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; WiFiClient client;
5064&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5065&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (client.connect(server, port)) {
5066&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5067&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// I use random number generator for this example
5068&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// but you can use analog or digital inputs from arduino
5069&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; String content = String(random(1000));
5070&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5071&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;POST /api HTTP/1.1&amp;#34;&lt;/span&gt;);
5072&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Connection: close&amp;#34;&lt;/span&gt;);
5073&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Api-Key: &amp;#34;&lt;/span&gt; &#43; api_key);
5074&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Content-Length: &amp;#34;&lt;/span&gt; &#43; String(content.length()));
5075&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println();
5076&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.println(content);
5077&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5078&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; delay(100);
5079&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; client.stop();
5080&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Data sent successfully ...&amp;#34;&lt;/span&gt;);
5081&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5082&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; } &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt; {
5083&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Serial.println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Problem sending data ...&amp;#34;&lt;/span&gt;);
5084&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5085&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5086&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// waits for x seconds and continue looping
5087&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; delay(timeout);
5088&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5089&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As seen from example you can notice that Arduino is generating random integer
5090between [ 0 .. 1000 ]. You can easily replace this with a temperature sensor or
5091any other kind of sensor.&lt;/p&gt;
5092&lt;p&gt;Now that we have API under the hood and Arduino is sending demo data we can now
5093focus on data visualization.&lt;/p&gt;
5094&lt;h2 id=&#34;data-visualization&#34;&gt;Data visualization&lt;/h2&gt;
5095&lt;p&gt;Before we continue we should examine our project folder structure. Currently we
5096only have two files in our project:&lt;/p&gt;
5097&lt;p&gt;&lt;em&gt;simple-iot-app/&lt;/em&gt;&lt;/p&gt;
5098&lt;ul&gt;
5099&lt;li&gt;&lt;em&gt;webapp.py&lt;/em&gt;&lt;/li&gt;
5100&lt;li&gt;&lt;em&gt;data.db&lt;/em&gt;&lt;/li&gt;
5101&lt;/ul&gt;
5102&lt;p&gt;We will now add HTML template that will contain CSS and JavaScript code inline
5103for the simplicity reason. And for the bottle framework to be able to scan root
5104application folder for templates we will add &lt;code&gt;bottle.TEMPLATE_PATH.insert(0, &amp;quot;./&amp;quot;)&lt;/code&gt; in &lt;code&gt;webapp.py&lt;/code&gt;. By default bottle framework uses &lt;code&gt;views/&lt;/code&gt;
5105subfolder to store templates. This is not the ideal situation and if you will
5106use bottle to develop web applications you should use native behavior and store
5107templates in it&#39;s predefined folder. But for the sake of example we will
5108over-ride this. Be careful to fully replace your code with new code that is
5109provided below. Avoid partially replacing code in file :) Also new code for
5110reading data-points is provided in Python example below.&lt;/p&gt;
5111&lt;p&gt;First we add new route to our web application. It should be trigger when browser
5112hits root of application &lt;code&gt;http://0.0.0.0:5000/&lt;/code&gt;. This route will do nothing
5113more than render &lt;code&gt;frontend.html&lt;/code&gt; template. This is done by &lt;code&gt;return bottle.template(&amp;quot;frontend.html&amp;quot;)&lt;/code&gt;. Check code below to further examine how
5114exactly this is done.&lt;/p&gt;
5115&lt;p&gt;Now we will expand &lt;code&gt;/api&lt;/code&gt; route and use different methods to write or read
5116data-points. For writing data-point we will use POST method and for reading
5117points we will use GET method. GET method will return JSON object with latest
5118readings and historical data.&lt;/p&gt;
5119&lt;p&gt;There is a fantastic JavaScript library for plotting time-series charts called
5120&lt;a href=&#34;https://www.metricsgraphicsjs.org&#34;&gt;MetricsGraphics.js&lt;/a&gt; that is based on
5121&lt;a href=&#34;https://d3js.org/&#34;&gt;D3.js&lt;/a&gt; library for visualizing data.&lt;/p&gt;
5122&lt;p&gt;Data schema required by MetricsGraphics.js → to achieve this we need to
5123transform data from database into this format:&lt;/p&gt;
5124&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[
5125&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
5126&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;date&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;2017-08-11 01:07:20&amp;#34;&lt;/span&gt;,
5127&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;value&amp;#34;: 933
5128&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
5129&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
5130&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;date&amp;#34;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;2017-08-11 01:07:30&amp;#34;&lt;/span&gt;,
5131&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;value&amp;#34;: 743
5132&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5133&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]
5134&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Web application is now complete and we only need &lt;code&gt;frontend.html&lt;/code&gt; that we
5135will develop now. If you would try to start web app now and go to root app this
5136will return error because we don&#39;t have frontend.html yet.&lt;/p&gt;
5137&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
5138&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5139&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; time
5140&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; bottle
5141&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; json
5142&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; datetime
5143&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; random
5144&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; dataset
5145&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5146&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# initializing bottle app&lt;/span&gt;
5147&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app = bottle.Bottle()
5148&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5149&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# adds root directory as template folder&lt;/span&gt;
5150&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bottle.TEMPLATE_PATH.insert(0, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;./&amp;#34;&lt;/span&gt;)
5151&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5152&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# connects to sqlite database&lt;/span&gt;
5153&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# check_same_thread=False allows using it in multi-threaded mode&lt;/span&gt;
5154&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;db&amp;#34;&lt;/span&gt;] = dataset.connect(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sqlite:///data.db?check_same_thread=False&amp;#34;&lt;/span&gt;)
5155&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5156&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# api key that will be used in Arduino code&lt;/span&gt;
5157&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;api_key&amp;#34;&lt;/span&gt;] = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;JtF2aUE5SGHfVJBCG5SH&amp;#34;&lt;/span&gt;
5158&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5159&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# triggered when / is accessed from browser&lt;/span&gt;
5160&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# only accepts GET → no POST allowed&lt;/span&gt;
5161&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt;, method=[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt;])
5162&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; route_default():
5163&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; bottle.template(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;frontend.html&amp;#34;&lt;/span&gt;)
5164&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5165&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# triggered when /api is accessed from browser&lt;/span&gt;
5166&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# accepts POST and GET&lt;/span&gt;
5167&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/api&amp;#34;&lt;/span&gt;, method=[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;])
5168&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; route_default():
5169&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5170&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# if method is POST then we write datapoint&lt;/span&gt;
5171&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; bottle.request.method == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;:
5172&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = 400
5173&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ts = int(time.time()) &lt;span style=&#34;color:#008000&#34;&gt;# current timestamp&lt;/span&gt;
5174&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; value = bottle.request.body.read() &lt;span style=&#34;color:#008000&#34;&gt;# data from device&lt;/span&gt;
5175&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; api_key = bottle.request.get_header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Api-Key&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#008000&#34;&gt;# api key from header&lt;/span&gt;
5176&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5177&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# outputs to console recieved data for debug reason&lt;/span&gt;
5178&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; :: &lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;{}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;.format(value, api_key)
5179&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5180&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# if api_key is correct and value is present&lt;/span&gt;
5181&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# then writes attribute to point table&lt;/span&gt;
5182&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; api_key == app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;api_key&amp;#34;&lt;/span&gt;] &lt;span style=&#34;color:#00f&#34;&gt;and&lt;/span&gt; value:
5183&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;db&amp;#34;&lt;/span&gt;][&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;point&amp;#34;&lt;/span&gt;].insert(dict(ts=ts, value=value))
5184&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; status = 200
5185&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5186&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# we only need to return status&lt;/span&gt;
5187&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; bottle.HTTPResponse(status=status, body=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;)
5188&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5189&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# if method is GET then we read datapoint&lt;/span&gt;
5190&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt;:
5191&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; response = []
5192&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; datapoints = app.config[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;db&amp;#34;&lt;/span&gt;][&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;point&amp;#34;&lt;/span&gt;].all()
5193&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5194&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; point &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; datapoints:
5195&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; response.append({
5196&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;date&amp;#34;&lt;/span&gt;: datetime.datetime.fromtimestamp(int(point[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;ts&amp;#34;&lt;/span&gt;])).strftime(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;%Y-%m-&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;%d&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; %H:%M:%S&amp;#34;&lt;/span&gt;),
5197&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;value&amp;#34;&lt;/span&gt;: point[&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;value&amp;#34;&lt;/span&gt;]
5198&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; })
5199&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5200&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bottle.response.content_type = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;application/json&amp;#34;&lt;/span&gt;
5201&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; json.dumps(response)
5202&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5203&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# starting server on http://0.0.0.0:5000&lt;/span&gt;
5204&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; __name__ == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:
5205&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bottle.run(
5206&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app = app,
5207&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; host = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;0.0.0.0&amp;#34;&lt;/span&gt;,
5208&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; port = 5000,
5209&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; debug = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
5210&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; reloader = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
5211&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; catchall = &lt;span style=&#34;color:#00f&#34;&gt;True&lt;/span&gt;,
5212&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; )
5213&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And now finally we can implement &lt;code&gt;frontend.html&lt;/code&gt;. Create file with this name
5214and copy code below. When you are done you can start web application. Steps for
5215this part are listed below the code.&lt;/p&gt;
5216&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
5217&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html&amp;gt;
5218&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5219&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;head&amp;gt;
5220&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta charset=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;&amp;gt;
5221&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;title&amp;gt;Simple IOT application&amp;lt;/title&amp;gt;
5222&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/head&amp;gt;
5223&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5224&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;body&amp;gt;
5225&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5226&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;h1&amp;gt;Simple IOT application&amp;lt;/h1&amp;gt;
5227&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5228&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;div class=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;chart-placeholder&amp;#34;&lt;/span&gt;&amp;gt;
5229&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;div id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;chart&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;
5230&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/div&amp;gt;
5231&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5232&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;&amp;lt;!-- application main script --&amp;gt;&lt;/span&gt;
5233&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script src=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
5234&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script src=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.0/d3.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
5235&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script src=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.11.0/metricsgraphics.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
5236&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script&amp;gt;
5237&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; fetch_and_render() {
5238&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; d3.json(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/api&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt;(data) {
5239&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; data = MG.convert.date(data, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;date&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;%Y-%m-%d %H:%M:%S&amp;#34;&lt;/span&gt;);
5240&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; MG.data_graphic({
5241&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; data: data,
5242&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; chart_type: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;line&amp;#34;&lt;/span&gt;,
5243&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; full_width: &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt;,
5244&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; height: 270,
5245&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; target: document.getElementById(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;chart&amp;#34;&lt;/span&gt;),
5246&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; x_accessor: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;date&amp;#34;&lt;/span&gt;,
5247&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; y_accessor: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;value&amp;#34;&lt;/span&gt;
5248&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
5249&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
5250&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5251&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; window.onload = &lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt;() {
5252&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// initial call for rendering
5253&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; fetch_and_render();
5254&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5255&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// updates chart every 5 seconds
5256&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; setInterval(&lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt;() {
5257&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fetch_and_render();
5258&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }, 5000);
5259&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5260&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/script&amp;gt;
5261&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5262&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;&amp;lt;!-- application styles --&amp;gt;&lt;/span&gt;
5263&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;style&amp;gt;
5264&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body {
5265&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font&lt;/span&gt;: 13&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;sans-serif&lt;/span&gt;;
5266&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 20&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt; 50&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt;;
5267&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5268&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;chart-placeholder&lt;/span&gt; {
5269&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;border&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;solid&lt;/span&gt; #ccc;
5270&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;width&lt;/span&gt;: 100&lt;span style=&#34;color:#2b91af&#34;&gt;%&lt;/span&gt;;
5271&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;user-select&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;none&lt;/span&gt;;
5272&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5273&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;/* chart styles */&lt;/span&gt;
5274&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;mg-line1-color&lt;/span&gt; {
5275&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; stroke: &lt;span style=&#34;color:#00f&#34;&gt;red&lt;/span&gt;;
5276&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; stroke-width: 2;
5277&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5278&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;mg-main-area&lt;/span&gt;, .&lt;span style=&#34;color:#2b91af&#34;&gt;mg-main-line&lt;/span&gt; {
5279&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fill: #fff;
5280&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5281&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;mg-x-axis&lt;/span&gt; line, .&lt;span style=&#34;color:#2b91af&#34;&gt;mg-y-axis&lt;/span&gt; line {
5282&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; stroke: #b3b2b2;
5283&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; stroke-width: 1&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt;;
5284&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5285&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/style&amp;gt;
5286&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5287&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/body&amp;gt;
5288&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5289&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;
5290&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now the folder structure should look like:&lt;/p&gt;
5291&lt;p&gt;&lt;em&gt;simple-iot-app/&lt;/em&gt;&lt;/p&gt;
5292&lt;ul&gt;
5293&lt;li&gt;&lt;em&gt;webapp.py&lt;/em&gt;&lt;/li&gt;
5294&lt;li&gt;&lt;em&gt;data.db&lt;/em&gt;&lt;/li&gt;
5295&lt;li&gt;&lt;em&gt;frontend.html&lt;/em&gt;&lt;/li&gt;
5296&lt;/ul&gt;
5297&lt;p&gt;Ok, lets now start application and start feeding it data.&lt;/p&gt;
5298&lt;ol&gt;
5299&lt;li&gt;&lt;code&gt;python webapp.py&lt;/code&gt;&lt;/li&gt;
5300&lt;li&gt;connect Arduino MKR1000 to power source&lt;/li&gt;
5301&lt;li&gt;open browser and go to &lt;code&gt;http://0.0.0.0:5000&lt;/code&gt;&lt;/li&gt;
5302&lt;/ol&gt;
5303&lt;p&gt;If everything goes well you should be seeing new data-points rendered on chart
5304every 5 seconds.&lt;/p&gt;
5305&lt;p&gt;If you navigate to &lt;code&gt;http://0.0.0.0:5000&lt;/code&gt; you should see rendered chart as
5306shown on picture below.&lt;/p&gt;
5307&lt;p&gt;&lt;img src=&#34;/assets/iot-application/iot-app-output.png&#34; alt=&#34;Application output&#34; /&gt;&lt;/p&gt;
5308&lt;p&gt;Complete application with all the code is available for
5309&lt;a href=&#34;/assets/iot-application/simple-iot-application.zip&#34;&gt;download&lt;/a&gt;.&lt;/p&gt;
5310&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
5311&lt;p&gt;I hope this clarifies some aspects of IOT application development. Of course
5312this is a minimal example and is far from what can be done in real life with
5313some further dive into other technologies.&lt;/p&gt;
5314&lt;p&gt;If you would like to continue exploring IOT world here are some interesting
5315resources for you to examine:&lt;/p&gt;
5316&lt;ul&gt;
5317&lt;li&gt;&lt;a href=&#34;https://www.allaboutcircuits.com/projects/reading-sensors-with-an-arduino/&#34;&gt;Reading Sensors with an Arduino&lt;/a&gt;&lt;/li&gt;
5318&lt;li&gt;&lt;a href=&#34;http://www.hivemq.com/blog/how-to-get-started-with-mqtt&#34;&gt;MQTT 101 – How to Get Started with the lightweight IoT Protocol&lt;/a&gt;&lt;/li&gt;
5319&lt;li&gt;&lt;a href=&#34;https://www.html5rocks.com/en/tutorials/eventsource/basics/&#34;&gt;Stream Updates with Server-Sent Events&lt;/a&gt;&lt;/li&gt;
5320&lt;li&gt;&lt;a href=&#34;http://www.tutorialspoint.com/internet_of_things/&#34;&gt;Internet of Things (IoT) Tutorials&lt;/a&gt;&lt;/li&gt;
5321&lt;/ul&gt;
5322&lt;p&gt;Any comment or additional ideas are welcomed in comments below.&lt;/p&gt;
5323</content:encoded>
5324 </item>
5325
5326
5327
5328 <item>
5329 <title>Profiling Python web applications with visual tools</title>
5330 <link>https://mitjafelicijan.com/profiling-python-web-applications-with-visual-tools.html</link>
5331 <pubDate>Fri, 21 Apr 2017 12:00:00 &#43;0200</pubDate>
5332 <guid>https://mitjafelicijan.com/profiling-python-web-applications-with-visual-tools.html</guid>
5333 <description>I have been profiling my software with KCachegrind for a long time now and I wasmissing this option when I am developing API&amp;#39;s or other web services.</description>
5334 <content:encoded>&lt;p&gt;I have been profiling my software with KCachegrind for a long time now and I was
5335missing this option when I am developing API&#39;s or other web services. I always
5336knew that this is possible but never really took the time and dive into it.&lt;/p&gt;
5337&lt;p&gt;Before we begin there are some requirements. We will need to:&lt;/p&gt;
5338&lt;ul&gt;
5339&lt;li&gt;implement &lt;a href=&#34;https://docs.python.org/2/library/profile.html#module-cProfile&#34;&gt;cProfile&lt;/a&gt; into our web app,&lt;/li&gt;
5340&lt;li&gt;convert output to &lt;a href=&#34;http://valgrind.org/docs/manual/cl-manual.html&#34;&gt;callgrind&lt;/a&gt; format with &lt;a href=&#34;https://pypi.python.org/pypi/pyprof2calltree/&#34;&gt;pyprof2calltree&lt;/a&gt;,&lt;/li&gt;
5341&lt;li&gt;visualize data with &lt;a href=&#34;http://kcachegrind.sourceforge.net/html/Home.html&#34;&gt;KCachegrind&lt;/a&gt; or &lt;a href=&#34;http://www.profilingviewer.com/&#34;&gt;Profiling Viewer&lt;/a&gt;.&lt;/li&gt;
5342&lt;/ul&gt;
5343&lt;p&gt;If you are using MacOS you should check out &lt;a href=&#34;http://www.profilingviewer.com/&#34;&gt;Profiling
5344Viewer&lt;/a&gt; or
5345&lt;a href=&#34;http://www.maccallgrind.com/&#34;&gt;MacCallGrind&lt;/a&gt;.&lt;/p&gt;
5346&lt;p&gt;&lt;img src=&#34;/assets/python-profiling/kcachegrind.png&#34; alt=&#34;KCachegrind&#34; /&gt;&lt;/p&gt;
5347&lt;p&gt;We will be dividing this post into two main categories:&lt;/p&gt;
5348&lt;ul&gt;
5349&lt;li&gt;writing simple web-service,&lt;/li&gt;
5350&lt;li&gt;visualize profile of this web-service.&lt;/li&gt;
5351&lt;/ul&gt;
5352&lt;h2 id=&#34;simple-web-service&#34;&gt;Simple web-service&lt;/h2&gt;
5353&lt;p&gt;Let&#39;s use virtualenv so we won&#39;t pollute our base system. If you don&#39;t have
5354virtualenv installed on your system you can install it with pip command.&lt;/p&gt;
5355&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# let&amp;#39;s install virtualenv globally&lt;/span&gt;
5356&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo pip install virtualenv
5357&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5358&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# let&amp;#39;s also install pyprof2calltree globally&lt;/span&gt;
5359&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo pip install pyprof2calltree
5360&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5361&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we create project&lt;/span&gt;
5362&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mkdir demo-project
5363&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd demo-project/
5364&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5365&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now let&amp;#39;s create folder where we will store profiles&lt;/span&gt;
5366&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mkdir prof
5367&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5368&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we create empty virtualenv in venv/ folder&lt;/span&gt;
5369&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ virtualenv --no-site-packages venv
5370&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5371&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we now need to activate virtualenv&lt;/span&gt;
5372&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ source venv/bin/activate
5373&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5374&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# you can check if virtualenv was correctly initialized by&lt;/span&gt;
5375&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# checking where your python interpreter is located&lt;/span&gt;
5376&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# if command bellow points to your created directory and not some&lt;/span&gt;
5377&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# system dir like /usr/bin/python then everything is fine&lt;/span&gt;
5378&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ which python
5379&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5380&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we can check now if all is good ➜ if ok couple of&lt;/span&gt;
5381&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# lines will be displayed&lt;/span&gt;
5382&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pip freeze
5383&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# appdirs==1.4.3&lt;/span&gt;
5384&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# packaging==16.8&lt;/span&gt;
5385&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# pyparsing==2.2.0&lt;/span&gt;
5386&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# six==1.10.0&lt;/span&gt;
5387&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5388&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we are ready to install bottlepy ➜ web micro-framework&lt;/span&gt;
5389&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pip install bottle
5390&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5391&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# you can deactivate virtualenv but you will then go&lt;/span&gt;
5392&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# under system domain ➜ for now don&amp;#39;t deactivate&lt;/span&gt;
5393&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ deactivate
5394&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We are now ready to write simple web service. Let&#39;s create file app.py and paste
5395code bellow in this newly created file.&lt;/p&gt;
5396&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
5397&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5398&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; bottle
5399&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; random
5400&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; cProfile
5401&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5402&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;app = bottle.Bottle()
5403&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5404&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this function is a decorator and encapsulates function&lt;/span&gt;
5405&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# and performs profiling and then saves it to subfolder&lt;/span&gt;
5406&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# prof/function-name.prof&lt;/span&gt;
5407&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# in our example only awesome_random_number function will&lt;/span&gt;
5408&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# be profiled because it has do_cprofile defined&lt;/span&gt;
5409&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; do_cprofile(func):
5410&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; profiled_func(*args, **kwargs):
5411&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; profile = cProfile.Profile()
5412&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;try&lt;/span&gt;:
5413&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; profile.enable()
5414&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; result = func(*args, **kwargs)
5415&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; profile.disable()
5416&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; result
5417&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;finally&lt;/span&gt;:
5418&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; profile.dump_stats(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;prof/&amp;#34;&lt;/span&gt; &#43; str(func.__name__) &#43; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;.prof&amp;#34;&lt;/span&gt;)
5419&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; profiled_func
5420&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5421&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5422&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we use profiling over specific function with including&lt;/span&gt;
5423&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# @do_cprofile above function declaration&lt;/span&gt;
5424&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt;)
5425&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@do_cprofile
5426&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; awesome_random_number():
5427&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; awesome_random_number = random.randint(0, 100)
5428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;awesome random number is &amp;#34;&lt;/span&gt; &#43; str(awesome_random_number)
5429&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5430&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@app.route(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/test&amp;#34;&lt;/span&gt;)
5431&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;def&lt;/span&gt; test():
5432&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;dummy test&amp;#34;&lt;/span&gt;
5433&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5434&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; __name__ == &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;:
5435&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bottle.run(
5436&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; app = app,
5437&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; host = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;0.0.0.0&amp;#34;&lt;/span&gt;,
5438&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; port = 4000
5439&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; )
5440&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5441&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# run with &amp;#39;python app.py&amp;#39;&lt;/span&gt;
5442&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# open browser &amp;#39;http://0.0.0.0:4000&amp;#39;&lt;/span&gt;
5443&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When browser hits awesome_random_number() function profile is created in prof/
5444subfolder.&lt;/p&gt;
5445&lt;h2 id=&#34;visualize-profile&#34;&gt;Visualize profile&lt;/h2&gt;
5446&lt;p&gt;Now let&#39;s create callgrind format from this cProfile output.&lt;/p&gt;
5447&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd prof/
5448&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pyprof2calltree -i awesome_random_number.prof
5449&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this creates &amp;#39;awesome_random_number.prof.log&amp;#39; file in the same folder&lt;/span&gt;
5450&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This file can be opened with visualizing tools listed above. In this case we
5451will be using Profilling Viewer under MacOS. You can open image in new tab. As
5452you can see from this example there is hierarchy of execution order of your
5453code.&lt;/p&gt;
5454&lt;p&gt;&lt;img src=&#34;/assets/python-profiling/profiling-viewer.png&#34; alt=&#34;Profilling Viewer&#34; /&gt;&lt;/p&gt;
5455&lt;blockquote&gt;
5456&lt;p&gt;Make sure you convert output of the cProfile output every time you want to
5457refresh and take a look at your possible optimizations because cProfile updates
5458.prof file every time browser hits the function.&lt;/p&gt;
5459&lt;/blockquote&gt;
5460&lt;p&gt;This is just a simple example but when you are developing real-life applications
5461this can be very illuminating, especially to see which parts of your code are
5462bottlenecks and need to be optimized.&lt;/p&gt;
5463&lt;h2 id=&#34;update-2017-04-22&#34;&gt;Update 2017-04-22&lt;/h2&gt;
5464&lt;p&gt;Reddit user &lt;a href=&#34;https://www.reddit.com/user/mvt&#34;&gt;mvt&lt;/a&gt; also recommended this awesome
5465web based profile visualizer &lt;a href=&#34;https://jiffyclub.github.io/snakeviz/&#34;&gt;SnakeViz&lt;/a&gt;
5466that directly takes output from
5467&lt;a href=&#34;https://docs.python.org/2/library/profile.html#module-cProfile&#34;&gt;cProfile&lt;/a&gt;
5468module.&lt;/p&gt;
5469&lt;div class=&#34;reddit-embed&#34; data-embed-media=&#34;www.redditmedia.com&#34; data-embed-parent=&#34;false&#34; data-embed-live=&#34;false&#34; data-embed-uuid=&#34;583880c1-002e-41ed-a373-020a0ef2cff9&#34; data-embed-created=&#34;2017-04-22T19:46:54.810Z&#34;&gt;&lt;a href=&#34;https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dgljhsb/&#34;&gt;Comment&lt;/a&gt; from discussion &lt;a href=&#34;https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/&#34;&gt;Profiling Python web applications with visual tools&lt;/a&gt;.&lt;/div&gt;&lt;script async src=&#34;https://www.redditstatic.com/comment-embed.js&#34;&gt;&lt;/script&gt;
5470&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# let&amp;#39;s install it globally as well&lt;/span&gt;
5471&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo pip install snakeviz
5472&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5473&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now let&amp;#39;s visualize&lt;/span&gt;
5474&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd prof/
5475&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ snakeviz awesome_random_number.prof
5476&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# this automatically opens browser window and&lt;/span&gt;
5477&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# shows visualized profile&lt;/span&gt;
5478&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;/assets/python-profiling/snakeviz.png&#34; alt=&#34;SnakeViz&#34; /&gt;&lt;/p&gt;
5479&lt;p&gt;Reddit user &lt;a href=&#34;https://www.reddit.com/user/ccharles&#34;&gt;ccharles&lt;/a&gt; suggested a better
5480way for installing pip software by targeting user level instead of using sudo.&lt;/p&gt;
5481&lt;div class=&#34;reddit-embed&#34; data-embed-media=&#34;www.redditmedia.com&#34; data-embed-parent=&#34;false&#34; data-embed-live=&#34;false&#34; data-embed-uuid=&#34;f4f0459e-684d-441e-bebe-eb49b2f0a31d&#34; data-embed-created=&#34;2017-04-22T19:46:10.874Z&#34;&gt;&lt;a href=&#34;https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dglpzkx/&#34;&gt;Comment&lt;/a&gt; from discussion &lt;a href=&#34;https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/&#34;&gt;Profiling Python web applications with visual tools&lt;/a&gt;.&lt;/div&gt;&lt;script async src=&#34;https://www.redditstatic.com/comment-embed.js&#34;&gt;&lt;/script&gt;
5482&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we need to add this path to our $PATH variable&lt;/span&gt;
5483&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# we do this my adding this line at the end of your&lt;/span&gt;
5484&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# ~/.bashrc file&lt;/span&gt;
5485&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PATH=$PATH:$HOME/.local/bin/
5486&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5487&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# in order to use this new configuration you can close&lt;/span&gt;
5488&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# and reopen terminal or reload .bashrc file&lt;/span&gt;
5489&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ source ~/.bashrc
5490&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5491&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now let&amp;#39;s test if new directory is present in $PATH&lt;/span&gt;
5492&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ echo $PATH
5493&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5494&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# now we can install on user level by adding --user&lt;/span&gt;
5495&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# without use of sudo&lt;/span&gt;
5496&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pip install snakeviz --user
5497&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or as suggested by &lt;a href=&#34;https://www.reddit.com/user/mvt&#34;&gt;mvt&lt;/a&gt; you can
5498use &lt;a href=&#34;https://github.com/mitsuhiko/pipsi&#34;&gt;pipsi&lt;/a&gt;.&lt;/p&gt;
5499</content:encoded>
5500 </item>
5501
5502
5503
5504 <item>
5505 <title>What I&#39;ve learned developing ad server</title>
5506 <link>https://mitjafelicijan.com/what-i-ve-learned-developing-ad-server.html</link>
5507 <pubDate>Mon, 17 Apr 2017 12:00:00 &#43;0200</pubDate>
5508 <guid>https://mitjafelicijan.com/what-i-ve-learned-developing-ad-server.html</guid>
5509 <description>For the past year and half I have been developing native advertising server thatcontextually matches ads and displays them in different template forms onvariety of websites.</description>
5510 <content:encoded>&lt;p&gt;For the past year and half I have been developing native advertising server that
5511contextually matches ads and displays them in different template forms on
5512variety of websites. This project grew from serving thousands of ads per day to
5513millions.&lt;/p&gt;
5514&lt;p&gt;The system is made from couple of core components:&lt;/p&gt;
5515&lt;ul&gt;
5516&lt;li&gt;API for serving ads,&lt;/li&gt;
5517&lt;li&gt;Utils - cronjobs and queue management tools,&lt;/li&gt;
5518&lt;li&gt;Dashboard UI.&lt;/li&gt;
5519&lt;/ul&gt;
5520&lt;p&gt;Initial release was using &lt;a href=&#34;https://www.mongodb.com/&#34;&gt;MongoDB&lt;/a&gt; for full-text
5521search but was later replaced by &lt;a href=&#34;https://www.elastic.co/&#34;&gt;Elasticsearch&lt;/a&gt; for
5522better CPU utilization and better search performance. This provided us with many
5523amazing functionalities of &lt;a href=&#34;https://www.elastic.co/&#34;&gt;Elasticsearch&lt;/a&gt;. You should
5524check it out if you do any search related operations.&lt;/p&gt;
5525&lt;p&gt;Because the premise of the server is to provide native ad experience, they are
5526rendered on the client side via simple templating engine. This ensures that ads
5527can be displayed number of different ways based on the visual style of the
5528page. And this makes JavaScript client library quite complex.&lt;/p&gt;
5529&lt;p&gt;So now that you know basic information about the product lets get into the
5530lessons we learned.&lt;/p&gt;
5531&lt;h2 id=&#34;aggregate-everything&#34;&gt;Aggregate everything&lt;/h2&gt;
5532&lt;p&gt;After beta version was released everything (impressions, clicks, etc) was
5533written in nanosecond resolution in the database. At that time we were using
5534&lt;a href=&#34;https://www.postgresql.org/&#34;&gt;PostgreSQL&lt;/a&gt; and database quickly grew way above
5535200GB in disk space. And that was problematic. Statistics took disturbingly long
5536time to aggregate. Also using indexes on stats table in database was no help
5537after we reached 500 million datapoints.&lt;/p&gt;
5538&lt;blockquote&gt;
5539&lt;p&gt;There is a marketing product information and there is real life experience.
5540And the tend to be quite the opposite.&lt;/p&gt;
5541&lt;/blockquote&gt;
5542&lt;p&gt;This was the reason that now everything is aggregated on daily basis and this
5543data is then fed to Elastic in form of daily summary. With this we achieved we
5544can now track many more dimensions such as zone, channel and platform
5545information. And with this information we can now adapt occurrences of ads on
5546specific places more precisely.&lt;/p&gt;
5547&lt;p&gt;We have also adapted &lt;a href=&#34;https://redis.io/&#34;&gt;Redis&lt;/a&gt; as a full-time citizen in our
5548stack. Because Redis also stores information on a local disk we have some sort
5549of backup if server would accidentally suffer some failure.&lt;/p&gt;
5550&lt;p&gt;All the real-time statistics for ad serving and redirecting is presented as
5551counters in Redis instance and daily extracted and pushed to Elastic.&lt;/p&gt;
5552&lt;h2 id=&#34;measure-everything&#34;&gt;Measure everything&lt;/h2&gt;
5553&lt;p&gt;The thing about software is that we really don&#39;t know how well it is performing
5554under load until such load is presented. When testing locally everything is fine
5555but when on production things tend to fall apart.&lt;/p&gt;
5556&lt;p&gt;As a solution for this we are measuring everything we can. Function execution
5557time (by encapsulating functions with timers), server performance (cpu, memory,
5558disk, etc), Nginx and &lt;a href=&#34;https://uwsgi-docs.readthedocs.io/&#34;&gt;uWSGI&lt;/a&gt; performance.
5559We sacrifice a bit of performance for the sake of this information. And we store
5560all this information for later analysis.&lt;/p&gt;
5561&lt;p&gt;&lt;strong&gt;Example of function execution time&lt;/strong&gt;&lt;/p&gt;
5562&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
5563&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;get_final_filtered_ads&amp;#34;: {
5564&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;counter&amp;#34;: 1931250,
5565&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;avg&amp;#34;: 0.0066143431,
5566&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;elapsed&amp;#34;: 12773.9500310003
5567&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
5568&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;store_keywords_statistics&amp;#34;: {
5569&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;counter&amp;#34;: 1931011,
5570&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;avg&amp;#34;: 0.0004605267,
5571&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;elapsed&amp;#34;: 889.2821669996
5572&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
5573&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;match_by_context&amp;#34;: {
5574&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;counter&amp;#34;: 1931011,
5575&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;avg&amp;#34;: 0.0055960716,
5576&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;elapsed&amp;#34;: 10806.0758889999
5577&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
5578&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;match_by_high_performance&amp;#34;: {
5579&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;counter&amp;#34;: 262,
5580&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;avg&amp;#34;: 0.0152770229,
5581&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;elapsed&amp;#34;: 4.00258
5582&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
5583&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;store_impression_stats&amp;#34;: {
5584&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;counter&amp;#34;: 1931250,
5585&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;avg&amp;#34;: 0.0006189991,
5586&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#34;elapsed&amp;#34;: 1195.4419869999
5587&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5588&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5589&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We have also started profiling with &lt;a href=&#34;https://pymotw.com/2/profile/&#34;&gt;cProfile&lt;/a&gt;
5590and then visualizing with &lt;a href=&#34;http://kcachegrind.sourceforge.net/&#34;&gt;KCachegrind&lt;/a&gt;.
5591This provides much more detailed look into code execution.&lt;/p&gt;
5592&lt;h2 id=&#34;cache-control-is-your-friend&#34;&gt;Cache control is your friend&lt;/h2&gt;
5593&lt;p&gt;Because we use Javascript library for rendering ads we rely on this script
5594extensively and when in need we need to be able to change behavior of the script
5595quickly.&lt;/p&gt;
5596&lt;p&gt;In our case we can not simply replace javascript url in html code. It usually
5597takes a day or two for the guys who maintain sites to change code or add
5598?ver=xxx attribute. And this makes rapid deployment and testing very difficult
5599and time consuming. There is a limitation of how much you can test locally.&lt;/p&gt;
5600&lt;p&gt;We are now in the process of integrating &lt;a href=&#34;https://www.google.com/analytics/tag-manager/&#34;&gt;Google Tag
5601Manager&lt;/a&gt; but couple of websites
5602are developed on ASP.net platform that have some problems with tag manager. With
5603a solution below we are certain that we are serving latest version of the
5604script.&lt;/p&gt;
5605&lt;p&gt;And it only takes one mistake and users have the script cached and in case of
5606caching it for 1 year you probably know where the problem is.&lt;/p&gt;
5607&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# nginx ➜ /etc/nginx/sites-available/default
5608&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;location&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/static/&lt;/span&gt; {
5609&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;alias&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;/path-to-static-content/&lt;/span&gt;;
5610&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;autoindex&lt;/span&gt; off;
5611&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;charset&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;utf-8&lt;/span&gt;;
5612&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;gzip&lt;/span&gt; on;
5613&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;gzip_types&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;text/plain&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;application/javascript&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;application/x-javascript&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;text/javascript&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;text/xml&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;text/css&lt;/span&gt;;
5614&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;location&lt;/span&gt; ~&lt;span style=&#34;color:#a31515&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;\.(ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)&lt;/span&gt;$ {
5615&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;expires&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;1y&lt;/span&gt;;
5616&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;add_header&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;Pragma&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;public&lt;/span&gt;;
5617&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;add_header&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;Cache-Control&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;public&amp;#34;&lt;/span&gt;;
5618&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5619&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;location&lt;/span&gt; ~&lt;span style=&#34;color:#a31515&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;\.(css|js|txt)&lt;/span&gt;$ {
5620&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;expires&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;3600s&lt;/span&gt;;
5621&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;add_header&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;Pragma&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;public&lt;/span&gt;;
5622&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;add_header&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;Cache-Control&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;public,&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;must-revalidate&amp;#34;&lt;/span&gt;;
5623&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5624&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5625&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also be careful when redirecting to url in your python code. We noticed that if
5626we didn&#39;t precisely setup cache control and expire headers in response we didn&#39;t
5627get the request on the server and therefore couldn&#39;t measure clicks. So when
5628redirecting do as follows and there will be no problems.&lt;/p&gt;
5629&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# python ➜ bottlepy web micro-framework&lt;/span&gt;
5630&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;response = bottle.HTTPResponse(status=302)
5631&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;response.set_header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Cache-Control&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;no-store, no-cache, must-revalidate&amp;#34;&lt;/span&gt;)
5632&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;response.set_header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Expires&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Thu, 01 Jan 1970 00:00:00 GMT&amp;#34;&lt;/span&gt;)
5633&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;response.set_header(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Location&amp;#34;&lt;/span&gt;, url)
5634&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; response
5635&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
5636&lt;p&gt;Cache control in browsers is quite aggressive and you need to be precise to
5637avoid future problems. We learned that lesson the hard way.&lt;/p&gt;
5638&lt;/blockquote&gt;
5639&lt;h2 id=&#34;learn-nginx&#34;&gt;Learn NGINX&lt;/h2&gt;
5640&lt;p&gt;When deciding on a web server we went with Nginx as a reverse proxy for our
5641applications. We adapted micro-service oriented architecture early in the
5642project to ensure when we scale we can easily add additional servers to our
5643cluster. And Nginx was crucial to perform load balancing and static content
5644delivery.&lt;/p&gt;
5645&lt;p&gt;At first our config file was quite simple and later grew larger. After patching
5646and adding new settings I sat down and learned more about the guts of Nginx.
5647This proved to be very useful and we were able to squeeze much more out of our
5648setup. So I advise you to take your time and read through the
5649&lt;a href=&#34;https://nginx.org/en/docs/&#34;&gt;documentation&lt;/a&gt;. This saved us a lot of headache.
5650Googling for solutions only goes so far.&lt;/p&gt;
5651&lt;h2 id=&#34;use-redismemcached&#34;&gt;Use Redis/Memcached&lt;/h2&gt;
5652&lt;p&gt;As explained above we are using caching basically for everything. It is the
5653corner stone of our services. At first we were very careful about the quantity
5654of things we stored in &lt;a href=&#34;https://redis.io/&#34;&gt;Redis&lt;/a&gt;. But we later found out that
5655the memory footprint is very low even when storing large amount of data in it.&lt;/p&gt;
5656&lt;p&gt;So we gradually increased our usage to caching whole HTML outputs of dashboard.
5657This improved our performance in order of magnitude. And by using native TTL
5658support this goes hand in hand with our needs.&lt;/p&gt;
5659&lt;p&gt;The reason why we choose &lt;a href=&#34;https://redis.io/&#34;&gt;Redis&lt;/a&gt; over
5660&lt;a href=&#34;https://memcached.org/&#34;&gt;Memcached&lt;/a&gt; was the nature of scalability of Redis out
5661of the box. But all this can be achieved with Memcached.&lt;/p&gt;
5662&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
5663&lt;p&gt;There are a lot more details that could have been written and every single topic
5664in here deserves it&#39;s own post but you probably got the idea about the problems
5665we faced.&lt;/p&gt;
5666</content:encoded>
5667 </item>
5668
5669
5670
5671 <item>
5672 <title>Golang profiling simplified</title>
5673 <link>https://mitjafelicijan.com/golang-profiling-simplified.html</link>
5674 <pubDate>Tue, 07 Mar 2017 12:00:00 &#43;0200</pubDate>
5675 <guid>https://mitjafelicijan.com/golang-profiling-simplified.html</guid>
5676 <description>Many posts have been written regarding profiling in Golang and I haven’t foundproper tutorial regarding this.</description>
5677 <content:encoded>&lt;p&gt;Many posts have been written regarding profiling in Golang and I haven’t found
5678proper tutorial regarding this. Almost all of them are missing some part of
5679important information and it gets pretty frustrating when you have a deadline
5680and are not finding simple distilled solution.&lt;/p&gt;
5681&lt;p&gt;Nevertheless, after searching and experimenting I have found a solution that
5682works for me and probably should also for you.&lt;/p&gt;
5683&lt;h2 id=&#34;where-are-my-pprof-files&#34;&gt;Where are my pprof files?&lt;/h2&gt;
5684&lt;p&gt;By default pprof files are generated in /tmp/ folder. You can override folder
5685where this files are generated programmatically in your golang code as we will
5686see below in example.&lt;/p&gt;
5687&lt;h2 id=&#34;why-is-my-cpu-profile-empty&#34;&gt;Why is my CPU profile empty?&lt;/h2&gt;
5688&lt;p&gt;I have found out that sometimes CPU profile is empty because program was not
5689executing long enough. Programs, that execute too quickly don’t produce pprof
5690file in my cases. Well, file is generated but only contains 4KB of information.&lt;/p&gt;
5691&lt;h2 id=&#34;profiling&#34;&gt;Profiling&lt;/h2&gt;
5692&lt;p&gt;As you can see from examples we are executing dummy_benchmark functions to
5693ensure some sort of execution. Memory profiling can be done without such a
5694“complex” function. But CPU profiling needs it.&lt;/p&gt;
5695&lt;p&gt;Both memory and CPU profiling examples are almost the same. Only parameters in
5696main function when calling profile.Start are different. When we set
5697profile.ProfilePath(“.”) we tell profiler to store pprof files in the same
5698folder as our program.&lt;/p&gt;
5699&lt;h3 id=&#34;memory-profiling&#34;&gt;Memory profiling&lt;/h3&gt;
5700&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;package&lt;/span&gt; main
5701&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5702&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; (
5703&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
5704&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;
5705&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;github.com/pkg/profile&amp;#34;&lt;/span&gt;
5706&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)
5707&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5708&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;func&lt;/span&gt; dummy_benchmark() {
5709&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5710&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fmt.Println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;first set ...&amp;#34;&lt;/span&gt;)
5711&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i := 0; i &amp;lt; 918231333; i&#43;&#43; {
5712&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i *= 2
5713&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i /= 2
5714&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5715&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5716&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;-time.After(time.Second*3)
5717&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5718&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fmt.Println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sencond set ...&amp;#34;&lt;/span&gt;)
5719&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i := 0; i &amp;lt; 9182312232; i&#43;&#43; {
5720&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i *= 2
5721&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i /= 2
5722&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5723&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5724&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5725&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;func&lt;/span&gt; main() {
5726&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;defer&lt;/span&gt; profile.Start(profile.MemProfile, profile.ProfilePath(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;), profile.NoShutdownHook).Stop()
5727&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; dummy_benchmark()
5728&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5729&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;cpu-profiling&#34;&gt;CPU profiling&lt;/h3&gt;
5730&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;package&lt;/span&gt; main
5731&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5732&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; (
5733&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
5734&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;
5735&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;github.com/pkg/profile&amp;#34;&lt;/span&gt;
5736&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)
5737&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5738&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;func&lt;/span&gt; dummy_benchmark() {
5739&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5740&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fmt.Println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;first set ...&amp;#34;&lt;/span&gt;)
5741&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i := 0; i &amp;lt; 918231333; i&#43;&#43; {
5742&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i *= 2
5743&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i /= 2
5744&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5745&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5746&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;-time.After(time.Second*3)
5747&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5748&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; fmt.Println(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;sencond set ...&amp;#34;&lt;/span&gt;)
5749&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; i := 0; i &amp;lt; 9182312232; i&#43;&#43; {
5750&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i *= 2
5751&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i /= 2
5752&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
5753&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5754&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5755&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;func&lt;/span&gt; main() {
5756&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;defer&lt;/span&gt; profile.Start(profile.CPUProfile, profile.ProfilePath(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;), profile.NoShutdownHook).Stop()
5757&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; dummy_benchmark()
5758&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
5759&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;generating-profiling-reports&#34;&gt;Generating profiling reports&lt;/h3&gt;
5760&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# memory profiling&lt;/span&gt;
5761&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go build mem.go
5762&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./mem
5763&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go tool pprof -pdf ./mem mem.pprof &amp;gt; mem.pdf
5764&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
5765&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# cpu profiling&lt;/span&gt;
5766&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go build cpu.go
5767&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./cpu
5768&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go tool pprof -pdf ./cpu cpu.pprof &amp;gt; cpu.pdf
5769&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will generate PDF document with visualized profile.&lt;/p&gt;
5770&lt;ul&gt;
5771&lt;li&gt;&lt;a href=&#34;/assets/go-profiling/golang-profiling-mem.pdf&#34;&gt;Memory PDF profile example&lt;/a&gt;&lt;/li&gt;
5772&lt;li&gt;&lt;a href=&#34;/assets/go-profiling/golang-profiling-cpu.pdf&#34;&gt;CPU PDF profile example&lt;/a&gt;&lt;/li&gt;
5773&lt;/ul&gt;
5774</content:encoded>
5775 </item>
5776
5777
5778
5779 <item>
5780 <title>Software development and my favorite pitfalls</title>
5781 <link>https://mitjafelicijan.com/software-development-pitfalls.html</link>
5782 <pubDate>Tue, 10 Nov 2015 12:00:00 &#43;0200</pubDate>
5783 <guid>https://mitjafelicijan.com/software-development-pitfalls.html</guid>
5784 <description>Over the years I had the privilege to work on some very excited projects both insoftware development field and also in electronics field and every experiencetaught me some invaluable lessons about how NOT TO approach development.</description>
5785 <content:encoded>&lt;p&gt;Over the years I had the privilege to work on some very excited projects both in
5786software development field and also in electronics field and every experience
5787taught me some invaluable lessons about how NOT TO approach development. And
5788through this post I will try to point out some absurd, outdated techniques I
5789find the most annoying and damaging during a development cycle. There will be
5790swearing because this topic really gets on my nerves and I never coherently
5791tried to explain them in writing. So if I get heated up, please bear with me.&lt;/p&gt;
5792&lt;p&gt;As new methods of project management are emerging, underlying processes still
5793stay old and outdated. This is mainly because we as people are unable to
5794completely shift away from these approaches.&lt;/p&gt;
5795&lt;p&gt;I was always struggling with communication, and many times that cost me a
5796relationship or two because I was not on the ball all the time. Through every
5797experience, I became more convinced that I am the problem and never ever doubted
5798that the problem may be that communication never evolved a single step from
5799emails. And if you think for a second, not many things have changed around this
5800topic. We just have different representations of email (message boards, chats,
5801project management tools). And I believe this is the real issue we are facing
5802now.&lt;/p&gt;
5803&lt;p&gt;There are many articles written about hyper connectivity and the effects that
5804are a direct result of it. But mainstream does nothing towards it. We are just
5805putting out fires, and we do nothing to prevent it. I am certain this will be a
5806major source of grief in coming years. And what we all can do to avoid this is
5807to change our mindset and experiment on our communication skills, development
5808approaches. We need to maximize possible output that a person can give. And to
5809achieve this we need to listen to them, encourage them. I know that not
5810everybody is a naturally born leader, but with enough practice and encouragement
5811they also can become active participants in leadership.&lt;/p&gt;
5812&lt;p&gt;There are many talks now about methodologies such as Scrum, Kanban, Cleanroom
5813and they all fucking piss me of :). These are all boxes that imprison people and
5814take away their freedom of thought. This is a straightforward mindfuck /
5815amputation of creativity.&lt;/p&gt;
5816&lt;p&gt;Let me list a couple of things that I find really destructive and bad for a
5817project and in a long run company.&lt;/p&gt;
5818&lt;h2 id=&#34;ping-emails&#34;&gt;Ping emails&lt;/h2&gt;
5819&lt;p&gt;Ping emails are emails you have to write as soon as you receive an email. Its
5820sole purpose is to inform the sender that you received their email, and you are
5821working on it. Its result is only to calm down the sender that their task is
5822being dealt with. It’s intent basically is, I did my job by sending you this
5823email, so I am on clear grounds. I categorize this email as fuck you email.
5824This is one of the most irritating types of emails I need to write. This is the
5825ultimate control freak show you can experience, and it gives the sender a false
5826feeling of control. Newsflash: We do not live in 1982 where there was a
5827possibility that email never reached the destination. I really hate this from
5828the bottom of my heart.&lt;/p&gt;
5829&lt;p&gt;They should be like: “Yes, I am fucking alive, and I am at your service my
5830leash!”. I guess if I would reply like this, I wouldn’t have to write any more
5831of this kind of messages.&lt;/p&gt;
5832&lt;h2 id=&#34;everybody-is-a-project-manager&#34;&gt;Everybody is a project manager&lt;/h2&gt;
5833&lt;p&gt;Well, this is a tough one. I noticed that as soon as you let people to give
5834their suggestions, you are basically screwed. There is a truth in the saying:
5835“Give low expectations and deliver little more than you promised.”.&lt;/p&gt;
5836&lt;p&gt;People tend to take a role of a manager as soon as they are presented with an
5837opportunity. And by getting angry at them, you only provoke yourself. They are
5838not at fault. You just need to tell them they are only giving suggestions and
5839not tasks at the beginning and everything will be alright. But if you give them
5840a feeling that they are in control, you will have immense problems explaining
5841why their features are not in current release.&lt;/p&gt;
5842&lt;p&gt;Project mission must be always leading project requirements and any deviation
5843from it will result in major project butchering. And by this, I mean that the
5844project will get its own path, and you will be left with half done software that
5845helps nobody. Clear mission goals and clean execution will allow you to develop
5846software will clear intent.&lt;/p&gt;
5847&lt;h2 id=&#34;we-are-never-wrong&#34;&gt;We are never wrong&lt;/h2&gt;
5848&lt;p&gt;I find this type of arrogance the worst. We must always conduct ourselves that
5849we are infallible and cannot make mistakes. As soon as a procedure or process is
5850established, there is no room for changes or improvements. This is the most
5851idiotic thing someone can say of think. I think that processes need to involve
5852and change over time. This is imperative and need to have in your organization
5853if you want to improve and develop company. We all need to grow balls and change
5854everything in order to adapt to current situations. Being a prisoner of
5855predefined processes kills creativity.&lt;/p&gt;
5856&lt;p&gt;I am constantly trying new software for project managing and communication. I
5857believe every team has its own dynamic, and it needs to be discovered
5858organically and naturally through many experiments. By putting the team in a
5859box, you are amputating their creativity and therefore minimizing their
5860potential. But if you talk to an executive, you will mainly find archetypical
5861thinking and a strong need to compartmentalize everything from business
5862processes to resource management. And this type of management that often
5863displays micromanagement techniques only works for short periods (couple of
5864years) and then employees either leave the company or become basically retarded
5865drones on autopilot.&lt;/p&gt;
5866&lt;h2 id=&#34;micromanaging&#34;&gt;Micromanaging&lt;/h2&gt;
5867&lt;p&gt;This basically implies that everybody on the team is an idiot who needs to have
5868a to-do list that they cannot write themselves. How about spoon-feeding the team
5869at launch because besides the team leader, everybody must be a retarded idiot at
5870best?&lt;/p&gt;
5871&lt;p&gt;I prefer milestones as they give developers much more freedom and creativity in
5872developing and not waste their time checking some bizarre to-do list that was
5873not even thought through. Projects constantly change throughout the development
5874cycle, and all you are left at the end is a list of unchecked tasks and the
5875wrath of management why they are not completed. Best WTF moment!&lt;/p&gt;
5876&lt;h2 id=&#34;human-contact--no-need-for-it&#34;&gt;Human contact — no need for it!&lt;/h2&gt;
5877&lt;p&gt;We are vigorously trying to eliminate physical contact by replacing short
5878meetings with software, with no regards that we are not machines. Many times a
5879simple 5-min meeting at morning can solve most of the problems. In rapid
5880development, short bursts of man to man communication is possibly the best way
5881to go.&lt;/p&gt;
5882&lt;p&gt;We now have all this software available, and all what we get out of it is a
5883giant clusterfuck. An obstacle and not a solution. So, why we still use them?&lt;/p&gt;
5884&lt;h2 id=&#34;mvp-is-killing-innovation&#34;&gt;MVP is killing innovation&lt;/h2&gt;
5885&lt;p&gt;Many will disagree with me on this one, but I stand strong by this statement.
5886What I noticed in my experience that all this buzz words around us only mislead
5887and capture us in a circle of solving issues that already have a solution, but
5888we are unable to see it without using some fancy word for it.&lt;/p&gt;
5889&lt;p&gt;The toughest thing to do for a developer is to minimize requirements. Well, this
5890is though only for bad developers. Yes, I said it. There are many types of
5891developers out there. And those unable to minimize feature scope are the ones
5892you don’t need on your team. Their only goal is to solve problems that exist
5893only in their heads. And then you have to argue with them, and waste energy on
5894them, instead of developing your awesome product. They are a cancer and I
5895suggest you cut them off.&lt;/p&gt;
5896&lt;p&gt;MVP as an idea is great, but sadly people don’t understand underlying
5897philosophy, and they spent too much time focusing and fixating on something that
5898every sane person with normal IQ will understand without some made up
5899acronym. And the result is a lot of talking and barely no execution.&lt;/p&gt;
5900&lt;p&gt;Well, MVP is not directly killing innovation, but stupid people do when they try
5901to understand it.&lt;/p&gt;
5902&lt;h2 id=&#34;pressure-wasteland&#34;&gt;Pressure wasteland&lt;/h2&gt;
5903&lt;p&gt;You must never allow to be pressured into confirming a deadline if you are not
5904confident. We often feel a need that we are in service of others, which is true
5905to some extent. But it is also true that others are in service to us to some
5906extent. And we forget this all the time. We are all pressured all the time to
5907make decisions just to calm other people down. And when they leave your office
5908you experience WTF moment :) How the hell did they manage to fuck me up again?&lt;/p&gt;
5909&lt;p&gt;People need to realize that the more pressure you put on somebody, the less they
5910will be able to do. So 5-min update email requests will only resolve in mental
5911breakdown and inability to work that day. Constant poking is probably the only
5912thing I lose my mind instantly. For all you that are doing this: “Stop bothering
5913us with your insecurities and let us do our job. We will do it quicker and
5914better without you breathing down our necks.”&lt;/p&gt;
5915&lt;p&gt;If this happens to me, I end up with no energy at the end. Don’t you get it?
5916You will get much more from and out of me if you ask me like a human person and
5917not your personal butler. On a long run, you are destroying your relationships
5918and nobody would want to work with you. Your schizophrenic approach will damage
5919only you in a long run. Nobody is anybody’s property.&lt;/p&gt;
5920&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
5921&lt;p&gt;I am guilty of many things described in this post. And I find it hard sometimes
5922to acknowledge this. And I lie to myself and try vigorously to find some
5923explanation why I do these things. There is always space for growth. And maybe
5924you will also find some of yourself in this post and realize what needs to
5925change for you to evolve.&lt;/p&gt;
5926</content:encoded>
5927 </item>
5928
5929
5930
5931 <item>
5932 <title>Wireless sensor networks</title>
5933 <link>https://mitjafelicijan.com/wireless-sensor-networks.html</link>
5934 <pubDate>Thu, 24 Oct 2013 12:00:00 &#43;0200</pubDate>
5935 <guid>https://mitjafelicijan.com/wireless-sensor-networks.html</guid>
5936 <description>Zigbee networks have this wonderful capability to self-heal, which means theycan reorder connections between them if one of them is inoperable.</description>
5937 <content:encoded>&lt;p&gt;Zigbee networks have this wonderful capability to self-heal, which means they
5938can reorder connections between them if one of them is inoperable. This works
5939our of the box when you deploy them. But you have to have in mind that achieving
5940this is not as easy as you would think. None of it is plug&amp;amp;play. So to make
5941your life a bit easier, here are some pointers which, I hope, will help you.&lt;/p&gt;
5942&lt;ul&gt;
5943&lt;li&gt;Be careful when you are ordering your equipment abroad. There are many rules
5944and regulations you need to comply before you get your Xbee radios. What they
5945do is they wait until you prove that you won’t use the technology for some
5946kind of evil take over control of the world project :). For this, they have
5947EAR (Export Administration Regulations) which basically means “This product
5948may require a license to export from the United States.”.&lt;/li&gt;
5949&lt;li&gt;I don’t know if this applies for every country, but when we purchased our Xbee
5950radios from Mouser, this was mandatory! What we needed to do was to print out
5951a form and write information about our company and send them a copy via
5952email. With this document, we proved that we are a legitimate company.&lt;/li&gt;
5953&lt;li&gt;When you complete your purchase and send all the documentation, you are not
5954clear yet. Then customs will take it from there :). There will be some
5955additional costs. Before purchasing, make sure you have as much information
5956about costs as possible. Because it can get costly in the end.&lt;/li&gt;
5957&lt;li&gt;I suggest you use companies from your country. You can seriously cut your
5958costs. Here in Slovenia, the best option so far as I know is Farnell. And
5959based on my personal experience, they rock! All I need to say!&lt;/li&gt;
5960&lt;li&gt;Make plans when ordering larger quantities. Do not, I say, do not make your
5961orders in December! :) Believe me! You will have problems with stock they can
5962provide for you. So, we were forced to buy some things from Mouser, which was
5963extremely painful because of all the regulations you need to obey when
5964importing goods from the USA.&lt;/li&gt;
5965&lt;li&gt;Make sure that firmware version on your Xbee radios is exactly the same! Do
5966not get creative!!! I propose using templates. You can get template by
5967exporting settings/profile in X-CTU application. Make sure you have enabled
5968“Upgrade firmware” so you can be sure each radio has the same firmware.&lt;/li&gt;
5969&lt;li&gt;And again: make plans! Plan everything! In months advanced! You will thank me
5970later :)&lt;/li&gt;
5971&lt;li&gt;Test, test, test. Wireless networks can be tricky.&lt;/li&gt;
5972&lt;/ul&gt;
5973&lt;p&gt;If you are serious, I suggest you buy this book, Building Wireless Sensor
5974Networks. You will get a glimpse of how networks work in lumens terms. It is a
5975good starting point for everybody who wants to build wireless networks.&lt;/p&gt;
5976&lt;p&gt;&lt;strong&gt;Additional resources:&lt;/strong&gt;&lt;/p&gt;
5977&lt;ul&gt;
5978&lt;li&gt;&lt;a href=&#34;http://www.digi.com/aboutus/export/generalexportinfo&#34;&gt;http://www.digi.com/aboutus/export/generalexportinfo&lt;/a&gt;&lt;/li&gt;
5979&lt;li&gt;&lt;a href=&#34;http://doresearch.stanford.edu/research-scholarship/export-controls/export-controlled-or-embargoed-countries-entities-and-persons&#34;&gt;http://doresearch.stanford.edu/research-scholarship/export-controls/export-controlled-or-embargoed-countries-entities-and-persons&lt;/a&gt;&lt;/li&gt;
5980&lt;li&gt;&lt;a href=&#34;http://www.bis.doc.gov/licensing/exportingbasics.htm&#34;&gt;http://www.bis.doc.gov/licensing/exportingbasics.htm&lt;/a&gt;&lt;/li&gt;
5981&lt;/ul&gt;
5982</content:encoded>
5983 </item>
5984
5985
5986
5987 <item>
5988 <title>LED technology might not be as eco-friendly as you think</title>
5989 <link>https://mitjafelicijan.com/led-technology-not-so-eco.html</link>
5990 <pubDate>Fri, 09 Mar 2012 12:00:00 &#43;0200</pubDate>
5991 <guid>https://mitjafelicijan.com/led-technology-not-so-eco.html</guid>
5992 <description>There is a lot of talk about LED technology.</description>
5993 <content:encoded>&lt;p&gt;There is a lot of talk about LED technology. It is beginning to infiltrate
5994industry at a fast rate, and it’s a challenge for designers and also engineers.
5995I wondered when a weakness will be revealed. Then I stomped on an article
5996talking about harm in using LED technology. It looks like this magical
5997technology is not so magical and eco-friendly.&lt;/p&gt;
5998&lt;p&gt;A new study from the University of California indicates that LED lights contain
5999toxic metals, and should be produced, used and disposed of carefully. Besides
6000the lead and nickel, the bulbs and their associated parts were also found to
6001contain arsenic, copper, and other metals that have been linked to different
6002cancers, neurological damage, kidney disease, hypertension, skin rashes and
6003other illnesses in humans, and to ecological damage in waterways.&lt;/p&gt;
6004&lt;p&gt;Since then, I haven’t yet found any regulation for disposal of LED lights or any
6005other regulation or standard. This might be a problem in the future. And it is a
6006massive drawback. This might have quite an impact on consumer market.&lt;/p&gt;
6007&lt;p&gt;Nevertheless, there is a potential, and I am sure the market will adapt. I also
6008hope I will be reading documents regarding solution for this concern soon.&lt;/p&gt;
6009&lt;p&gt;&lt;strong&gt;Additional resources:&lt;/strong&gt;&lt;/p&gt;
6010&lt;ul&gt;
6011&lt;li&gt;&lt;a href=&#34;http://ezinearticles.com/?Recycling-and-Disposal-of-Light-Bulbs&amp;amp;id=1091304&#34;&gt;Recycling and Disposal of Light Bulbs&lt;/a&gt;&lt;/li&gt;
6012&lt;li&gt;&lt;a href=&#34;http://www.ehow.com/how_7483442_dispose-lowenergy-light-bulb.html&#34;&gt;How to Dispose of a Low-Energy Light Bulb&lt;/a&gt;&lt;/li&gt;
6013&lt;/ul&gt;
6014</content:encoded>
6015 </item>
6016
6017
6018
6019 <item>
6020 <title>Most likely to succeed in the year of 2011</title>
6021 <link>https://mitjafelicijan.com/most-likely-to-succeed-in-year-of-2011.html</link>
6022 <pubDate>Thu, 13 Jan 2011 12:00:00 &#43;0200</pubDate>
6023 <guid>https://mitjafelicijan.com/most-likely-to-succeed-in-year-of-2011.html</guid>
6024 <description>The year of 2010 was definitely the year of Geo-location.</description>
6025 <content:encoded>&lt;p&gt;The year of 2010 was definitely the year of Geo-location. The market responded
6026beautifully and lots of very cool services were launched. We all have to thank
6027the mobile market for such extensive adoption. With new generations of mobile
6028phones that are not only buffed with high-tech hardware but are also affordable.
6029We can now manage tasks that were not so long time ago, almost Star Trek’ish.
6030And all this had and has great influence on the destination to which we are
6031going now.&lt;/p&gt;
6032&lt;p&gt;Reading all this articles about new innovation about new thriving technologies
6033makes me wonder what’s the next step. The future is the mesh, like Lisa Gansky
6034said in her book The Mesh.&lt;/p&gt;
6035&lt;p&gt;Many still have conservative views on distributed systems. The problems with
6036security of information. Fear of not controlling every aspect of information
6037flow. I am very opened to distributed systems and heterogeneous applications,
6038and I think this is the correct and best way to proceed.&lt;/p&gt;
6039&lt;p&gt;This year will definitely be about communication platforms. Mobile to mobile.
6040Machine to mobile and vice versa. All the tech is available and ready to put
6041into action. Wireless is today’s new mantra. And the concept of semantic web is
6042now ready for industry.&lt;/p&gt;
6043&lt;p&gt;Applications and developers now can gain access to new layers of systems and can
6044prepare and build solutions to meet the high quality needs of market. The speed
6045is everything now.&lt;/p&gt;
6046&lt;p&gt;My vote goes to “Machine to Machine” and “Embedded Systems”!&lt;/p&gt;
6047&lt;ul&gt;
6048&lt;li&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Machine-to-Machine&#34;&gt;Machine-to-Machine&lt;/a&gt;&lt;/li&gt;
6049&lt;li&gt;&lt;a href=&#34;http://www.bitxml.org/&#34;&gt;The ultimate M2M communication protocol&lt;/a&gt;&lt;/li&gt;
6050&lt;li&gt;&lt;a href=&#34;http://www.coosproject.org/maven-site/1.0.0/project-info.html&#34;&gt;COOS Project (connectivity initiative)&lt;/a&gt;&lt;/li&gt;
6051&lt;li&gt;&lt;a href=&#34;http://m2m.com/index.jspa&#34;&gt;Community for machine-to-machine&lt;/a&gt;&lt;/li&gt;
6052&lt;li&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Embedded_system&#34;&gt;Embedded system&lt;/a&gt;&lt;/li&gt;
6053&lt;/ul&gt;
6054</content:encoded>
6055 </item>
6056
6057
6058 </channel>
6059</rss>
diff --git a/public/install-plan9port-linux.html b/public/install-plan9port-linux.html
deleted file mode 100755
index 903b889..0000000
--- a/public/install-plan9port-linux.html
+++ /dev/null
@@ -1,18 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Install Plan9port on Linux</title><meta name=description content="Install Plan9port on Linux."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Install Plan9port on Linux</h1><p>May 12, 2023<div><p>Install Plan9port on Linux. This applies to
7<a href=https://9fans.github.io/plan9port/>Plan9port</a>. This is a port of many Plan 9
8programs to Unix-like operating systems. Useful for programs like <code>9term</code> and
9<code>rc</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt-get install gcc libx11-dev libxt-dev libxext-dev libfontconfig1-dev
10</span></span><span style=display:flex><span>git clone https://github.com/9fans/plan9port $HOME/plan9
11</span></span><span style=display:flex><span>cd $HOME/plan9/plan9port
12</span></span><span style=display:flex><span>./INSTALL -r $HOME/plan9
13</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
14<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
15with me
16<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
17the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
18otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/led-technology-not-so-eco.html b/public/led-technology-not-so-eco.html
deleted file mode 100755
index 3708221..0000000
--- a/public/led-technology-not-so-eco.html
+++ /dev/null
@@ -1,23 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>LED technology might not be as eco-friendly as you think</title><meta name=description content="There is a lot of talk about LED technology."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>LED technology might not be as eco-friendly as you think</h1><p>Mar 9, 2012<div><p>There is a lot of talk about LED technology. It is beginning to infiltrate
7industry at a fast rate, and it’s a challenge for designers and also engineers.
8I wondered when a weakness will be revealed. Then I stomped on an article
9talking about harm in using LED technology. It looks like this magical
10technology is not so magical and eco-friendly.<p>A new study from the University of California indicates that LED lights contain
11toxic metals, and should be produced, used and disposed of carefully. Besides
12the lead and nickel, the bulbs and their associated parts were also found to
13contain arsenic, copper, and other metals that have been linked to different
14cancers, neurological damage, kidney disease, hypertension, skin rashes and
15other illnesses in humans, and to ecological damage in waterways.<p>Since then, I haven’t yet found any regulation for disposal of LED lights or any
16other regulation or standard. This might be a problem in the future. And it is a
17massive drawback. This might have quite an impact on consumer market.<p>Nevertheless, there is a potential, and I am sure the market will adapt. I also
18hope I will be reading documents regarding solution for this concern soon.<p><strong>Additional resources:</strong><ul><li><a href="http://ezinearticles.com/?Recycling-and-Disposal-of-Light-Bulbs&amp;id=1091304">Recycling and Disposal of Light Bulbs</a><li><a href=http://www.ehow.com/how_7483442_dispose-lowenergy-light-bulb.html>How to Dispose of a Low-Energy Light Bulb</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
19<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
20with me
21<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
22the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
23otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/linux-cheatsheet.html b/public/linux-cheatsheet.html
deleted file mode 100755
index 46555ac..0000000
--- a/public/linux-cheatsheet.html
+++ /dev/null
@@ -1,111 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>List of essential Linux commands for server management</title><meta name=description content="Generate SSH keyssh-keygen -t ed25519 -C &amp;#34;your_email@example."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>List of essential Linux commands for server management</h1><p>Aug 1, 2021<div><p><strong>Generate SSH key</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>ssh-keygen -t ed25519 -C <span style=color:#a31515>&#34;your_email@example.com&#34;</span>
7</span></span><span style=display:flex><span>
8</span></span><span style=display:flex><span><span style=color:green># when no support for Ed25519 present</span>
9</span></span><span style=display:flex><span>ssh-keygen -t rsa -b 4096 -C <span style=color:#a31515>&#34;your_email@example.com&#34;</span>
10</span></span></code></pre><p>Note: By default SSH keys get stored to <code>/home/&lt;username>/.ssh/</code> folder.<p><strong>Login to host via SSH</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># connect to host as your local username</span>
11</span></span><span style=display:flex><span>ssh host
12</span></span><span style=display:flex><span>
13</span></span><span style=display:flex><span><span style=color:green># connect to host as user</span>
14</span></span><span style=display:flex><span>ssh &lt;user&gt;@&lt;host&gt;
15</span></span><span style=display:flex><span>
16</span></span><span style=display:flex><span><span style=color:green># connect to host using port</span>
17</span></span><span style=display:flex><span>ssh -p &lt;port&gt; &lt;user&gt;@&lt;host&gt;
18</span></span></code></pre><p><strong>Execute command on a server through SSH</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># execute one command</span>
19</span></span><span style=display:flex><span>ssh root@100.100.100.100 <span style=color:#a31515>&#34;ls /root&#34;</span>
20</span></span><span style=display:flex><span>
21</span></span><span style=display:flex><span><span style=color:green># execute many commands</span>
22</span></span><span style=display:flex><span>ssh root@100.100.100.100 <span style=color:#a31515>&#34;cd /root;touch file.txt&#34;</span>
23</span></span></code></pre><p><strong>Displays currently logged in users in the system</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>w
24</span></span></code></pre><p><strong>Displays Linux system information</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>uname
25</span></span></code></pre><p><strong>Displays kernel release information</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>uname -r
26</span></span></code></pre><p><strong>Shows the system hostname</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>hostname
27</span></span></code></pre><p><strong>Shows system reboot history</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>last reboot
28</span></span></code></pre><p><strong>Displays information about the user</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install finger
29</span></span><span style=display:flex><span>finger &lt;username&gt;
30</span></span></code></pre><p><strong>Displays IP addresses and all the network interfaces</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>ip addr show
31</span></span></code></pre><p><strong>Downloads a file from an online source</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>wget https://example.com/example.tgz
32</span></span></code></pre><p>Note: If URL contains ?, & enclose the URL in double quotes.<p><strong>Compress a file with gzip</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># will not keep the original file</span>
33</span></span><span style=display:flex><span>gzip file.txt
34</span></span><span style=display:flex><span>
35</span></span><span style=display:flex><span><span style=color:green># will keep the original file</span>
36</span></span><span style=display:flex><span>gzip --keep file.txt
37</span></span></code></pre><p><strong>Interactive disk usage analyzer</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install ncdu
38</span></span><span style=display:flex><span>
39</span></span><span style=display:flex><span>ncdu
40</span></span><span style=display:flex><span>ncdu &lt;path/to/directory&gt;
41</span></span></code></pre><p><strong>Install Node.js using the Node Version Manager</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
42</span></span><span style=display:flex><span>source ~/.bashrc
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span>nvm install v13
45</span></span></code></pre><p><strong>Too long; didn't read</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>npm install -g tldr
46</span></span><span style=display:flex><span>
47</span></span><span style=display:flex><span>tldr tar
48</span></span></code></pre><p><strong>Combine all Nginx access logs to one big log file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>zcat -f /var/log/nginx/access.log* &gt; /var/log/nginx/access-all.log
49</span></span></code></pre><p><strong>Set up Redis server</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install redis-server redis-tools
50</span></span><span style=display:flex><span>
51</span></span><span style=display:flex><span><span style=color:green># check if server is running</span>
52</span></span><span style=display:flex><span>sudo service redis status
53</span></span><span style=display:flex><span>
54</span></span><span style=display:flex><span><span style=color:green># set and get a key value</span>
55</span></span><span style=display:flex><span>redis-cli set mykey myvalue
56</span></span><span style=display:flex><span>redis-cli get mykey
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span><span style=color:green># interactive shell</span>
59</span></span><span style=display:flex><span>redis-cli
60</span></span></code></pre><p><strong>Generate statistics of your webserver</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install goaccess
61</span></span><span style=display:flex><span>
62</span></span><span style=display:flex><span><span style=color:green># check if installed</span>
63</span></span><span style=display:flex><span>goaccess -v
64</span></span><span style=display:flex><span>
65</span></span><span style=display:flex><span><span style=color:green># combine logs</span>
66</span></span><span style=display:flex><span>zcat -f /var/log/nginx/access.log* &gt; /var/log/nginx/access-all.log
67</span></span><span style=display:flex><span>
68</span></span><span style=display:flex><span><span style=color:green># export to single html</span>
69</span></span><span style=display:flex><span>goaccess <span style=color:#a31515>\
70</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --log-file=/var/log/nginx/access-all.log <span style=color:#a31515>\
71</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --log-format=COMBINED <span style=color:#a31515>\
72</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --exclude-ip=0.0.0.0 <span style=color:#a31515>\
73</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --ignore-crawlers <span style=color:#a31515>\
74</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --real-os <span style=color:#a31515>\
75</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --output=/var/www/html/stats.html
76</span></span><span style=display:flex><span>
77</span></span><span style=display:flex><span><span style=color:green># cleanup afterwards</span>
78</span></span><span style=display:flex><span>rm /var/log/nginx/access-all.log
79</span></span></code></pre><p><strong>Search for a given pattern in files</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>grep -r ‘pattern’ files
80</span></span></code></pre><p><strong>Find proccess ID for a specific program</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>pgrep nginx
81</span></span></code></pre><p><strong>Print name of current/working directory</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>pwd
82</span></span></code></pre><p><strong>Creates a blank new file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>touch newfile.txt
83</span></span></code></pre><p><strong>Displays first lines in a file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -n &lt;x&gt; presents the number of lines (10 by default)</span>
84</span></span><span style=display:flex><span>head -n 20 somefile.txt
85</span></span></code></pre><p><strong>Displays last lines in a file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -n &lt;x&gt; presents the number of lines (10 by default)</span>
86</span></span><span style=display:flex><span>tail -n 20 somefile.txt
87</span></span><span style=display:flex><span>
88</span></span><span style=display:flex><span><span style=color:green># -f follows the changes in file (doesn&#39;t closes)</span>
89</span></span><span style=display:flex><span>tail -f somefile.txt
90</span></span></code></pre><p><strong>Count lines in a file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>wc -l somefile.txt
91</span></span></code></pre><p><strong>Find all instances of the file</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install mlocate
92</span></span><span style=display:flex><span>
93</span></span><span style=display:flex><span>locate somefile.txt
94</span></span></code></pre><p><strong>Find file names that begin with ‘index’ in /home folder</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>find /home/ -name <span style=color:#a31515>&#34;index&#34;</span>
95</span></span></code></pre><p><strong>Find files larger than 100MB in the home folder</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>find /home -size +100M
96</span></span></code></pre><p><strong>Displays block devices related information</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>lsblk
97</span></span></code></pre><p><strong>Displays free space on mounted systems</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>df -h
98</span></span></code></pre><p><strong>Displays free and used memory in the system</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>free -h
99</span></span></code></pre><p><strong>Displays all active listening ports</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo apt install net-tools
100</span></span><span style=display:flex><span>
101</span></span><span style=display:flex><span>netstat -pnltu
102</span></span></code></pre><p><strong>Kill a process violently</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>kill -9 &lt;pid&gt;
103</span></span></code></pre><p><strong>List files opened by user</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>lsof -u &lt;user&gt;
104</span></span></code></pre><p><strong>Execute "df -h", showing periodic updates</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -n 1 means every second</span>
105</span></span><span style=display:flex><span>watch -n 1 df -h
106</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
107<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
108with me
109<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
110the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
111otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/making-cgit-look-nicer.html b/public/making-cgit-look-nicer.html
deleted file mode 100755
index 109e375..0000000
--- a/public/making-cgit-look-nicer.html
+++ /dev/null
@@ -1,195 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAE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gxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Making cgit look nicer</title><meta name=description content="For personal use I have a private Git serverset up and I use GitHub just as a mirror."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Making cgit look nicer</h1><p>Jun 24, 2023<div><p>For personal use I have a <a href=https://git.mitjafelicijan.com>private Git server</a>
7set up and I use GitHub just as a mirror. By default the cgit theme looks a bit
8dated so I made the flowing theme.<ul><li><code>/etc/cgitrc</code></ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>css=<span style=color:#a31515>/cgit.css</span>
9</span></span><span style=display:flex><span>logo=<span style=color:#a31515>/startrek.gif</span>
10</span></span><span style=display:flex><span>favicon=<span style=color:#a31515>/favicon.png</span>
11</span></span><span style=display:flex><span>source-filter=<span style=color:#a31515>/usr/lib/cgit/filters/syntax-highlighting-edited.sh</span>
12</span></span><span style=display:flex><span>about-filter=<span style=color:#a31515>/usr/lib/cgit/filters/about-formatting.sh</span>
13</span></span><span style=display:flex><span>
14</span></span><span style=display:flex><span>local-time=<span style=color:#a31515>1</span>
15</span></span><span style=display:flex><span>snapshots=<span style=color:#a31515>tar.gz</span>
16</span></span><span style=display:flex><span>repository-sort=<span style=color:#a31515>age</span>
17</span></span><span style=display:flex><span>cache-size=<span style=color:#a31515>1000</span>
18</span></span><span style=display:flex><span>branch-sort=<span style=color:#a31515>age</span>
19</span></span><span style=display:flex><span>summary-log=<span style=color:#a31515>200</span>
20</span></span><span style=display:flex><span>max-atom-items=<span style=color:#a31515>50</span>
21</span></span><span style=display:flex><span>max-repo-count=<span style=color:#a31515>100</span>
22</span></span><span style=display:flex><span>
23</span></span><span style=display:flex><span>enable-index-owner=<span style=color:#a31515>0</span>
24</span></span><span style=display:flex><span>enable-follow-links=<span style=color:#a31515>1</span>
25</span></span><span style=display:flex><span>enable-log-filecount=<span style=color:#a31515>1</span>
26</span></span><span style=display:flex><span>enable-log-linecount=<span style=color:#a31515>1</span>
27</span></span><span style=display:flex><span>
28</span></span><span style=display:flex><span>root-title=<span style=color:#a31515>Place for code, experiments and other bullshit!</span>
29</span></span><span style=display:flex><span>root-desc=
30</span></span><span style=display:flex><span>clone-url=<span style=color:#a31515>git@git.mitjafelicijan.com:/home/git/$CGIT_REPO_URL</span>
31</span></span><span style=display:flex><span>
32</span></span><span style=display:flex><span>mimetype.gif=<span style=color:#a31515>image/gif</span>
33</span></span><span style=display:flex><span>mimetype.html=<span style=color:#a31515>text/html</span>
34</span></span><span style=display:flex><span>mimetype.jpg=<span style=color:#a31515>image/jpeg</span>
35</span></span><span style=display:flex><span>mimetype.jpeg=<span style=color:#a31515>image/jpeg</span>
36</span></span><span style=display:flex><span>mimetype.pdf=<span style=color:#a31515>application/pdf</span>
37</span></span><span style=display:flex><span>mimetype.png=<span style=color:#a31515>image/png</span>
38</span></span><span style=display:flex><span>mimetype.svg=<span style=color:#a31515>image/svg+xml</span>
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span>readme=<span style=color:#a31515>:README.md</span>
41</span></span><span style=display:flex><span>readme=<span style=color:#a31515>:readme.md</span>
42</span></span><span style=display:flex><span>
43</span></span><span style=display:flex><span><span style=color:green># Must be at the end!</span>
44</span></span><span style=display:flex><span>virtual-root=<span style=color:#a31515>/</span>
45</span></span><span style=display:flex><span>scan-path=<span style=color:#a31515>/home/git/</span>
46</span></span></code></pre><p>For <code>syntax-highlighting-edited.sh</code> follow instructions on
47<a href=https://wiki.archlinux.org/title/Cgit#Using_highlight>https://wiki.archlinux.org/title/Cgit</a>.<ul><li><code>/usr/share/cgit/cgit.css</code></ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>* {
48</span></span><span style=display:flex><span> <span style=color:#00f>font-size</span>: 11<span style=color:#2b91af>pt</span>;
49</span></span><span style=display:flex><span>}
50</span></span><span style=display:flex><span>
51</span></span><span style=display:flex><span>body {
52</span></span><span style=display:flex><span> <span style=color:#00f>font-family</span>: <span style=color:#00f>monospace</span>;
53</span></span><span style=display:flex><span> <span style=color:#00f>background</span>: <span style=color:#00f>white</span>;
54</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 1<span style=color:#2b91af>em</span>;
55</span></span><span style=display:flex><span>}
56</span></span><span style=display:flex><span>
57</span></span><span style=display:flex><span>th, td {
58</span></span><span style=display:flex><span> <span style=color:#00f>text-align</span>: <span style=color:#00f>left</span>;
59</span></span><span style=display:flex><span>}
60</span></span><span style=display:flex><span>
61</span></span><span style=display:flex><span><span style=color:green>/* HEADER */</span>
62</span></span><span style=display:flex><span>
63</span></span><span style=display:flex><span>#header {
64</span></span><span style=display:flex><span> <span style=color:#00f>margin-bottom</span>: 1<span style=color:#2b91af>em</span>;
65</span></span><span style=display:flex><span>}
66</span></span><span style=display:flex><span>
67</span></span><span style=display:flex><span>#header .<span style=color:#2b91af>logo</span> img {
68</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>block</span>;
69</span></span><span style=display:flex><span> <span style=color:#00f>height</span>: 3<span style=color:#2b91af>em</span>;
70</span></span><span style=display:flex><span> <span style=color:#00f>margin-right</span>: 10<span style=color:#2b91af>px</span>;
71</span></span><span style=display:flex><span>}
72</span></span><span style=display:flex><span>
73</span></span><span style=display:flex><span>#header .<span style=color:#2b91af>sub</span>.<span style=color:#2b91af>right</span> {
74</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>none</span>;
75</span></span><span style=display:flex><span>}
76</span></span><span style=display:flex><span>
77</span></span><span style=display:flex><span><span style=color:green>/* FOOTER */</span>
78</span></span><span style=display:flex><span>
79</span></span><span style=display:flex><span>.<span style=color:#2b91af>footer</span> {
80</span></span><span style=display:flex><span> <span style=color:#00f>margin-top</span>: 2<span style=color:#2b91af>em</span>;
81</span></span><span style=display:flex><span> <span style=color:#00f>font-style</span>: <span style=color:#00f>italic</span>;
82</span></span><span style=display:flex><span>}
83</span></span><span style=display:flex><span>
84</span></span><span style=display:flex><span>.<span style=color:#2b91af>footer</span>, .<span style=color:#2b91af>footer</span> a {
85</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>gray</span>;
86</span></span><span style=display:flex><span>}
87</span></span><span style=display:flex><span>
88</span></span><span style=display:flex><span><span style=color:green>/* TABS */</span>
89</span></span><span style=display:flex><span>
90</span></span><span style=display:flex><span>.<span style=color:#2b91af>tabs</span> a {
91</span></span><span style=display:flex><span> <span style=color:#00f>margin-bottom</span>: 2<span style=color:#2b91af>em</span>;
92</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>inline-block</span>;
93</span></span><span style=display:flex><span> <span style=color:#00f>margin-right</span>: 1<span style=color:#2b91af>em</span>;
94</span></span><span style=display:flex><span>}
95</span></span><span style=display:flex><span>
96</span></span><span style=display:flex><span>.<span style=color:#2b91af>tabs</span> td a:only-child {
97</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>none</span>;
98</span></span><span style=display:flex><span>}
99</span></span><span style=display:flex><span>
100</span></span><span style=display:flex><span><span style=color:green>/* HIDING ELEMENTS */</span>
101</span></span><span style=display:flex><span>
102</span></span><span style=display:flex><span>.<span style=color:#2b91af>cgit-panel</span>, .<span style=color:#2b91af>form</span> {
103</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>none</span>;
104</span></span><span style=display:flex><span>}
105</span></span><span style=display:flex><span>
106</span></span><span style=display:flex><span><span style=color:green>/* LISTS */</span>
107</span></span><span style=display:flex><span>
108</span></span><span style=display:flex><span>.<span style=color:#2b91af>list</span> td, .<span style=color:#2b91af>list</span> th {
109</span></span><span style=display:flex><span> <span style=color:#00f>padding-right</span>: 2<span style=color:#2b91af>em</span>;
110</span></span><span style=display:flex><span>}
111</span></span><span style=display:flex><span>
112</span></span><span style=display:flex><span>.<span style=color:#2b91af>list</span> .<span style=color:#2b91af>nohover</span> a {
113</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>black</span>;
114</span></span><span style=display:flex><span>}
115</span></span><span style=display:flex><span>
116</span></span><span style=display:flex><span>.<span style=color:#2b91af>list</span> .<span style=color:#2b91af>button</span> {
117</span></span><span style=display:flex><span> <span style=color:#00f>padding-right</span>: 0.5<span style=color:#2b91af>em</span>;
118</span></span><span style=display:flex><span>}
119</span></span><span style=display:flex><span>
120</span></span><span style=display:flex><span><span style=color:green>/* COMMIT */</span>
121</span></span><span style=display:flex><span>
122</span></span><span style=display:flex><span>.<span style=color:#2b91af>commit-subject</span> {
123</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 1<span style=color:#2b91af>em</span> 0;
124</span></span><span style=display:flex><span>}
125</span></span><span style=display:flex><span>
126</span></span><span style=display:flex><span>.<span style=color:#2b91af>decoration</span> a {
127</span></span><span style=display:flex><span> <span style=color:#00f>padding-left</span>: 0.5<span style=color:#2b91af>em</span>;
128</span></span><span style=display:flex><span>}
129</span></span><span style=display:flex><span>
130</span></span><span style=display:flex><span>.<span style=color:#2b91af>commit-info</span> th {
131</span></span><span style=display:flex><span> <span style=color:#00f>padding-right</span>: 1<span style=color:#2b91af>em</span>;
132</span></span><span style=display:flex><span>}
133</span></span><span style=display:flex><span>
134</span></span><span style=display:flex><span>.<span style=color:#2b91af>commit-subject</span> {
135</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 2<span style=color:#2b91af>em</span> 0;
136</span></span><span style=display:flex><span>}
137</span></span><span style=display:flex><span>
138</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> div.<span style=color:#2b91af>head</span> {
139</span></span><span style=display:flex><span> <span style=color:#00f>padding-top</span>: 2<span style=color:#2b91af>em</span>;
140</span></span><span style=display:flex><span>}
141</span></span><span style=display:flex><span>
142</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diffstat</span> td {
143</span></span><span style=display:flex><span> <span style=color:#00f>padding-right</span>: 1<span style=color:#2b91af>em</span>;
144</span></span><span style=display:flex><span>}
145</span></span><span style=display:flex><span>
146</span></span><span style=display:flex><span><span style=color:green>/* CONTENT */</span>
147</span></span><span style=display:flex><span>
148</span></span><span style=display:flex><span>.<span style=color:#2b91af>linenumbers</span> {
149</span></span><span style=display:flex><span> <span style=color:#00f>padding-right</span>: 0.5<span style=color:#2b91af>em</span>;
150</span></span><span style=display:flex><span>}
151</span></span><span style=display:flex><span>
152</span></span><span style=display:flex><span>.<span style=color:#2b91af>linenumbers</span> a {
153</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>gray</span>;
154</span></span><span style=display:flex><span>}
155</span></span><span style=display:flex><span>
156</span></span><span style=display:flex><span>.<span style=color:#2b91af>pager</span> {
157</span></span><span style=display:flex><span> <span style=color:#00f>display</span>: <span style=color:#00f>flex</span>;
158</span></span><span style=display:flex><span> <span style=color:#00f>list-style-type</span>: <span style=color:#00f>none</span>;
159</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 0;
160</span></span><span style=display:flex><span> gap: 0.5<span style=color:#2b91af>em</span>;
161</span></span><span style=display:flex><span>}
162</span></span><span style=display:flex><span>
163</span></span><span style=display:flex><span><span style=color:green>/* DIFF COLORS */</span>
164</span></span><span style=display:flex><span>
165</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> {
166</span></span><span style=display:flex><span> <span style=color:#00f>width</span>: 100<span style=color:#2b91af>%</span>;
167</span></span><span style=display:flex><span>}
168</span></span><span style=display:flex><span>
169</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> td {
170</span></span><span style=display:flex><span> <span style=color:#00f>white-space</span>: <span style=color:#00f>pre</span>;
171</span></span><span style=display:flex><span>}
172</span></span><span style=display:flex><span>
173</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> td div.<span style=color:#2b91af>head</span> {
174</span></span><span style=display:flex><span> <span style=color:#00f>font-weight</span>: <span style=color:#00f>bold</span>;
175</span></span><span style=display:flex><span> <span style=color:#00f>margin-top</span>: 1<span style=color:#2b91af>em</span>;
176</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>black</span>;
177</span></span><span style=display:flex><span>}
178</span></span><span style=display:flex><span>
179</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> td div.<span style=color:#2b91af>hunk</span> {
180</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: #009;
181</span></span><span style=display:flex><span>}
182</span></span><span style=display:flex><span>
183</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> td div.<span style=color:#2b91af>add</span> {
184</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>green</span>;
185</span></span><span style=display:flex><span>}
186</span></span><span style=display:flex><span>
187</span></span><span style=display:flex><span>table.<span style=color:#2b91af>diff</span> td div.<span style=color:#2b91af>del</span> {
188</span></span><span style=display:flex><span> <span style=color:#00f>color</span>: <span style=color:#00f>red</span>;
189</span></span><span style=display:flex><span>}
190</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
191<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
192with me
193<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
194the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
195otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/mass-set-permission.html b/public/mass-set-permission.html
deleted file mode 100755
index 425efb6..0000000
--- a/public/mass-set-permission.html
+++ /dev/null
@@ -1,13 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device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1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Change permissions of matching files recursively</title><meta name=description content="Replace *."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Change permissions of matching files recursively</h1><p>May 16, 2023<div><p>Replace <code>*.xml</code> with your pattern. This will remove executable bit from all
7files matching the pattern. Change <code>+</code> to <code>-</code> to add executable bit.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>find . -type f -name <span style=color:#a31515>&#34;*.xml&#34;</span> -exec chmod -x {} +
8</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
9<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
10with me
11<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
12the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
13otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/mitjafelicijan.pgp.pub.txt b/public/mitjafelicijan.pgp.pub.txt
deleted file mode 100644
index 225fc1b..0000000
--- a/public/mitjafelicijan.pgp.pub.txt
+++ /dev/null
@@ -1,52 +0,0 @@
1-----BEGIN PGP PUBLIC KEY BLOCK-----
2
3mQINBGScz38BEAC546x4aPvhUAAbas3RSIZZnvLAVEohlLL+D/HT/XEPviSmmd/0
483Bqz7/wwbArRuzuL3I+c3T6oT/9KCqNrKu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Wyg71vxVOPMFgPN3FQtj/SdmHTuNp1PkG+PXQVwWWeo
38UUiQIQARAQABiQI2BBgBCgAgFiEERZJsG52JD+NHqDtGn5NlRGNwe5oFAmScz38C
39GwwACgkQn5NlRGNwe5o5FA/6AiYgke33S+2AaiYnxqaNd9apq4osuudw9AdzuqGt
40oXR7cl/xsLaJSVGrveZcbnXTSkVZWHbDR7netr7uaQ0k80o7pIECoplbqLJCFZHt
41GERGPcoUJQX/B/uKMM/WrqixL0VQ6V8cyTnaLfFPOLCOpEqFi2kLDe/2rVqvxUF9
42UKnrm8jJQUPggcevHTvKy0MMFjX+1LgLKU1nIsuDHJhtTnruDQPTyIBFrjMTTTmu
43m5fBLV+nyA6+3ahZAR55kQIUTDMZgkR+zWNqcabSwTGFyM+/DlSkjc55e/Zr385E
44tv9FCNorMJ3HBDtYGoO5pscakf+J8xF6NROSVzJ1fwTo/tkAQCR65HR0LC7QlBh6
45V/nI1wX1rqC6wcRY1I2nBHwBieCD8BV9ZboIux6DDlyU/eSNpf5OryHrgwutrj7I
46OIZ4mp4g46WtEJo7fdQf7hX7iGLCIAGZAipvOMuiJTSIoCtrSuv/WUZJDzQpN1tl
47Pfd5XtwvkuoGvbwCbG0w1w99Gu4QONqfpssTJekDuYyREiUTmF8t/dVko+fLSYKW
48ynh+je5hadDHFzQ54d9Lixg7mB08Vs9YopyizglI3BnYDOFiWhAiwsC6hwAVLXUQ
493hRb4NK/5ztCoZcozpVqy66BLma+3b8fKp+1a3oET07iDdCS/L91RMnuD/4Lsz/o
50So8=
51=T/rq
52-----END PGP PUBLIC KEY BLOCK-----
diff --git a/public/most-likely-to-succeed-in-year-of-2011.html b/public/most-likely-to-succeed-in-year-of-2011.html
deleted file mode 100755
index 411aa4e..0000000
--- a/public/most-likely-to-succeed-in-year-of-2011.html
+++ /dev/null
@@ -1,27 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAA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GB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Most likely to succeed in the year of 2011</title><meta name=description content="The year of 2010 was definitely the year of Geo-location."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Most likely to succeed in the year of 2011</h1><p>Jan 13, 2011<div><p>The year of 2010 was definitely the year of Geo-location. The market responded
7beautifully and lots of very cool services were launched. We all have to thank
8the mobile market for such extensive adoption. With new generations of mobile
9phones that are not only buffed with high-tech hardware but are also affordable.
10We can now manage tasks that were not so long time ago, almost Star Trek’ish.
11And all this had and has great influence on the destination to which we are
12going now.<p>Reading all this articles about new innovation about new thriving technologies
13makes me wonder what’s the next step. The future is the mesh, like Lisa Gansky
14said in her book The Mesh.<p>Many still have conservative views on distributed systems. The problems with
15security of information. Fear of not controlling every aspect of information
16flow. I am very opened to distributed systems and heterogeneous applications,
17and I think this is the correct and best way to proceed.<p>This year will definitely be about communication platforms. Mobile to mobile.
18Machine to mobile and vice versa. All the tech is available and ready to put
19into action. Wireless is today’s new mantra. And the concept of semantic web is
20now ready for industry.<p>Applications and developers now can gain access to new layers of systems and can
21prepare and build solutions to meet the high quality needs of market. The speed
22is everything now.<p>My vote goes to “Machine to Machine” and “Embedded Systems”!<ul><li><a href=http://en.wikipedia.org/wiki/Machine-to-Machine>Machine-to-Machine</a><li><a href=http://www.bitxml.org/>The ultimate M2M communication protocol</a><li><a href=http://www.coosproject.org/maven-site/1.0.0/project-info.html>COOS Project (connectivity initiative)</a><li><a href=http://m2m.com/index.jspa>Community for machine-to-machine</a><li><a href=http://en.wikipedia.org/wiki/Embedded_system>Embedded system</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
23<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
24with me
25<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
26the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
27otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/mount-plan9-over-network.html b/public/mount-plan9-over-network.html
deleted file mode 100755
index b2756b1..0000000
--- a/public/mount-plan9-over-network.html
+++ /dev/null
@@ -1,18 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Mount Plan9 over network</title><meta name=description content="First install libfuse with sudo apt install libfuse-dev."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Mount Plan9 over network</h1><p>May 7, 2023<div><ul><li>First install libfuse with sudo apt install libfuse-dev.<li>Then clone <a href=https://github.com/ftrvxmtrx/9pfs>https://github.com/ftrvxmtrx/9pfs</a> and compile it with make.<li>Copy 9pfs to your path.</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># On Plan9 side</span>
7</span></span><span style=display:flex><span>ip/ipconfig <span style=color:green># enables network</span>
8</span></span><span style=display:flex><span>aux/listen1 -tv tcp!*!9999 /bin/exportfs -r tmp <span style=color:green># export tmp folder</span>
9</span></span><span style=display:flex><span>
10</span></span><span style=display:flex><span><span style=color:green># On Linux side</span>
11</span></span><span style=display:flex><span>9pfs 172.18.0.1 -p 9999 local_folder <span style=color:green># mount</span>
12</span></span><span style=display:flex><span>umount local_folder <span style=color:green># unmount</span>
13</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
14<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
15with me
16<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
17the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
18otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/my-love-and-hate-relationship-with-nodejs.html b/public/my-love-and-hate-relationship-with-nodejs.html
deleted file mode 100755
index 7ee1496..0000000
--- a/public/my-love-and-hate-relationship-with-nodejs.html
+++ /dev/null
@@ -1,77 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>My love and hate relationship with Node.js</title><meta name=description content="Previous project I was working on was being coded inGolang."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>My love and hate relationship with Node.js</h1><p>Mar 30, 2020<div><p>Previous project I was working on was being coded in
7<a href=https://golang.org/>Golang</a>. Also was my first project using it. And damn,
8that was an awesome experience. The whole thing is just superb. From how errors
9are handled. The C-like way you handle compiling. The way the language is
10structured making it incredibly versatile and easy to learn.<p>It may cause some pain for somebody that is not used of using interfaces to map
11JSON and doing the recompilation all the time. But we have tools like
12<a href=http://eradman.com/entrproject/>entr</a> and
13<a href=https://www.gnu.org/software/make/>make</a> to fix that.<p>But we are not here to talk about my undying love for <strong>Golang</strong>. Only in some
14way we probably should. It is an excellent example of how modern language should
15be designed. And because I have used it extensively in the last couple of years
16this probably taints my views of other languages. And is doing me a great
17disservice. Nevertheless, here we are.<p>About two years ago I started flirting with <a href=https://nodejs.org/en/>Node.js</a>
18for a project I started working on. What I wanted was to have things written in
19a language that is widely used, and we could get additional developers for. As
20much as <strong>Golang</strong> is amazing it's really hard to get developers for it. Even
21now. And after playing around with it for a week I felt in love with the speed
22of iteration and massive package ecosystem. Do you want SSO? You got it! Do you
23want some esoteric library for something? There is a strong chance somebody
24wrote it. It is so extensive that you find yourself evaluating packages based on
25<strong>GitHub stars</strong> and number of contributors. You get swallowed by the vanity
26metrics and that potentially will become the downfall of Node.js.<p>Because of the sheer amount of choice I often got anxiety when choosing
27libraries. Will I choose the correct one? Is this library something that will be
28supported for a foreseeable future or not? I am used of using libraries that are
29being in development for 10 years plus (Python, C) and that gave me some sort of
30comfort. And it is probably unfair to Node.js and community to expect same
31dedication.<p>Moving forward ... Work started and things were great. <strong>Speed of iteration was
32insane</strong>. For some feature that I would need a day in Golang only took me hour
33or two. I became lazy! Using packages all over the place. Falling into the same
34trap as others. Packages on top of packages. And <a href=https://www.npmjs.com/>npm</a>
35didn't help at all. The way that the package manager works is just
36horrendous. And not allowing to have node_modules outside the project is also
37the stupidest idea ever.<p>So at that point I started feeling the technical debt that comes with Node.js
38and the whole ecosystem. What nobody tells you is that <strong>structuring large
39Node.js apps</strong> is more problematic than one would think. And going microservice
40for every single thing is also a bad idea. The amount of networking you
41introduce with that approach always ends up being a pain in the ass. And I don't
42even want to go into system administration here. The overhead is
43insane. Package-lock.json made many days feel like living hell for me. And I
44would eat the cost of all this if it meant for better development
45experience. Well, it didn't.<p>The <strong>lack of Typescript</strong> support in the interpreter is still mind boggling to
46me. Why haven't they added native support yet for this is beyond me?! That would
47have solved so many problems. Lack of type safety became a problem somewhere in
48the middle of the project where the codebase was sufficiently large enough to
49present problems. We started adding arguments to functions and there was <strong>no
50way to implicitly define argument types</strong>. And because at that point there were
51a lot of functions, it became impossible to know what each one accepts,
52development became more and more trial and error based.<p>I tried <strong>implementing Typescript</strong>, but that would present a large refactor
53that we were not willing to do at that point. The benefits were not enough. I
54also tried <a href=https://flow.org/>Flow - static type checker</a> but implementation
55was also horrible. What Typescript and Flow forces you is to have src folder and
56then <strong>transpile</strong> your code into dist folder and run it with node. WTH is that
57all about. Why can't this be done in memory or some virtual file system? Why? I
58see no reason why this couldn't be done like this. But it is what it is. I
59abandoned all hope for static type checking.<p>One of the problems that resulted from not having interfaces or types was
60inability to model out our data from <strong>Elasticsearch</strong>. I could have done a
61<strong>pedestrian implementation</strong> of it, but there must be a better way of doing
62this without resorting to some hack basically. Or maybe I haven't found a
63solution, which is also a possibility. I have looked, though. No juice!<p><strong>Error handling?</strong> Is that a joke?<p>Thank god for <strong>await/async</strong>. Without it, I would have probably just abandoned
64the whole thing and went with something else like Python. That's all I am going
65to say about this :)<p>I started asking myself a question if Node.js is actually ready to be used in a
66<strong>large scale applications</strong>? And this was a totally wrong question. What I
67should have been asking myself was, how to use Node.js in large scale
68application. And you don't get this in <strong>marketing material</strong> for Express or Koa
69etc. They never tell you this. Making Node.js scale on infrastructure or in
70codebase is really <strong>more of an art than a science</strong>. And just like with the
71whole JavaScript ecosystem:<ul><li>impossible to master,<li>half of your time you work on your tooling,<li>just accept transpilers that convert one code into another (holly smokes),<li>error handling is a joke,<li>standards? What standards?</ul><p>But on the other hand. As I did, you will also learn to love it. Learn to use it
72quickly and do impossible things in crazy limited time.<p>I hate to admit it. But I love Node.js. Dammit, I love it :)<p>2023 Update: I hate Node.js!</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
73<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
74with me
75<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
76the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
77otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/non-blocking-shell-exec-csharp.html b/public/non-blocking-shell-exec-csharp.html
deleted file mode 100755
index 3a4ebe9..0000000
--- a/public/non-blocking-shell-exec-csharp.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Execute not blocking async shell command in C#</title><meta name=description content="Execute a shell command in async in C# while not blocking the UI thread."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Execute not blocking async shell command in C#</h1><p>May 22, 2023<div><p>Execute a shell command in async in C# while not blocking the UI thread.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>private</span> <span style=color:#00f>async</span> Task executeCopyCommand()
7</span></span><span style=display:flex><span>{
8</span></span><span style=display:flex><span> <span style=color:#00f>await</span> Task.Run(() =&gt;
9</span></span><span style=display:flex><span> {
10</span></span><span style=display:flex><span> <span style=color:#2b91af>var</span> processStartInfo = <span style=color:#00f>new</span> ProcessStartInfo(<span style=color:#a31515>&#34;cmd&#34;</span>, <span style=color:#a31515>&#34;/c dir&#34;</span>)
11</span></span><span style=display:flex><span> {
12</span></span><span style=display:flex><span> RedirectStandardOutput = <span style=color:#00f>true</span>,
13</span></span><span style=display:flex><span> UseShellExecute = <span style=color:#00f>false</span>,
14</span></span><span style=display:flex><span> CreateNoWindow = <span style=color:#00f>true</span>
15</span></span><span style=display:flex><span> };
16</span></span><span style=display:flex><span>
17</span></span><span style=display:flex><span> <span style=color:#2b91af>var</span> process = <span style=color:#00f>new</span> Process
18</span></span><span style=display:flex><span> {
19</span></span><span style=display:flex><span> StartInfo = processStartInfo
20</span></span><span style=display:flex><span> };
21</span></span><span style=display:flex><span>
22</span></span><span style=display:flex><span> process.Start();
23</span></span><span style=display:flex><span> process.WaitForExit();
24</span></span><span style=display:flex><span> });
25</span></span><span style=display:flex><span>}
26</span></span></code></pre><p>Make sure that <code>async</code> is present in the function definition and <code>await</code> is used
27in the method that calls <code>executeCopyCommand()</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>private</span> <span style=color:#00f>async</span> <span style=color:#00f>void</span> button_Click(<span style=color:#2b91af>object</span> sender, EventArgs e)
28</span></span><span style=display:flex><span>{
29</span></span><span style=display:flex><span> <span style=color:#00f>await</span> executeCopyCommand();
30</span></span><span style=display:flex><span>}
31</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
32<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
33with me
34<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
35the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
36otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/notes.xml b/public/notes.xml
deleted file mode 100755
index b4c9e4f..0000000
--- a/public/notes.xml
+++ /dev/null
@@ -1,1373 +0,0 @@
1<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
2 <channel>
3 <title>Mitja Felicijan's notes</title>
4 <link>https://mitjafelicijan.com</link>
5 <description>You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you.</description>
6 <language>en-us</language>
7
8
9
10
11
12
13
14 <item>
15 <title>60&#39;s IBM Computers Commercial</title>
16 <link>https://mitjafelicijan.com/60s-ibm-computers-commercial.html</link>
17 <pubDate>Thu, 29 Jun 2023 22:13:45 &#43;0200</pubDate>
18 <guid>https://mitjafelicijan.com/60s-ibm-computers-commercial.html</guid>
19 <description>Likely aired during an hour-long program during the 1960s, long commercials suchas this typically aired during hour-long programs.</description>
20 <content:encoded>&lt;p&gt;Likely aired during an hour-long program during the 1960s, long commercials such
21as this typically aired during hour-long programs. They would &lt;em&gt;not&lt;/em&gt; have aired
22during a half-hour program.&lt;/p&gt;
23&lt;p&gt;&lt;video
24poster=&#34;/notes/60s-ibm-computers-commercial.jpg&#34;
25src=&#34;/notes/60s-ibm-computers-commercial.mp4&#34;
26controls&gt;&lt;/video&gt;&lt;/p&gt;
27</content:encoded>
28 </item>
29
30
31
32 <item>
33 <title>10/GUI 10 Finger Multitouch User Interface</title>
34 <link>https://mitjafelicijan.com/10gui-10-finger-multitouch-user-interface.html</link>
35 <pubDate>Thu, 29 Jun 2023 14:51:39 &#43;0200</pubDate>
36 <guid>https://mitjafelicijan.com/10gui-10-finger-multitouch-user-interface.html</guid>
37 <description>Message from 10/GUI team (page 10gui.</description>
38 <content:encoded>&lt;p&gt;Message from 10/GUI team (page 10gui.com does not exist anymore):&lt;/p&gt;
39&lt;p&gt;&lt;em&gt;Over a quarter-century ago, Xerox introduced the modern graphical user
40interface paradigm we today take for granted.&lt;/em&gt;&lt;/p&gt;
41&lt;p&gt;&lt;em&gt;That it has endured is a testament to the genius of its design. But the
42industry is now at a crossroads: New technologies promise higher-bandwidth
43interaction, but have yet to find a truly viable implementation.&lt;/em&gt;&lt;/p&gt;
44&lt;p&gt;&lt;em&gt;10/GUI aims to bridge this gap by rethinking the desktop to leverage technology
45in an intuitive and powerful way.&lt;/em&gt;&lt;/p&gt;
46&lt;p&gt;&lt;video
47poster=&#34;/notes/10gui-10-finger-multitouch-user-interface.jpg&#34;
48src=&#34;/notes/10gui-10-finger-multitouch-user-interface.mp4&#34;
49controls&gt;&lt;/video&gt;&lt;/p&gt;
50</content:encoded>
51 </item>
52
53
54
55 <item>
56 <title>Alacritty open links with modifier</title>
57 <link>https://mitjafelicijan.com/alacritty-open-links-with-modifier.html</link>
58 <pubDate>Sun, 25 Jun 2023 17:17:16 &#43;0200</pubDate>
59 <guid>https://mitjafelicijan.com/alacritty-open-links-with-modifier.html</guid>
60 <description>Alacritty by default makes all links in the terminal output clickable and thisgets annoying rather quickly.</description>
61 <content:encoded>&lt;p&gt;Alacritty by default makes all links in the terminal output clickable and this
62gets annoying rather quickly. I liked the default behavior of Gnome terminal
63where you needed to hold Control key and then you could click and open links.&lt;/p&gt;
64&lt;p&gt;To achieve this in Alacritty you need to provide a &lt;code&gt;hint&lt;/code&gt; in the configuration
65file. Config file is located at &lt;code&gt;~/.config/alacritty/alacritty.yml&lt;/code&gt;.&lt;/p&gt;
66&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hints:
67&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enabled:
68&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - regex: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
69&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt; [^\u0000-\u001F\u007F-\u009F&amp;lt;&amp;gt;\&amp;#34;\\s{-}\\^⟨⟩`]&#43;&amp;#34;&lt;/span&gt;
70&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; command: xdg-open
71&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; post_processing: &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt;
72&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; mouse:
73&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; enabled: &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt;
74&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; mods: Control
75&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following should work under any Linux system. For macOS, you will need to
76change &lt;code&gt;command: xdg-open&lt;/code&gt; to something else.&lt;/p&gt;
77&lt;p&gt;Now the links will be visible and clickable only when Control key is being
78pressed.&lt;/p&gt;
79&lt;p&gt;Source: &lt;a href=&#34;https://github.com/alacritty/alacritty/issues/5246&#34;&gt;https://github.com/alacritty/alacritty/issues/5246&lt;/a&gt;&lt;/p&gt;
80</content:encoded>
81 </item>
82
83
84
85 <item>
86 <title>Development environments with Nix</title>
87 <link>https://mitjafelicijan.com/development-environments-with-nix.html</link>
88 <pubDate>Sun, 25 Jun 2023 16:38:10 &#43;0200</pubDate>
89 <guid>https://mitjafelicijan.com/development-environments-with-nix.html</guid>
90 <description>Nix is amazing for making reproducible cross OS development environment.</description>
91 <content:encoded>&lt;p&gt;Nix is amazing for making reproducible cross OS development environment.&lt;/p&gt;
92&lt;p&gt;First you need to &lt;a href=&#34;https://nixos.org/download.html&#34;&gt;install Nix package
93manager&lt;/a&gt;.&lt;/p&gt;
94&lt;ul&gt;
95&lt;li&gt;Create a file &lt;code&gt;shell.nix&lt;/code&gt; in your project folder.&lt;/li&gt;
96&lt;li&gt;In the section that has &lt;code&gt;python3&lt;/code&gt; etc add programs you want to use. These can
97be CLI or GUI applications. It doesn&#39;t matter to Nix.&lt;/li&gt;
98&lt;/ul&gt;
99&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{ pkgs ? &lt;span style=&#34;color:#00f&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;lt;nixpkgs&amp;gt;&lt;/span&gt; {} }:
100&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; pkgs.mkShell {
101&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; nativeBuildInputs = &lt;span style=&#34;color:#00f&#34;&gt;with&lt;/span&gt; pkgs.buildPackages; [
102&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3
103&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; tinycc
104&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ];
105&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
106&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And then run it &lt;code&gt;nix-shell&lt;/code&gt;. By default it will look for &lt;code&gt;shell.nix&lt;/code&gt; file. If
107you want to specify a different file use &lt;code&gt;nix-shell file.nix&lt;/code&gt;. That is about it.&lt;/p&gt;
108&lt;p&gt;When the shell is spawned it could happen that your &lt;code&gt;PS1&lt;/code&gt; prompt will be
109overwritten and your prompt will look differently. In that case you need to
110either do &lt;code&gt;NIX_SHELL_PRESERVE_PROMPT=1 nix shell&lt;/code&gt; or add
111&lt;code&gt;NIX_SHELL_PRESERVE_PROMPT&lt;/code&gt; variable to your &lt;code&gt;bashrc&lt;/code&gt; or &lt;code&gt;zshrc&lt;/code&gt; file and set it
112to &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;
113&lt;p&gt;I also have a modified &lt;code&gt;PS1&lt;/code&gt; prompt for Bash that I use and it also catches the
114usage of Nix shell.&lt;/p&gt;
115&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NIX_SHELL_PRESERVE_PROMPT=1
116&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
117&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;parse_git_branch() {
118&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; git branch 2&amp;gt; /dev/null | sed -e &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;/^[^*]/d&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;s/* \(.*\)/ (\1)/&amp;#39;&lt;/span&gt;
119&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
120&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
121&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;is_inside_nix_shell() {
122&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; nix_shell_name=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;basename &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$IN_NIX_SHELL&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; 2&amp;gt;/dev/null&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;
123&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; [[ -n &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$nix_shell_name&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; ]]; &lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
124&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34; \e[0;36m(nix-shell)\e[0m&amp;#34;&lt;/span&gt;
125&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;fi&lt;/span&gt;
126&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
127&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
128&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export PS1=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;[\033[38;5;9m\]\u@\h\[&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;tput sgr0&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\]]&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;is_inside_nix_shell&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;tput sgr0&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;\] \n&lt;/span&gt;$&lt;span style=&#34;color:#a31515&#34;&gt; &amp;#34;&lt;/span&gt;
129&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And this is what it looks like when you are in a Nix shell. Otherwise that part
130of prompt is omitted&lt;/p&gt;
131&lt;p&gt;&lt;img src=&#34;/notes/ps1-prompt.png&#34; alt=&#34;PS1 Prompt&#34; /&gt;&lt;/p&gt;
132&lt;p&gt;More resources:&lt;/p&gt;
133&lt;ul&gt;
134&lt;li&gt;&lt;a href=&#34;https://nixos.wiki/wiki/Development_environment_with_nix-shell&#34;&gt;https://nixos.wiki/wiki/Development_environment_with_nix-shell&lt;/a&gt;&lt;/li&gt;
135&lt;li&gt;&lt;a href=&#34;https://nixos.wiki/wiki/Main_Page&#34;&gt;https://nixos.wiki/wiki/Main_Page&lt;/a&gt;&lt;/li&gt;
136&lt;li&gt;&lt;a href=&#34;https://itsfoss.com/why-use-nixos/&#34;&gt;https://itsfoss.com/why-use-nixos/&lt;/a&gt;&lt;/li&gt;
137&lt;li&gt;&lt;a href=&#34;https://mynixos.com/&#34;&gt;https://mynixos.com/&lt;/a&gt;&lt;/li&gt;
138&lt;/ul&gt;
139</content:encoded>
140 </item>
141
142
143
144 <item>
145 <title>Making cgit look nicer</title>
146 <link>https://mitjafelicijan.com/making-cgit-look-nicer.html</link>
147 <pubDate>Sat, 24 Jun 2023 13:33:58 &#43;0200</pubDate>
148 <guid>https://mitjafelicijan.com/making-cgit-look-nicer.html</guid>
149 <description>For personal use I have a private Git serverset up and I use GitHub just as a mirror.</description>
150 <content:encoded>&lt;p&gt;For personal use I have a &lt;a href=&#34;https://git.mitjafelicijan.com&#34;&gt;private Git server&lt;/a&gt;
151set up and I use GitHub just as a mirror. By default the cgit theme looks a bit
152dated so I made the flowing theme.&lt;/p&gt;
153&lt;ul&gt;
154&lt;li&gt;&lt;code&gt;/etc/cgitrc&lt;/code&gt;&lt;/li&gt;
155&lt;/ul&gt;
156&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;css=&lt;span style=&#34;color:#a31515&#34;&gt;/cgit.css&lt;/span&gt;
157&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;logo=&lt;span style=&#34;color:#a31515&#34;&gt;/startrek.gif&lt;/span&gt;
158&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;favicon=&lt;span style=&#34;color:#a31515&#34;&gt;/favicon.png&lt;/span&gt;
159&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;source-filter=&lt;span style=&#34;color:#a31515&#34;&gt;/usr/lib/cgit/filters/syntax-highlighting-edited.sh&lt;/span&gt;
160&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;about-filter=&lt;span style=&#34;color:#a31515&#34;&gt;/usr/lib/cgit/filters/about-formatting.sh&lt;/span&gt;
161&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
162&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;local-time=&lt;span style=&#34;color:#a31515&#34;&gt;1&lt;/span&gt;
163&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;snapshots=&lt;span style=&#34;color:#a31515&#34;&gt;tar.gz&lt;/span&gt;
164&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repository-sort=&lt;span style=&#34;color:#a31515&#34;&gt;age&lt;/span&gt;
165&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cache-size=&lt;span style=&#34;color:#a31515&#34;&gt;1000&lt;/span&gt;
166&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;branch-sort=&lt;span style=&#34;color:#a31515&#34;&gt;age&lt;/span&gt;
167&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;summary-log=&lt;span style=&#34;color:#a31515&#34;&gt;200&lt;/span&gt;
168&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;max-atom-items=&lt;span style=&#34;color:#a31515&#34;&gt;50&lt;/span&gt;
169&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;max-repo-count=&lt;span style=&#34;color:#a31515&#34;&gt;100&lt;/span&gt;
170&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
171&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;enable-index-owner=&lt;span style=&#34;color:#a31515&#34;&gt;0&lt;/span&gt;
172&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;enable-follow-links=&lt;span style=&#34;color:#a31515&#34;&gt;1&lt;/span&gt;
173&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;enable-log-filecount=&lt;span style=&#34;color:#a31515&#34;&gt;1&lt;/span&gt;
174&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;enable-log-linecount=&lt;span style=&#34;color:#a31515&#34;&gt;1&lt;/span&gt;
175&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
176&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root-title=&lt;span style=&#34;color:#a31515&#34;&gt;Place for code, experiments and other bullshit!&lt;/span&gt;
177&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root-desc=
178&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;clone-url=&lt;span style=&#34;color:#a31515&#34;&gt;git@git.mitjafelicijan.com:/home/git/$CGIT_REPO_URL&lt;/span&gt;
179&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
180&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.gif=&lt;span style=&#34;color:#a31515&#34;&gt;image/gif&lt;/span&gt;
181&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.html=&lt;span style=&#34;color:#a31515&#34;&gt;text/html&lt;/span&gt;
182&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.jpg=&lt;span style=&#34;color:#a31515&#34;&gt;image/jpeg&lt;/span&gt;
183&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.jpeg=&lt;span style=&#34;color:#a31515&#34;&gt;image/jpeg&lt;/span&gt;
184&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.pdf=&lt;span style=&#34;color:#a31515&#34;&gt;application/pdf&lt;/span&gt;
185&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.png=&lt;span style=&#34;color:#a31515&#34;&gt;image/png&lt;/span&gt;
186&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mimetype.svg=&lt;span style=&#34;color:#a31515&#34;&gt;image/svg&#43;xml&lt;/span&gt;
187&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
188&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;readme=&lt;span style=&#34;color:#a31515&#34;&gt;:README.md&lt;/span&gt;
189&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;readme=&lt;span style=&#34;color:#a31515&#34;&gt;:readme.md&lt;/span&gt;
190&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
191&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Must be at the end!&lt;/span&gt;
192&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;virtual-root=&lt;span style=&#34;color:#a31515&#34;&gt;/&lt;/span&gt;
193&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scan-path=&lt;span style=&#34;color:#a31515&#34;&gt;/home/git/&lt;/span&gt;
194&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For &lt;code&gt;syntax-highlighting-edited.sh&lt;/code&gt; follow instructions on
195&lt;a href=&#34;https://wiki.archlinux.org/title/Cgit#Using_highlight&#34;&gt;https://wiki.archlinux.org/title/Cgit&lt;/a&gt;.&lt;/p&gt;
196&lt;ul&gt;
197&lt;li&gt;&lt;code&gt;/usr/share/cgit/cgit.css&lt;/code&gt;&lt;/li&gt;
198&lt;/ul&gt;
199&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;* {
200&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-size&lt;/span&gt;: 11&lt;span style=&#34;color:#2b91af&#34;&gt;pt&lt;/span&gt;;
201&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
202&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
203&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;body {
204&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-family&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;monospace&lt;/span&gt;;
205&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;background&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;white&lt;/span&gt;;
206&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
207&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
208&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
209&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;th, td {
210&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;text-align&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;left&lt;/span&gt;;
211&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
212&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
213&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* HEADER */&lt;/span&gt;
214&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
215&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#header {
216&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-bottom&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
217&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
218&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
219&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#header .&lt;span style=&#34;color:#2b91af&#34;&gt;logo&lt;/span&gt; img {
220&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;block&lt;/span&gt;;
221&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;height&lt;/span&gt;: 3&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
222&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-right&lt;/span&gt;: 10&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt;;
223&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
224&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
225&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#header .&lt;span style=&#34;color:#2b91af&#34;&gt;sub&lt;/span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;right&lt;/span&gt; {
226&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;none&lt;/span&gt;;
227&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
228&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
229&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* FOOTER */&lt;/span&gt;
230&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
231&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;footer&lt;/span&gt; {
232&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-top&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
233&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-style&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;italic&lt;/span&gt;;
234&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
235&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
236&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;footer&lt;/span&gt;, .&lt;span style=&#34;color:#2b91af&#34;&gt;footer&lt;/span&gt; a {
237&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;gray&lt;/span&gt;;
238&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
239&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
240&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* TABS */&lt;/span&gt;
241&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
242&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;tabs&lt;/span&gt; a {
243&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-bottom&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
244&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;inline-block&lt;/span&gt;;
245&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-right&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
246&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
247&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
248&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;tabs&lt;/span&gt; td a:only-child {
249&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;none&lt;/span&gt;;
250&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
251&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
252&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* HIDING ELEMENTS */&lt;/span&gt;
253&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
254&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;cgit-panel&lt;/span&gt;, .&lt;span style=&#34;color:#2b91af&#34;&gt;form&lt;/span&gt; {
255&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;none&lt;/span&gt;;
256&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
257&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
258&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* LISTS */&lt;/span&gt;
259&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
260&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;list&lt;/span&gt; td, .&lt;span style=&#34;color:#2b91af&#34;&gt;list&lt;/span&gt; th {
261&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-right&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
262&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
263&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
264&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;list&lt;/span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;nohover&lt;/span&gt; a {
265&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;black&lt;/span&gt;;
266&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
267&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
268&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;list&lt;/span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;button&lt;/span&gt; {
269&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-right&lt;/span&gt;: 0.5&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
270&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
271&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
272&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* COMMIT */&lt;/span&gt;
273&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
274&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;commit-subject&lt;/span&gt; {
275&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt; 0;
276&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
277&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
278&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;decoration&lt;/span&gt; a {
279&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-left&lt;/span&gt;: 0.5&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
280&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
281&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
282&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;commit-info&lt;/span&gt; th {
283&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-right&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
284&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
285&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
286&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;commit-subject&lt;/span&gt; {
287&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt; 0;
288&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
289&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
290&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; div.&lt;span style=&#34;color:#2b91af&#34;&gt;head&lt;/span&gt; {
291&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-top&lt;/span&gt;: 2&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
292&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
293&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
294&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diffstat&lt;/span&gt; td {
295&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-right&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
296&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
297&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
298&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* CONTENT */&lt;/span&gt;
299&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
300&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;linenumbers&lt;/span&gt; {
301&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding-right&lt;/span&gt;: 0.5&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
302&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
303&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
304&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;linenumbers&lt;/span&gt; a {
305&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;gray&lt;/span&gt;;
306&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
307&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
308&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.&lt;span style=&#34;color:#2b91af&#34;&gt;pager&lt;/span&gt; {
309&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;flex&lt;/span&gt;;
310&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;list-style-type&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;none&lt;/span&gt;;
311&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 0;
312&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; gap: 0.5&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
313&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
314&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
315&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;/* DIFF COLORS */&lt;/span&gt;
316&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
317&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; {
318&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;width&lt;/span&gt;: 100&lt;span style=&#34;color:#2b91af&#34;&gt;%&lt;/span&gt;;
319&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
320&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
321&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; td {
322&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;white-space&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;pre&lt;/span&gt;;
323&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
324&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
325&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; td div.&lt;span style=&#34;color:#2b91af&#34;&gt;head&lt;/span&gt; {
326&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-weight&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;bold&lt;/span&gt;;
327&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;margin-top&lt;/span&gt;: 1&lt;span style=&#34;color:#2b91af&#34;&gt;em&lt;/span&gt;;
328&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;black&lt;/span&gt;;
329&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
330&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
331&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; td div.&lt;span style=&#34;color:#2b91af&#34;&gt;hunk&lt;/span&gt; {
332&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: #009;
333&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
334&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
335&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; td div.&lt;span style=&#34;color:#2b91af&#34;&gt;add&lt;/span&gt; {
336&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;green&lt;/span&gt;;
337&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
338&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
339&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table.&lt;span style=&#34;color:#2b91af&#34;&gt;diff&lt;/span&gt; td div.&lt;span style=&#34;color:#2b91af&#34;&gt;del&lt;/span&gt; {
340&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;red&lt;/span&gt;;
341&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
342&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
343 </item>
344
345
346
347 <item>
348 <title>Simple presentations with Markdown</title>
349 <link>https://mitjafelicijan.com/presentations-with-markdown.html</link>
350 <pubDate>Wed, 21 Jun 2023 08:54:48 &#43;0200</pubDate>
351 <guid>https://mitjafelicijan.com/presentations-with-markdown.html</guid>
352 <description>A simple way to make presentations without using desktop apps or using onlineservices is https://github.</description>
353 <content:encoded>&lt;p&gt;A simple way to make presentations without using desktop apps or using online
354services is &lt;a href=&#34;https://github.com/remarkjs/remark&#34;&gt;https://github.com/remarkjs/remark&lt;/a&gt;.&lt;/p&gt;
355&lt;p&gt;First create &lt;code&gt;index.html&lt;/code&gt; and be sure you make changes to &lt;code&gt;config&lt;/code&gt; variable.&lt;/p&gt;
356&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
357&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html&amp;gt;
358&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
359&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;head&amp;gt;
360&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
361&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;meta charset=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;&amp;gt;
362&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;style&amp;gt;
363&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; body {
364&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-family&lt;/span&gt;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;SF Pro Display&amp;#39;&lt;/span&gt;;
365&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
366&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
367&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;remark-code&lt;/span&gt;,
368&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; .&lt;span style=&#34;color:#2b91af&#34;&gt;remark-inline-code&lt;/span&gt; {
369&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-family&lt;/span&gt;: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;SF Mono&amp;#39;&lt;/span&gt;;
370&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;medium&lt;/span&gt;;
371&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;background-color&lt;/span&gt;: &lt;span style=&#34;color:#00f&#34;&gt;gainsboro&lt;/span&gt;;
372&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;border-radius&lt;/span&gt;: 5&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt;;
373&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;padding&lt;/span&gt;: 0 5&lt;span style=&#34;color:#2b91af&#34;&gt;px&lt;/span&gt;;
374&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
375&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/style&amp;gt;
376&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/head&amp;gt;
377&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
378&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;body&amp;gt;
379&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;textarea id=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/textarea&amp;gt;
380&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script src=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://remarkjs.com/downloads/remark-latest.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
381&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;script&amp;gt;
382&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; config = {
383&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; title: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;My presentation&amp;#39;&lt;/span&gt;,
384&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; file: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;presentation.md&amp;#39;&lt;/span&gt;,
385&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; };
386&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
387&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; document.title = config.title;
388&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; remark.create({ sourceUrl: config.file });
389&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/script&amp;gt;
390&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/body&amp;gt;
391&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
392&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;
393&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now the markdown file &lt;code&gt;presentation.md&lt;/code&gt; with presenetation. &lt;code&gt;---&lt;/code&gt; is used to
394separate slides. Other stuff is just pure markdown.&lt;/p&gt;
395&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;class: center, middle
396&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
397&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;# Main title of the presentation
398&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;&lt;/span&gt;
399&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
400&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
401&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;# Fist slide
402&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;&lt;/span&gt;
403&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Eveniet mollitia nemo architecto rerum aut iure iste. Sit nihil nobis libero iusto fugit nam laudantium ut. Dignissimos corrupti laudantium nisi.
404&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
405&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;-&lt;/span&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit.
406&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;-&lt;/span&gt; Integer aliquet mauris a felis fringilla, ut congue massa finibus.
407&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
408&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
409&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
410&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;# Slide two
411&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold&#34;&gt;&lt;/span&gt;
412&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;-&lt;/span&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit.
413&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;-&lt;/span&gt; Vestibulum eget leo ac dolor venenatis pulvinar.
414&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
415 </item>
416
417
418
419 <item>
420 <title>Bulk thumbnails</title>
421 <link>https://mitjafelicijan.com/bulk-make-thumbnails.html</link>
422 <pubDate>Sun, 04 Jun 2023 20:46:56 &#43;0200</pubDate>
423 <guid>https://mitjafelicijan.com/bulk-make-thumbnails.html</guid>
424 <description>Make bulk thumbnails of JPGs with ImageMagick.</description>
425 <content:encoded>&lt;p&gt;Make bulk thumbnails of JPGs with ImageMagick.&lt;/p&gt;
426&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/bin/bash
427&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
428&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;directory=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;./images/&amp;#34;&lt;/span&gt;
429&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dimensions=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;360x360&amp;#34;&lt;/span&gt;
430&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
431&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; file in &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$directory&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;*.jpg; &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
432&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; convert &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$file&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; -resize $dimensions &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$file&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;file%.*&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;-thumbnail.jpg&amp;#34;&lt;/span&gt;
433&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
434&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
435 </item>
436
437
438
439 <item>
440 <title>Edsger W. Dijkstra Manuscripts ebook</title>
441 <link>https://mitjafelicijan.com/ewd-manuscripts-ebook.html</link>
442 <pubDate>Thu, 01 Jun 2023 22:47:56 &#43;0200</pubDate>
443 <guid>https://mitjafelicijan.com/ewd-manuscripts-ebook.html</guid>
444 <description>I love reading the original manuscripts of Edsger W.</description>
445 <content:encoded>&lt;p&gt;I love reading the original manuscripts of Edsger W. Dijkstra. They are
446available online at the University of Texas at Austin website, but I also found
447MOBI version. I converted it into ePub as well.&lt;/p&gt;
448&lt;p&gt;Downloads:&lt;/p&gt;
449&lt;ul&gt;
450&lt;li&gt;&lt;a href=&#34;https://files.mitjafelicijan.com/haphazard/ewd-manuscripts.mobi&#34;&gt;MOBI version of all Manuscripts&lt;/a&gt;&lt;/li&gt;
451&lt;li&gt;&lt;a href=&#34;https://files.mitjafelicijan.com/haphazard/ewd-manuscripts.epub&#34;&gt;ePub version of all Manuscripts&lt;/a&gt;&lt;/li&gt;
452&lt;/ul&gt;
453&lt;p&gt;Sources and credits:&lt;/p&gt;
454&lt;ul&gt;
455&lt;li&gt;&lt;a href=&#34;https://www.cs.utexas.edu/users/EWD/index00xx.html&#34;&gt;Original manuscripts from University of Texas at Austin&lt;/a&gt;&lt;/li&gt;
456&lt;li&gt;&lt;a href=&#34;https://github.com/evmn/The-Manuscripts-of-Edsger-W.-Dijkstra&#34;&gt;Original repository of MOBI version&lt;/a&gt;&lt;/li&gt;
457&lt;/ul&gt;
458</content:encoded>
459 </item>
460
461
462
463
464
465 <item>
466 <title>Extending dte editor</title>
467 <link>https://mitjafelicijan.com/extending-dte-editor.html</link>
468 <pubDate>Wed, 31 May 2023 08:12:45 &#43;0200</pubDate>
469 <guid>https://mitjafelicijan.com/extending-dte-editor.html</guid>
470 <description>dte is an interesting editor I startedusing lately more and more.</description>
471 <content:encoded>&lt;p&gt;&lt;a href=&#34;https://craigbarnes.gitlab.io/dte/&#34;&gt;&lt;code&gt;dte&lt;/code&gt;&lt;/a&gt; is an interesting editor I started
472using lately more and more. Since it is using
473&lt;a href=&#34;https://linux.die.net/man/3/execvp&#34;&gt;&lt;code&gt;execvp()&lt;/code&gt;&lt;/a&gt; it can be easily extended. I
474needed comment/uncomment feature so I created a small utility that does this for
475me. Code lives on repository &lt;a href=&#34;https://git.mitjafelicijan.com/dte-extensions.git/about/&#34;&gt;dte
476extensions&lt;/a&gt; but this
477utilities can be used for whatever you want. Make sure you have version 1.11 or
478above.&lt;/p&gt;
479&lt;p&gt;Next one will be invoking formatter based on the type of a file.&lt;/p&gt;
480&lt;p&gt;My config that works for me.&lt;/p&gt;
481&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set show-line-numbers true;
482&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set tab-width 4;
483&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set &lt;span style=&#34;color:#00f&#34;&gt;case&lt;/span&gt;-sensitive-search false;
484&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
485&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Special aliases&lt;/span&gt;
486&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias m_comment &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;exec -s -i line -o buffer -e errmsg ~/.dte/bin/comment&amp;#39;&lt;/span&gt;
487&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias m_format &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;save; exec go fmt .; reload&amp;#39;&lt;/span&gt;
488&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias m_duplicate &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;copy;paste&amp;#39;&lt;/span&gt;;
489&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
490&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Useful aliases.&lt;/span&gt;
491&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias m_force_close &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;quit -f&amp;#39;&lt;/span&gt;;
492&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias m_reload &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;close; open $FILE&amp;#39;&lt;/span&gt;
493&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
494&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Key bindings.&lt;/span&gt;
495&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind M-s save;
496&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind M-q m_force_close;
497&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind M-z refresh;
498&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind C-down blkdown;
499&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind C-up blkup;
500&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind C-_ m_comment;
501&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind M-. m_format;
502&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bind C-d m_duplicate;
503&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
504&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Syntax highlighting.&lt;/span&gt;
505&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hi preproc magenta;
506&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hi keyword red;
507&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hi linenumber blue;
508&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hi comment cyan;
509&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
510 </item>
511
512
513
514 <item>
515 <title>Grep to Less that maintain colors</title>
516 <link>https://mitjafelicijan.com/grep-to-less-maintain-colors.html</link>
517 <pubDate>Mon, 29 May 2023 21:27:07 &#43;0200</pubDate>
518 <guid>https://mitjafelicijan.com/grep-to-less-maintain-colors.html</guid>
519 <description>I often use grep to search for todo&amp;#39;s in my code and other people&amp;#39;s code andthen pipe them in less and I missed having colors that grep outputs in less.</description>
520 <content:encoded>&lt;p&gt;I often use &lt;code&gt;grep&lt;/code&gt; to search for todo&#39;s in my code and other people&#39;s code and
521then pipe them in &lt;code&gt;less&lt;/code&gt; and I missed having colors that grep outputs in &lt;code&gt;less&lt;/code&gt;.&lt;/p&gt;
522&lt;ul&gt;
523&lt;li&gt;Grep&#39;s &lt;code&gt;--color=always&lt;/code&gt; use markers to highlight the matching strings.&lt;/li&gt;
524&lt;li&gt;Less&#39;s &lt;code&gt;-R&lt;/code&gt; option outputs &amp;quot;raw&amp;quot; control characters.&lt;/li&gt;
525&lt;/ul&gt;
526&lt;p&gt;You could use &lt;code&gt;alias grep=&#39;grep --color=always&#39;&lt;/code&gt; and &lt;code&gt;alias less=&#39;less -R&#39;&lt;/code&gt; or
527create todo function in your &lt;code&gt;.bashrc&lt;/code&gt; that accepts first argument as search
528string.&lt;/p&gt;
529&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This is where the magic happens.&lt;/span&gt;
530&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grep --color=always -rni &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;TODO:&amp;#34;&lt;/span&gt; | less -R
531&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;/notes/grep-less.png&#34; alt=&#34;Less and grep&#34; /&gt;&lt;/p&gt;
532</content:encoded>
533 </item>
534
535
536
537 <item>
538 <title>Easy measure time took in a bash script</title>
539 <link>https://mitjafelicijan.com/easy-time-took-in-bash.html</link>
540 <pubDate>Sun, 28 May 2023 17:53:20 &#43;0200</pubDate>
541 <guid>https://mitjafelicijan.com/easy-time-took-in-bash.html</guid>
542 <description>In Bash, the $SECONDS variable is a special variable that automatically keepstrack of the number of seconds since the current shell or script startedexecuting.</description>
543 <content:encoded>&lt;p&gt;In Bash, the &lt;code&gt;$SECONDS&lt;/code&gt; variable is a special variable that automatically keeps
544track of the number of seconds since the current shell or script started
545executing. It starts counting from the moment the script begins running.&lt;/p&gt;
546&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/bin/bash
547&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
548&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Reset the timer to zero.&lt;/span&gt;
549&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SECONDS=0
550&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
551&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Do something.&lt;/span&gt;
552&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sleep 5
553&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
554&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Print the time elapsed.&lt;/span&gt;
555&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Time taken: &lt;/span&gt;$SECONDS&lt;span style=&#34;color:#a31515&#34;&gt; seconds&amp;#34;&lt;/span&gt;
556&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
557 </item>
558
559
560
561 <item>
562 <title>Make DCSS playable on 4k displays</title>
563 <link>https://mitjafelicijan.com/dcss-on-4k-display.html</link>
564 <pubDate>Sat, 27 May 2023 19:35:11 &#43;0200</pubDate>
565 <guid>https://mitjafelicijan.com/dcss-on-4k-display.html</guid>
566 <description>Dungeon Crawl Stone Soup has a a very small font by default.</description>
567 <content:encoded>&lt;p&gt;Dungeon Crawl Stone Soup has a a very small font by default. On a 4k display, it
568is barely readable. This is how I made it playable.&lt;/p&gt;
569&lt;p&gt;Make a file &lt;code&gt;~/.crawlrc&lt;/code&gt; with the following content:&lt;/p&gt;
570&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Adjust the sizes to your liking.&lt;/span&gt;
571&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
572&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_font_crt_size = &lt;span style=&#34;color:#a31515&#34;&gt;32&lt;/span&gt;
573&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_font_stat_size = &lt;span style=&#34;color:#a31515&#34;&gt;32&lt;/span&gt;
574&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_font_msg_size = &lt;span style=&#34;color:#a31515&#34;&gt;32&lt;/span&gt;
575&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_font_tip_size = &lt;span style=&#34;color:#a31515&#34;&gt;32&lt;/span&gt;
576&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_font_lbl_size = &lt;span style=&#34;color:#a31515&#34;&gt;32&lt;/span&gt;
577&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tile_sidebar_pixels = &lt;span style=&#34;color:#a31515&#34;&gt;64&lt;/span&gt;
578&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To zoom in and out in viewport, press &lt;code&gt;Ctrl&#43;&lt;/code&gt; and &lt;code&gt;Ctrl-&lt;/code&gt; respectively.&lt;/p&gt;
579&lt;p&gt;All the possible options are documented in the &lt;a href=&#34;https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt&#34;&gt;Dungeon Crawl Stone Soup Options
580Guide&lt;/a&gt;
581file.&lt;/p&gt;
582</content:encoded>
583 </item>
584
585
586
587 <item>
588 <title>Drawing Pixels in Plan9</title>
589 <link>https://mitjafelicijan.com/drawing-pixels-in-plan9.html</link>
590 <pubDate>Sat, 27 May 2023 17:41:33 &#43;0200</pubDate>
591 <guid>https://mitjafelicijan.com/drawing-pixels-in-plan9.html</guid>
592 <description>I have started exploring Plan9&amp;#39;s graphics capabilities.</description>
593 <content:encoded>&lt;p&gt;I have started exploring Plan9&#39;s graphics capabilities. This is a hello world
594alternative for drawing that draws a yellow square on a blue background.&lt;/p&gt;
595&lt;p&gt;More information:&lt;/p&gt;
596&lt;ul&gt;
597&lt;li&gt;&lt;a href=&#34;https://github.com/0intro/plan9/blob/main/sys/include/draw.h&#34;&gt;draw.h header file&lt;/a&gt;
598contains all the drawing functions&lt;/li&gt;
599&lt;li&gt;&lt;a href=&#34;https://9fans.github.io/plan9port/man/man3/draw.html&#34;&gt;draw man page&lt;/a&gt;
600has a bit more digestable descriptions of the draw functions&lt;/li&gt;
601&lt;li&gt;&lt;a href=&#34;https://9fans.github.io/plan9port/man/man3/graphics.html&#34;&gt;graphics man page&lt;/a&gt;
602has a bit more digestable descriptions of the graphics functions&lt;/li&gt;
603&lt;li&gt;&lt;a href=&#34;https://9fans.github.io/plan9port/man/man3/&#34;&gt;all man pages&lt;/a&gt;
604can be a valuable resource for learning about the system&lt;/li&gt;
605&lt;/ul&gt;
606&lt;p&gt;&lt;img src=&#34;/notes/plan9-pixels.png&#34; alt=&#34;Plan9 Howdy World!&#34; /&gt;&lt;/p&gt;
607&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// main.c
608&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;u.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
609&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;libc.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
610&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;draw.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
611&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;cursor.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
612&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
613&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;void&lt;/span&gt;
614&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;main()
615&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
616&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ulong co;
617&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Image *im, *bg;
618&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; co = 0x0000FFFF;
619&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
620&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (initdraw(nil, nil, argv0) &amp;lt; 0)
621&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
622&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sysfatal(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;%s: %r&amp;#34;&lt;/span&gt;, argv0);
623&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
624&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
625&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; im = allocimage(display, Rect(0, 0, 300, 300), RGB24, 0, DYellow);
626&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; bg = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1, co);
627&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
628&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; (im == nil || bg == nil)
629&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
630&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sysfatal(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;not enough memory&amp;#34;&lt;/span&gt;);
631&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
632&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
633&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; draw(screen, screen-&amp;gt;r, bg, nil, ZP);
634&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; draw(screen, screen-&amp;gt;r, im, nil, Pt(-40, -40));
635&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
636&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; flushimage(display, Refnone);
637&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
638&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;// Wait 10 seconds before exiting.
639&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt; sleep(10000);
640&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
641&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; exits(nil);
642&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
643&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And then compile with &lt;code&gt;mk&lt;/code&gt; (mkfile below):&lt;/p&gt;
644&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# mkfile
645&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;&lt;span style=&#34;&#34;&gt;&amp;lt;/$objtype/mkfile&lt;/span&gt;
646&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
647&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RC=/rc/bin
648&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;BIN=/$objtype/bin
649&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MAN=/sys/man
650&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
651&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;main:
652&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; $CC $CFLAGS main.c
653&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; $LD $LDFLAGS -o main main.$O
654&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And run with &lt;code&gt;./main&lt;/code&gt;. To exit the program, press &lt;code&gt;Delete key&lt;/code&gt; (strange but this
655is the alternative for Ctrl&#43;C).&lt;/p&gt;
656&lt;p&gt;&lt;em&gt;This is &lt;strong&gt;very cool&lt;/strong&gt; indeed!&lt;/em&gt;&lt;/p&gt;
657</content:encoded>
658 </item>
659
660
661
662 <item>
663 <title>Cronjobs on Github with Github Actions</title>
664 <link>https://mitjafelicijan.com/cronjobs-github-with-actions.html</link>
665 <pubDate>Sat, 27 May 2023 00:35:36 &#43;0200</pubDate>
666 <guid>https://mitjafelicijan.com/cronjobs-github-with-actions.html</guid>
667 <description>In the root of your repository create a folder .</description>
668 <content:encoded>&lt;p&gt;In the root of your repository create a folder &lt;code&gt;.github/workflows&lt;/code&gt; and in that
669folder create a file a file &lt;code&gt;cron.yaml&lt;/code&gt;. This file can be named whatever you
670wish. But it has to be a &lt;code&gt;yaml&lt;/code&gt; file.&lt;/p&gt;
671&lt;p&gt;File below (&lt;code&gt;.github/workflows/cron.yaml&lt;/code&gt;) describes an action that will trigger
672every six hours and it will curl example.com.&lt;/p&gt;
673&lt;p&gt;However. Be sure that you have enough credits. Free account is not that generous
674with the minutes they give you for free. Check more about GitHub Actions usage
675on their website &lt;a href=&#34;https://docs.github.com/en/actions&#34;&gt;https://docs.github.com/en/actions&lt;/a&gt;.&lt;/p&gt;
676&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# .github/workflows/cron.yaml&lt;/span&gt;
677&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;name: Do a curl every 6 hours
678&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;on:
679&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; schedule:
680&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - cron: &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;0 */6 * * *&amp;#39;&lt;/span&gt;
681&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jobs:
682&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; cron:
683&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; runs-on: ubuntu-latest
684&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; steps:
685&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - name: Call some url
686&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; run: curl &amp;#39;https://example.com&amp;#39;
687&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
688 </item>
689
690
691
692 <item>
693 <title>Dungeon Crawl Stone Soup - New player guide</title>
694 <link>https://mitjafelicijan.com/dcss-new-player-guide.html</link>
695 <pubDate>Thu, 25 May 2023 22:00:00 &#43;0200</pubDate>
696 <guid>https://mitjafelicijan.com/dcss-new-player-guide.html</guid>
697 <description>An amazing game deserves an amazing guide.</description>
698 <content:encoded>&lt;p&gt;An amazing game deserves an amazing guide. All this material can be find in some
699form on another on &lt;a href=&#34;https://github.com/crawl/crawl&#34;&gt;craw&#39;s&lt;/a&gt; official repository.&lt;/p&gt;
700&lt;ul&gt;
701&lt;li&gt;&lt;a href=&#34;/notes/dcss-quickstart.pdf&#34;&gt;DCSS Quickstart&lt;/a&gt; - Very short introduction to the
702game&lt;/li&gt;
703&lt;li&gt;&lt;a href=&#34;/notes/dcss_manual.pdf&#34;&gt;DCSS Manual&lt;/a&gt; - Extensive manual about the game&lt;/li&gt;
704&lt;/ul&gt;
705&lt;p&gt;&lt;img src=&#34;/notes/dcss.jpg&#34; alt=&#34;Dungeon Crawl Stone Soup&#34; /&gt;&lt;/p&gt;
706&lt;p&gt;&lt;strong&gt;Movement and Exploration&lt;/strong&gt;&lt;/p&gt;
707&lt;ul&gt;
708&lt;li&gt;You can move around with the numpad (try numlock on and off), vi-keys, or
709clicking with the mouse. Arrow keys work, though you can&#39;t move diagonally
710with them. Pressing Shift and a direction will move until you see/hit
711something.&lt;/li&gt;
712&lt;li&gt;Pressing &lt;code&gt;&amp;gt;&lt;/code&gt; will take you down a staircase, and &lt;code&gt;&amp;lt;&lt;/code&gt; to go up a staircase.&lt;/li&gt;
713&lt;li&gt;You can open doors by walking into them, and close them with &lt;code&gt;C&lt;/code&gt;.&lt;/li&gt;
714&lt;li&gt;You can autoexplore by pressing &lt;code&gt;o&lt;/code&gt;.&lt;/li&gt;
715&lt;li&gt;You can re-view recent messages with &lt;code&gt;Ctrl-p&lt;/code&gt;.&lt;/li&gt;
716&lt;/ul&gt;
717&lt;p&gt;&lt;strong&gt;Monsters and Combat&lt;/strong&gt;&lt;/p&gt;
718&lt;ul&gt;
719&lt;li&gt;You can pick up items with &lt;code&gt;,&lt;/code&gt; or &lt;code&gt;g&lt;/code&gt;.&lt;/li&gt;
720&lt;li&gt;Wield weapons with &lt;code&gt;w&lt;/code&gt;. Weapons have different stats.
721&lt;ul&gt;
722&lt;li&gt;(You may also engage in Unarmed Combat, though it isn&#39;t very effective when
723untrained).&lt;/li&gt;
724&lt;/ul&gt;
725&lt;/li&gt;
726&lt;li&gt;Attack monsters in melee by walking in their direction (or with
727Ctrl-direction).&lt;/li&gt;
728&lt;li&gt;You can wait with &lt;code&gt;.&lt;/code&gt; or &lt;code&gt;s&lt;/code&gt;, passing your turn - such as to get monsters into
729a corridor with you.&lt;/li&gt;
730&lt;li&gt;You can rest with &lt;code&gt;5&lt;/code&gt;, waiting until you are fully healed, or something
731noteworthy happens.&lt;/li&gt;
732&lt;li&gt;Either mouseover and rightclick, or use &lt;code&gt;x&lt;/code&gt; then &lt;code&gt;v&lt;/code&gt; on the monster to examine
733monsters. Monsters with a red border are &#39;dangerous&#39; relative to your current
734XP level (XL).&lt;/li&gt;
735&lt;li&gt;Quiver (often ranged) actions for further use with &lt;code&gt;Q&lt;/code&gt;.&lt;/li&gt;
736&lt;li&gt;You can fire ranged weapons manually with &lt;code&gt;f&lt;/code&gt;, or auto-target your quiver with
737&lt;code&gt;p&lt;/code&gt; or &lt;code&gt;Shift-Tab&lt;/code&gt;. Throwing weapons can be thrown immediately, while
738launchers (like bows) need to be wielded first.&lt;/li&gt;
739&lt;/ul&gt;
740&lt;p&gt;&lt;strong&gt;Items and Inventory&lt;/strong&gt;&lt;/p&gt;
741&lt;ul&gt;
742&lt;li&gt;View your inventory by pressing &lt;code&gt;i&lt;/code&gt;. Most item related commands can also be
743done with this menu.&lt;/li&gt;
744&lt;li&gt;You can wear amour with &lt;code&gt;W;&lt;/code&gt; amour gives &lt;code&gt;AC&lt;/code&gt;, while heavier body armour
745reduces &lt;code&gt;EV&lt;/code&gt;.&lt;/li&gt;
746&lt;li&gt;Autoexplore will automatically pick up useful items, such as potions and
747scrolls, if you aren&#39;t in danger.&lt;/li&gt;
748&lt;li&gt;You can read scrolls with &lt;code&gt;r&lt;/code&gt; and drink (&amp;quot;quaff&amp;quot;) potions with &lt;code&gt;q&lt;/code&gt;.&lt;/li&gt;
749&lt;li&gt;Equipment items may have brands, with special properties. Branded equipment is
750blue when unidentified.&lt;/li&gt;
751&lt;li&gt;Equipment items may be artifacts, often with unique properties, and are
752unmodifiable. They are written in white.&lt;/li&gt;
753&lt;li&gt;You can evoke wands with &lt;code&gt;V&lt;/code&gt;.&lt;/li&gt;
754&lt;li&gt;You can put on jewelry with &lt;code&gt;P&lt;/code&gt;, and remove it with &lt;code&gt;R&lt;/code&gt;.&lt;/li&gt;
755&lt;li&gt;Gold is used in shops, which can be interacted with by either &lt;code&gt;&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;&lt;/code&gt;.&lt;/li&gt;
756&lt;/ul&gt;
757&lt;p&gt;&lt;strong&gt;Magic and Spellcasting&lt;/strong&gt;&lt;/p&gt;
758&lt;ul&gt;
759&lt;li&gt;Once you find a spellbook, you can memorize spells with &lt;code&gt;M&lt;/code&gt;.&lt;/li&gt;
760&lt;li&gt;You need to be the same XL as the spell&#39;s spell level in order to learn it, in
761addition to training magical skill (to lower failure rate).&lt;/li&gt;
762&lt;li&gt;Cast spells by pressing &lt;code&gt;z&lt;/code&gt;, then the letter assigned to the spell. You may
763also Quiver a spell and then use it like a ranged weapon (with Shift-Tab).&lt;/li&gt;
764&lt;li&gt;You can view your memorized spells by pressing &lt;code&gt;I&lt;/code&gt; (capital-i) or &lt;code&gt;z&lt;/code&gt;.&lt;/li&gt;
765&lt;li&gt;Like HP, you can recover MP by resting (with 5).&lt;/li&gt;
766&lt;li&gt;Many spells can be positioned more effectively, or combined with other spells,
767in order to get (more effective) use out of them.&lt;/li&gt;
768&lt;li&gt;Heavier body amour and shields hamper spellcasting.&lt;/li&gt;
769&lt;/ul&gt;
770&lt;p&gt;&lt;strong&gt;Gods and Divine Abilities&lt;/strong&gt;&lt;/p&gt;
771&lt;ul&gt;
772&lt;li&gt;You may look at a god&#39;s overview by praying at their altar (with &lt;code&gt;&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;&lt;/code&gt;).
773After praying, you can worship the god by pressing Enter afterwards.&lt;/li&gt;
774&lt;li&gt;Gods all have unique features about them. Trog, the god of the tutorial, is
775also the god of rage and bloodshed, and so despises spellcasting.&lt;/li&gt;
776&lt;li&gt;Gods like and dislike different things. Most gods either like killing things
777(like Trog) or exploring new areas (like Elyvilon), rewarding you piety
778(divine favor) for doing so.&lt;/li&gt;
779&lt;li&gt;You should learn to use and even rely on divine abilities often, as they are
780usually very strong. Trog&#39;s Berserk gives you 1.5x health, 1.5x speed (to all
781valid actions), and a big damage boost. Note that Berserk prevents most
782actions other than move and melee attack, and runs out very quickly if you
783aren&#39;t attacking. And after berserk ends, you are slowed down and can&#39;t
784berserk again for a short time.&lt;/li&gt;
785&lt;li&gt;In addition, the vast majority of abilities consume piety in the process.
786Regardless, this ability is very cheap, and the benefits are incredible, so
787don&#39;t hold back!&lt;/li&gt;
788&lt;li&gt;Pressing &lt;code&gt;^&lt;/code&gt; will let you view your current god, abilities, and piety.&lt;/li&gt;
789&lt;/ul&gt;
790</content:encoded>
791 </item>
792
793
794
795 <item>
796 <title>Display xterm color palette</title>
797 <link>https://mitjafelicijan.com/write-iso-usb.html</link>
798 <pubDate>Thu, 25 May 2023 12:00:00 &#43;0200</pubDate>
799 <guid>https://mitjafelicijan.com/write-iso-usb.html</guid>
800 <description>bash xterm-palette.</description>
801 <content:encoded>&lt;ul&gt;
802&lt;li&gt;&lt;code&gt;bash xterm-palette.sh&lt;/code&gt; - will show you number of max colors available&lt;/li&gt;
803&lt;li&gt;&lt;code&gt;bash xterm-palette.sh -v&lt;/code&gt; - will create a list of all colors with codes&lt;/li&gt;
804&lt;/ul&gt;
805&lt;p&gt;&lt;img src=&#34;/notes/xterm-palette.png&#34; alt=&#34;xterm color palette&#34; /&gt;&lt;/p&gt;
806&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#!/usr/bin/env bash
807&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# xterm-palette.sh&lt;/span&gt;
808&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
809&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;trap &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;tput sgr0&amp;#39;&lt;/span&gt; exit &lt;span style=&#34;color:#008000&#34;&gt;# Clean up even if user hits ^C&lt;/span&gt;
810&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
811&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; setfg () {
812&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;\e[38;5;%dm&amp;#39;&lt;/span&gt; $1
813&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
814&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
815&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; setbg () {
816&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;\e[48;5;%dm&amp;#39;&lt;/span&gt; $1
817&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
818&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
819&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;function&lt;/span&gt; showcolors() {
820&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# Given an integer, display that many colors&lt;/span&gt;
821&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; ((i=0; i&amp;lt;$1; i&#43;&#43;))
822&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
823&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;%4d &amp;#39;&lt;/span&gt; $i
824&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; setbg $i
825&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; tput el
826&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; tput sgr0
827&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo
828&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
829&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; tput sgr0 el
830&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
831&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
832&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# First, test if terminal supports OSC 4 at all.&lt;/span&gt;
833&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;\e]4;%d;?\a&amp;#39;&lt;/span&gt; 0
834&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;read -d &lt;span style=&#34;color:#a31515&#34;&gt;$&amp;#39;\a&amp;#39;&lt;/span&gt; -s -t 0.1 &amp;lt;/dev/tty
835&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; [ -z &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$REPLY&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; ]
836&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
837&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# OSC 4 not supported, so we&amp;#39;ll fall back to terminfo&lt;/span&gt;
838&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; max=&lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;tput colors&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;
839&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt;
840&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;# OSC 4 is supported, so use it for a binary search&lt;/span&gt;
841&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; min=0
842&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; max=256
843&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;while&lt;/span&gt; [[ &lt;span style=&#34;color:#00f&#34;&gt;$((&lt;/span&gt;min&#43;1&lt;span style=&#34;color:#00f&#34;&gt;))&lt;/span&gt; -lt $max ]]
844&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
845&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; i=&lt;span style=&#34;color:#00f&#34;&gt;$((&lt;/span&gt; (min&#43;max)/2 &lt;span style=&#34;color:#00f&#34;&gt;))&lt;/span&gt;
846&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; printf &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;\e]4;%d;?\a&amp;#39;&lt;/span&gt; $i
847&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; read -d &lt;span style=&#34;color:#a31515&#34;&gt;$&amp;#39;\a&amp;#39;&lt;/span&gt; -s -t 0.1 &amp;lt;/dev/tty
848&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; [ -z &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$REPLY&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; ]
849&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
850&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; max=$i
851&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt;
852&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; min=$i
853&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;fi&lt;/span&gt;
854&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;done&lt;/span&gt;
855&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;fi&lt;/span&gt;
856&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
857&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
858&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# If -v is given, show all the colors&lt;/span&gt;
859&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;case&lt;/span&gt; &lt;span style=&#34;color:#a31515&#34;&gt;${&lt;/span&gt;1-none&lt;span style=&#34;color:#a31515&#34;&gt;}&lt;/span&gt; in
860&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; none)
861&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo $max
862&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ;;
863&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; -v)
864&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; showcolors $max
865&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ;;
866&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; *)
867&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; [[ &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt;$1&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&lt;/span&gt; -gt 0 ]]; &lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
868&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; showcolors $1
869&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt;
870&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; echo $max
871&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;fi&lt;/span&gt;
872&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ;;
873&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;esac&lt;/span&gt; | less --raw-control-chars --QUIT-AT-EOF --no-init
874&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
875 </item>
876
877
878
879 <item>
880 <title>Sane defaults for tmux with more visible statusbar</title>
881 <link>https://mitjafelicijan.com/tmux-sane-defaults.html</link>
882 <pubDate>Thu, 25 May 2023 12:00:00 &#43;0200</pubDate>
883 <guid>https://mitjafelicijan.com/tmux-sane-defaults.html</guid>
884 <description># Remap prefix from &amp;#39;C-b&amp;#39; to &amp;#39;M-a&amp;#39;.</description>
885 <content:encoded>&lt;pre&gt;&lt;code class=&#34;language-conf&#34;&gt;# Remap prefix from &#39;C-b&#39; to &#39;M-a&#39;.
886unbind C-b
887set-option -g prefix M-a
888bind-key M-a send-prefix
889
890# Split panes using | and -.
891bind | split-window -h
892bind - split-window -v
893unbind &#39;&amp;quot;&#39;
894unbind %
895
896# Start counting windows with 1.
897set-option -g allow-rename on
898set -g base-index 1
899setw -g pane-base-index 1
900
901# Statusbar: purple bg and white fg.
902set -g status-bg &#39;#480b8e&#39;
903set -g status-fg &#39;#ffffff&#39;
904
905# Active window: black bg and white fg.
906set -g window-status-current-format &amp;quot;#[fg=#ffffff]#[bg=#111111]#[fg=#ffffff]#[bg=#111111] #I:#W #[fg=#ffffff]#[bg=#111111]&amp;quot;
907
908# Disable mouse mode (tmux 2.1 and above).
909set -g mouse off
910&lt;/code&gt;&lt;/pre&gt;
911</content:encoded>
912 </item>
913
914
915
916 <item>
917 <title>My brand new Plan9/9front desktop</title>
918 <link>https://mitjafelicijan.com/fresh-9front-desktop.html</link>
919 <pubDate>Wed, 24 May 2023 12:00:00 &#43;0200</pubDate>
920 <guid>https://mitjafelicijan.com/fresh-9front-desktop.html</guid>
921 <description>I have been experimenting with Plan9/9front for a week now.</description>
922 <content:encoded>&lt;p&gt;I have been experimenting with Plan9/9front for a week now. Noice! This is how
923my desktop looks like.&lt;/p&gt;
924&lt;p&gt;&lt;img src=&#34;/notes/9front-desktop.png&#34; alt=&#34;9front desktop&#34; /&gt;&lt;/p&gt;
925</content:encoded>
926 </item>
927
928
929
930
931
932 <item>
933 <title>Parse RSS feeds with Lua</title>
934 <link>https://mitjafelicijan.com/parse-rss-with-lua.html</link>
935 <pubDate>Tue, 23 May 2023 12:00:00 &#43;0200</pubDate>
936 <guid>https://mitjafelicijan.com/parse-rss-with-lua.html</guid>
937 <description>Example of parsing RSS feeds with Lua.</description>
938 <content:encoded>&lt;p&gt;Example of parsing RSS feeds with Lua. Before running the script install:&lt;/p&gt;
939&lt;ul&gt;
940&lt;li&gt;feedparser with &lt;code&gt;luarocks install feedparser&lt;/code&gt;&lt;/li&gt;
941&lt;li&gt;luasocket with &lt;code&gt;luarocks install luasocket&lt;/code&gt;&lt;/li&gt;
942&lt;/ul&gt;
943&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;local&lt;/span&gt; http = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;socket.http&amp;#34;&lt;/span&gt;)
944&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;local&lt;/span&gt; feedparser = require(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;feedparser&amp;#34;&lt;/span&gt;)
945&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
946&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;local&lt;/span&gt; feed_url = &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;https://mitjafelicijan.com/feed.rss&amp;#34;&lt;/span&gt;
947&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
948&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;local&lt;/span&gt; response, status, _ = http.request(feed_url)
949&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt; status == 200 &lt;span style=&#34;color:#00f&#34;&gt;then&lt;/span&gt;
950&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;local&lt;/span&gt; parsed = feedparser.parse(response)
951&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
952&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;-- Print out feed details.&lt;/span&gt;
953&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; Title &amp;#34;&lt;/span&gt;, parsed.feed.title)
954&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; Author &amp;#34;&lt;/span&gt;, parsed.feed.author)
955&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; ID &amp;#34;&lt;/span&gt;, parsed.feed.id)
956&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;&amp;gt; Entries &amp;#34;&lt;/span&gt;, #parsed.entries)
957&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
958&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;for&lt;/span&gt; _, item &lt;span style=&#34;color:#00f&#34;&gt;in&lt;/span&gt; ipairs(parsed.entries) &lt;span style=&#34;color:#00f&#34;&gt;do&lt;/span&gt;
959&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;GUID &amp;#34;&lt;/span&gt;, item.guid)
960&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Title &amp;#34;&lt;/span&gt;, item.title)
961&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Link &amp;#34;&lt;/span&gt;, item.link)
962&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;Summary &amp;#34;&lt;/span&gt;, item.summary)
963&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
964&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;else&lt;/span&gt;
965&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; print(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;! Request failed. Status:&amp;#34;&lt;/span&gt;, status)
966&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;end&lt;/span&gt;
967&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
968 </item>
969
970
971
972 <item>
973 <title>Extend Lua with custom C functions using Clang</title>
974 <link>https://mitjafelicijan.com/extend-lua-with-custom-c.html</link>
975 <pubDate>Tue, 23 May 2023 12:00:00 &#43;0200</pubDate>
976 <guid>https://mitjafelicijan.com/extend-lua-with-custom-c.html</guid>
977 <description>Here is a boilerplate for extending Lua with custom C functions.</description>
978 <content:encoded>&lt;p&gt;Here is a boilerplate for extending Lua with custom C functions. This requires
979Clang and Lua 5.1 to be installed. GCC can be used instead of Clang, but the
980Makefile will need to be modified.&lt;/p&gt;
981&lt;ul&gt;
982&lt;li&gt;
983&lt;p&gt;nativefunc.c&lt;/p&gt;
984&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;lua.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
985&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;&amp;lt;lauxlib.h&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#00f&#34;&gt;
986&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;&lt;/span&gt;
987&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;int&lt;/span&gt; l_mult50(lua_State *L) {
988&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;double&lt;/span&gt; number = luaL_checknumber(L, 1);
989&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; lua_pushnumber(L, number * 50);
990&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; 1;
991&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
992&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
993&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#2b91af&#34;&gt;int&lt;/span&gt; luaopen_nativefunc(lua_State *L) {
994&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;struct&lt;/span&gt; luaL_Reg nativeFuncLib[] = {{&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;mult50&amp;#34;&lt;/span&gt;, l_mult50}, {NULL, NULL}};
995&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
996&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; luaL_register(L, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;nativelib&amp;#34;&lt;/span&gt;, nativeFuncLib);
997&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;return&lt;/span&gt; 1;
998&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
999&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
1000&lt;li&gt;
1001&lt;p&gt;main.lua&lt;/p&gt;
1002&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;require &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;nativefunc&amp;#34;&lt;/span&gt;
1003&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(nativelib.mult50(50))
1004&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
1005&lt;li&gt;
1006&lt;p&gt;Makefile&lt;/p&gt;
1007&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CC = clang
1008&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CFLAGS =
1009&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;INCLUDES = &lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;pkg-config lua5.1 --cflags-only-I&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;
1010&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1011&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;all:
1012&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;CC&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt; -shared -o nativefunc.so -fPIC nativefunc.c &lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;CFLAGS&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;$(&lt;/span&gt;INCLUDES&lt;span style=&#34;color:#00f&#34;&gt;)&lt;/span&gt;
1013&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1014&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;clean:
1015&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; rm *.so
1016&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
1017&lt;/ul&gt;
1018</content:encoded>
1019 </item>
1020
1021
1022
1023
1024
1025 <item>
1026 <title>Execute not blocking async shell command in C#</title>
1027 <link>https://mitjafelicijan.com/non-blocking-shell-exec-csharp.html</link>
1028 <pubDate>Mon, 22 May 2023 12:00:00 &#43;0200</pubDate>
1029 <guid>https://mitjafelicijan.com/non-blocking-shell-exec-csharp.html</guid>
1030 <description>Execute a shell command in async in C# while not blocking the UI thread.</description>
1031 <content:encoded>&lt;p&gt;Execute a shell command in async in C# while not blocking the UI thread.&lt;/p&gt;
1032&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; Task executeCopyCommand()
1033&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
1034&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; Task.Run(() =&amp;gt;
1035&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
1036&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;var&lt;/span&gt; processStartInfo = &lt;span style=&#34;color:#00f&#34;&gt;new&lt;/span&gt; ProcessStartInfo(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;cmd&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/c dir&amp;#34;&lt;/span&gt;)
1037&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
1038&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; RedirectStandardOutput = &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt;,
1039&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; UseShellExecute = &lt;span style=&#34;color:#00f&#34;&gt;false&lt;/span&gt;,
1040&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; CreateNoWindow = &lt;span style=&#34;color:#00f&#34;&gt;true&lt;/span&gt;
1041&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; };
1042&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1043&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#2b91af&#34;&gt;var&lt;/span&gt; process = &lt;span style=&#34;color:#00f&#34;&gt;new&lt;/span&gt; Process
1044&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
1045&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; StartInfo = processStartInfo
1046&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; };
1047&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1048&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; process.Start();
1049&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; process.WaitForExit();
1050&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });
1051&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1052&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Make sure that &lt;code&gt;async&lt;/code&gt; is present in the function definition and &lt;code&gt;await&lt;/code&gt; is used
1053in the method that calls &lt;code&gt;executeCopyCommand()&lt;/code&gt;.&lt;/p&gt;
1054&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;async&lt;/span&gt; &lt;span style=&#34;color:#00f&#34;&gt;void&lt;/span&gt; button_Click(&lt;span style=&#34;color:#2b91af&#34;&gt;object&lt;/span&gt; sender, EventArgs e)
1055&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
1056&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#00f&#34;&gt;await&lt;/span&gt; executeCopyCommand();
1057&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
1058&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1059 </item>
1060
1061
1062
1063 <item>
1064 <title>Change permissions of matching files recursively</title>
1065 <link>https://mitjafelicijan.com/mass-set-permission.html</link>
1066 <pubDate>Tue, 16 May 2023 12:00:00 &#43;0200</pubDate>
1067 <guid>https://mitjafelicijan.com/mass-set-permission.html</guid>
1068 <description>Replace *.</description>
1069 <content:encoded>&lt;p&gt;Replace &lt;code&gt;*.xml&lt;/code&gt; with your pattern. This will remove executable bit from all
1070files matching the pattern. Change &lt;code&gt;&#43;&lt;/code&gt; to &lt;code&gt;-&lt;/code&gt; to add executable bit.&lt;/p&gt;
1071&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -type f -name &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;*.xml&amp;#34;&lt;/span&gt; -exec chmod -x {} &#43;
1072&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1073 </item>
1074
1075
1076
1077
1078
1079 <item>
1080 <title>Previews how man page written in Troff will look like</title>
1081 <link>https://mitjafelicijan.com/preview-troff-man-pages.html</link>
1082 <pubDate>Mon, 15 May 2023 12:00:00 &#43;0200</pubDate>
1083 <guid>https://mitjafelicijan.com/preview-troff-man-pages.html</guid>
1084 <description>Troff is used to write man pages and it is difficult to read it so this willpreview how it will look like when it is rendered.</description>
1085 <content:encoded>&lt;p&gt;Troff is used to write man pages and it is difficult to read it so this will
1086preview how it will look like when it is rendered.&lt;/p&gt;
1087&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# On Linux system.&lt;/span&gt;
1088&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;groff -man -Tascii filename
1089&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1090&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# On Plan9 system.&lt;/span&gt;
1091&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;man 1 filename
1092&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1093 </item>
1094
1095
1096
1097 <item>
1098 <title>Convert all MKV files into other formats</title>
1099 <link>https://mitjafelicijan.com/convert-mkv.html</link>
1100 <pubDate>Sun, 14 May 2023 12:00:00 &#43;0200</pubDate>
1101 <guid>https://mitjafelicijan.com/convert-mkv.html</guid>
1102 <description>You will need ffmpeg installed on your system.</description>
1103 <content:encoded>&lt;p&gt;You will need &lt;code&gt;ffmpeg&lt;/code&gt; installed on your system. This will convert all MKV files
1104into WebM format.&lt;/p&gt;
1105&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Convert all MKV files into WebM format.&lt;/span&gt;
1106&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find ./ -name &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*.mkv&amp;#39;&lt;/span&gt; -exec bash -c &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;ffmpeg -i &amp;#34;$0&amp;#34; -vcodec libvpx -acodec libvorbis -cpu-used 5 -threads 8 &amp;#34;${0%%.mp4}.webm&amp;#34;&amp;#39;&lt;/span&gt; {} &lt;span style=&#34;color:#a31515&#34;&gt;\;&lt;/span&gt;
1107&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Convert all MKV files into MP4 format.&lt;/span&gt;
1108&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find ./ -name &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;*.mkv&amp;#39;&lt;/span&gt; -exec bash -c &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;ffmpeg -i &amp;#34;$0&amp;#34; c:a copy -c:v copy -cpu-used 5 -threads 8 &amp;#34;${0%%.mp4}.mp4&amp;#34;&amp;#39;&lt;/span&gt; {} &lt;span style=&#34;color:#a31515&#34;&gt;\;&lt;/span&gt;
1109&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1110 </item>
1111
1112
1113
1114 <item>
1115 <title>Download list of YouTube files</title>
1116 <link>https://mitjafelicijan.com/download-youtube-videos.html</link>
1117 <pubDate>Sat, 13 May 2023 12:00:00 &#43;0200</pubDate>
1118 <guid>https://mitjafelicijan.com/download-youtube-videos.html</guid>
1119 <description>If you need to download a list of YouTube videos and don&amp;#39;t want to download theactual YouTube list (which yt-dlp supports), you can use the following method.</description>
1120 <content:encoded>&lt;p&gt;If you need to download a list of YouTube videos and don&#39;t want to download the
1121actual YouTube list (which &lt;code&gt;yt-dlp&lt;/code&gt; supports), you can use the following method.&lt;/p&gt;
1122&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Used to get list of raw URL&amp;#39;s from YouTube&amp;#39;s video tab&amp;#39;.
1123&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;// Copy them into videos.txt.
1124&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;&lt;/span&gt;document.querySelectorAll(&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;#contents a.ytd-thumbnail.style-scope.ytd-thumbnail&amp;#39;&lt;/span&gt;).forEach(el =&amp;gt; console.log(el.href))
1125&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Download and install &lt;a href=&#34;https://github.com/yt-dlp/yt-dlp&#34;&gt;https://github.com/yt-dlp/yt-dlp&lt;/a&gt;.&lt;/p&gt;
1126&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# This will download all videos in videos.txt.&lt;/span&gt;
1127&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yt-dlp --batch-file videos.txt -N &lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt;nproc&lt;span style=&#34;color:#a31515&#34;&gt;`&lt;/span&gt; -f webm
1128&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1129 </item>
1130
1131
1132
1133 <item>
1134 <title>Install Plan9port on Linux</title>
1135 <link>https://mitjafelicijan.com/install-plan9port-linux.html</link>
1136 <pubDate>Fri, 12 May 2023 12:00:00 &#43;0200</pubDate>
1137 <guid>https://mitjafelicijan.com/install-plan9port-linux.html</guid>
1138 <description>Install Plan9port on Linux.</description>
1139 <content:encoded>&lt;p&gt;Install Plan9port on Linux. This applies to
1140&lt;a href=&#34;https://9fans.github.io/plan9port/&#34;&gt;Plan9port&lt;/a&gt;. This is a port of many Plan 9
1141programs to Unix-like operating systems. Useful for programs like &lt;code&gt;9term&lt;/code&gt; and
1142&lt;code&gt;rc&lt;/code&gt;.&lt;/p&gt;
1143&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt-get install gcc libx11-dev libxt-dev libxext-dev libfontconfig1-dev
1144&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/9fans/plan9port $HOME/plan9
1145&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd $HOME/plan9/plan9port
1146&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./INSTALL -r $HOME/plan9
1147&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1148 </item>
1149
1150
1151
1152 <item>
1153 <title>Fix bootloader not being written in Plan9</title>
1154 <link>https://mitjafelicijan.com/fix-plan9-bootloader.html</link>
1155 <pubDate>Thu, 11 May 2023 12:00:00 &#43;0200</pubDate>
1156 <guid>https://mitjafelicijan.com/fix-plan9-bootloader.html</guid>
1157 <description>If the bootloader is not being written to a disk when installing 9front on realharware try clearing first sector of the disk with the following command.</description>
1158 <content:encoded>&lt;p&gt;If the bootloader is not being written to a disk when installing 9front on real
1159harware try clearing first sector of the disk with the following command.&lt;/p&gt;
1160&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=/dev/zero of=/dev/sdX bs=512 count=1
1161&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1162&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# If command above doesn&amp;#39;t work try this one, wait couple of seconds and&lt;/span&gt;
1163&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# press delete key to stop the command.&lt;/span&gt;
1164&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &amp;lt;/dev/zero &amp;gt;/dev/sd*/data
1165&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1166 </item>
1167
1168
1169
1170 <item>
1171 <title>Take a screenshot in Plan9</title>
1172 <link>https://mitjafelicijan.com/plan9-screenshot.html</link>
1173 <pubDate>Wed, 10 May 2023 12:00:00 &#43;0200</pubDate>
1174 <guid>https://mitjafelicijan.com/plan9-screenshot.html</guid>
1175 <description>Take a screenshot in Plan9.</description>
1176 <content:encoded>&lt;p&gt;Take a screenshot in Plan9. This applies to &lt;a href=&#34;https://9p.io/plan9/&#34;&gt;Plan9&lt;/a&gt; and
1177&lt;a href=&#34;https://9front.org/&#34;&gt;9front&lt;/a&gt;. This will take a screenshot of the screen and
1178output it to &lt;code&gt;/dev/screen&lt;/code&gt;. You can then use &lt;code&gt;topng&lt;/code&gt; to convert it to a png
1179image.&lt;/p&gt;
1180&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Instant screenshot.&lt;/span&gt;
1181&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat /dev/screen | topng &amp;gt; screen.png
1182&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1183&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Delayed screenshot (5 seconds).&lt;/span&gt;
1184&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sleep 5; cat /dev/screen | topng &amp;gt; screen.png
1185&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1186 </item>
1187
1188
1189
1190 <item>
1191 <title>#cat-v on weechat configuration</title>
1192 <link>https://mitjafelicijan.com/catv-weechat-config.html</link>
1193 <pubDate>Tue, 09 May 2023 12:00:00 &#43;0200</pubDate>
1194 <guid>https://mitjafelicijan.com/catv-weechat-config.html</guid>
1195 <description>Set up weechat to connect to #cat-v on oftc.</description>
1196 <content:encoded>&lt;p&gt;Set up weechat to connect to #cat-v on oftc. This applies to
1197&lt;a href=&#34;https://weechat.org/&#34;&gt;weechat&lt;/a&gt; but should be similar for other irc clients.&lt;/p&gt;
1198&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Install weechat and launch it and execute the following commands.&lt;/span&gt;
1199&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1200&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/server add oftc irc.oftc.net -tls
1201&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/set irc.server.oftc.autoconnect on
1202&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/set irc.server.oftc.autojoin &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;#cat-v&amp;#34;&lt;/span&gt;
1203&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/set irc.server.oftc.nicks &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;nick1,nick2,nick3&amp;#34;&lt;/span&gt;
1204&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1205 </item>
1206
1207
1208
1209 <item>
1210 <title>Write ISO to USB Key</title>
1211 <link>https://mitjafelicijan.com/write-iso-usb.html</link>
1212 <pubDate>Mon, 08 May 2023 12:00:00 &#43;0200</pubDate>
1213 <guid>https://mitjafelicijan.com/write-iso-usb.html</guid>
1214 <description>Write ISO to USB key.</description>
1215 <content:encoded>&lt;p&gt;Write ISO to USB key. Nothing fancy here.&lt;/p&gt;
1216&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo dd &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=iso_file.iso of=/dev/sdX bs=4M status=progress conv=fdatasync
1217&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1218 </item>
1219
1220
1221
1222 <item>
1223 <title>Mount Plan9 over network</title>
1224 <link>https://mitjafelicijan.com/mount-plan9-over-network.html</link>
1225 <pubDate>Sun, 07 May 2023 12:00:00 &#43;0200</pubDate>
1226 <guid>https://mitjafelicijan.com/mount-plan9-over-network.html</guid>
1227 <description>First install libfuse with sudo apt install libfuse-dev.</description>
1228 <content:encoded>&lt;ul&gt;
1229&lt;li&gt;First install libfuse with sudo apt install libfuse-dev.&lt;/li&gt;
1230&lt;li&gt;Then clone &lt;a href=&#34;https://github.com/ftrvxmtrx/9pfs&#34;&gt;https://github.com/ftrvxmtrx/9pfs&lt;/a&gt; and compile it with make.&lt;/li&gt;
1231&lt;li&gt;Copy 9pfs to your path.&lt;/li&gt;
1232&lt;/ul&gt;
1233&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# On Plan9 side&lt;/span&gt;
1234&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ip/ipconfig &lt;span style=&#34;color:#008000&#34;&gt;# enables network&lt;/span&gt;
1235&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;aux/listen1 -tv tcp!*!9999 /bin/exportfs -r tmp &lt;span style=&#34;color:#008000&#34;&gt;# export tmp folder&lt;/span&gt;
1236&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1237&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# On Linux side&lt;/span&gt;
1238&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;9pfs 172.18.0.1 -p 9999 local_folder &lt;span style=&#34;color:#008000&#34;&gt;# mount&lt;/span&gt;
1239&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;umount local_folder &lt;span style=&#34;color:#008000&#34;&gt;# unmount&lt;/span&gt;
1240&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1241 </item>
1242
1243
1244
1245 <item>
1246 <title>Push to multiple origins at once in Git</title>
1247 <link>https://mitjafelicijan.com/git-push-multiple-origins.html</link>
1248 <pubDate>Sat, 06 May 2023 12:00:00 &#43;0200</pubDate>
1249 <guid>https://mitjafelicijan.com/git-push-multiple-origins.html</guid>
1250 <description>Sometimes you want to push to multiple origins at once.</description>
1251 <content:encoded>&lt;p&gt;Sometimes you want to push to multiple origins at once. This is useful if you
1252have a mirror of your repository on another server. You can do this by adding
1253multiple push urls to your git config. This is a shorthand for command above.&lt;/p&gt;
1254&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --global alias.pushall &lt;span style=&#34;color:#a31515&#34;&gt;&amp;#39;!sh -c &amp;#34;git remote | xargs -L1 git push --all&amp;#34;&amp;#39;&lt;/span&gt;
1255&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1256 </item>
1257
1258
1259
1260 <item>
1261 <title>Run 9front in Qemu</title>
1262 <link>https://mitjafelicijan.com/run-9front-in-qemu.html</link>
1263 <pubDate>Fri, 05 May 2023 12:00:00 &#43;0200</pubDate>
1264 <guid>https://mitjafelicijan.com/run-9front-in-qemu.html</guid>
1265 <description>Run 9front in Qemu.</description>
1266 <content:encoded>&lt;p&gt;Run 9front in Qemu. This applies to &lt;a href=&#34;https://9p.io/plan9/&#34;&gt;Plan9&lt;/a&gt; and
1267&lt;a href=&#34;https://9front.org/&#34;&gt;9front&lt;/a&gt;.&lt;/p&gt;
1268&lt;p&gt;Download from here &lt;a href=&#34;http://9front.org/iso/&#34;&gt;http://9front.org/iso/&lt;/a&gt;.&lt;/p&gt;
1269&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Create a qcow2 image.&lt;/span&gt;
1270&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;qemu-img create -f qcow2 $HOME/VM/9front.qcow2.img 30G
1271&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1272&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;# Run the VM.&lt;/span&gt;
1273&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;qemu-system-x86_64 -cpu host -enable-kvm -m 1024 &lt;span style=&#34;color:#a31515&#34;&gt;\
1274&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -net nic,model=virtio,macaddr=52:54:00:00:EE:03 -net user &lt;span style=&#34;color:#a31515&#34;&gt;\
1275&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -device virtio-scsi-pci,id=scsi &lt;span style=&#34;color:#a31515&#34;&gt;\
1276&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -drive &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=none,id=vd0,file=$HOME/VM/9front.qcow2.img &lt;span style=&#34;color:#a31515&#34;&gt;\
1277&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -device scsi-hd,drive=vd0 &lt;span style=&#34;color:#a31515&#34;&gt;\
1278&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -drive &lt;span style=&#34;color:#00f&#34;&gt;if&lt;/span&gt;=none,id=vd1,file=$HOME/VM/ISO/9front.386.iso &lt;span style=&#34;color:#a31515&#34;&gt;\
1279&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a31515&#34;&gt;&lt;/span&gt; -device scsi-cd,drive=vd1,bootindex=0
1280&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded>
1281 </item>
1282
1283
1284
1285 <item>
1286 <title>Cache busting in Hugo</title>
1287 <link>https://mitjafelicijan.com/cachebusting-in-hugo.html</link>
1288 <pubDate>Mon, 01 May 2023 12:00:00 &#43;0200</pubDate>
1289 <guid>https://mitjafelicijan.com/cachebusting-in-hugo.html</guid>
1290 <description>{{ $cachebuster := delimit (shuffle (split (md5 &amp;#34;6fab11c6669976d759d2992eff1dd5be&amp;#34;) &amp;#34;&amp;#34; )) &amp;#34;&amp;#34; }}&amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;/style.</description>
1291 <content:encoded>&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;&#34;&gt;&lt;code&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ $cachebuster := delimit (shuffle (split (md5 &amp;#34;6fab11c6669976d759d2992eff1dd5be&amp;#34;) &amp;#34;&amp;#34; )) &amp;#34;&amp;#34; }}
1292&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
1293&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;link rel=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; href=&lt;span style=&#34;color:#a31515&#34;&gt;&amp;#34;/style.css?v={{ $cachebuster }}&amp;#34;&lt;/span&gt;&amp;gt;
1294&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This &lt;code&gt;6fab11c6669976d759d2992eff1dd5be&lt;/code&gt; can be random string you generate use.
1295You can use whatever you want.&lt;/p&gt;
1296</content:encoded>
1297 </item>
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372 </channel>
1373</rss>
diff --git a/public/notes/10gui-10-finger-multitouch-user-interface.jpg b/public/notes/10gui-10-finger-multitouch-user-interface.jpg
deleted file mode 100644
index 270b4ea..0000000
--- a/public/notes/10gui-10-finger-multitouch-user-interface.jpg
+++ /dev/null
Binary files differ
diff --git a/public/notes/10gui-10-finger-multitouch-user-interface.mp4 b/public/notes/10gui-10-finger-multitouch-user-interface.mp4
deleted file mode 100644
index 8afdbf8..0000000
--- a/public/notes/10gui-10-finger-multitouch-user-interface.mp4
+++ /dev/null
Binary files differ
diff --git a/public/notes/60s-ibm-computers-commercial.jpg b/public/notes/60s-ibm-computers-commercial.jpg
deleted file mode 100644
index 1d49e93..0000000
--- a/public/notes/60s-ibm-computers-commercial.jpg
+++ /dev/null
Binary files differ
diff --git a/public/notes/60s-ibm-computers-commercial.mp4 b/public/notes/60s-ibm-computers-commercial.mp4
deleted file mode 100644
index 9ff1567..0000000
--- a/public/notes/60s-ibm-computers-commercial.mp4
+++ /dev/null
Binary files differ
diff --git a/public/notes/9front-desktop.png b/public/notes/9front-desktop.png
deleted file mode 100644
index 3a0964b..0000000
--- a/public/notes/9front-desktop.png
+++ /dev/null
Binary files differ
diff --git a/public/notes/dcss-quickstart.pdf b/public/notes/dcss-quickstart.pdf
deleted file mode 100644
index 1b70615..0000000
--- a/public/notes/dcss-quickstart.pdf
+++ /dev/null
Binary files differ
diff --git a/public/notes/dcss.jpg b/public/notes/dcss.jpg
deleted file mode 100644
index ffe7c6a..0000000
--- a/public/notes/dcss.jpg
+++ /dev/null
Binary files differ
diff --git a/public/notes/dcss_manual.pdf b/public/notes/dcss_manual.pdf
deleted file mode 100644
index 03cafd2..0000000
--- a/public/notes/dcss_manual.pdf
+++ /dev/null
Binary files differ
diff --git a/public/notes/grep-less.png b/public/notes/grep-less.png
deleted file mode 100644
index f69a935..0000000
--- a/public/notes/grep-less.png
+++ /dev/null
Binary files differ
diff --git a/public/notes/plan9-pixels.png b/public/notes/plan9-pixels.png
deleted file mode 100644
index 536dd82..0000000
--- a/public/notes/plan9-pixels.png
+++ /dev/null
Binary files differ
diff --git a/public/notes/ps1-prompt.png b/public/notes/ps1-prompt.png
deleted file mode 100644
index e27c714..0000000
--- a/public/notes/ps1-prompt.png
+++ /dev/null
Binary files differ
diff --git a/public/notes/xterm-palette.png b/public/notes/xterm-palette.png
deleted file mode 100644
index e286c5e..0000000
--- a/public/notes/xterm-palette.png
+++ /dev/null
Binary files differ
diff --git a/public/parse-rss-with-lua.html b/public/parse-rss-with-lua.html
deleted file mode 100755
index 58fbe27..0000000
--- a/public/parse-rss-with-lua.html
+++ /dev/null
@@ -1,35 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Parse RSS feeds with Lua</title><meta name=description content="Example of parsing RSS feeds with Lua."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Parse RSS feeds with Lua</h1><p>May 23, 2023<div><p>Example of parsing RSS feeds with Lua. Before running the script install:<ul><li>feedparser with <code>luarocks install feedparser</code><li>luasocket with <code>luarocks install luasocket</code></ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>local</span> http = require(<span style=color:#a31515>&#34;socket.http&#34;</span>)
7</span></span><span style=display:flex><span><span style=color:#00f>local</span> feedparser = require(<span style=color:#a31515>&#34;feedparser&#34;</span>)
8</span></span><span style=display:flex><span>
9</span></span><span style=display:flex><span><span style=color:#00f>local</span> feed_url = <span style=color:#a31515>&#34;https://mitjafelicijan.com/feed.rss&#34;</span>
10</span></span><span style=display:flex><span>
11</span></span><span style=display:flex><span><span style=color:#00f>local</span> response, status, _ = http.request(feed_url)
12</span></span><span style=display:flex><span><span style=color:#00f>if</span> status == 200 <span style=color:#00f>then</span>
13</span></span><span style=display:flex><span> <span style=color:#00f>local</span> parsed = feedparser.parse(response)
14</span></span><span style=display:flex><span>
15</span></span><span style=display:flex><span> <span style=color:green>-- Print out feed details.</span>
16</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;&gt; Title &#34;</span>, parsed.feed.title)
17</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;&gt; Author &#34;</span>, parsed.feed.author)
18</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;&gt; ID &#34;</span>, parsed.feed.id)
19</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;&gt; Entries &#34;</span>, #parsed.entries)
20</span></span><span style=display:flex><span>
21</span></span><span style=display:flex><span> <span style=color:#00f>for</span> _, item <span style=color:#00f>in</span> ipairs(parsed.entries) <span style=color:#00f>do</span>
22</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;GUID &#34;</span>, item.guid)
23</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;Title &#34;</span>, item.title)
24</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;Link &#34;</span>, item.link)
25</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;Summary &#34;</span>, item.summary)
26</span></span><span style=display:flex><span> <span style=color:#00f>end</span>
27</span></span><span style=display:flex><span><span style=color:#00f>else</span>
28</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;! Request failed. Status:&#34;</span>, status)
29</span></span><span style=display:flex><span><span style=color:#00f>end</span>
30</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
31<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
32with me
33<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
34the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
35otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/plan9-screenshot.html b/public/plan9-screenshot.html
deleted file mode 100755
index 395c4d1..0000000
--- a/public/plan9-screenshot.html
+++ /dev/null
@@ -1,19 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Take a screenshot in Plan9</title><meta name=description content="Take a screenshot in Plan9."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Take a screenshot in Plan9</h1><p>May 10, 2023<div><p>Take a screenshot in Plan9. This applies to <a href=https://9p.io/plan9/>Plan9</a> and
7<a href=https://9front.org/>9front</a>. This will take a screenshot of the screen and
8output it to <code>/dev/screen</code>. You can then use <code>topng</code> to convert it to a png
9image.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Instant screenshot.</span>
10</span></span><span style=display:flex><span>cat /dev/screen | topng &gt; screen.png
11</span></span><span style=display:flex><span>
12</span></span><span style=display:flex><span><span style=color:green># Delayed screenshot (5 seconds).</span>
13</span></span><span style=display:flex><span>sleep 5; cat /dev/screen | topng &gt; screen.png
14</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
15<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
16with me
17<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
18the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
19otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/presentations-with-markdown.html b/public/presentations-with-markdown.html
deleted file mode 100755
index 470ed59..0000000
--- a/public/presentations-with-markdown.html
+++ /dev/null
@@ -1,69 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simple presentations with Markdown</title><meta name=description content="A simple way to make presentations without using desktop apps or using onlineservices is https://github."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Simple presentations with Markdown</h1><p>Jun 21, 2023<div><p>A simple way to make presentations without using desktop apps or using online
7services is <a href=https://github.com/remarkjs/remark>https://github.com/remarkjs/remark</a>.<p>First create <code>index.html</code> and be sure you make changes to <code>config</code> variable.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE html&gt;</span>
8</span></span><span style=display:flex><span>&lt;html&gt;
9</span></span><span style=display:flex><span>
10</span></span><span style=display:flex><span>&lt;head&gt;
11</span></span><span style=display:flex><span> &lt;title&gt;&lt;/title&gt;
12</span></span><span style=display:flex><span> &lt;meta charset=<span style=color:#a31515>&#34;utf-8&#34;</span>&gt;
13</span></span><span style=display:flex><span> &lt;style&gt;
14</span></span><span style=display:flex><span> body {
15</span></span><span style=display:flex><span> <span style=color:#00f>font-family</span>: <span style=color:#a31515>&#39;SF Pro Display&#39;</span>;
16</span></span><span style=display:flex><span> }
17</span></span><span style=display:flex><span>
18</span></span><span style=display:flex><span> .<span style=color:#2b91af>remark-code</span>,
19</span></span><span style=display:flex><span> .<span style=color:#2b91af>remark-inline-code</span> {
20</span></span><span style=display:flex><span> <span style=color:#00f>font-family</span>: <span style=color:#a31515>&#39;SF Mono&#39;</span>;
21</span></span><span style=display:flex><span> <span style=color:#00f>font-size</span>: <span style=color:#00f>medium</span>;
22</span></span><span style=display:flex><span> <span style=color:#00f>background-color</span>: <span style=color:#00f>gainsboro</span>;
23</span></span><span style=display:flex><span> <span style=color:#00f>border-radius</span>: 5<span style=color:#2b91af>px</span>;
24</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 0 5<span style=color:#2b91af>px</span>;
25</span></span><span style=display:flex><span> }
26</span></span><span style=display:flex><span> &lt;/style&gt;
27</span></span><span style=display:flex><span>&lt;/head&gt;
28</span></span><span style=display:flex><span>
29</span></span><span style=display:flex><span>&lt;body&gt;
30</span></span><span style=display:flex><span> &lt;textarea id=<span style=color:#a31515>&#34;source&#34;</span>&gt;&lt;/textarea&gt;
31</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://remarkjs.com/downloads/remark-latest.min.js&#34;</span>&gt;&lt;/script&gt;
32</span></span><span style=display:flex><span> &lt;script&gt;
33</span></span><span style=display:flex><span> <span style=color:#00f>const</span> config = {
34</span></span><span style=display:flex><span> title: <span style=color:#a31515>&#39;My presentation&#39;</span>,
35</span></span><span style=display:flex><span> file: <span style=color:#a31515>&#39;presentation.md&#39;</span>,
36</span></span><span style=display:flex><span> };
37</span></span><span style=display:flex><span>
38</span></span><span style=display:flex><span> document.title = config.title;
39</span></span><span style=display:flex><span> remark.create({ sourceUrl: config.file });
40</span></span><span style=display:flex><span> &lt;/script&gt;
41</span></span><span style=display:flex><span>&lt;/body&gt;
42</span></span><span style=display:flex><span>
43</span></span><span style=display:flex><span>&lt;/html&gt;
44</span></span></code></pre><p>Now the markdown file <code>presentation.md</code> with presenetation. <code>---</code> is used to
45separate slides. Other stuff is just pure markdown.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>class: center, middle
46</span></span><span style=display:flex><span>
47</span></span><span style=display:flex><span><span style=font-weight:700># Main title of the presentation
48</span></span></span><span style=display:flex><span><span style=font-weight:700></span>
49</span></span><span style=display:flex><span>---
50</span></span><span style=display:flex><span>
51</span></span><span style=display:flex><span><span style=font-weight:700># Fist slide
52</span></span></span><span style=display:flex><span><span style=font-weight:700></span>
53</span></span><span style=display:flex><span>Eveniet mollitia nemo architecto rerum aut iure iste. Sit nihil nobis libero iusto fugit nam laudantium ut. Dignissimos corrupti laudantium nisi.
54</span></span><span style=display:flex><span>
55</span></span><span style=display:flex><span><span style=color:#00f>-</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
56</span></span><span style=display:flex><span><span style=color:#00f>-</span> Integer aliquet mauris a felis fringilla, ut congue massa finibus.
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span>---
59</span></span><span style=display:flex><span>
60</span></span><span style=display:flex><span><span style=font-weight:700># Slide two
61</span></span></span><span style=display:flex><span><span style=font-weight:700></span>
62</span></span><span style=display:flex><span><span style=color:#00f>-</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
63</span></span><span style=display:flex><span><span style=color:#00f>-</span> Vestibulum eget leo ac dolor venenatis pulvinar.
64</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
65<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
66with me
67<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
68the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
69otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/preview-troff-man-pages.html b/public/preview-troff-man-pages.html
deleted file mode 100755
index bb91048..0000000
--- a/public/preview-troff-man-pages.html
+++ /dev/null
@@ -1,17 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Previews how man page written in Troff will look like</title><meta name=description content="Troff is used to write man pages and it is difficult to read it so this willpreview how it will look like when it is rendered."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Previews how man page written in Troff will look like</h1><p>May 15, 2023<div><p>Troff is used to write man pages and it is difficult to read it so this will
7preview how it will look like when it is rendered.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># On Linux system.</span>
8</span></span><span style=display:flex><span>groff -man -Tascii filename
9</span></span><span style=display:flex><span>
10</span></span><span style=display:flex><span><span style=color:green># On Plan9 system.</span>
11</span></span><span style=display:flex><span>man 1 filename
12</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
13<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
14with me
15<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
16the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
17otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/profiling-python-web-applications-with-visual-tools.html b/public/profiling-python-web-applications-with-visual-tools.html
deleted file mode 100755
index 49cfffc..0000000
--- a/public/profiling-python-web-applications-with-visual-tools.html
+++ /dev/null
@@ -1,143 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Profiling Python web applications with visual tools</title><meta name=description content="I have been profiling my software with KCachegrind for a long time now and I wasmissing this option when I am developing API&amp;#39;s or other web services."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Profiling Python web applications with visual tools</h1><p>Apr 21, 2017<div><p>I have been profiling my software with KCachegrind for a long time now and I was
7missing this option when I am developing API's or other web services. I always
8knew that this is possible but never really took the time and dive into it.<p>Before we begin there are some requirements. We will need to:<ul><li>implement <a href=https://docs.python.org/2/library/profile.html#module-cProfile>cProfile</a> into our web app,<li>convert output to <a href=http://valgrind.org/docs/manual/cl-manual.html>callgrind</a> format with <a href=https://pypi.python.org/pypi/pyprof2calltree/>pyprof2calltree</a>,<li>visualize data with <a href=http://kcachegrind.sourceforge.net/html/Home.html>KCachegrind</a> or <a href=http://www.profilingviewer.com/>Profiling Viewer</a>.</ul><p>If you are using MacOS you should check out <a href=http://www.profilingviewer.com/>Profiling
9Viewer</a> or
10<a href=http://www.maccallgrind.com/>MacCallGrind</a>.<p><img src=/assets/python-profiling/kcachegrind.png alt=KCachegrind><p>We will be dividing this post into two main categories:<ul><li>writing simple web-service,<li>visualize profile of this web-service.</ul><h2 id=simple-web-service>Simple web-service</h2><p>Let's use virtualenv so we won't pollute our base system. If you don't have
11virtualenv installed on your system you can install it with pip command.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># let&#39;s install virtualenv globally</span>
12</span></span><span style=display:flex><span>$ sudo pip install virtualenv
13</span></span><span style=display:flex><span>
14</span></span><span style=display:flex><span><span style=color:green># let&#39;s also install pyprof2calltree globally</span>
15</span></span><span style=display:flex><span>$ sudo pip install pyprof2calltree
16</span></span><span style=display:flex><span>
17</span></span><span style=display:flex><span><span style=color:green># now we create project</span>
18</span></span><span style=display:flex><span>$ mkdir demo-project
19</span></span><span style=display:flex><span>$ cd demo-project/
20</span></span><span style=display:flex><span>
21</span></span><span style=display:flex><span><span style=color:green># now let&#39;s create folder where we will store profiles</span>
22</span></span><span style=display:flex><span>$ mkdir prof
23</span></span><span style=display:flex><span>
24</span></span><span style=display:flex><span><span style=color:green># now we create empty virtualenv in venv/ folder</span>
25</span></span><span style=display:flex><span>$ virtualenv --no-site-packages venv
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span><span style=color:green># we now need to activate virtualenv</span>
28</span></span><span style=display:flex><span>$ source venv/bin/activate
29</span></span><span style=display:flex><span>
30</span></span><span style=display:flex><span><span style=color:green># you can check if virtualenv was correctly initialized by</span>
31</span></span><span style=display:flex><span><span style=color:green># checking where your python interpreter is located</span>
32</span></span><span style=display:flex><span><span style=color:green># if command bellow points to your created directory and not some</span>
33</span></span><span style=display:flex><span><span style=color:green># system dir like /usr/bin/python then everything is fine</span>
34</span></span><span style=display:flex><span>$ which python
35</span></span><span style=display:flex><span>
36</span></span><span style=display:flex><span><span style=color:green># we can check now if all is good ➜ if ok couple of</span>
37</span></span><span style=display:flex><span><span style=color:green># lines will be displayed</span>
38</span></span><span style=display:flex><span>$ pip freeze
39</span></span><span style=display:flex><span><span style=color:green># appdirs==1.4.3</span>
40</span></span><span style=display:flex><span><span style=color:green># packaging==16.8</span>
41</span></span><span style=display:flex><span><span style=color:green># pyparsing==2.2.0</span>
42</span></span><span style=display:flex><span><span style=color:green># six==1.10.0</span>
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span><span style=color:green># now we are ready to install bottlepy ➜ web micro-framework</span>
45</span></span><span style=display:flex><span>$ pip install bottle
46</span></span><span style=display:flex><span>
47</span></span><span style=display:flex><span><span style=color:green># you can deactivate virtualenv but you will then go</span>
48</span></span><span style=display:flex><span><span style=color:green># under system domain ➜ for now don&#39;t deactivate</span>
49</span></span><span style=display:flex><span>$ deactivate
50</span></span></code></pre><p>We are now ready to write simple web service. Let's create file app.py and paste
51code bellow in this newly created file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
52</span></span><span style=display:flex><span>
53</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
54</span></span><span style=display:flex><span><span style=color:#00f>import</span> random
55</span></span><span style=display:flex><span><span style=color:#00f>import</span> cProfile
56</span></span><span style=display:flex><span>
57</span></span><span style=display:flex><span>app = bottle.Bottle()
58</span></span><span style=display:flex><span>
59</span></span><span style=display:flex><span><span style=color:green># this function is a decorator and encapsulates function</span>
60</span></span><span style=display:flex><span><span style=color:green># and performs profiling and then saves it to subfolder</span>
61</span></span><span style=display:flex><span><span style=color:green># prof/function-name.prof</span>
62</span></span><span style=display:flex><span><span style=color:green># in our example only awesome_random_number function will</span>
63</span></span><span style=display:flex><span><span style=color:green># be profiled because it has do_cprofile defined</span>
64</span></span><span style=display:flex><span><span style=color:#00f>def</span> do_cprofile(func):
65</span></span><span style=display:flex><span> <span style=color:#00f>def</span> profiled_func(*args, **kwargs):
66</span></span><span style=display:flex><span> profile = cProfile.Profile()
67</span></span><span style=display:flex><span> <span style=color:#00f>try</span>:
68</span></span><span style=display:flex><span> profile.enable()
69</span></span><span style=display:flex><span> result = func(*args, **kwargs)
70</span></span><span style=display:flex><span> profile.disable()
71</span></span><span style=display:flex><span> <span style=color:#00f>return</span> result
72</span></span><span style=display:flex><span> <span style=color:#00f>finally</span>:
73</span></span><span style=display:flex><span> profile.dump_stats(<span style=color:#a31515>&#34;prof/&#34;</span> + str(func.__name__) + <span style=color:#a31515>&#34;.prof&#34;</span>)
74</span></span><span style=display:flex><span> <span style=color:#00f>return</span> profiled_func
75</span></span><span style=display:flex><span>
76</span></span><span style=display:flex><span>
77</span></span><span style=display:flex><span><span style=color:green># we use profiling over specific function with including</span>
78</span></span><span style=display:flex><span><span style=color:green># @do_cprofile above function declaration</span>
79</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/&#34;</span>)
80</span></span><span style=display:flex><span>@do_cprofile
81</span></span><span style=display:flex><span><span style=color:#00f>def</span> awesome_random_number():
82</span></span><span style=display:flex><span> awesome_random_number = random.randint(0, 100)
83</span></span><span style=display:flex><span> <span style=color:#00f>return</span> <span style=color:#a31515>&#34;awesome random number is &#34;</span> + str(awesome_random_number)
84</span></span><span style=display:flex><span>
85</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/test&#34;</span>)
86</span></span><span style=display:flex><span><span style=color:#00f>def</span> test():
87</span></span><span style=display:flex><span> <span style=color:#00f>return</span> <span style=color:#a31515>&#34;dummy test&#34;</span>
88</span></span><span style=display:flex><span>
89</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#39;__main__&#39;</span>:
90</span></span><span style=display:flex><span> bottle.run(
91</span></span><span style=display:flex><span> app = app,
92</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
93</span></span><span style=display:flex><span> port = 4000
94</span></span><span style=display:flex><span> )
95</span></span><span style=display:flex><span>
96</span></span><span style=display:flex><span><span style=color:green># run with &#39;python app.py&#39;</span>
97</span></span><span style=display:flex><span><span style=color:green># open browser &#39;http://0.0.0.0:4000&#39;</span>
98</span></span></code></pre><p>When browser hits awesome_random_number() function profile is created in prof/
99subfolder.<h2 id=visualize-profile>Visualize profile</h2><p>Now let's create callgrind format from this cProfile output.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ cd prof/
100</span></span><span style=display:flex><span>$ pyprof2calltree -i awesome_random_number.prof
101</span></span><span style=display:flex><span><span style=color:green># this creates &#39;awesome_random_number.prof.log&#39; file in the same folder</span>
102</span></span></code></pre><p>This file can be opened with visualizing tools listed above. In this case we
103will be using Profilling Viewer under MacOS. You can open image in new tab. As
104you can see from this example there is hierarchy of execution order of your
105code.<p><img src=/assets/python-profiling/profiling-viewer.png alt="Profilling Viewer"><blockquote><p>Make sure you convert output of the cProfile output every time you want to
106refresh and take a look at your possible optimizations because cProfile updates
107.prof file every time browser hits the function.</blockquote><p>This is just a simple example but when you are developing real-life applications
108this can be very illuminating, especially to see which parts of your code are
109bottlenecks and need to be optimized.<h2 id=update-2017-04-22>Update 2017-04-22</h2><p>Reddit user <a href=https://www.reddit.com/user/mvt>mvt</a> also recommended this awesome
110web based profile visualizer <a href=https://jiffyclub.github.io/snakeviz/>SnakeViz</a>
111that directly takes output from
112<a href=https://docs.python.org/2/library/profile.html#module-cProfile>cProfile</a>
113module.<div class=reddit-embed data-embed-media=www.redditmedia.com data-embed-parent=false data-embed-live=false data-embed-uuid=583880c1-002e-41ed-a373-020a0ef2cff9 data-embed-created=2017-04-22T19:46:54.810Z><a href=https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dgljhsb/>Comment</a> from discussion <a href=https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/>Profiling Python web applications with visual tools</a>.</div><script async src=https://www.redditstatic.com/comment-embed.js></script><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># let&#39;s install it globally as well</span>
114</span></span><span style=display:flex><span>$ sudo pip install snakeviz
115</span></span><span style=display:flex><span>
116</span></span><span style=display:flex><span><span style=color:green># now let&#39;s visualize</span>
117</span></span><span style=display:flex><span>$ cd prof/
118</span></span><span style=display:flex><span>$ snakeviz awesome_random_number.prof
119</span></span><span style=display:flex><span><span style=color:green># this automatically opens browser window and</span>
120</span></span><span style=display:flex><span><span style=color:green># shows visualized profile</span>
121</span></span></code></pre><p><img src=/assets/python-profiling/snakeviz.png alt=SnakeViz><p>Reddit user <a href=https://www.reddit.com/user/ccharles>ccharles</a> suggested a better
122way for installing pip software by targeting user level instead of using sudo.<div class=reddit-embed data-embed-media=www.redditmedia.com data-embed-parent=false data-embed-live=false data-embed-uuid=f4f0459e-684d-441e-bebe-eb49b2f0a31d data-embed-created=2017-04-22T19:46:10.874Z><a href=https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dglpzkx/>Comment</a> from discussion <a href=https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/>Profiling Python web applications with visual tools</a>.</div><script async src=https://www.redditstatic.com/comment-embed.js></script><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># now we need to add this path to our $PATH variable</span>
123</span></span><span style=display:flex><span><span style=color:green># we do this my adding this line at the end of your</span>
124</span></span><span style=display:flex><span><span style=color:green># ~/.bashrc file</span>
125</span></span><span style=display:flex><span>PATH=$PATH:$HOME/.local/bin/
126</span></span><span style=display:flex><span>
127</span></span><span style=display:flex><span><span style=color:green># in order to use this new configuration you can close</span>
128</span></span><span style=display:flex><span><span style=color:green># and reopen terminal or reload .bashrc file</span>
129</span></span><span style=display:flex><span>$ source ~/.bashrc
130</span></span><span style=display:flex><span>
131</span></span><span style=display:flex><span><span style=color:green># now let&#39;s test if new directory is present in $PATH</span>
132</span></span><span style=display:flex><span>$ echo $PATH
133</span></span><span style=display:flex><span>
134</span></span><span style=display:flex><span><span style=color:green># now we can install on user level by adding --user</span>
135</span></span><span style=display:flex><span><span style=color:green># without use of sudo</span>
136</span></span><span style=display:flex><span>$ pip install snakeviz --user
137</span></span></code></pre><p>Or as suggested by <a href=https://www.reddit.com/user/mvt>mvt</a> you can
138use <a href=https://github.com/mitsuhiko/pipsi>pipsi</a>.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
139<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
140with me
141<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
142the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
143otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/re-inventing-task-runner-that-i-actually-used-daily.html b/public/re-inventing-task-runner-that-i-actually-used-daily.html
deleted file mode 100755
index b0d418d..0000000
--- a/public/re-inventing-task-runner-that-i-actually-used-daily.html
+++ /dev/null
@@ -1,112 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Re-Inventing Task Runner That I Actually Used Daily</title><meta name=description content="Couple of months ago I had this brilliant idea of re-inventing the wheel bymaking an alternative for make."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Re-Inventing Task Runner That I Actually Used Daily</h1><p>May 31, 2023<div><p>Couple of months ago I had this brilliant idea of re-inventing the wheel by
7making an alternative for make. And so I went. Boldly into the battle. And to my
8big surprise my attempt resulted in not a completely useless piece of software.<p>My initial requirements were quite simple but soon grow into something more
9ambitious. And looking back I should have stuck to the simple version. My
10laziness was on my side this time though. Because I haven’t implemented some of
11the features I now realise I really didn’t need them and they would bog the
12whole program and make it be something it was never meant to be.<p>My basic requirements were following:<ul><li>Syntax should be a tiny bit inspired by Rake and Rakefiles.<li>Should borrow the overall feel of a unit test experience.<li>Using something like Python would be a bit of an overkill.<li>The program must be statically compiled, so it can run on same architecture
13without libc, musl dependencies or things like that.<li>Install ruby for rake is a bit overkill and can not be done with certain
14really lightweight distributions like Alpine Linux. This tool would be usable
15on such lightweight systems for remote debugging.<li>I want to use it for more than just compiling things. I want to use it as an
16entry-point into a project, and I want this to help me indirectly document the
17project as well.<li>It should be an abstraction over bash shell or the default system shell.<ul><li>Each task essentially becomes its own shell instance.</ul><li>Must work on Linux and macOS systems.<li>By default, running <code>erd</code> list all the available tasks (when I use make, I
18usually put a disclaimer that you should check Makefile to see all available
19target).<li>Should support passing arguments when you run it from a shell.<li>Normal variable as the same as environmental variables. There is no
20distinction. Every variable is also essentially an environment variable and
21can be used by other programs.<li>State between tasks is not shared, and this makes this “pure” shell instances.<li>Should be single-threaded for the start and later expanded with <code>@spawn</code>
22command.<li>Variables behave like macros and are preprocessed before evaluation.<li>Should support something like <code>assure</code> that would check if programs like C
23compiler or Python (whatever the project requires) are installed on a machine.</ul><p>Quite a reasonable list of requirements. I do this things already in my
24Makefiles or/and Bash scripts. But I would like to avoid repeating myself every
25time I start working on something new.<p>So I started with the following syntax.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>@env on
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span><span style=color:green># Override the default shell.</span>
28</span></span><span style=display:flex><span>@shell <span style=color:#a31515>/bin/</span>bash
29</span></span><span style=display:flex><span>
30</span></span><span style=display:flex><span><span style=color:green># Assure that program is installed.</span>
31</span></span><span style=display:flex><span>@assure docker-compose pip python3
32</span></span><span style=display:flex><span>
33</span></span><span style=display:flex><span><span style=color:green># Load local dotenv files (these are then globally available).</span>
34</span></span><span style=display:flex><span>@dotenv .env
35</span></span><span style=display:flex><span>@dotenv .env.sample
36</span></span><span style=display:flex><span>@dotenv some_other_file
37</span></span><span style=display:flex><span>
38</span></span><span style=display:flex><span><span style=color:green># This are local variables but still accessible in tasks.</span>
39</span></span><span style=display:flex><span>@var HI = <span style=color:#a31515>&#34;hey&#34;</span>
40</span></span><span style=display:flex><span>@var TOKEN = <span style=color:#a31515>&#34;sometoken&#34;</span>
41</span></span><span style=display:flex><span>@var EMAIL = <span style=color:#a31515>&#34;m@m.com&#34;</span>
42</span></span><span style=display:flex><span>@var PASSWORD = <span style=color:#a31515>&#34;pass&#34;</span>
43</span></span><span style=display:flex><span>@var EDITOR = <span style=color:#a31515>&#34;vim&#34;</span>
44</span></span><span style=display:flex><span>
45</span></span><span style=display:flex><span>@task dev <span style=color:#a31515>&#34;Test chars .:&#39;}{]!//&#34;</span> does
46</span></span><span style=display:flex><span> echo <span style=color:#a31515>&#34;...&#34;</span> $HI
47</span></span><span style=display:flex><span><span style=color:#00f>end</span>
48</span></span><span style=display:flex><span>
49</span></span><span style=display:flex><span>@task clean <span style=color:#a31515>&#34;Cleans the obj files&#34;</span> does
50</span></span><span style=display:flex><span> rm .obj
51</span></span><span style=display:flex><span><span style=color:#00f>end</span>
52</span></span><span style=display:flex><span>
53</span></span><span style=display:flex><span>@task greet <span style=color:#a31515>&#34;Greets the user&#34;</span> does
54</span></span><span style=display:flex><span> echo <span style=color:#a31515>&#34;Hi user $TOKEN or $WINDOWID $EMAIL&#34;</span>
55</span></span><span style=display:flex><span><span style=color:#00f>end</span>
56</span></span><span style=display:flex><span>
57</span></span><span style=display:flex><span>@task stack <span style=color:#a31515>&#34;Starts Docker stack&#34;</span> does
58</span></span><span style=display:flex><span> docker-compose -f stack.yml up
59</span></span><span style=display:flex><span><span style=color:#00f>end</span>
60</span></span><span style=display:flex><span>
61</span></span><span style=display:flex><span>@task todo <span style=color:#a31515>&#34;Shows all todos in source files and count them&#34;</span> does
62</span></span><span style=display:flex><span> grep -ir <span style=color:#a31515>&#34;TODO|FIXME&#34;</span> . | wc -l
63</span></span><span style=display:flex><span><span style=color:#00f>end</span>
64</span></span><span style=display:flex><span>
65</span></span><span style=display:flex><span>@task test1 <span style=color:#a31515>&#34;For testing 1&#34;</span> does
66</span></span><span style=display:flex><span> unknown-command
67</span></span><span style=display:flex><span> echo <span style=color:#a31515>&#34;test1&#34;</span>
68</span></span><span style=display:flex><span> ls -lha
69</span></span><span style=display:flex><span><span style=color:#00f>end</span>
70</span></span><span style=display:flex><span>
71</span></span><span style=display:flex><span>@task test2 <span style=color:#a31515>&#34;For testing 2&#34;</span> does
72</span></span><span style=display:flex><span> echo <span style=color:#a31515>&#34;test1&#34;</span>
73</span></span><span style=display:flex><span> ls -lha
74</span></span><span style=display:flex><span> docker-compose -f samples/stack.yml up
75</span></span><span style=display:flex><span><span style=color:#00f>end</span>
76</span></span></code></pre><p>One thing that I really like about Errand. Yes, this is what it is called. And
77it is available at <a href=https://git.mitjafelicijan.com/errand.git/about/>https://git.mitjafelicijan.com/errand.git/about/</a>. Moving
78on. One thing that I really like is that a task is a persistent shell. By that I
79mean, that the whole task, even if it contains multiple command in one shell.
80In make each line in a target is that and you need to combine lines or add <code>\</code>
81at the end of the line.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># How you do this things in make.</span>
82</span></span><span style=display:flex><span>target:
83</span></span><span style=display:flex><span> source .venv/bin/activate <span style=color:#a31515>\
84</span></span></span><span style=display:flex><span><span style=color:#a31515></span> python script.py
85</span></span></code></pre><p>This solves this problem. Consider each task and what is being executed in that
86task a shell that will only close when all the tasks are completed.<p>By self-documenting I mean that if you are in a directory with <code>Errandfile</code> in,
87if you only type <code>erd</code> and press enter it should by default display all the
88possible targets. In make i was doing this by having a first target be something
89like <code>default</code> that echos the message “Check Makefile for all available target.”
90Because all of the tasks in Errand require a message I use that to display let’s
91call it table of contents.<p>Because I don’t use any external dependencies this whole thing can be statically
92compiled. So that also checked one of the boxes.<p>It works on Linux and on a Mac so that’s also a bonus. I don’t believe this
93would work on Windows machines because of the way that I use shell instances. By
94you could use something like Windows Subsystem for Linux and run it in
95there. That is a valid option.<p>To finish this essay off, how was it to use it in “real life”. I have to be
96honest. Some of the missing features still bother me. <code>@dotenv</code> directive is
97still missing and I need to implement this ASAP.<p>Another thing that needs to happen is support for streaming output. Currently
98commands like <code>docker-compose</code> that runs in foreground mode is not compatible
99with Errand. So commands that stream output are an issue. I need to revisit how
100I initiate shell and how I read stdout and stderr. But that shouldn’t be a
101problem.<p>I have been very satisfied with this thing. I am pleasantly surprised by how
102useful it is. I really wanted to test this in the wild before I commit to it. I
103have more abandoned project than Google and it’s bringing a massive shame to my
104family at this point. So I wanted to be sure that this is even useful. And it
105actually is. Quite surprised at myself.<p>I really need to package this now and write proper docs. And maybe rewrite
106tokeniser. Its atrocious right now. Site to behold! But that is an issue for
107another time.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
108<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
109with me
110<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
111the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
112otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/rekindling-my-love-for-programming.html b/public/rekindling-my-love-for-programming.html
deleted file mode 100755
index 8a83061..0000000
--- a/public/rekindling-my-love-for-programming.html
+++ /dev/null
@@ -1,52 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Rekindling my love for programming and enjoying the act of creating</title><meta name=description content="Programming can be a challenging and rewarding experience, but sometimes it&amp;#39;seasy to feel burnt out or disinterested."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Rekindling my love for programming and enjoying the act of creating</h1><p>May 16, 2023<div><p>Programming can be a challenging and rewarding experience, but sometimes it's
7easy to feel burnt out or disinterested. I have lost the passion for coding over
8the past couple of months and it looked like I will never enjoy the coding as
9much as I did.<p>I was feeling burnt out with programming. I thought taking a break from it and
10focusing on other activities that I enjoy might be helpful. This way, I could
11come back to programming with a fresh perspective and renewed energy. I also
12thought about learning a new programming language or technology to keep things
13interesting and challenging.<p>However, what I didn't realize was that learning a new language or technology
14wasn't going to solve the underlying issue. I needed to take a step back and
15re-evaluate why I had lost my passion for programming in the first place. This
16involved taking a deep look into what I was doing that resulted in this rut.<p>Sometimes, it's easy to get caught up in the hype of new technologies or
17languages, and we can feel like we're missing out if we're not constantly
18learning and experimenting. However, it's important to remember that the latest
19and greatest isn't always the best fit for our projects or our
20interests. Instead of constantly chasing the next big thing, it can be helpful
21to focus on what truly interests us and what we're passionate about. This can
22help us stay motivated and engaged with our work, rather than feeling like we're
23just going through the motions.<p>I expressed that I had lost my passion for coding over the past couple of
24months, and I realized that the reason behind it was my tendency to spread
25myself too thin and not focus on completing interesting projects. In order to
26regain my passion for coding, I need to focus on projects that truly interest me
27and give me a sense of purpose and motivation.<p>Recently, I have been playing World of Warcraft more frequently and have become
28interested in developing addons for the game.<p>This quickly resulted in me creating three addons that improve the quality of
29life, and I subsequently developed a more useful add-on that encapsulates all
30the others I made.<p>I found it interesting that this action sparked a new interest in me.
31Additionally, I discovered the Lua language, which reminded me that coding
32should be fun rather than just a struggle with a language. It should be pure,
33unadulterated fun.<p>I wasn't fighting the syntax, nor was I focused on finding the most optimal
34solution. I simply created things without the pressure of making them the best
35they could possibly be.<p>This made me realize that I actually adore simple languages that get out of the
36way and let you express what you want to do. It forced me to rethink a lot about
37what I use and what I actually enjoy.<p>I have decided to stick to the basics. For a scripting language, I will use
38Lua. For networking, I will use Golang. And for any special needs, I will rely
39on C. I do not require Rust, Nim, or Zig. This selection is more than sufficient
40for my needs. I have to stay true to this simplicity. There is something to the
41Occam's Razor.<p>I've been struggling with a lack of creativity lately, but now I'm experiencing
42a real change. I realized I needed to take a step back and stop actively trying
43to address the issue. I needed to stop worrying and overthinking it. I simply
44needed some time. Looking back, I don't think I've taken any significant time
45off in the last 10 years.<p>Suddenly, I find myself with the energy and passion to complete multiple small
46projects. It doesn't feel like a chore at all. Who knew I needed WoW to
47kickstart everything. Inspiration really does come from the strangest places.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
48<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
49with me
50<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
51the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
52otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/remote-work.html b/public/remote-work.html
deleted file mode 100755
index b000fe1..0000000
--- a/public/remote-work.html
+++ /dev/null
@@ -1,45 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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fP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Remote work and how it affects the daily lives of people</title><meta name=description content="I have been working remotely for the past 5 years."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Remote work and how it affects the daily lives of people</h1><p>May 5, 2020<div><p>I have been working remotely for the past 5 years. I love it. Love the freedom
7and make your schedule thingy.<h2 id=you-work-more-not-less>You work more not less</h2><p>I've heard from people things like: "Oh, you are so lucky, working from home,
8having all the free time you want". It was obvious they had no clue what means
9working remotely. They had this romantic idea of remote work. You can watch TV
10whenever you like, you can go outside for a picnic if you want and stuff like
11that.<p>This may be true if you work a day or two in a week from home. But if you go
12completely remote all these changes completely. I take some time to acclimate
13but then you start feeling the consequences of going fully remote. And it's not
14all rainbows and unicorns. Rather the opposite.<h2 id=feeling-lost>Feeling lost</h2><p>At first, I remembered I felt lost. I was not used to this kind of environment.
15It felt disoriented and a part of you that is used to procrastinate turns on.
16You start thinking of a workday as a whole day. And soon this idea of "I can do
17this later" starts creeping in. Well, I have the whole day ahead of me. I can do
18this a bit later.<h2 id=hyper-performance>Hyper-performance</h2><p>As a direct result, you become more focused on your work since you don't have
19all the interruptions common in the workplace. And you can quickly get used to
20this hyper-performance. But this mode requires also a lot of peace and quiet.<p>And here we come to the ugly parts of all this. <strong>People rarely have the
21self-control</strong> to not waste other people's time. It is paralyzing when people
22start calling you, sending you chat messages, etc. The thing is, that when I
23achieve this hyper-performance mode I am completely embroiled in the problem I
24am solving and this kind of interruptions mess with your head. I need an hour at
25least to get back in the zone. Sometimes not achieving the same focus the whole
26day.<p>I know that life is not how you want it to be and takes its route but from what
27I've learned this kind of interruptions can be avoided in 90% of the case easily
28just by closing any chat programs and putting your phone in a drawer.<h2 id=suggestion-to-all-the-new-remote-workers>Suggestion to all the new remote workers</h2><ul><li>Stop wasting other people's time. You don't bother people at their desks in
29the office either.<li>Do not replace daily chats in the hallways with instant messaging software.
30It will only interrupt people. Nothing good will come of it.<li>Set your working hours and try to not allow it to bleed outside these
31boundaries and maintain your routine.<li>Be prepared that hours will be longer regardless of your good intentions and
32your well thought of routine.<li>Try to be hyper-focused and do only one thing at the time. Multitasking is the
33enemy of progress.<li>Avoid long meetings and if possible eliminate them. Rather take time to write
34them out and allow others to respond in their own time. Meetings are usually a
35large waste of time and most of the people attending them are there just
36because the manager said so.<li>The software will not solve your problems. And throwing money at problems
37neither.<li>If you are in a managerial position don't supervise any single minute of
38workers. They are probably giving you more hours anyways. Track progress
39weekly not daily. You hired them and give them the benefit of the doubt that
40they will deliver what you agreed upon.</ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
41<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
42with me
43<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
44the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
45otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/replacing-dropbox-in-favor-of-digitalocean-spaces.html b/public/replacing-dropbox-in-favor-of-digitalocean-spaces.html
deleted file mode 100755
index 05f28a1..0000000
--- a/public/replacing-dropbox-in-favor-of-digitalocean-spaces.html
+++ /dev/null
@@ -1,73 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Replacing Dropbox in favor of DigitalOcean spaces</title><meta name=description content="A few months ago I experimented with DigitalOcean spaces as my backup solutionthat could replace Dropboxeventually."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Replacing Dropbox in favor of DigitalOcean spaces</h1><p>Jan 24, 2021<div><p>A few months ago I experimented with DigitalOcean spaces as my backup solution
7that could <a href=/digitalocean-spaces-to-sync-between-computers.html>replace Dropbox
8eventually</a>. That solution
9worked quite nicely, and I was amazed how smashing together a couple of existing
10solutions would work this fine.<p>I have been running that solution in the background for a couple of months now
11and kind of forgot about it. But recent developments around deplatforming and
12having us people hostages of technology and big companies speed up my goals to
13become less dependent on
14<a href=https://edition.cnn.com/2020/12/17/tech/google-antitrust-lawsuit/index.html>Google</a>,
15<a href=https://www.pcworld.com/article/2048680/dropbox-takes-a-peek-at-files.html>Dropbox</a>
16etc and take back some control.<p>I am not a conspiracy theory nut, but to be honest, what these companies are
17doing lately is out of control. It is a matter of principle at this point. I
18have almost completely degoogled my life all the way from ditching Gmail,
19YouTube and most of the services surrounding Google. And I must tell you, I feel
20so good. I haven't felt this way for a long time.<p><strong>Anyways. Let's get to the meat of things.</strong><p>Before you continue you should read my post about <a href=/digitalocean-spaces-to-sync-between-computers.html>syncing to
21Dropbox</a>.<blockquote><p>Also to note, I am using Linux on my machine with Gnome desktop environment.
22This should work on MacOS too. To use this on Windows I suggest using
23<a href=https://docs.microsoft.com/en-us/windows/wsl/install-win10>Subsystem for Linux</a>
24or <a href=https://www.cygwin.com/>Cygwin</a>.</blockquote><h2 id=folder-structure>Folder structure</h2><p>I liked structure from Dropbox. One folder where everything is located and
25synced. So, that's why adopted this also for my sync setup.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span>~</span>/Vault
26</span></span><span style=display:flex><span> <span>↳</span> backup
27</span></span><span style=display:flex><span> <span>↳</span> bin
28</span></span><span style=display:flex><span> <span>↳</span> documents
29</span></span><span style=display:flex><span> <span>↳</span> projects
30</span></span></code></pre><p>All of my code is located in <code>~/Vault/projects</code> folder. And most of the projects
31are Git repositories. I do not use this sync method for backup per see but in
32case I reinstall my machine I can easily recreate all the important folder
33structure with one quick command. No external drives needed that can fail etc.<h2 id=sync-script>Sync script</h2><p>My sync script is located in <code>~/Vault/bin/vault-backup.sh</code><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/bin/bash
34</span></span></span><span style=display:flex><span><span style=color:#00f></span>
35</span></span><span style=display:flex><span><span style=color:green># dconf load /com/gexperts/Tilix/ &lt; tilix.dconf</span>
36</span></span><span style=display:flex><span><span style=color:green># 0 2 * * * sh ~/Vault/bin/vault-backup.sh</span>
37</span></span><span style=display:flex><span>
38</span></span><span style=display:flex><span>cd ~/Vault/backup/dotfiles
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span>MACHINE=<span style=color:#00f>$(</span>whoami<span style=color:#00f>)</span>@<span style=color:#00f>$(</span>hostname<span style=color:#00f>)</span>
41</span></span><span style=display:flex><span>mkdir -p $MACHINE
42</span></span><span style=display:flex><span>cd $MACHINE
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span>cp ~/.config/VSCodium/User/settings.json settings.json
45</span></span><span style=display:flex><span>cp ~/.s3cfg s3cfg
46</span></span><span style=display:flex><span>cp ~/.bash_extended bash_extended
47</span></span><span style=display:flex><span>cp ~/.ssh ssh -rf
48</span></span><span style=display:flex><span>
49</span></span><span style=display:flex><span>codium --list-extensions &gt; vscode-extension.txt
50</span></span><span style=display:flex><span>dconf dump /com/gexperts/Tilix/ &gt; tilix.dconf
51</span></span><span style=display:flex><span>
52</span></span><span style=display:flex><span>cd ~/Vault
53</span></span><span style=display:flex><span>s3cmd sync --delete-removed --exclude <span style=color:#a31515>&#39;node_modules/*&#39;</span> --exclude <span style=color:#a31515>&#39;.git/*&#39;</span> --exclude <span style=color:#a31515>&#39;.venv/*&#39;</span> ./ s3://bucket-name/backup/
54</span></span><span style=display:flex><span>
55</span></span><span style=display:flex><span>echo <span style=color:#a31515>`</span>date +<span style=color:#a31515>&#34;%D %T&#34;</span><span style=color:#a31515>`</span> &gt;&gt; ~/.vault.log
56</span></span><span style=display:flex><span>
57</span></span><span style=display:flex><span>notify-send <span style=color:#a31515>\
58</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -u normal <span style=color:#a31515>\
59</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -i /usr/share/icons/Adwaita/96x96/status/security-medium-symbolic.symbolic.png <span style=color:#a31515>\
60</span></span></span><span style=display:flex><span><span style=color:#a31515></span> <span style=color:#a31515>&#34;Vault sync succeded at `date +&#34;</span>%D %T<span style=color:#a31515>&#34;`&#34;</span>
61</span></span></code></pre><p>This script also backups some of the dotfiles I use and sends notification to
62Gnome notification center. It is a straightforward solution. Nothing special
63going on.<blockquote><p>One obvious benefit of this is that I can omit syncing Node's <code>node_modules</code>
64or Python's <code>.venv</code> and <code>.git</code> folders.</blockquote><p>You can use this script in a combination with <a href=https://en.wikipedia.org/wiki/Cron>Cron</a>.<pre><code>0 2 * * * sh ~/Vault/bin/vault-backup.sh
65</code></pre><p>When you start syncing your local stuff with a remote server you can review your
66items on DigitalOcean.<p><img src=/assets/dropbox-sync/dropbox-spaces.png alt="Dropbox Spaces"><p>I have been using this script now for quite some time, and it's working
67flawlessly. I also uninstalled Dropbox and stopped using it completely.<p>All I need to do is write a Bash script that does the reverse and downloads from
68remote server to local folder. This could be another post.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
69<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
70with me
71<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
72the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
73otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/run-9front-in-qemu.html b/public/run-9front-in-qemu.html
deleted file mode 100755
index eea451a..0000000
--- a/public/run-9front-in-qemu.html
+++ /dev/null
@@ -1,23 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Run 9front in Qemu</title><meta name=description content="Run 9front in Qemu."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Run 9front in Qemu</h1><p>May 5, 2023<div><p>Run 9front in Qemu. This applies to <a href=https://9p.io/plan9/>Plan9</a> and
7<a href=https://9front.org/>9front</a>.<p>Download from here <a href=http://9front.org/iso/>http://9front.org/iso/</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Create a qcow2 image.</span>
8</span></span><span style=display:flex><span>qemu-img create -f qcow2 $HOME/VM/9front.qcow2.img 30G
9</span></span><span style=display:flex><span>
10</span></span><span style=display:flex><span><span style=color:green># Run the VM.</span>
11</span></span><span style=display:flex><span>qemu-system-x86_64 -cpu host -enable-kvm -m 1024 <span style=color:#a31515>\
12</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -net nic,model=virtio,macaddr=52:54:00:00:EE:03 -net user <span style=color:#a31515>\
13</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -device virtio-scsi-pci,id=scsi <span style=color:#a31515>\
14</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -drive <span style=color:#00f>if</span>=none,id=vd0,file=$HOME/VM/9front.qcow2.img <span style=color:#a31515>\
15</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -device scsi-hd,drive=vd0 <span style=color:#a31515>\
16</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -drive <span style=color:#00f>if</span>=none,id=vd1,file=$HOME/VM/ISO/9front.386.iso <span style=color:#a31515>\
17</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -device scsi-cd,drive=vd1,bootindex=0
18</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
19<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
20with me
21<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
22the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
23otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/running-golang-application-as-pid1.html b/public/running-golang-application-as-pid1.html
deleted file mode 100755
index 3da57b0..0000000
--- a/public/running-golang-application-as-pid1.html
+++ /dev/null
@@ -1,189 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAA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sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Running Golang application as PID 1 with Linux kernel</title><meta name=description content="Unikernels, kernels, and alikeI have been reading a lot aboutunikernernels lately and found themvery intriguing."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Running Golang application as PID 1 with Linux kernel</h1><p>Dec 25, 2021<div><h2 id=unikernels-kernels-and-alike>Unikernels, kernels, and alike</h2><p>I have been reading a lot about
7<a href=https://en.wikipedia.org/wiki/Unikernel>unikernernels</a> lately and found them
8very intriguing. When you push away all the marketing speak and look at the
9idea, it makes a lot of sense.<blockquote><p>A unikernel is a specialized, single address space machine image constructed
10by using library operating systems. (<a href=https://en.wikipedia.org/wiki/Unikernel>Wikipedia</a>)</blockquote><p>I really like the explanation from the article
11<a href="https://queue.acm.org/detail.cfm?id=2566628">Unikernels: Rise of the Virtual Library Operating System</a>.
12Really worth a read.<p>If we compare a normal operating system to a unikernel side by side, they would
13look something like this.<p><img src=/assets/pid1/unikernels.png alt="Virtual machines vs Containers vs Unikernels"><p>From this image, we can see how the complexity significantly decreases with
14the use of Unikernels. This comes with a price, of course. Unikernels are hard
15to get running and require a lot of work since you don't have an actual proper
16kernel running in the background providing network access and drivers etc.<p>So as a half step to make the stack simpler, I started looking into using
17Linux kernel as a base and going from there. I came across this
18<a href="https://www.youtube.com/watch?v=Sk9TatW9ino">Youtube video talking about Building the Simplest Possible Linux System</a>
19by <a href=https://landley.net>Rob Landley</a> and apart from statically compiling the
20application to be run as PID1 there was really no other obstacles.<h2 id=what-is-pid-1>What is PID 1?</h2><p>PID 1 is the first process that Linux kernel starts after the boot process.
21It also has a couple of unique properties that are unique to it.<ul><li>When the process with PID 1 dies for any reason, all other processes are
22killed with KILL signal.<li>When any process having children dies for any reason, its children are
23re-parented to process with PID 1.<li>Many signals which have default action of Term do not have one for PID 1.<li>When the process with PID 1 dies for any reason, kernel panics, which
24result in system crash.</ul><p>PID 1 is considered as an Init application which takes care of running other
25and handling services like:<ul><li>sshd,<li>nginx,<li>pulseaudio,<li>etc.</ul><p>If you are on a Linux machine, you can check what your process is with PID 1
26by running the following.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ cat /proc/1/status
27</span></span><span style=display:flex><span>Name: systemd
28</span></span><span style=display:flex><span>Umask: 0000
29</span></span><span style=display:flex><span>State: S (sleeping)
30</span></span><span style=display:flex><span>Tgid: 1
31</span></span><span style=display:flex><span>Ngid: 0
32</span></span><span style=display:flex><span>Pid: 1
33</span></span><span style=display:flex><span>PPid: 0
34</span></span><span style=display:flex><span>...
35</span></span></code></pre><p>As we can see on my machine the process with id of 1 is <a href=https://systemd.io/>systemd</a>
36which is a software suite that provides an array of system components for Linux
37operating systems. If you look closely you can also see that the <code>PPid</code>
38(process id of the parent process) is <code>0</code> which additionally confirms that
39this process doesn't have a parent.<h2 id=so-why-even-run-application-as-pid-1-instead-of-just-using-a-container>So why even run application as PID 1 instead of just using a container?</h2><p>Containers are wonderful, but they come with a lot of baggage. And because they
40are in their nature layered, the images require quite a lot of space and also a
41lot of additional software to handle them. They are not as lightweight as they
42seem, and many popular images require 500 MB plus disk space.<p>The idea of running this as PID 1 would result in a significantly smaller footprint,
43as we will see later in the post.<blockquote><p>You could run a simple init system inside Docker container described more
44in this article <a href=https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/>Docker and the PID 1 zombie reaping problem</a>.</blockquote><h2 id=the-master-plan>The master plan</h2><ol><li>Compile Linux kernel with the default definitions.<li>Prepare a Hello World application in Golang that is statically compiled.<li>Run it with <a href=https://www.qemu.org/>QEMU</a> and providing Golang application
45as init application / PID 1.</ol><p>For the sake of simplicity we will not be cross-compiling any of it and just
46use the 64bit version.<h2 id=compiling-linux-kernel>Compiling Linux kernel</h2><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.7.tar.xz
47</span></span><span style=display:flex><span>$ tar xf linux-5.15.7.tar.xz
48</span></span><span style=display:flex><span>
49</span></span><span style=display:flex><span>$ cd linux-5.15.7
50</span></span><span style=display:flex><span>
51</span></span><span style=display:flex><span>$ make clean
52</span></span><span style=display:flex><span>
53</span></span><span style=display:flex><span><span style=color:green># read more about this https://stackoverflow.com/a/41886394</span>
54</span></span><span style=display:flex><span>$ make defconfig
55</span></span><span style=display:flex><span>
56</span></span><span style=display:flex><span>$ time make -j <span style=color:#a31515>`</span>nproc<span style=color:#a31515>`</span>
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span>$ cd ..
59</span></span></code></pre><p>At this point we have kernel image that is located in <code>arch/x86_64/boot/bzImage</code>.
60We will use this in QEMU later.<p>To make our lives a bit easier lets move the kernel image to another place.
61Lets create a folder <code>bin/</code> in the root of our project with <code>mkdir -p bin</code>.<p>At this point we can copy <code>bzImage</code> to <code>bin/</code> folder with
62<code>cp linux-5.15.7/arch/x86_64/boot/bzImage bin/bzImage</code>.<p>The folder structure of this experiment should look like this.<pre><code>pid1/
63 bin/
64 bzImage
65 linux-5.15.7/
66 linux-5.15.7.tar.xz
67</code></pre><h2 id=preparing-pid-1-application-in-golang>Preparing PID 1 application in Golang</h2><p>This step is relatively easy. The only thing we must have in mind that we will
68need to compile the binary as a static one.<p>Let's create <code>init.go</code> file in the root of the project.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>package</span> main
69</span></span><span style=display:flex><span>
70</span></span><span style=display:flex><span><span style=color:#00f>import</span> (
71</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;fmt&#34;</span>
72</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;time&#34;</span>
73</span></span><span style=display:flex><span>)
74</span></span><span style=display:flex><span>
75</span></span><span style=display:flex><span><span style=color:#00f>func</span> main() {
76</span></span><span style=display:flex><span> <span style=color:#00f>for</span> {
77</span></span><span style=display:flex><span> fmt.Println(<span style=color:#a31515>&#34;Hello from Golang&#34;</span>)
78</span></span><span style=display:flex><span> time.Sleep(1 * time.Second)
79</span></span><span style=display:flex><span> }
80</span></span><span style=display:flex><span>}
81</span></span></code></pre><p>If you notice, we have a forever loop in the main, with a simple sleep of 1
82second to not overwhelm the CPU. This is because PID 1 should never complete
83and/or exit. That would result in a kernel panic. Which is BAD!<p>There are two ways of compiling Golang application. Statically and dynamically.<p>To statically compile the binary, use the following command.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ go build -ldflags=<span style=color:#a31515>&#34;-extldflags=-static&#34;</span> init.go
84</span></span></code></pre><p>We can also check if the binary is statically compiled with:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ file init
85</span></span><span style=display:flex><span>init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=Ypu8Zw_4NBxm1Yxg2OYO/H5x721rQ9uTPiDVh-VqP/vZN7kXfGG1zhX_qdHMgH/9vBfmK81tFrygfOXDEOo, not stripped
86</span></span><span style=display:flex><span>
87</span></span><span style=display:flex><span>$ ldd init
88</span></span><span style=display:flex><span>not a dynamic executable
89</span></span></code></pre><p>At this point, we need to create <a href=https://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html>initramfs</a>
90(abbreviated from "initial RAM file system", is the successor of initrd. It
91is a cpio archive of the initial file system that gets loaded into memory
92during the Linux startup process).<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ echo init | cpio -o --format=newc &gt; initramfs
93</span></span><span style=display:flex><span>$ mv initramfs bin/initramfs
94</span></span></code></pre><p>The projects at this stage should look like this.<pre><code>pid1/
95 bin/
96 bzImage
97 initramfs
98 linux-5.15.7/
99 linux-5.15.7.tar.xz
100 init.go
101</code></pre><h2 id=running-all-of-it-with-qemu>Running all of it with QEMU</h2><p><a href=https://www.qemu.org/>QEMU</a> is a free and open-source hypervisor. It emulates
102the machine's processor through dynamic binary translation and provides a set
103of different hardware and device models for the machine, enabling it to run a
104variety of guest operating systems.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ qemu-system-x86_64 -serial stdio -kernel bin/bzImage -initrd bin/initramfs -append <span style=color:#a31515>&#34;console=ttyS0&#34;</span> -m 128
105</span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ qemu-system-x86_64 -serial stdio -kernel bin/bzImage -initrd bin/initramfs -append <span style=color:#a31515>&#34;console=ttyS0&#34;</span> -m 128
106</span></span><span style=display:flex><span>[ 0.000000] Linux version 5.15.7 (m@khan) (gcc (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7), GNU ld version 2.37-10.fc35) <span style=color:green>#7 SMP Mon Dec 13 10:23:25 CET 2021</span>
107</span></span><span style=display:flex><span>[ 0.000000] Command line: console=ttyS0
108</span></span><span style=display:flex><span>[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
109</span></span><span style=display:flex><span>[ 0.000000] signal: max sigframe size: 1440
110</span></span><span style=display:flex><span>[ 0.000000] BIOS-provided physical RAM map:
111</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
112</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
113</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
114</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
115</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
116</span></span><span style=display:flex><span>[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
117</span></span><span style=display:flex><span>[ 0.000000] NX (Execute Disable) protection: active
118</span></span><span style=display:flex><span>[ 0.000000] SMBIOS 2.8 present.
119</span></span><span style=display:flex><span>[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-6.fc35 04/01/2014
120</span></span><span style=display:flex><span>[ 0.000000] tsc: Fast TSC calibration failed
121</span></span><span style=display:flex><span>...
122</span></span><span style=display:flex><span>[ 2.016106] ALSA device list:
123</span></span><span style=display:flex><span>[ 2.016329] No soundcards found.
124</span></span><span style=display:flex><span>[ 2.053176] Freeing unused kernel image (initmem) memory: 1368K
125</span></span><span style=display:flex><span>[ 2.056095] Write protecting the kernel read-only data: 20480k
126</span></span><span style=display:flex><span>[ 2.058248] Freeing unused kernel image (text/rodata gap) memory: 2032K
127</span></span><span style=display:flex><span>[ 2.058811] Freeing unused kernel image (rodata/data gap) memory: 500K
128</span></span><span style=display:flex><span>[ 2.059164] Run /init as init process
129</span></span><span style=display:flex><span>Hello from Golang
130</span></span><span style=display:flex><span>[ 2.386879] tsc: Refined TSC clocksource calibration: 3192.032 MHz
131</span></span><span style=display:flex><span>[ 2.387114] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e02e31fa14, max_idle_ns: 440795264947 ns
132</span></span><span style=display:flex><span>[ 2.387380] clocksource: Switched to clocksource tsc
133</span></span><span style=display:flex><span>[ 2.587895] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
134</span></span><span style=display:flex><span>Hello from Golang
135</span></span><span style=display:flex><span>Hello from Golang
136</span></span><span style=display:flex><span>Hello from Golang
137</span></span></code></pre><p>The whole <a href=/assets/pid1/qemu.log>log file here</a>.<h2 id=size-comparison>Size comparison</h2><p>The cool thing about this approach is that the Linux kernel and the application
138together only take around 12 MB, which is impressive as hell. And we need to
139also know that the size of bzImage (Linux kernel) could be greatly decreased
140by going into <code>make menuconfig</code> and removing a ton of features from the kernel,
141making the size even smaller. I managed to get kernel size down to 2 MB and
142still working properly.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>total 12M
143</span></span><span style=display:flex><span>-rw-r--r--. 1 m m 9.3M Dec 13 10:24 bzImage
144</span></span><span style=display:flex><span>-rw-r--r--. 1 m m 1.9M Dec 27 01:19 initramfs
145</span></span></code></pre><h2 id=creating-iso-image-and-running-it-with-gnome-boxes>Creating ISO image and running it with Gnome Boxes</h2><p>First we need to create proper folder structure with <code>mkdir -p iso/boot/grub</code>.<p>Then we need to download the <a href=https://github.com/littleosbook/littleosbook/raw/master/files/stage2_eltorito>grub binary</a>.
146You can read more about this program on <a href=https://github.com/littleosbook/littleosbook>https://github.com/littleosbook/littleosbook</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ wget -O iso/boot/grub/stage2_eltorito https://github.com/littleosbook/littleosbook/raw/master/files/stage2_eltorito
147</span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ tree iso/boot/
148</span></span><span style=display:flex><span>iso/boot/
149</span></span><span style=display:flex><span>├── bzImage
150</span></span><span style=display:flex><span>├── grub
151</span></span><span style=display:flex><span>│   ├── menu.lst
152</span></span><span style=display:flex><span>│   └── stage2_eltorito
153</span></span><span style=display:flex><span>└── initramfs
154</span></span></code></pre><p>Let's copy files into proper folders.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>$ cp stage2_eltorito iso/boot/grub/
155</span></span><span style=display:flex><span>$ cp bin/bzImage iso/boot/
156</span></span><span style=display:flex><span>$ cp bin/initramfs iso/boot/
157</span></span></code></pre><p>Lets create a GRUB config file at <code>nano iso/boot/grub/menu.lst</code> with contents.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>default=<span style=color:#a31515>0</span>
158</span></span><span style=display:flex><span>timeout=<span style=color:#a31515>5</span>
159</span></span><span style=display:flex><span>
160</span></span><span style=display:flex><span>title GoAsPID1
161</span></span><span style=display:flex><span>kernel /boot/bzImage
162</span></span><span style=display:flex><span>initrd /boot/initramfs
163</span></span></code></pre><p>Let's create iso file by using genisoimage:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>genisoimage -R <span style=color:#a31515>\
164</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -b boot/grub/stage2_eltorito <span style=color:#a31515>\
165</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -no-emul-boot <span style=color:#a31515>\
166</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -boot-load-size 4 <span style=color:#a31515>\
167</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -A os <span style=color:#a31515>\
168</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -input-charset utf8 <span style=color:#a31515>\
169</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -quiet <span style=color:#a31515>\
170</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -boot-info-table <span style=color:#a31515>\
171</span></span></span><span style=display:flex><span><span style=color:#a31515></span> -o GoAsPID1.iso <span style=color:#a31515>\
172</span></span></span><span style=display:flex><span><span style=color:#a31515></span> iso
173</span></span></code></pre><p>This will produce <code>GoAsPID1.iso</code> which you can use with <a href=https://www.virtualbox.org/>Virtualbox</a>
174or <a href=https://apps.gnome.org/app/org.gnome.Boxes/>Gnome Boxes</a>.<p><video src=/assets/pid1/boxes.mp4 controls></video><h2 id=is-running-applications-as-pid-1-even-worth-it>Is running applications as PID 1 even worth it?</h2><p>Well, the answer to this is not as simple as one would think. Sometimes it is
175and sometimes it's not. For embedded systems and very specialized applications
176it is worth for sure. But in normal uses, I don't think so. It was an interesting
177exercise in compiling kernels and looking at the guts of the Linux kernel,
178but sticking to containers for most of the things is a better option in my
179opinion.<p>An interesting experiment would be creating an image that supports networking
180and could be deployed to AWS as an EC2 instance and observing how it fares.
181But in that case, we would need to write some sort of supervisor that would
182run on a separate EC2 that would check if other EC2 instances are running
183properly. Remember that if your application fails, kernel panics and the
184whole machine is inoperable in this case.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
185<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
186with me
187<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
188the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
189otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/simple-iot-application.html b/public/simple-iot-application.html
deleted file mode 100755
index 2027c1c..0000000
--- a/public/simple-iot-application.html
+++ /dev/null
@@ -1,439 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAA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D/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simple IOT application supported by real-time monitoring and data history</title><meta name=description content="Initial thoughtsI have been developing these kind of application for the better part of my last5 years and people keep asking me how to approach developing such applicationand I will give a try explaining it here."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Simple IOT application supported by real-time monitoring and data history</h1><p>Aug 11, 2017<div><h2 id=initial-thoughts>Initial thoughts</h2><p>I have been developing these kind of application for the better part of my last
75 years and people keep asking me how to approach developing such application
8and I will give a try explaining it here.<p>IOT applications are really no different than any other kind of applications.
9We have data that needs to be collected and visualized in some form of tables or
10charts. The main difference here is that most of the times these data is
11collected by some kind of device foreign to developer that mainly operates in
12web domain. But fear not, it's not that different than writing some JavaScript.<p>There are many devices able to transmit data via wireless or wired network by
13default but for the sake of example we will be using commonly known Arduino with
14wireless module already on the board → <a href=https://store.arduino.cc/arduino-mkr1000>Arduino
15MKR1000</a>.<p>In order to make this little project as accessible to others as possible I will
16try to make it as inexpensive as possible. And by this I mean that I will avoid
17using hosted virtual servers and will be using my own laptop as a server. But
18you must buy Arduino MKR1000 to follow steps below. But if you would want to
19deploy this software I would suggest using
20<a href=https://www.digitalocean.com>DigitalOcean</a> → smallest VPS is only per month
21making this one of the most affordable option out there. Please notice that this
22software will not run on stock web hosting that only supports LAMP (Linux,
23Apache, MySQL, and PHP).<p>But before we begin please take notice that this is strictly experimental code
24and not well optimized and there are much better ways in handling some aspects
25of the application but that requires much deeper knowledge of technology that is
26not needed for an example like this.<p><strong>Development steps</strong><ol><li>Simple Python API that will receive and store incoming data.<li>Prototype C++ code that will read "sensor data" and transmit it to API.<li>Data visualization with charts → extends Python web application.</ol><p>Step 1. and 3. will share the same web application. One route will be dedicated
27to API and another to serving HTML with chart.<p>Schema below represents what we will try to achieve and how different parts
28correlates to each other.<p><img src=/assets/iot-application/simple-iot-application-overview.svg alt=Overview><h2 id=simple-python-api>Simple Python API</h2><p>I have always been a fan of simplicity so we will be using <a href=https://bottlepy.org/docs/dev/>Bottle: Python Web
29Framework</a>. It is a single file web framework
30that seriously simplifies working with routes, templating and has built-in web
31server that satisfies our need in this case.<p>First we need to install bottle package. This can be done by downloading
32<code>bottle.py</code> and placing it in the root of your application or by using pip
33software <code>pip install bottle --user</code>.<p>If you are using Linux or MacOS then Python is already installed. If you will
34try to test this on Windows please install <a href=https://www.python.org/downloads/windows/>Python for
35Windows</a>. There may be some problems
36with path when you will try to launch <code>python webapp.py</code> so please take care
37of this before you continue.<h3 id=basic-web-application>Basic web application</h3><p>Most basic bottle application is quite simple. Paste code below in
38<code>webapp.py</code> file and save.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
41</span></span><span style=display:flex><span>
42</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
43</span></span><span style=display:flex><span>app = bottle.Bottle()
44</span></span><span style=display:flex><span>
45</span></span><span style=display:flex><span><span style=color:green># triggered when / is accessed from browser</span>
46</span></span><span style=display:flex><span><span style=color:green># only accepts GET → no POST allowed</span>
47</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>])
48</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
49</span></span><span style=display:flex><span> <span style=color:#00f>return</span> <span style=color:#a31515>&#34;howdy from python&#34;</span>
50</span></span><span style=display:flex><span>
51</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
52</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
53</span></span><span style=display:flex><span> bottle.run(
54</span></span><span style=display:flex><span> app = app,
55</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
56</span></span><span style=display:flex><span> port = 5000,
57</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
58</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
59</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
60</span></span><span style=display:flex><span> )
61</span></span></code></pre><p>To run this simple application you should open command prompt or terminal on
62your machine and go to the folder containing your file and type <code>python webapp.py</code>. If everything goes ok then open your web browser and point it to
63<code>http://0.0.0.0:5000</code>.<p>If you would like change the port of your application (like port 80) and not use
64root to run your app this will present a problem. The TCP/IP port numbers below
651024 are privileged ports → this is a security feature. So in order of
66simplicity and security use a port number above 1024 like I have used port 5000.<p>If this fails at any time please fix it before you continue, because nothing
67below will work otherwise.<p>We use 0.0.0.0 as default host so that this app is available over your local
68network. If you find your local ip <code>ifconfig</code> and try accessing this site
69with your phone (if on same network/router as your machine) this should work as
70well (example of such ip <code>http://192.168.1.15:5000</code>). This is a must have
71because Arduino will be accessing this application to send it's data.<h3 id=web-application-security>Web application security</h3><p>There is a lot to be said about security and is a topic of many books. Of course
72all this can not be written here but to just establish some basic security → you
73should always use SSL with your application. Some fantastic free certificates
74are available by <a href=https://letsencrypt.org>Let's Encrypt - Free SSL/TLS
75Certificates</a>. With SSL certificate installed you
76should then make use of HTTP headers and send your "API key" via a header. If
77your key is send via header then this key is encrypted by SSL and send encrypted
78over the network. Never send your api keys by GET parameter like
79<code>http://example.com/?api_key=somekeyvalue</code>. The problem that this kind of
80sending presents is that this key is visible in logs and by network sniffers.<p>There is a fantastic article describing some aspects about security: <a href=https://www.keycdn.com/blog/web-application-security-best-practices/>11 Web
81Application Security Best
82Practices</a>. Please
83check it out.<h3 id=simple-api-for-writing-data-points>Simple API for writing data-points</h3><p>We will now be using boilerplate code from example above and extend it to be
84SQLite3 because it plays well with Python and can store quite large amount of
85able to write data received by API to local storage. For example use I will use
86data. I have been using it to collect gigabytes of data in a single database
87without any corruption or problems → your experience may vary.<p>To avoid learning SQLite I will be using <a href=https://dataset.readthedocs.io/en/latest/index.html>Dataset: databases for lazy
88people</a>. This package
89abstracts SQL and simplifies writing and reading data from database. You should
90install this package with pip software <code>pip install dataset --user</code>.<p>Because API will use POST method I will be testing if code works correctly by
91using <a href=https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm>Restlet Client for Google
92Chrome</a>.
93This software also allows you to set headers → for basic security with API_KEY.<p>To quickly generate passwords or API keys I usually use this nifty website
94<a href=https://randomkeygen.com/>RandomKeygen</a>.<p>Copy and paste code below over your previous code in file <code>webapp.py</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
95</span></span><span style=display:flex><span>
96</span></span><span style=display:flex><span><span style=color:#00f>import</span> time
97</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
98</span></span><span style=display:flex><span><span style=color:#00f>import</span> random
99</span></span><span style=display:flex><span><span style=color:#00f>import</span> dataset
100</span></span><span style=display:flex><span>
101</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
102</span></span><span style=display:flex><span>app = bottle.Bottle()
103</span></span><span style=display:flex><span>
104</span></span><span style=display:flex><span><span style=color:green># connects to sqlite database</span>
105</span></span><span style=display:flex><span><span style=color:green># check_same_thread=False allows using it in multi-threaded mode</span>
106</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;dsn&#34;</span>] = dataset.connect(<span style=color:#a31515>&#34;sqlite:///data.db?check_same_thread=False&#34;</span>)
107</span></span><span style=display:flex><span>
108</span></span><span style=display:flex><span><span style=color:green># api key that will be used in Arduino code</span>
109</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>
110</span></span><span style=display:flex><span>
111</span></span><span style=display:flex><span><span style=color:green># triggered when /api is accessed from browser</span>
112</span></span><span style=display:flex><span><span style=color:green># only accepts POST → no GET allowed</span>
113</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/api&#34;</span>, method=[<span style=color:#a31515>&#34;POST&#34;</span>])
114</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
115</span></span><span style=display:flex><span> status = 400
116</span></span><span style=display:flex><span> ts = int(time.time()) <span style=color:green># current timestamp</span>
117</span></span><span style=display:flex><span> value = bottle.request.body.read() <span style=color:green># data from device</span>
118</span></span><span style=display:flex><span> api_key = bottle.request.get_header(<span style=color:#a31515>&#34;Api_Key&#34;</span>) <span style=color:green># api key from header</span>
119</span></span><span style=display:flex><span>
120</span></span><span style=display:flex><span> <span style=color:green># outputs to console received data for debug reason</span>
121</span></span><span style=display:flex><span> print <span style=color:#a31515>&#34;&gt;&gt;&gt; </span><span style=color:#a31515>{}</span><span style=color:#a31515> :: </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(value, api_key)
122</span></span><span style=display:flex><span>
123</span></span><span style=display:flex><span> <span style=color:green># if api_key is correct and value is present</span>
124</span></span><span style=display:flex><span> <span style=color:green># then writes attribute to point table</span>
125</span></span><span style=display:flex><span> <span style=color:#00f>if</span> api_key == app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] <span style=color:#00f>and</span> value:
126</span></span><span style=display:flex><span> app.config[<span style=color:#a31515>&#34;dsn&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].insert(dict(ts=ts, value=value))
127</span></span><span style=display:flex><span> status = 200
128</span></span><span style=display:flex><span>
129</span></span><span style=display:flex><span> <span style=color:green># we only need to return status</span>
130</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.HTTPResponse(status=status, body=<span style=color:#a31515>&#34;&#34;</span>)
131</span></span><span style=display:flex><span>
132</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
133</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
134</span></span><span style=display:flex><span> bottle.run(
135</span></span><span style=display:flex><span> app = app,
136</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
137</span></span><span style=display:flex><span> port = 5000,
138</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
139</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
140</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
141</span></span><span style=display:flex><span> )
142</span></span></code></pre><p>To run this simply go to folder containing python file and run <code>python webapp.py</code> from terminal. If everything goes ok you should have simple API
143available via POST method on /api route.<p>After testing the service with Restlet Client you should be able to view your
144data in a database file <code>data.db</code>.<p><img src=/assets/iot-application/iot-rest-example.png alt="REST settings example"><p>You can also check the contents of new database file by using desktop client
145for SQLite → <a href=http://sqlitebrowser.org/>DB Browser for SQLite</a>.<p><img src=/assets/iot-application/iot-sqlite-db.png alt="SQLite database example"><p>Table structure is as simple as it can be. We have ts (timestamp) and value
146(value from Arduino). As you can see timestamp is generated on API side. If you
147would happen to have atomic clock on Arduino it would be then better to generate
148and send timestamp with the value. This would be particularity useful if we
149would be collecting sensor data at a higher frequency and then sending this data
150in bulk to API.<p>If you will deploy this app with uWSGI and multi-threaded, use DSN (Data Source
151Name) url with <code>?check_same_thread=False</code>.<p>Ok, now that we have some sort of a working API with some basic security so
152unwanted people can not post data to your database can we proceed further and
153try to program Arduino to send data to API.<h2 id=sending-data-to-api-with-arduino-mkr1000>Sending data to API with Arduino MKR1000</h2><p>First of all you should have MKR1000 module and microUSB cable to proceed. If
154you have ever done any work with Arduino you should know that you also need
155<a href=https://www.arduino.cc/en/Main/Software>Arduino IDE</a>. On provided link you
156should be able to download and install IDE. Once that task is completed and you
157have successfully run blink example you should proceed to the next step.<p>In order to use wireless capabilities of MKR1000 you need to first install
158<a href=https://www.arduino.cc/en/Reference/WiFi101>WiFi101 library</a> in Arduino IDE.
159Please check before you install, you may already have it installed.<p>Code below is a working example that sends data to API. Before you try to test
160your code make sure you have run Python web application. Then change settings
161for wifi, api endpoint and api_key. If by some reason code bellow doesn't work
162for you please leave a comment and I'll try to help.<p>Once you have opened IDE and copied this code try to compile and upload it.
163Then open "Serial monitor" to see if any output is presented by Arduino.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;WiFi101.h&gt;</span><span style=color:#00f>
164</span></span></span><span style=display:flex><span><span style=color:#00f></span>
165</span></span><span style=display:flex><span><span style=color:green>// wifi settings
166</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>char</span> ssid[] = <span style=color:#a31515>&#34;ssid-name&#34;</span>;
167</span></span><span style=display:flex><span><span style=color:#2b91af>char</span> pass[] = <span style=color:#a31515>&#34;ssid-password&#34;</span>;
168</span></span><span style=display:flex><span>
169</span></span><span style=display:flex><span><span style=color:green>// api server enpoint
170</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>char</span> server[] = <span style=color:#a31515>&#34;192.168.6.22&#34;</span>;
171</span></span><span style=display:flex><span><span style=color:#2b91af>int</span> port = 5000;
172</span></span><span style=display:flex><span>
173</span></span><span style=display:flex><span><span style=color:green>// api key that must be the same as the one in Python code
174</span></span></span><span style=display:flex><span><span style=color:green></span>String api_key = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>;
175</span></span><span style=display:flex><span>
176</span></span><span style=display:flex><span><span style=color:green>// frequency data is sent in ms - every 5 seconds
177</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>int</span> timeout = 1000 * 5;
178</span></span><span style=display:flex><span>
179</span></span><span style=display:flex><span><span style=color:#2b91af>int</span> status = WL_IDLE_STATUS;
180</span></span><span style=display:flex><span>
181</span></span><span style=display:flex><span><span style=color:#2b91af>void</span> setup() {
182</span></span><span style=display:flex><span>
183</span></span><span style=display:flex><span> <span style=color:green>// initialize serial and wait for port to open:
184</span></span></span><span style=display:flex><span><span style=color:green></span> Serial.begin(9600);
185</span></span><span style=display:flex><span> delay(1000);
186</span></span><span style=display:flex><span>
187</span></span><span style=display:flex><span> <span style=color:green>// check for the presence of the shield
188</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>if</span> (WiFi.status() == WL_NO_SHIELD) {
189</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;WiFi shield not present&#34;</span>);
190</span></span><span style=display:flex><span> <span style=color:#00f>while</span> (true);
191</span></span><span style=display:flex><span> }
192</span></span><span style=display:flex><span>
193</span></span><span style=display:flex><span> <span style=color:green>// attempt to connect to wifi network
194</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>while</span> (status != WL_CONNECTED) {
195</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;Attempting to connect to SSID: &#34;</span>);
196</span></span><span style=display:flex><span> Serial.println(ssid);
197</span></span><span style=display:flex><span> status = WiFi.begin(ssid, pass);
198</span></span><span style=display:flex><span> <span style=color:green>// wait 10 seconds for connection
199</span></span></span><span style=display:flex><span><span style=color:green></span> delay(10000);
200</span></span><span style=display:flex><span> }
201</span></span><span style=display:flex><span>
202</span></span><span style=display:flex><span> <span style=color:green>// output wifi status to serial monitor
203</span></span></span><span style=display:flex><span><span style=color:green></span> Serial.print(<span style=color:#a31515>&#34;SSID: &#34;</span>);
204</span></span><span style=display:flex><span> Serial.println(WiFi.SSID());
205</span></span><span style=display:flex><span>
206</span></span><span style=display:flex><span> IPAddress ip = WiFi.localIP();
207</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;IP Address: &#34;</span>);
208</span></span><span style=display:flex><span> Serial.println(ip);
209</span></span><span style=display:flex><span>
210</span></span><span style=display:flex><span> <span style=color:#2b91af>long</span> rssi = WiFi.RSSI();
211</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;signal strength (RSSI):&#34;</span>);
212</span></span><span style=display:flex><span> Serial.print(rssi);
213</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34; dBm&#34;</span>);
214</span></span><span style=display:flex><span>}
215</span></span><span style=display:flex><span>
216</span></span><span style=display:flex><span><span style=color:#2b91af>void</span> loop() {
217</span></span><span style=display:flex><span> WiFiClient client;
218</span></span><span style=display:flex><span>
219</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (client.connect(server, port)) {
220</span></span><span style=display:flex><span>
221</span></span><span style=display:flex><span> <span style=color:green>// I use random number generator for this example
222</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:green>// but you can use analog or digital inputs from arduino
223</span></span></span><span style=display:flex><span><span style=color:green></span> String content = String(random(1000));
224</span></span><span style=display:flex><span>
225</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;POST /api HTTP/1.1&#34;</span>);
226</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Connection: close&#34;</span>);
227</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Api-Key: &#34;</span> + api_key);
228</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Content-Length: &#34;</span> + String(content.length()));
229</span></span><span style=display:flex><span> client.println();
230</span></span><span style=display:flex><span> client.println(content);
231</span></span><span style=display:flex><span>
232</span></span><span style=display:flex><span> delay(100);
233</span></span><span style=display:flex><span> client.stop();
234</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;Data sent successfully ...&#34;</span>);
235</span></span><span style=display:flex><span>
236</span></span><span style=display:flex><span> } <span style=color:#00f>else</span> {
237</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;Problem sending data ...&#34;</span>);
238</span></span><span style=display:flex><span> }
239</span></span><span style=display:flex><span>
240</span></span><span style=display:flex><span> <span style=color:green>// waits for x seconds and continue looping
241</span></span></span><span style=display:flex><span><span style=color:green></span> delay(timeout);
242</span></span><span style=display:flex><span>}
243</span></span></code></pre><p>As seen from example you can notice that Arduino is generating random integer
244between [ 0 .. 1000 ]. You can easily replace this with a temperature sensor or
245any other kind of sensor.<p>Now that we have API under the hood and Arduino is sending demo data we can now
246focus on data visualization.<h2 id=data-visualization>Data visualization</h2><p>Before we continue we should examine our project folder structure. Currently we
247only have two files in our project:<p><em>simple-iot-app/</em><ul><li><em>webapp.py</em><li><em>data.db</em></ul><p>We will now add HTML template that will contain CSS and JavaScript code inline
248for the simplicity reason. And for the bottle framework to be able to scan root
249application folder for templates we will add <code>bottle.TEMPLATE_PATH.insert(0, "./")</code> in <code>webapp.py</code>. By default bottle framework uses <code>views/</code>
250subfolder to store templates. This is not the ideal situation and if you will
251use bottle to develop web applications you should use native behavior and store
252templates in it's predefined folder. But for the sake of example we will
253over-ride this. Be careful to fully replace your code with new code that is
254provided below. Avoid partially replacing code in file :) Also new code for
255reading data-points is provided in Python example below.<p>First we add new route to our web application. It should be trigger when browser
256hits root of application <code>http://0.0.0.0:5000/</code>. This route will do nothing
257more than render <code>frontend.html</code> template. This is done by <code>return bottle.template("frontend.html")</code>. Check code below to further examine how
258exactly this is done.<p>Now we will expand <code>/api</code> route and use different methods to write or read
259data-points. For writing data-point we will use POST method and for reading
260points we will use GET method. GET method will return JSON object with latest
261readings and historical data.<p>There is a fantastic JavaScript library for plotting time-series charts called
262<a href=https://www.metricsgraphicsjs.org>MetricsGraphics.js</a> that is based on
263<a href=https://d3js.org/>D3.js</a> library for visualizing data.<p>Data schema required by MetricsGraphics.js → to achieve this we need to
264transform data from database into this format:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>[
265</span></span><span style=display:flex><span> {
266</span></span><span style=display:flex><span> &#34;date&#34;: <span style=color:#a31515>&#34;2017-08-11 01:07:20&#34;</span>,
267</span></span><span style=display:flex><span> &#34;value&#34;: 933
268</span></span><span style=display:flex><span> },
269</span></span><span style=display:flex><span> {
270</span></span><span style=display:flex><span> &#34;date&#34;: <span style=color:#a31515>&#34;2017-08-11 01:07:30&#34;</span>,
271</span></span><span style=display:flex><span> &#34;value&#34;: 743
272</span></span><span style=display:flex><span> }
273</span></span><span style=display:flex><span>]
274</span></span></code></pre><p>Web application is now complete and we only need <code>frontend.html</code> that we
275will develop now. If you would try to start web app now and go to root app this
276will return error because we don't have frontend.html yet.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
277</span></span><span style=display:flex><span>
278</span></span><span style=display:flex><span><span style=color:#00f>import</span> time
279</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
280</span></span><span style=display:flex><span><span style=color:#00f>import</span> json
281</span></span><span style=display:flex><span><span style=color:#00f>import</span> datetime
282</span></span><span style=display:flex><span><span style=color:#00f>import</span> random
283</span></span><span style=display:flex><span><span style=color:#00f>import</span> dataset
284</span></span><span style=display:flex><span>
285</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
286</span></span><span style=display:flex><span>app = bottle.Bottle()
287</span></span><span style=display:flex><span>
288</span></span><span style=display:flex><span><span style=color:green># adds root directory as template folder</span>
289</span></span><span style=display:flex><span>bottle.TEMPLATE_PATH.insert(0, <span style=color:#a31515>&#34;./&#34;</span>)
290</span></span><span style=display:flex><span>
291</span></span><span style=display:flex><span><span style=color:green># connects to sqlite database</span>
292</span></span><span style=display:flex><span><span style=color:green># check_same_thread=False allows using it in multi-threaded mode</span>
293</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;db&#34;</span>] = dataset.connect(<span style=color:#a31515>&#34;sqlite:///data.db?check_same_thread=False&#34;</span>)
294</span></span><span style=display:flex><span>
295</span></span><span style=display:flex><span><span style=color:green># api key that will be used in Arduino code</span>
296</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>
297</span></span><span style=display:flex><span>
298</span></span><span style=display:flex><span><span style=color:green># triggered when / is accessed from browser</span>
299</span></span><span style=display:flex><span><span style=color:green># only accepts GET → no POST allowed</span>
300</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>])
301</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
302</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.template(<span style=color:#a31515>&#34;frontend.html&#34;</span>)
303</span></span><span style=display:flex><span>
304</span></span><span style=display:flex><span><span style=color:green># triggered when /api is accessed from browser</span>
305</span></span><span style=display:flex><span><span style=color:green># accepts POST and GET</span>
306</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/api&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>, <span style=color:#a31515>&#34;POST&#34;</span>])
307</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
308</span></span><span style=display:flex><span>
309</span></span><span style=display:flex><span> <span style=color:green># if method is POST then we write datapoint</span>
310</span></span><span style=display:flex><span> <span style=color:#00f>if</span> bottle.request.method == <span style=color:#a31515>&#34;POST&#34;</span>:
311</span></span><span style=display:flex><span> status = 400
312</span></span><span style=display:flex><span> ts = int(time.time()) <span style=color:green># current timestamp</span>
313</span></span><span style=display:flex><span> value = bottle.request.body.read() <span style=color:green># data from device</span>
314</span></span><span style=display:flex><span> api_key = bottle.request.get_header(<span style=color:#a31515>&#34;Api-Key&#34;</span>) <span style=color:green># api key from header</span>
315</span></span><span style=display:flex><span>
316</span></span><span style=display:flex><span> <span style=color:green># outputs to console recieved data for debug reason</span>
317</span></span><span style=display:flex><span> print <span style=color:#a31515>&#34;&gt;&gt;&gt; </span><span style=color:#a31515>{}</span><span style=color:#a31515> :: </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(value, api_key)
318</span></span><span style=display:flex><span>
319</span></span><span style=display:flex><span> <span style=color:green># if api_key is correct and value is present</span>
320</span></span><span style=display:flex><span> <span style=color:green># then writes attribute to point table</span>
321</span></span><span style=display:flex><span> <span style=color:#00f>if</span> api_key == app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] <span style=color:#00f>and</span> value:
322</span></span><span style=display:flex><span> app.config[<span style=color:#a31515>&#34;db&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].insert(dict(ts=ts, value=value))
323</span></span><span style=display:flex><span> status = 200
324</span></span><span style=display:flex><span>
325</span></span><span style=display:flex><span> <span style=color:green># we only need to return status</span>
326</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.HTTPResponse(status=status, body=<span style=color:#a31515>&#34;&#34;</span>)
327</span></span><span style=display:flex><span>
328</span></span><span style=display:flex><span> <span style=color:green># if method is GET then we read datapoint</span>
329</span></span><span style=display:flex><span> <span style=color:#00f>else</span>:
330</span></span><span style=display:flex><span> response = []
331</span></span><span style=display:flex><span> datapoints = app.config[<span style=color:#a31515>&#34;db&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].all()
332</span></span><span style=display:flex><span>
333</span></span><span style=display:flex><span> <span style=color:#00f>for</span> point <span style=color:#00f>in</span> datapoints:
334</span></span><span style=display:flex><span> response.append({
335</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;date&#34;</span>: datetime.datetime.fromtimestamp(int(point[<span style=color:#a31515>&#34;ts&#34;</span>])).strftime(<span style=color:#a31515>&#34;%Y-%m-</span><span style=color:#a31515>%d</span><span style=color:#a31515> %H:%M:%S&#34;</span>),
336</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;value&#34;</span>: point[<span style=color:#a31515>&#34;value&#34;</span>]
337</span></span><span style=display:flex><span> })
338</span></span><span style=display:flex><span>
339</span></span><span style=display:flex><span> bottle.response.content_type = <span style=color:#a31515>&#34;application/json&#34;</span>
340</span></span><span style=display:flex><span> <span style=color:#00f>return</span> json.dumps(response)
341</span></span><span style=display:flex><span>
342</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
343</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
344</span></span><span style=display:flex><span> bottle.run(
345</span></span><span style=display:flex><span> app = app,
346</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
347</span></span><span style=display:flex><span> port = 5000,
348</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
349</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
350</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
351</span></span><span style=display:flex><span> )
352</span></span></code></pre><p>And now finally we can implement <code>frontend.html</code>. Create file with this name
353and copy code below. When you are done you can start web application. Steps for
354this part are listed below the code.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE html&gt;</span>
355</span></span><span style=display:flex><span>&lt;html&gt;
356</span></span><span style=display:flex><span>
357</span></span><span style=display:flex><span> &lt;head&gt;
358</span></span><span style=display:flex><span> &lt;meta charset=<span style=color:#a31515>&#34;utf-8&#34;</span>&gt;
359</span></span><span style=display:flex><span> &lt;title&gt;Simple IOT application&lt;/title&gt;
360</span></span><span style=display:flex><span> &lt;/head&gt;
361</span></span><span style=display:flex><span>
362</span></span><span style=display:flex><span> &lt;body&gt;
363</span></span><span style=display:flex><span>
364</span></span><span style=display:flex><span> &lt;h1&gt;Simple IOT application&lt;/h1&gt;
365</span></span><span style=display:flex><span>
366</span></span><span style=display:flex><span> &lt;div class=<span style=color:#a31515>&#34;chart-placeholder&#34;</span>&gt;
367</span></span><span style=display:flex><span> &lt;div id=<span style=color:#a31515>&#34;chart&#34;</span>&gt;&lt;/div&gt;
368</span></span><span style=display:flex><span> &lt;/div&gt;
369</span></span><span style=display:flex><span>
370</span></span><span style=display:flex><span> <span style=color:green>&lt;!-- application main script --&gt;</span>
371</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js&#34;</span>&gt;&lt;/script&gt;
372</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.0/d3.min.js&#34;</span>&gt;&lt;/script&gt;
373</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.11.0/metricsgraphics.min.js&#34;</span>&gt;&lt;/script&gt;
374</span></span><span style=display:flex><span> &lt;script&gt;
375</span></span><span style=display:flex><span> <span style=color:#00f>function</span> fetch_and_render() {
376</span></span><span style=display:flex><span> d3.json(<span style=color:#a31515>&#34;/api&#34;</span>, <span style=color:#00f>function</span>(data) {
377</span></span><span style=display:flex><span> data = MG.convert.date(data, <span style=color:#a31515>&#34;date&#34;</span>, <span style=color:#a31515>&#34;%Y-%m-%d %H:%M:%S&#34;</span>);
378</span></span><span style=display:flex><span> MG.data_graphic({
379</span></span><span style=display:flex><span> data: data,
380</span></span><span style=display:flex><span> chart_type: <span style=color:#a31515>&#34;line&#34;</span>,
381</span></span><span style=display:flex><span> full_width: <span style=color:#00f>true</span>,
382</span></span><span style=display:flex><span> height: 270,
383</span></span><span style=display:flex><span> target: document.getElementById(<span style=color:#a31515>&#34;chart&#34;</span>),
384</span></span><span style=display:flex><span> x_accessor: <span style=color:#a31515>&#34;date&#34;</span>,
385</span></span><span style=display:flex><span> y_accessor: <span style=color:#a31515>&#34;value&#34;</span>
386</span></span><span style=display:flex><span> });
387</span></span><span style=display:flex><span> });
388</span></span><span style=display:flex><span> }
389</span></span><span style=display:flex><span> window.onload = <span style=color:#00f>function</span>() {
390</span></span><span style=display:flex><span> <span style=color:green>// initial call for rendering
391</span></span></span><span style=display:flex><span><span style=color:green></span> fetch_and_render();
392</span></span><span style=display:flex><span>
393</span></span><span style=display:flex><span> <span style=color:green>// updates chart every 5 seconds
394</span></span></span><span style=display:flex><span><span style=color:green></span> setInterval(<span style=color:#00f>function</span>() {
395</span></span><span style=display:flex><span> fetch_and_render();
396</span></span><span style=display:flex><span> }, 5000);
397</span></span><span style=display:flex><span> }
398</span></span><span style=display:flex><span> &lt;/script&gt;
399</span></span><span style=display:flex><span>
400</span></span><span style=display:flex><span> <span style=color:green>&lt;!-- application styles --&gt;</span>
401</span></span><span style=display:flex><span> &lt;style&gt;
402</span></span><span style=display:flex><span> body {
403</span></span><span style=display:flex><span> <span style=color:#00f>font</span>: 13<span style=color:#2b91af>px</span> <span style=color:#00f>sans-serif</span>;
404</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 20<span style=color:#2b91af>px</span> 50<span style=color:#2b91af>px</span>;
405</span></span><span style=display:flex><span> }
406</span></span><span style=display:flex><span> .<span style=color:#2b91af>chart-placeholder</span> {
407</span></span><span style=display:flex><span> <span style=color:#00f>border</span>: 2<span style=color:#2b91af>px</span> <span style=color:#00f>solid</span> #ccc;
408</span></span><span style=display:flex><span> <span style=color:#00f>width</span>: 100<span style=color:#2b91af>%</span>;
409</span></span><span style=display:flex><span> <span style=color:#00f>user-select</span>: <span style=color:#00f>none</span>;
410</span></span><span style=display:flex><span> }
411</span></span><span style=display:flex><span> <span style=color:green>/* chart styles */</span>
412</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-line1-color</span> {
413</span></span><span style=display:flex><span> stroke: <span style=color:#00f>red</span>;
414</span></span><span style=display:flex><span> stroke-width: 2;
415</span></span><span style=display:flex><span> }
416</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-main-area</span>, .<span style=color:#2b91af>mg-main-line</span> {
417</span></span><span style=display:flex><span> fill: #fff;
418</span></span><span style=display:flex><span> }
419</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-x-axis</span> line, .<span style=color:#2b91af>mg-y-axis</span> line {
420</span></span><span style=display:flex><span> stroke: #b3b2b2;
421</span></span><span style=display:flex><span> stroke-width: 1<span style=color:#2b91af>px</span>;
422</span></span><span style=display:flex><span> }
423</span></span><span style=display:flex><span> &lt;/style&gt;
424</span></span><span style=display:flex><span>
425</span></span><span style=display:flex><span> &lt;/body&gt;
426</span></span><span style=display:flex><span>
427</span></span><span style=display:flex><span>&lt;/html&gt;
428</span></span></code></pre><p>Now the folder structure should look like:<p><em>simple-iot-app/</em><ul><li><em>webapp.py</em><li><em>data.db</em><li><em>frontend.html</em></ul><p>Ok, lets now start application and start feeding it data.<ol><li><code>python webapp.py</code><li>connect Arduino MKR1000 to power source<li>open browser and go to <code>http://0.0.0.0:5000</code></ol><p>If everything goes well you should be seeing new data-points rendered on chart
429every 5 seconds.<p>If you navigate to <code>http://0.0.0.0:5000</code> you should see rendered chart as
430shown on picture below.<p><img src=/assets/iot-application/iot-app-output.png alt="Application output"><p>Complete application with all the code is available for
431<a href=/assets/iot-application/simple-iot-application.zip>download</a>.<h2 id=conclusion>Conclusion</h2><p>I hope this clarifies some aspects of IOT application development. Of course
432this is a minimal example and is far from what can be done in real life with
433some further dive into other technologies.<p>If you would like to continue exploring IOT world here are some interesting
434resources for you to examine:<ul><li><a href=https://www.allaboutcircuits.com/projects/reading-sensors-with-an-arduino/>Reading Sensors with an Arduino</a><li><a href=http://www.hivemq.com/blog/how-to-get-started-with-mqtt>MQTT 101 – How to Get Started with the lightweight IoT Protocol</a><li><a href=https://www.html5rocks.com/en/tutorials/eventsource/basics/>Stream Updates with Server-Sent Events</a><li><a href=http://www.tutorialspoint.com/internet_of_things/>Internet of Things (IoT) Tutorials</a></ul><p>Any comment or additional ideas are welcomed in comments below.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
435<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
436with me
437<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
438the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
439otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/simple-server-sent-events-based-pubsub-server.html b/public/simple-server-sent-events-based-pubsub-server.html
deleted file mode 100755
index 5fb9455..0000000
--- a/public/simple-server-sent-events-based-pubsub-server.html
+++ /dev/null
@@ -1,310 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simple Server-Sent Events based PubSub Server</title><meta name=description content="Before we continue ."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Simple Server-Sent Events based PubSub Server</h1><p>Mar 22, 2020<div><h2 id=before-we-continue->Before we continue ...</h2><p>Publisher Subscriber model is nothing new and there are many amazing solutions
7out there, so writing a new one would be a waste of time if other solutions
8wouldn't have quite complex install procedures and weren't so hard to maintain.
9But to be fair, comparing this simple server with something like
10<a href=https://kafka.apache.org/>Kafka</a> or <a href=https://www.rabbitmq.com/>RabbitMQ</a> is
11laughable at the least. Those solutions are enterprise grade and have many
12mechanisms there to ensure messages aren't lost and much more. Regardless of
13these drawbacks, this method has been tested on a large website and worked until
14now without any problems. So now, that we got that cleared up, let's continue.<p><em><strong>Wiki definition:</strong> Publish/subscribe messaging, or pub/sub messaging, is a
15form of asynchronous service-to-service communication used in serverless and
16microservices architectures. In a pub/sub model, any message published to a
17topic is immediately received by all the subscribers to the topic.</em><h2 id=general-goals>General goals</h2><ul><li>provide a simple server that relays messages to all the connected clients,<li>messages can be posted on specific topics,<li>messages get sent via <a href=https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>Server-Sent
18Events</a>
19to all the subscribers.</ul><h2 id=how-exactly-does-the-pubsub-model-work>How exactly does the pub/sub model work?</h2><p>The easiest way to explain this is with diagram bellow. Basic function is
20simple. We have subscribers that receive messages, and we have publishers that
21create and post messages. Similar model is also well know pattern that works on
22a premise of consumers and producers, and they take similar roles.<p><img src=/assets/simple-pubsub-server/pubsub-overview.png alt="How PubSub works"><p><strong>These are some naive characteristics we want to achieve:</strong><ul><li>producer is publishing messages to subscribe topic,<li>consumer is receiving messages from subscribed topic,<li>servers is also known as Broker,<li>broker does not store messages or tracks success,<li>broker uses
23<a href=https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)>FIFO</a> method
24for delivering messages,<li>if consumer wants to receive messages from a topic, producer and consumer
25topics must match,<li>consumer can subscribe to multiple topics,<li>producer can publish to multiple topics,<li>each message has a messageId.</ul><p><strong>Known drawbacks:</strong><ul><li>messages will not be stored in a persistent queue or unreceived messages like
26<a href=https://en.wikipedia.org/wiki/Dead_letter_queue>DeadLetterQueue</a> so old
27messages could be lost on server restart,<li><a href=https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>Server-Sent
28Events</a>
29opens a long-running connection between the client and the server so make sure
30if your setup is load balanced that the load balancer in this case can have
31long opened connection,<li>no system moderation due to the dynamic nature of creating queues.</ul><h2 id=server-sent-events>Server-Sent Events</h2><p>Read more about it on <a href=https://html.spec.whatwg.org/multipage/server-sent-events.html>official specification
32page</a>.<h3 id=current-browser-support>Current browser support</h3><p><img src=/assets/simple-pubsub-server/caniuse.png alt="Browser support"><p>Check
33<a href="https://caniuse.com/#feat=eventsource">https://caniuse.com/#feat=eventsource</a>
34for latest information about browser support.<h3 id=known-issues>Known issues</h3><ul><li>Firefox 52 and below do not support EventSource in web/shared workers<li>In Firefox prior to version 36 server-sent events do not reconnect
35automatically in case of a connection interrupt (bug)<li>Reportedly, CORS in EventSource is currently supported in Firefox 10+, Opera
3612+, Chrome 26+, Safari 7.0+.<li>Antivirus software may block the event streaming data chunks.</ul><p>Source: <a href="https://caniuse.com/#feat=eventsource">https://caniuse.com/#feat=eventsource</a><h3 id=message-format>Message format</h3><p>The simplest message that can be sent is only with data attribute:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>data: this is a simple message
37</span></span><span style=display:flex><span>&lt;blank line&gt;
38</span></span></code></pre><p>You can send message IDs to be used if the connection is dropped:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>id: 33
39</span></span><span style=display:flex><span>data: this is line one
40</span></span><span style=display:flex><span>data: this is line two
41</span></span><span style=display:flex><span>&lt;blank line&gt;
42</span></span></code></pre><p>And you can specify your own event types (the above messages will all trigger
43the message event):<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>id: 36
44</span></span><span style=display:flex><span>event: price
45</span></span><span style=display:flex><span>data: 103.34
46</span></span><span style=display:flex><span>&lt;blank line&gt;
47</span></span></code></pre><h3 id=server-requirements>Server requirements</h3><p>The important thing is how you send headers and which headers are sent by the
48server that triggers browser to threat response as a EventStream.<p>Headers responsible for this are:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>Content-Type: text/event-stream
49</span></span><span style=display:flex><span>Cache-Control: no-cache
50</span></span><span style=display:flex><span>Connection: keep-alive
51</span></span></code></pre><h3 id=debugging-with-google-chrome>Debugging with Google Chrome</h3><p>Google Chrome provides build-in debugging and exploration tool for <a href=https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>Server-Sent
52Events</a>
53which is quite nice and available from Developer Tools under Network tab.<blockquote><p>You can debug only client side events that get received and not the server
54ones. For debugging server events add <code>console.log</code> to <code>server.js</code> code and
55print out events.</blockquote><p><img src=/assets/simple-pubsub-server/chrome-debugging.png alt="Google Chrome Developer Tools EventStream"><h2 id=server-implementation>Server implementation</h2><p>For the sake of this example we will use <a href=https://nodejs.org/en/>Node.js</a> with
56<a href=https://expressjs.com>Express</a> as our router since this is the easiest way to
57get started and we will use already written SSE library for node
58<a href=https://www.npmjs.com/package/sse-pubsub>sse-pubsub</a> so we don't reinvent the
59wheel.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>npm init --yes
60</span></span><span style=display:flex><span>
61</span></span><span style=display:flex><span>npm install express
62</span></span><span style=display:flex><span>npm install body-parser
63</span></span><span style=display:flex><span>npm install sse-pubsub
64</span></span></code></pre><p>Basic implementation of a server (<code>server.js</code>):<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>const</span> express = require(<span style=color:#a31515>&#39;express&#39;</span>);
65</span></span><span style=display:flex><span><span style=color:#00f>const</span> bodyParser = require(<span style=color:#a31515>&#39;body-parser&#39;</span>);
66</span></span><span style=display:flex><span><span style=color:#00f>const</span> SSETopic = require(<span style=color:#a31515>&#39;sse-pubsub&#39;</span>);
67</span></span><span style=display:flex><span>
68</span></span><span style=display:flex><span><span style=color:#00f>const</span> app = express();
69</span></span><span style=display:flex><span><span style=color:#00f>const</span> port = process.env.PORT || 4000;
70</span></span><span style=display:flex><span>
71</span></span><span style=display:flex><span><span style=color:green>// topics container
72</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>const</span> sseTopics = {};
73</span></span><span style=display:flex><span>
74</span></span><span style=display:flex><span>app.use(bodyParser.json());
75</span></span><span style=display:flex><span>
76</span></span><span style=display:flex><span><span style=color:green>// open for all cors
77</span></span></span><span style=display:flex><span><span style=color:green></span>app.all(<span style=color:#a31515>&#39;*&#39;</span>, (req, res, next) =&gt; {
78</span></span><span style=display:flex><span> res.header(<span style=color:#a31515>&#39;Access-Control-Allow-Origin&#39;</span>, <span style=color:#a31515>&#39;*&#39;</span>);
79</span></span><span style=display:flex><span> res.header(<span style=color:#a31515>&#39;Access-Control-Allow-Headers&#39;</span>, <span style=color:#a31515>&#39;X-Requested-With, Content-Type&#39;</span>);
80</span></span><span style=display:flex><span> next();
81</span></span><span style=display:flex><span>});
82</span></span><span style=display:flex><span>
83</span></span><span style=display:flex><span><span style=color:green>// preflight request error fix
84</span></span></span><span style=display:flex><span><span style=color:green></span>app.options(<span style=color:#a31515>&#39;*&#39;</span>, <span style=color:#00f>async</span> (req, res) =&gt; {
85</span></span><span style=display:flex><span> res.header(<span style=color:#a31515>&#39;Access-Control-Allow-Origin&#39;</span>, <span style=color:#a31515>&#39;*&#39;</span>);
86</span></span><span style=display:flex><span> res.header(<span style=color:#a31515>&#39;Access-Control-Allow-Headers&#39;</span>, <span style=color:#a31515>&#39;X-Requested-With, Content-Type&#39;</span>);
87</span></span><span style=display:flex><span> res.send(<span style=color:#a31515>&#39;OK&#39;</span>);
88</span></span><span style=display:flex><span>});
89</span></span><span style=display:flex><span>
90</span></span><span style=display:flex><span><span style=color:green>// serve the event streams
91</span></span></span><span style=display:flex><span><span style=color:green></span>app.get(<span style=color:#a31515>&#39;/stream/:topic&#39;</span>, <span style=color:#00f>async</span> (req, res, next) =&gt; {
92</span></span><span style=display:flex><span> <span style=color:#00f>const</span> topic = req.params.topic;
93</span></span><span style=display:flex><span>
94</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (!(topic <span style=color:#00f>in</span> sseTopics)) {
95</span></span><span style=display:flex><span> sseTopics[topic] = <span style=color:#00f>new</span> SSETopic({
96</span></span><span style=display:flex><span> pingInterval: 0,
97</span></span><span style=display:flex><span> maxStreamDuration: 15000,
98</span></span><span style=display:flex><span> });
99</span></span><span style=display:flex><span> }
100</span></span><span style=display:flex><span>
101</span></span><span style=display:flex><span> <span style=color:green>// subscribing client to topic
102</span></span></span><span style=display:flex><span><span style=color:green></span> sseTopics[topic].subscribe(req, res);
103</span></span><span style=display:flex><span>});
104</span></span><span style=display:flex><span>
105</span></span><span style=display:flex><span><span style=color:green>// accepts new messages into topic
106</span></span></span><span style=display:flex><span><span style=color:green></span>app.post(<span style=color:#a31515>&#39;/publish&#39;</span>, <span style=color:#00f>async</span> (req, res) =&gt; {
107</span></span><span style=display:flex><span> <span style=color:#00f>let</span> body = req.body;
108</span></span><span style=display:flex><span> <span style=color:#00f>let</span> status = 200;
109</span></span><span style=display:flex><span>
110</span></span><span style=display:flex><span> console.log(<span style=color:#a31515>&#39;Incoming message:&#39;</span>, req.body);
111</span></span><span style=display:flex><span>
112</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (
113</span></span><span style=display:flex><span> body.hasOwnProperty(<span style=color:#a31515>&#39;topic&#39;</span>) &amp;&amp;
114</span></span><span style=display:flex><span> body.hasOwnProperty(<span style=color:#a31515>&#39;event&#39;</span>) &amp;&amp;
115</span></span><span style=display:flex><span> body.hasOwnProperty(<span style=color:#a31515>&#39;message&#39;</span>)
116</span></span><span style=display:flex><span> ) {
117</span></span><span style=display:flex><span> <span style=color:#00f>const</span> topic = req.body.topic;
118</span></span><span style=display:flex><span> <span style=color:#00f>const</span> event = req.body.event;
119</span></span><span style=display:flex><span> <span style=color:#00f>const</span> message = req.body.message;
120</span></span><span style=display:flex><span>
121</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (topic <span style=color:#00f>in</span> sseTopics) {
122</span></span><span style=display:flex><span> <span style=color:green>// sends message to all the subscribers
123</span></span></span><span style=display:flex><span><span style=color:green></span> sseTopics[topic].publish(message, event);
124</span></span><span style=display:flex><span> }
125</span></span><span style=display:flex><span> } <span style=color:#00f>else</span> {
126</span></span><span style=display:flex><span> status = 400;
127</span></span><span style=display:flex><span> }
128</span></span><span style=display:flex><span>
129</span></span><span style=display:flex><span> res.status(status).send({
130</span></span><span style=display:flex><span> status,
131</span></span><span style=display:flex><span> });
132</span></span><span style=display:flex><span>});
133</span></span><span style=display:flex><span>
134</span></span><span style=display:flex><span><span style=color:green>// returns JSON object of all opened topics
135</span></span></span><span style=display:flex><span><span style=color:green></span>app.get(<span style=color:#a31515>&#39;/status&#39;</span>, <span style=color:#00f>async</span> (req, res) =&gt; {
136</span></span><span style=display:flex><span> res.send(sseTopics);
137</span></span><span style=display:flex><span>});
138</span></span><span style=display:flex><span>
139</span></span><span style=display:flex><span><span style=color:green>// health-check endpoint
140</span></span></span><span style=display:flex><span><span style=color:green></span>app.get(<span style=color:#a31515>&#39;/&#39;</span>, <span style=color:#00f>async</span> (req, res) =&gt; {
141</span></span><span style=display:flex><span> res.send(<span style=color:#a31515>&#39;OK&#39;</span>);
142</span></span><span style=display:flex><span>});
143</span></span><span style=display:flex><span>
144</span></span><span style=display:flex><span><span style=color:green>// return a 404 if no routes match
145</span></span></span><span style=display:flex><span><span style=color:green></span>app.use((req, res, next) =&gt; {
146</span></span><span style=display:flex><span> res.set(<span style=color:#a31515>&#39;Cache-Control&#39;</span>, <span style=color:#a31515>&#39;private, no-store&#39;</span>);
147</span></span><span style=display:flex><span> res.status(404).end(<span style=color:#a31515>&#39;Not found&#39;</span>);
148</span></span><span style=display:flex><span>});
149</span></span><span style=display:flex><span>
150</span></span><span style=display:flex><span><span style=color:green>// starts the server
151</span></span></span><span style=display:flex><span><span style=color:green></span>app.listen(port, () =&gt; {
152</span></span><span style=display:flex><span> console.log(<span style=color:#a31515>`PubSub server running on http://localhost:</span><span style=color:#a31515>${</span>port<span style=color:#a31515>}</span><span style=color:#a31515>`</span>);
153</span></span><span style=display:flex><span>});
154</span></span></code></pre><h3 id=our-custom-message-format>Our custom message format</h3><p>Each message posted on a server must be in a specific format that out server
155accepts. Having structure like this allows us to have multiple separated type of
156events on each topic.<p>With this we can separate streams and only receive events that belong to the
157topic.<p>One example would be, that we have index page and we want to receive messages
158about new upvotes or new subscribers but we don't want to follow events for
159other pages. This reduces clutter and overall network. And structure is much
160nicer and maintanable.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{
161</span></span><span style=display:flex><span> &#34;topic&#34;: <span style=color:#a31515>&#34;sample-topic&#34;</span>,
162</span></span><span style=display:flex><span> &#34;event&#34;: <span style=color:#a31515>&#34;sample-event&#34;</span>,
163</span></span><span style=display:flex><span> &#34;message&#34;: { &#34;name&#34;: <span style=color:#a31515>&#34;John&#34;</span> }
164</span></span><span style=display:flex><span>}
165</span></span></code></pre><h2 id=publisher-and-subscriber-clients>Publisher and subscriber clients</h2><h3 id=publisher-and-subscriber-in-action>Publisher and subscriber in action</h3><p><video src=/assets/simple-pubsub-server/clients.m4v controls></video><p>You can download <a href=../simple-pubsub-server/sse-pubsub-server.zip>the code</a> and
166follow along.<h3 id=publisher>Publisher</h3><p>As talked about above publisher is the one that send messages to the
167broker/server. Message inside the payload can be whatever you want (string,
168object, array). I would however personally avoid send large chunks of data like
169blobs and such.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE html&gt;</span>
170</span></span><span style=display:flex><span>&lt;html lang=<span style=color:#a31515>&#34;en&#34;</span>&gt;
171</span></span><span style=display:flex><span>
172</span></span><span style=display:flex><span> &lt;head&gt;
173</span></span><span style=display:flex><span> &lt;meta charset=<span style=color:#a31515>&#34;UTF-8&#34;</span>&gt;
174</span></span><span style=display:flex><span> &lt;meta name=<span style=color:#a31515>&#34;viewport&#34;</span> content=<span style=color:#a31515>&#34;width=device-width, initial-scale=1.0&#34;</span>&gt;
175</span></span><span style=display:flex><span> &lt;title&gt;Publisher&lt;/title&gt;
176</span></span><span style=display:flex><span> &lt;/head&gt;
177</span></span><span style=display:flex><span>
178</span></span><span style=display:flex><span> &lt;body&gt;
179</span></span><span style=display:flex><span>
180</span></span><span style=display:flex><span> &lt;h1&gt;Publisher&lt;/h1&gt;
181</span></span><span style=display:flex><span>
182</span></span><span style=display:flex><span> &lt;fieldset&gt;
183</span></span><span style=display:flex><span> &lt;p&gt;
184</span></span><span style=display:flex><span> &lt;label&gt;Server:&lt;/label&gt;
185</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;server&#34;</span> value=<span style=color:#a31515>&#34;http://localhost:4000&#34;</span>&gt;
186</span></span><span style=display:flex><span> &lt;/p&gt;
187</span></span><span style=display:flex><span> &lt;p&gt;
188</span></span><span style=display:flex><span> &lt;label&gt;Topic:&lt;/label&gt;
189</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;topic&#34;</span> value=<span style=color:#a31515>&#34;sample-topic&#34;</span>&gt;
190</span></span><span style=display:flex><span> &lt;/p&gt;
191</span></span><span style=display:flex><span> &lt;p&gt;
192</span></span><span style=display:flex><span> &lt;label&gt;Event:&lt;/label&gt;
193</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;event&#34;</span> value=<span style=color:#a31515>&#34;sample-event&#34;</span>&gt;
194</span></span><span style=display:flex><span> &lt;/p&gt;
195</span></span><span style=display:flex><span> &lt;p&gt;
196</span></span><span style=display:flex><span> &lt;label&gt;Message:&lt;/label&gt;
197</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;message&#34;</span> value=<span style=color:#a31515>&#39;{&#34;name&#34;: &#34;John&#34;}&#39;</span>&gt;
198</span></span><span style=display:flex><span> &lt;/p&gt;
199</span></span><span style=display:flex><span> &lt;p&gt;
200</span></span><span style=display:flex><span> &lt;button type=<span style=color:#a31515>&#34;button&#34;</span> id=<span style=color:#a31515>&#34;button&#34;</span>&gt;Publish message to topic&lt;/button&gt;
201</span></span><span style=display:flex><span> &lt;/p&gt;
202</span></span><span style=display:flex><span> &lt;/fieldset&gt;
203</span></span><span style=display:flex><span>
204</span></span><span style=display:flex><span> &lt;script&gt;
205</span></span><span style=display:flex><span>
206</span></span><span style=display:flex><span> <span style=color:#00f>const</span> button = document.querySelector(<span style=color:#a31515>&#39;#button&#39;</span>);
207</span></span><span style=display:flex><span> <span style=color:#00f>const</span> server = document.querySelector(<span style=color:#a31515>&#39;#server&#39;</span>);
208</span></span><span style=display:flex><span> <span style=color:#00f>const</span> topic = document.querySelector(<span style=color:#a31515>&#39;#topic&#39;</span>);
209</span></span><span style=display:flex><span> <span style=color:#00f>const</span> event = document.querySelector(<span style=color:#a31515>&#39;#event&#39;</span>);
210</span></span><span style=display:flex><span> <span style=color:#00f>const</span> message = document.querySelector(<span style=color:#a31515>&#39;#message&#39;</span>);
211</span></span><span style=display:flex><span>
212</span></span><span style=display:flex><span> button.addEventListener(<span style=color:#a31515>&#39;click&#39;</span>, <span style=color:#00f>async</span> (evt) =&gt; {
213</span></span><span style=display:flex><span> <span style=color:#00f>const</span> req = <span style=color:#00f>await</span> fetch(<span style=color:#a31515>`</span><span style=color:#a31515>${</span>server.value<span style=color:#a31515>}</span><span style=color:#a31515>/publish`</span>, {
214</span></span><span style=display:flex><span> method: <span style=color:#a31515>&#39;post&#39;</span>,
215</span></span><span style=display:flex><span> headers: {
216</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;Accept&#39;</span>: <span style=color:#a31515>&#39;application/json&#39;</span>,
217</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;Content-Type&#39;</span>: <span style=color:#a31515>&#39;application/json&#39;</span>,
218</span></span><span style=display:flex><span> },
219</span></span><span style=display:flex><span> body: JSON.stringify({
220</span></span><span style=display:flex><span> topic: topic.value,
221</span></span><span style=display:flex><span> event: event.value,
222</span></span><span style=display:flex><span> message: JSON.parse(message.value),
223</span></span><span style=display:flex><span> }),
224</span></span><span style=display:flex><span> });
225</span></span><span style=display:flex><span>
226</span></span><span style=display:flex><span> <span style=color:#00f>const</span> res = <span style=color:#00f>await</span> req.json();
227</span></span><span style=display:flex><span> console.log(res);
228</span></span><span style=display:flex><span> });
229</span></span><span style=display:flex><span>
230</span></span><span style=display:flex><span> &lt;/script&gt;
231</span></span><span style=display:flex><span>
232</span></span><span style=display:flex><span> &lt;/body&gt;
233</span></span><span style=display:flex><span>
234</span></span><span style=display:flex><span>&lt;/html&gt;
235</span></span></code></pre><h3 id=subscriber>Subscriber</h3><p>Subscriber is responsible for receiving new messages that come from server via
236publisher. The code bellow is very rudimentary but works and follows the
237implementation guidelines for EventSource.<p>You can use either Developer Tools Console to see incoming messages or you can
238defer to Debugging with Google Chrome section above to see all EventStream
239messages.<blockquote><p>Don't be alarmed if the subscriber gets disconnected from the server every so
240often. The code we have here resets connection every 15s but it automatically
241get reconnected and fetches all messages up to last received message id. This
242setting can be adjusted in <code>server.js</code> file; search for the
243<code>maxStreamDuration</code> variable.</blockquote><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE html&gt;</span>
244</span></span><span style=display:flex><span>&lt;html lang=<span style=color:#a31515>&#34;en&#34;</span>&gt;
245</span></span><span style=display:flex><span>
246</span></span><span style=display:flex><span> &lt;head&gt;
247</span></span><span style=display:flex><span> &lt;meta charset=<span style=color:#a31515>&#34;UTF-8&#34;</span>&gt;
248</span></span><span style=display:flex><span> &lt;meta name=<span style=color:#a31515>&#34;viewport&#34;</span> content=<span style=color:#a31515>&#34;width=device-width, initial-scale=1.0&#34;</span>&gt;
249</span></span><span style=display:flex><span> &lt;title&gt;Subscriber&lt;/title&gt;
250</span></span><span style=display:flex><span> &lt;link rel=<span style=color:#a31515>&#34;stylesheet&#34;</span> href=<span style=color:#a31515>&#34;style.css&#34;</span>&gt;
251</span></span><span style=display:flex><span> &lt;/head&gt;
252</span></span><span style=display:flex><span>
253</span></span><span style=display:flex><span> &lt;body&gt;
254</span></span><span style=display:flex><span>
255</span></span><span style=display:flex><span> &lt;h1&gt;Subscriber&lt;/h1&gt;
256</span></span><span style=display:flex><span>
257</span></span><span style=display:flex><span> &lt;fieldset&gt;
258</span></span><span style=display:flex><span> &lt;p&gt;
259</span></span><span style=display:flex><span> &lt;label&gt;Server:&lt;/label&gt;
260</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;server&#34;</span> value=<span style=color:#a31515>&#34;http://localhost:4000&#34;</span>&gt;
261</span></span><span style=display:flex><span> &lt;/p&gt;
262</span></span><span style=display:flex><span> &lt;p&gt;
263</span></span><span style=display:flex><span> &lt;label&gt;Topic:&lt;/label&gt;
264</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;topic&#34;</span> value=<span style=color:#a31515>&#34;sample-topic&#34;</span>&gt;
265</span></span><span style=display:flex><span> &lt;/p&gt;
266</span></span><span style=display:flex><span> &lt;p&gt;
267</span></span><span style=display:flex><span> &lt;label&gt;Event:&lt;/label&gt;
268</span></span><span style=display:flex><span> &lt;input type=<span style=color:#a31515>&#34;text&#34;</span> id=<span style=color:#a31515>&#34;event&#34;</span> value=<span style=color:#a31515>&#34;sample-event&#34;</span>&gt;
269</span></span><span style=display:flex><span> &lt;/p&gt;
270</span></span><span style=display:flex><span> &lt;p&gt;
271</span></span><span style=display:flex><span> &lt;button type=<span style=color:#a31515>&#34;button&#34;</span> id=<span style=color:#a31515>&#34;button&#34;</span>&gt;Subscribe to topic&lt;/button&gt;
272</span></span><span style=display:flex><span> &lt;/p&gt;
273</span></span><span style=display:flex><span> &lt;/fieldset&gt;
274</span></span><span style=display:flex><span>
275</span></span><span style=display:flex><span> &lt;script&gt;
276</span></span><span style=display:flex><span>
277</span></span><span style=display:flex><span> <span style=color:#00f>const</span> button = document.querySelector(<span style=color:#a31515>&#39;#button&#39;</span>);
278</span></span><span style=display:flex><span> <span style=color:#00f>const</span> server = document.querySelector(<span style=color:#a31515>&#39;#server&#39;</span>);
279</span></span><span style=display:flex><span> <span style=color:#00f>const</span> topic = document.querySelector(<span style=color:#a31515>&#39;#topic&#39;</span>);
280</span></span><span style=display:flex><span> <span style=color:#00f>const</span> event = document.querySelector(<span style=color:#a31515>&#39;#event&#39;</span>);
281</span></span><span style=display:flex><span>
282</span></span><span style=display:flex><span> button.addEventListener(<span style=color:#a31515>&#39;click&#39;</span>, <span style=color:#00f>async</span> (evt) =&gt; {
283</span></span><span style=display:flex><span>
284</span></span><span style=display:flex><span> <span style=color:#00f>let</span> es = <span style=color:#00f>new</span> EventSource(<span style=color:#a31515>`</span><span style=color:#a31515>${</span>server.value<span style=color:#a31515>}</span><span style=color:#a31515>/stream/</span><span style=color:#a31515>${</span>topic.value<span style=color:#a31515>}</span><span style=color:#a31515>`</span>);
285</span></span><span style=display:flex><span>
286</span></span><span style=display:flex><span> es.addEventListener(event.value, <span style=color:#00f>function</span> (evt) {
287</span></span><span style=display:flex><span> console.log(<span style=color:#a31515>`incoming message`</span>, JSON.parse(evt.data));
288</span></span><span style=display:flex><span> });
289</span></span><span style=display:flex><span>
290</span></span><span style=display:flex><span> es.addEventListener(<span style=color:#a31515>&#39;open&#39;</span>, <span style=color:#00f>function</span> (evt) {
291</span></span><span style=display:flex><span> console.log(<span style=color:#a31515>&#39;connected&#39;</span>, evt);
292</span></span><span style=display:flex><span> });
293</span></span><span style=display:flex><span>
294</span></span><span style=display:flex><span> es.addEventListener(<span style=color:#a31515>&#39;error&#39;</span>, <span style=color:#00f>function</span> (evt) {
295</span></span><span style=display:flex><span> console.log(<span style=color:#a31515>&#39;error&#39;</span>, evt);
296</span></span><span style=display:flex><span> });
297</span></span><span style=display:flex><span>
298</span></span><span style=display:flex><span> });
299</span></span><span style=display:flex><span>
300</span></span><span style=display:flex><span> &lt;/script&gt;
301</span></span><span style=display:flex><span>
302</span></span><span style=display:flex><span> &lt;/body&gt;
303</span></span><span style=display:flex><span>
304</span></span><span style=display:flex><span>&lt;/html&gt;
305</span></span></code></pre><h2 id=reading-further>Reading further</h2><ul><li><a href=https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>Using server-sent events</a><li><a href=https://www.smashingmagazine.com/2018/02/sse-websockets-data-flow-http2/>Using SSE Instead Of WebSockets For Unidirectional Data Flow Over HTTP/2</a><li><a href=https://apifriends.com/api-streaming/server-sent-events/>What is Server-Sent Events?</a><li><a href=https://tools.ietf.org/id/draft-xie-bidirectional-messaging-01.html>An HTTP/2 extension for bidirectional messaging communication</a><li><a href=https://developers.google.com/web/fundamentals/performance/http2>Introduction to HTTP/2</a><li><a href=https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API>The WebSocket API (WebSockets)</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
306<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
307with me
308<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
309the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
310otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html b/public/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html
deleted file mode 100755
index 472b67e..0000000
--- a/public/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html
+++ /dev/null
@@ -1,71 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simple world clock with eInk display and Raspberry Pi Zero</title><meta name=description content="Our team is spread across the world, from the USA all the way to Australia, sohaving some sort of world clock makes sense."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Simple world clock with eInk display and Raspberry Pi Zero</h1><p>Jun 26, 2021<div><p>Our team is spread across the world, from the USA all the way to Australia, so
7having some sort of world clock makes sense.<p>Currently, I am using an extension for Gnome called <a href=https://extensions.gnome.org/extension/2657/timezones-extension/>Timezone
8extension</a>,
9and it serves the purpose quite well.<p>But I also have a bunch of electronics that I bought through the time, and I am
10not using any of them, and it's time to stop hording this stuff and use it in a
11project.<p>A while ago I bought a small eInk display <a href="https://shop.pimoroni.com/products/inky-phat?variant=12549254217811">Inky
12pHAT</a> and I
13have a bunch of <a href=https://www.raspberrypi.org/products/raspberry-pi-zero/>Raspberry Pi's
14Zero</a> lying around that
15I really need to use.<p><img src=/assets/world-clock/hardware.jpg alt="Inky pHAT, Raspberry Pi Zero"><p>Since the Inky <a href="https://shop.pimoroni.com/products/inky-phat?variant=12549254217811">Inky
16pHAT</a> is
17essentially a HAT, it can easily be added on top of the <a href=https://www.raspberrypi.org/products/raspberry-pi-zero/>Raspberry Pi
18Zero</a>.<p>First, I installed the necessary software on Raspberry Pi with <code>pip3 install inky</code>.<p>And then I created a file <code>clock.py</code> in home directory <code>/home/pi</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>#!/usr/bin/env python</span>
19</span></span><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
20</span></span><span style=display:flex><span>
21</span></span><span style=display:flex><span><span style=color:#00f>import</span> sys
22</span></span><span style=display:flex><span><span style=color:#00f>import</span> os
23</span></span><span style=display:flex><span><span style=color:#00f>from</span> inky.auto <span style=color:#00f>import</span> auto
24</span></span><span style=display:flex><span><span style=color:#00f>from</span> PIL <span style=color:#00f>import</span> Image, ImageFont, ImageDraw
25</span></span><span style=display:flex><span><span style=color:#00f>from</span> font_fredoka_one <span style=color:#00f>import</span> FredokaOne
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span>clocks = [
28</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;America/New_York&#39;</span>,
29</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;Europe/Ljubljana&#39;</span>,
30</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;Australia/Brisbane&#39;</span>,
31</span></span><span style=display:flex><span>]
32</span></span><span style=display:flex><span>
33</span></span><span style=display:flex><span>board = auto()
34</span></span><span style=display:flex><span>board.set_border(board.WHITE)
35</span></span><span style=display:flex><span>board.rotation = 90
36</span></span><span style=display:flex><span>
37</span></span><span style=display:flex><span>img = Image.new(<span style=color:#a31515>&#39;P&#39;</span>, (board.WIDTH, board.HEIGHT))
38</span></span><span style=display:flex><span>draw = ImageDraw.Draw(img)
39</span></span><span style=display:flex><span>
40</span></span><span style=display:flex><span>big_font = ImageFont.truetype(FredokaOne, 18)
41</span></span><span style=display:flex><span>small_font = ImageFont.truetype(FredokaOne, 13)
42</span></span><span style=display:flex><span>
43</span></span><span style=display:flex><span>x = board.WIDTH / 3
44</span></span><span style=display:flex><span>y = board.HEIGHT / 3
45</span></span><span style=display:flex><span>
46</span></span><span style=display:flex><span>idx = 1
47</span></span><span style=display:flex><span><span style=color:#00f>for</span> clock <span style=color:#00f>in</span> clocks:
48</span></span><span style=display:flex><span> ctime = os.popen(<span style=color:#a31515>&#39;TZ=&#34;</span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34; date +&#34;</span><span style=color:#a31515>%a</span><span style=color:#a31515>,%H:%M&#34;&#39;</span>.format(clock))
49</span></span><span style=display:flex><span> ctime = ctime.read().strip().split(<span style=color:#a31515>&#39;,&#39;</span>)
50</span></span><span style=display:flex><span> city = clock.split(<span style=color:#a31515>&#39;/&#39;</span>)[1].replace(<span style=color:#a31515>&#39;_&#39;</span>, <span style=color:#a31515>&#39; &#39;</span>)
51</span></span><span style=display:flex><span>
52</span></span><span style=display:flex><span> draw.text((15, (idx*y)-y+10), city, fill=board.BLACK, font=small_font)
53</span></span><span style=display:flex><span> draw.text((110, (idx*y)-y+7), str(ctime[0]), fill=board.BLACK, font=big_font)
54</span></span><span style=display:flex><span> draw.text((155, (idx*y)-y+7), str(ctime[1]), fill=board.BLACK, font=big_font)
55</span></span><span style=display:flex><span>
56</span></span><span style=display:flex><span> idx += 1
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span>board.set_image(img)
59</span></span><span style=display:flex><span>board.show()
60</span></span></code></pre><p>And because eInk displays are rather slow to refresh and the clock requires
61refreshing only once a minute, this can be done through cronjob.<p>Before we add this job to cron we need to make <code>clock.py</code> executable with <code>chmod +x clock.py</code>.<p>Then we add a cronjob with <code>crontab -e</code>.<pre><code>* * * * * /home/pi/clock.py
62</code></pre><p>So, we end up with a result like this.<p><img src=/assets/world-clock/world-clock.jpg alt="World Clock"><p>And for the enclosure that can be 3D printed, but I haven't yet something like
63this can be used.</p><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><p>You can download my <a href=/assets/world-clock/enclosure.stl>STL file for the enclosure
64here</a>, but make sure that dimensions make
65sense and also opening for USB port should be added or just use a drill and some
66hot glue to make it stick in the enclosure.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
67<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
68with me
69<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
70the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
71otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/simplifying-and-reducing-clutter.html b/public/simplifying-and-reducing-clutter.html
deleted file mode 100755
index 761309a..0000000
--- a/public/simplifying-and-reducing-clutter.html
+++ /dev/null
@@ -1,47 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simplifying and reducing clutter in my life and work</title><meta name=description content="I recently moved my main working machine back from Hachintosh to Linux."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Simplifying and reducing clutter in my life and work</h1><p>Oct 14, 2019<div><p>I recently moved my main working machine back from Hachintosh to Linux. Well the
7experiment was interesting and I have done some great work on macOS but it was
8time to move back.<p>I actually really missed Linux. The simplicity of <code>apt-get</code> or just the amount
9of software that exists for Linux should be a no-brainer. I spent most of my
10time on macOS finding solutions to make things work. Using
11<a href=https://brew.sh/>Brew</a> was just a horrible experience and far from package
12managers of Linux. At least they managed to get that <code>sudo</code> debacle sorted.<p>Not all was bad. macOS in general was a perfectly good environment. Things like
13Docker and tooling like this worked without any hiccups. My normal tools like
14coding IDE worked flawlessly and the whole look and feel is just superb. I have
15been using MacBook Air for couple of years so I was used to the system but never
16as a daily driver.<p>One of the things I did after I installed Linux back on my machine was cleaning
17up my Dropbox folder. I have everything on Dropbox. Even projects folder. I
18write code for living so my whole life revolves around couple of megs of code
19(with assets). So it's not like I have huge files on my machine. I don't have
20movies or music or pictures on my PC. All of that stuff is in cloud. I use
21Google music and I have Netflix account which is more than enough for me.<p>I also went and deleted some of the repositories on my Github account. I have
22deleted more code than deployed. People find this strange but for me deleting
23something feels so cathartic and also forces me to write better code next time
24around when I am faced with similar problem. That was a huge relief if I am
25being totally honest.<p>Next step was to do something with my webpage. I have been using some scripts I
26wrote a while ago to generate static pages from markdown source posts. I kept on
27adding and adding stuff on top of it and it became a source of a
28frustration. And this is just a simple blog and I was using gulp and npm.
29Anyways after couple of hours of searching and testing static generators I found
30an interesting one
31<a href=https://github.com/piranha/gostatic>https://github.com/piranha/gostatic</a> and I
32just decided to use this one. It was the only one that had a simple templating
33engine, not that I really need one. But others had this convoluted way of trying
34to solve everything and at the end just required quite bigger learning curve I
35was ready to go with. So I deleted couple of old posts, simplified HTML, trashed
36most of the CSS and went with
37<a href=https://motherfuckingwebsite.com/>https://motherfuckingwebsite.com/</a>
38aesthetics. Yeah, the previous site was more visually stimulating but all I
39really care is the content at this point. And Times New Roman font is kind of
40awesome.<p>I stopped working on most of the projects in the past couple of months because
41the overhead was just too insane. There comes a point when you stretch yourself
42too much and then you stop progressing and with that comes dissatisfaction.<p>So that's about it. Moving forward minimal style.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
43<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
44with me
45<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
46the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
47otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/software-development-pitfalls.html b/public/software-development-pitfalls.html
deleted file mode 100755
index 94cc15c..0000000
--- a/public/software-development-pitfalls.html
+++ /dev/null
@@ -1,119 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Software development and my favorite pitfalls</title><meta name=description content="Over the years I had the privilege to work on some very excited projects both insoftware development field and also in electronics field and every experiencetaught me some invaluable lessons about how NOT TO approach development."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Software development and my favorite pitfalls</h1><p>Nov 10, 2015<div><p>Over the years I had the privilege to work on some very excited projects both in
7software development field and also in electronics field and every experience
8taught me some invaluable lessons about how NOT TO approach development. And
9through this post I will try to point out some absurd, outdated techniques I
10find the most annoying and damaging during a development cycle. There will be
11swearing because this topic really gets on my nerves and I never coherently
12tried to explain them in writing. So if I get heated up, please bear with me.<p>As new methods of project management are emerging, underlying processes still
13stay old and outdated. This is mainly because we as people are unable to
14completely shift away from these approaches.<p>I was always struggling with communication, and many times that cost me a
15relationship or two because I was not on the ball all the time. Through every
16experience, I became more convinced that I am the problem and never ever doubted
17that the problem may be that communication never evolved a single step from
18emails. And if you think for a second, not many things have changed around this
19topic. We just have different representations of email (message boards, chats,
20project management tools). And I believe this is the real issue we are facing
21now.<p>There are many articles written about hyper connectivity and the effects that
22are a direct result of it. But mainstream does nothing towards it. We are just
23putting out fires, and we do nothing to prevent it. I am certain this will be a
24major source of grief in coming years. And what we all can do to avoid this is
25to change our mindset and experiment on our communication skills, development
26approaches. We need to maximize possible output that a person can give. And to
27achieve this we need to listen to them, encourage them. I know that not
28everybody is a naturally born leader, but with enough practice and encouragement
29they also can become active participants in leadership.<p>There are many talks now about methodologies such as Scrum, Kanban, Cleanroom
30and they all fucking piss me of :). These are all boxes that imprison people and
31take away their freedom of thought. This is a straightforward mindfuck /
32amputation of creativity.<p>Let me list a couple of things that I find really destructive and bad for a
33project and in a long run company.<h2 id=ping-emails>Ping emails</h2><p>Ping emails are emails you have to write as soon as you receive an email. Its
34sole purpose is to inform the sender that you received their email, and you are
35working on it. Its result is only to calm down the sender that their task is
36being dealt with. It’s intent basically is, I did my job by sending you this
37email, so I am on clear grounds. I categorize this email as fuck you email.
38This is one of the most irritating types of emails I need to write. This is the
39ultimate control freak show you can experience, and it gives the sender a false
40feeling of control. Newsflash: We do not live in 1982 where there was a
41possibility that email never reached the destination. I really hate this from
42the bottom of my heart.<p>They should be like: “Yes, I am fucking alive, and I am at your service my
43leash!”. I guess if I would reply like this, I wouldn’t have to write any more
44of this kind of messages.<h2 id=everybody-is-a-project-manager>Everybody is a project manager</h2><p>Well, this is a tough one. I noticed that as soon as you let people to give
45their suggestions, you are basically screwed. There is a truth in the saying:
46“Give low expectations and deliver little more than you promised.”.<p>People tend to take a role of a manager as soon as they are presented with an
47opportunity. And by getting angry at them, you only provoke yourself. They are
48not at fault. You just need to tell them they are only giving suggestions and
49not tasks at the beginning and everything will be alright. But if you give them
50a feeling that they are in control, you will have immense problems explaining
51why their features are not in current release.<p>Project mission must be always leading project requirements and any deviation
52from it will result in major project butchering. And by this, I mean that the
53project will get its own path, and you will be left with half done software that
54helps nobody. Clear mission goals and clean execution will allow you to develop
55software will clear intent.<h2 id=we-are-never-wrong>We are never wrong</h2><p>I find this type of arrogance the worst. We must always conduct ourselves that
56we are infallible and cannot make mistakes. As soon as a procedure or process is
57established, there is no room for changes or improvements. This is the most
58idiotic thing someone can say of think. I think that processes need to involve
59and change over time. This is imperative and need to have in your organization
60if you want to improve and develop company. We all need to grow balls and change
61everything in order to adapt to current situations. Being a prisoner of
62predefined processes kills creativity.<p>I am constantly trying new software for project managing and communication. I
63believe every team has its own dynamic, and it needs to be discovered
64organically and naturally through many experiments. By putting the team in a
65box, you are amputating their creativity and therefore minimizing their
66potential. But if you talk to an executive, you will mainly find archetypical
67thinking and a strong need to compartmentalize everything from business
68processes to resource management. And this type of management that often
69displays micromanagement techniques only works for short periods (couple of
70years) and then employees either leave the company or become basically retarded
71drones on autopilot.<h2 id=micromanaging>Micromanaging</h2><p>This basically implies that everybody on the team is an idiot who needs to have
72a to-do list that they cannot write themselves. How about spoon-feeding the team
73at launch because besides the team leader, everybody must be a retarded idiot at
74best?<p>I prefer milestones as they give developers much more freedom and creativity in
75developing and not waste their time checking some bizarre to-do list that was
76not even thought through. Projects constantly change throughout the development
77cycle, and all you are left at the end is a list of unchecked tasks and the
78wrath of management why they are not completed. Best WTF moment!<h2 id=human-contact--no-need-for-it>Human contact — no need for it!</h2><p>We are vigorously trying to eliminate physical contact by replacing short
79meetings with software, with no regards that we are not machines. Many times a
80simple 5-min meeting at morning can solve most of the problems. In rapid
81development, short bursts of man to man communication is possibly the best way
82to go.<p>We now have all this software available, and all what we get out of it is a
83giant clusterfuck. An obstacle and not a solution. So, why we still use them?<h2 id=mvp-is-killing-innovation>MVP is killing innovation</h2><p>Many will disagree with me on this one, but I stand strong by this statement.
84What I noticed in my experience that all this buzz words around us only mislead
85and capture us in a circle of solving issues that already have a solution, but
86we are unable to see it without using some fancy word for it.<p>The toughest thing to do for a developer is to minimize requirements. Well, this
87is though only for bad developers. Yes, I said it. There are many types of
88developers out there. And those unable to minimize feature scope are the ones
89you don’t need on your team. Their only goal is to solve problems that exist
90only in their heads. And then you have to argue with them, and waste energy on
91them, instead of developing your awesome product. They are a cancer and I
92suggest you cut them off.<p>MVP as an idea is great, but sadly people don’t understand underlying
93philosophy, and they spent too much time focusing and fixating on something that
94every sane person with normal IQ will understand without some made up
95acronym. And the result is a lot of talking and barely no execution.<p>Well, MVP is not directly killing innovation, but stupid people do when they try
96to understand it.<h2 id=pressure-wasteland>Pressure wasteland</h2><p>You must never allow to be pressured into confirming a deadline if you are not
97confident. We often feel a need that we are in service of others, which is true
98to some extent. But it is also true that others are in service to us to some
99extent. And we forget this all the time. We are all pressured all the time to
100make decisions just to calm other people down. And when they leave your office
101you experience WTF moment :) How the hell did they manage to fuck me up again?<p>People need to realize that the more pressure you put on somebody, the less they
102will be able to do. So 5-min update email requests will only resolve in mental
103breakdown and inability to work that day. Constant poking is probably the only
104thing I lose my mind instantly. For all you that are doing this: “Stop bothering
105us with your insecurities and let us do our job. We will do it quicker and
106better without you breathing down our necks.”<p>If this happens to me, I end up with no energy at the end. Don’t you get it?
107You will get much more from and out of me if you ask me like a human person and
108not your personal butler. On a long run, you are destroying your relationships
109and nobody would want to work with you. Your schizophrenic approach will damage
110only you in a long run. Nobody is anybody’s property.<h2 id=conclusion>Conclusion</h2><p>I am guilty of many things described in this post. And I find it hard sometimes
111to acknowledge this. And I lie to myself and try vigorously to find some
112explanation why I do these things. There is always space for growth. And maybe
113you will also find some of yourself in this post and realize what needs to
114change for you to evolve.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
115<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
116with me
117<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
118the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
119otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/state-of-web-technologies-and-web-development-in-year-2022.html b/public/state-of-web-technologies-and-web-development-in-year-2022.html
deleted file mode 100755
index b06498b..0000000
--- a/public/state-of-web-technologies-and-web-development-in-year-2022.html
+++ /dev/null
@@ -1,188 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/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on><title>State of Web Technologies and Web development in year 2022</title><meta name=description content="Initial thoughtsThis post is a critique on the current state of web development."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>State of Web Technologies and Web development in year 2022</h1><p>Oct 6, 2022<div><h2 id=initial-thoughts>Initial thoughts</h2><p><em>This post is a critique on the current state of web development. It is an
7opinionated post! I will learn more about this in the future, and probably
8slightly change my mind about some of the things I criticize.</em><p>I have started working on a hobby project about two weeks ago, and I wanted to
9use that situation as a learning one. Trying new things, new technologies, new
10tools. I always considered myself to be an adventurous person when it comes to
11technology. I never shy away from trying new languages, new operating systems
12etc. Likewise, I find the whole experience satisfying, and it tickles that part
13of my brain that finds discovery the highest of the mountains to climb.<p>What I always wanted to make was a coding game, that you would play in a browser
14(just to eliminate building binaries for each operating system) where you would
15level up your character and go into these scriptable battles. You know, RPG
16elements.<p>So, the natural way to go would be some sort of SPA (single page application)
17with basic routing and some state management. Nothing crazy.<blockquote><p><strong>Before we move on</strong>, I have to be transparent. Take my views on this with
18a grain of salt. I have only scratched the surface with these technologies,
19and my knowledge is full of gaps. This is my experience using some of these
20products for the first time or in a limited capacity.</blockquote><p>Having this out of the way, I got myself a fresh pot of coffee and down the
21rabbit hole I went.<h2 id=giving-react-js-a-spin>Giving React JS a spin</h2><p>I first tried <a href=https://reactjs.org/>React JS</a>. I kind of like it. Furthermore,
22I have worked with libraries like this in the past and also wrote a couple of
23them (nothing compared to that level), but I had the basic understanding of what
24was going on. I rolled up a project quickly and had basic things done in a
25matter of two hours, which was impressive.<p>I prefer using <a href=https://tailwindcss.com/>Tailwind CSS</a> for my styling
26pleasures, and integrating that was also a painless experience. It was actually
27nice to see that some things got better with time. In about 2 minutes I got
28Tailwind working, and I was able to use classes at my disposal. All that
29<code>postcss</code> stuff was taken care of by adding a couple of things in config files
30(all described really well in their documentation).<p>It is not that different from Vue which I have had more encounters with in the
31past People will probably call me a lunatic for saying this. But you know, it is
32the truth. Same same, but different. I still believe that using libraries like
33this is beneficial. I am not a JavaScript purist. They all have their quirks,
34but at the end of the day, I truly believe it’s worth it.<h2 id=bundlers-and-transpilers>Bundlers and Transpilers</h2><p>I still reject calling <a href=https://www.typescriptlang.org/>Typescript</a> to
35<a href=https://www.javascript.com/>JavaScript</a> conversion a "compilation process". I
36call them <a href=https://devopedia.org/transpiler>transpilers</a>, and I don’t care! 😈<p>And if you want to fight this, take a look at this little chart and be mad at
37it!<p><img src=/assets/state-of-web/compiling-vs-transpiling.png alt="Compiling vs Transpiling"><p>The first one that I ever used was <a href=https://webpack.js.org/>webpack</a>, and it
38was an absolute horrific experience. Saying this, it is an absolutely fantastic
39tool. I felt more like a config editor than actually a programmer. To be fair,
40I am a huge fan of <a href=https://www.gnu.org/software/make/>make</a>, and you can do as
41you wish with this information. I like my build systems simple.<p>Also, isn’t it interesting that we need something like
42<a href=https://babeljs.io/>Babel</a> to make JavaScript code work in a browser that has
43only one client side scripting available, which is by no accident also
44JavaScript. Why? I know why it’s needed, but seriously, why.<p>I haven’t used Babel for years now. Or if I did, it was packaged together by
45some other bundler thingy. Which does not make things better, but at least I
46didn’t need to worry about it.<p>I really don’t like complicated build systems. I really don’t like abstracting
47code and making things appear magical. The older I get, the more I appreciate
48clear and clean, expressive code. No one-liners, if possible.<p>But I have to give props to <a href=https://vitejs.dev/>Vite</a>! This was one of the
49best developer experiences I have ever had. Granted, it still has magical
50properties. And yes, it still is a bundler and abstracts things to the nth
51degree. But at least it didn’t force me to configure 700 lines of JSON. And I
52know that this makes me a hypocrite. You can’t have it all. Nonetheless, my
53reasoning here is, if using bundlers is inevitable, then at least they should
54provide an excellent developer experience.<p>I also noticed that now the catch-all phrase is “blazingly fast” and “lightning
55fast” and “next generation” and stuff like that. I mean, yeah, tools should get
56faster with time. But saying that starting a project now takes 2 seconds instead
57of 20 seconds is something that is a break it or make it kind of a deal is
58ridiculous. I don’t mind waiting a couple of seconds every couple of days. I
59also don’t create 700 projects every day, and also who does? This argument has
60no bite. All I want is a decent reload time (~100ms is more than good enough for
61me) and that is it.<p>You don’t need to sell me benefits if I only get them when I start a fresh
62project, and then try to convince me that this is somehow changing the fate of
63the universe. First of all, it is not. And second, if this is your only argument
64for your tool, I would advise you to maybe re-focus your efforts to something
65else. Vite says that startup times are really fast. And if that would be the
66only thing differentiating it from other tools, I would ignore it. But it has
67some really compelling features like <a href=https://www.geeksforgeeks.org/reactjs-hot-module-replacement/>Hot Module
68Replacement</a> that
69really works well. It was a joy to use.<p>So, I will be definitely using Vite in the future.<h2 id=jam-stack-mach-stack-no-snack>Jam Stack, Mach Stack no snack</h2><p>Let's get a couple of the acronyms out of the way, so we all know what we are
70talking about:<ul><li>Jam Stack - JavaScript, API and Markup<li>Mach Stack - Microservices, API-first, Cloud-Native SaaS, Headless</ul><p>It is so hard to follow all these new trendy things happening around you, that
71it makes you have a massive <strong>FOMO</strong> all the time. But on the other hand, you
72also don’t want to be that old fart that doesn’t move with the times and still
73writes his trusty jQuery code while listening to Blink 182 All the small things
74on full blast. It’s a good song, don’t get me wrong, but there are other songs
75out there.<p>I have to admit. <a href=https://vercel.com/>Vercel</a> is really cool! Love the
76simplicity of the service. You could compare it to
77<a href=https://www.netlify.com/>Netlify</a>. I haven’t tried Netlify extensively, but
78from a couple of experimental deployments I still prefer Vercel. It is much more
79streamlined, but maybe this is bias in me. I really like Vercel’s Analytics,
80which give you a <a href=https://web.dev/vitals/>Core Web Vitals report</a> in their
81admin console. Kind of cool, I’m not going to lie.<p>This whole idea about frontend and backend merging into <a href=https://www.debugbear.com/blog/server-side-rendering>SSR (server-side
82rendering)</a> looks so good
83on paper. It almost doesn’t come with any major flaws.<p>But when it comes to the actual implementation, there is much to be desired.
84I’m going to lump <a href=https://nextjs.org/>Next.js</a> and
85<a href=https://nuxtjs.org/>Nuxt.js</a> together because they are essentially the same
86thing, just a different library.<p>Now comes the reality. Mixing backend and frontend in this manner creates this
87weird mental model where you kind of rely on magical properties of these
88libraries. You relinquish control over to them for better developer experience.
89But is that really true? Initially, I was so stoked about it. However, the more
90I used them, the more I felt uncomfortable. I felt dirty, actually. Maybe this
91is because I come from old ways of doing things where you control every step of
92request, and allowing something to hijack it feels like blasphemy.<p>More than that, some pretty significant technical issues arose from this. How do
93you do JWT token authentication? You put it in <code>api</code> folder and then do some
94fetching and storing into local state management. But doing this also requires
95some tinkering with await/async stuff on the React/Vue side of things. And then
96you need to write middleware for it. And the more I look at it, the more I see
97that this whole thing was not meant to be used like this, and it all feels and
98looks like a huge hack.<p>The issue I have with this is that they over-promise and under-deliver. They
99want to be an all-in-one replacement for everything, and they don’t deliver on
100this promise. And how could they?! We have to be fair. It is an impossible task.<p>They sell you <a href=https://www.geeksforgeeks.org/overview-of-noops/>NoOps</a>, but
101when you need to accomplish something a little bit more out of the scope of
102Hello World, you have to make hacky decisions to make it work. And having a
103deployment strategy that relies on many moving parts is never a good idea.
104Abstracting too much is usually a sign of bad architecture.<p>Lately, this has become a huge trend that will for sure bite us in the future.
105And let’s not get it twisted. By doing this, PaaS providers like
106<a href=https://aws.amazon.com/>AWS</a>, <a href=https://cloud.google.com/>GCS</a>, etc. obscure
107their billing, and you end up paying more than you really should. And even if
108that is not an issue, it comes down to the principle of things. AWS is known for
109having multiple “currencies“ inside their projects like write operations, read
110operations, etc. which add up, and it creates this impossible to track billing
111scheme. It all behaves suspiciously like a pay-to-win game you could find on
112mobile phones that scams you out of your money.<p>And as far as I am concerned, the most important thing was me not coding the
113functionalities for the game I want to make. I was battling libraries and cloud
114providers. How to deploy, what settings are relevant. Bad documentation or
115multiple versions of achieving the same thing. You are getting bombarded by all
116this information, and you don’t really have any control over it.
117Production-ready code becomes a joke, essentially. Especially if you tend to
118work on that project for a prolonged period of time.<p>All of these options end up creating a fatigue. What to choose, what not to
119choose. Unnecessary worrying about if the stack will still be deemed worthy in
120six months. There is elegance in simplicity.<blockquote><p>JavaScript UI frameworks and libraries work in cycles. Every six months or
121so, a new one pops up, claiming that it has revolutionized UI development.
122Thousands of developers adopt it into their new projects, blog posts are
123written, Stack Overflow questions are asked and answered, and then a newer
124(and even more revolutionary) framework pops up to usurp the throne.
125— Ian Allen</blockquote><p><img src=/assets/state-of-web/2008-vs-2020.png alt="To many options"><p>And this jab at these libraries and cloud providers is not done out of malice.
126It is a real concern that I have about them. In my life, I have seen
127technologies come and go, but the basics always stick around. So surrendering
128all the power you have to a library or a cloud provider is in my opinion a
129stupid move.<h2 id=tailwind-css-still-rocks>Tailwind CSS still rocks!</h2><p>You know, many people say negative things about Tailwind. And after a lot of
130deliberation, I came to the conclusion that Tailwind is good for two types of
131developers. Tailwind is good for a complete noob or a senior developer. A
132complete noob doesn’t really care about inner workings of CSS, and a senior
133developer also doesn’t care about CSS. Well, at least, not anymore. And
134developers in between usually have the biggest issues with it. Not always of
135course, but in a lot of cases.<p>I like the creature comforts of Tailwind. Being utility first would make me
136argue that it is actually more similar to <a href=https://sass-lang.com/>Sass</a> or
137<a href=https://lesscss.org/>Less</a> than something like Bootstrap. Not technically, but
138ideologically. After I started using it, I never looked back. I use it every
139time I need to do something web related.<p>Writing CSS for general things feels like going several steps back. Instead of
140focusing on what you are actually trying to achieve, you focus on notations like
141<a href=https://en.bem.info/methodology/css/>BEM</a>, code structuring, optimizing HTML
142size. Just doing things that make 0.1% difference. You know that saying: Early
143optimization is the root of all evil. Exactly that.<p>I am also not saying that Tailwind is the cure for everything. Sometimes custom
144CSS is necessary. But from what I found out in using it for almost two years in
145a production environment (on a site getting quite a lot of traffic and
146constantly being changed), I can say without any reservations that Tailwind
147saved our asses countless times. We would be rewriting CSS all the time without
148it. And I don’t really think writing CSS is the best way to spend my time.<p>I have also noticed that people who criticize Tailwind the most never actually
149used it in a real project that has a long lifetime with plenty of changes that
150will happen in the future.<p>But you know, whatever floats your boat!<h2 id=code-maintainability>Code maintainability</h2><p>Somehow, people also stopped talking about maintenance. If you constantly try to
151catch the latest and greatest train, you are by that logic always trying new
152things. Which is a good thing if you want to learn about technologies and try
153them. But for the production environment, you have to have a stable stack that
154doesn’t change every 6 months.<p>You can lock dependencies for sure. Nevertheless, the hype train moves along
155anyway. And the mindset this breeds goes against locking the code. This
156bleeding-edge rolling release cycle is not helping. That is why enterprise
157solutions usually look down on these popular stacks and only do bare minimum to
158appear hip and cool.<p>With that said, I still think that progress is good, but should be taken with a
159grain of salt. If your project is something that should be built once and then
160rarely updated, going with the latest stack is a possible way to go. But, if you
161are working on a project that lasts for years, you should probably approach it
162with some level of caution. Web development is often times too volatile.<h2 id=web-development-has-a-marketing-issue>Web development has a marketing issue</h2><p>I noticed that almost every project now has this marketing spin put on it.
163Everything is blazingly fast now. I get it, they are competing for your
164attention, but what happened to just being truthful and not inflating reality.<p>And in order to appeal to mass market, they leave things out of their marketing
165materials. These open-source projects are now behaving more and more like
166companies do. Which is a scary thought on its self.<p>And we are also seeing a rise in a concept of building a company in the open,
167which is a good thing, don't get me wrong. But when it is using open-source to
168lure people and then lock them in their ecosystem, there is where I have issues
169with it.<p>This might be because I have been using GNU/Linux for 20 years now and have been
170so beholden for my success to open-source that I see issues when open-source is
171being used to trick people into a false sense of security that these projects
172are built in the spirit of open-source. Because there is a difference. They are
173NOT! They have a really specific goal in mind. And the open-source is being used
174as a delivery system. Which is in my opinion disgusting!<h2 id=conclusion>Conclusion</h2><p>I will end my post with this. Web development is running now in circles. People
175are discovering <a href=https://www.tutorialspoint.com/remote-procedure-call-rpc>RPC</a>
176now and this is the now the next big thing. <a href=https://graphql.org/>GraphQL</a> is
177so passé. And I am so tired of it all. Of blazingly fast libraries, of all these
178new technologies that are actually just a remake of old ones. Of just the
179general spirit of the web. I will just use what I already know. Which worked 10
180years ago and will work 10 years after this. I will adopt a couple of little
181tools like Vite. But I will not waste my time on this anymore.<p>It was a good exercise to get in touch with what’s new now. Nothing really
182changed that much. FOMO is now cured! Now I have to get my ass back to actually
183code and make the project that I wanted to make in the first place.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
184<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
185with me
186<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
187the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
188otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/that-sound-that-machine-makes-when-struggling.html b/public/that-sound-that-machine-makes-when-struggling.html
deleted file mode 100755
index 336329b..0000000
--- a/public/that-sound-that-machine-makes-when-struggling.html
+++ /dev/null
@@ -1,31 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Microsoundtrack — That sound that machine makes when struggling</title><meta name=description content="A couple of months ago, I got an idea about micro soundtracks."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Microsoundtrack — That sound that machine makes when struggling</h1><p>Oct 16, 2022<div><p>A couple of months ago, I got an idea about micro soundtracks. In this concept,
7you are the observer, director, and audience in this tiny movies.<p>What you do is to attempt to imagine what would be happening around you based on
8a title of the song and let the song help you fill the void in your story.<p>I made these songs is Logic Pro X. Every year or so I do this kind of thing and
9make a couple of songs similar to this. But this is the first time I am posting
10about it.<p>You can listen to the whole set on
11<a href="https://www.youtube.com/watch?v=_5oXBhSmF3c">Youtube</a> or scroll down the page
12and there are embedded players for each song.<h2 id=a-bunch-of-inter-dimensional-people-with-loud-clocks>A bunch of inter-dimensional people with loud clocks</h2><p>A group of inter-dimensional people are going up and down the elevator with you
13while having loud clocks around their necks. Each clock ticks on a different
14frequency. A lot of other sounds are getting drawn into your dimension,
15resulting in a strange merging of dimensions.</p><iframe style=border:0;width:100%;height:42px src="https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1349272965/transparent=true/" seamless title=Bandcamp><a href=https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling>That sound that machine makes when struggling by Mitja Felicijan</a></iframe><h2 id=two-black-holes-conversing-about-the-weather>Two black holes conversing about the weather</h2><p>You are a traveler in a spaceship flying very close to two colliding black holes
16having a discussion about the weather while tearing each other apart. During all
17this your ship is getting pulled into the event horizon of both black holes,
18putting a lot of strain on your spaceship.</p><iframe style=border:0;width:100%;height:42px src="https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1756714200/transparent=true/" seamless title=Bandcamp><a href=https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling>That sound that machine makes when struggling by Mitja Felicijan</a></iframe><h2 id=a-planet-where-every-organism-is-a-plant>A planet where every organism is a plant</h2><p>You land on a planet where every living organism is a plant and among those
19plants some of them are highly intelligent, and you were asked to make first
20contact with the native species. Your visit takes place in a giant cave where
21you are meeting these plants, and they are talking to you.</p><iframe style=border:0;width:100%;height:42px src="https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=3710973979/transparent=true/" seamless title=Bandcamp><a href=https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling>That sound that machine makes when struggling by Mitja Felicijan</a></iframe><h2 id=bio-implants-having-a-fit-and-reprogramming-your-brain>Bio implants having a fit and reprogramming your brain</h2><p>In a distant future where everybody has bio implants, you have just received
22your first one, which happens to be a brain implant. Something goes wrong, and
23your implant is starting to misbehave, and you are experiencing brain
24malfunctions. You are on the streets at night a couple of hours after your
25procedure. You can feel your sanity breaking down.</p><iframe style=border:0;width:100%;height:42px src="https://bandcamp.com/EmbeddedPlayer/album=3913808801/size=small/bgcol=ffffff/linkcol=0687f5/track=1157430581/transparent=true/" seamless title=Bandcamp><a href=https://mitjafelicijan.bandcamp.com/album/that-sound-that-machine-makes-when-struggling>That sound that machine makes when struggling by Mitja Felicijan</a></iframe><h2 id=cow-animation>Cow animation</h2><p>I also made this little cow animation. Go into full screen to see the effects in
26more details.<p><video src=/assets/microsoundtrack/cow.m4v controls loop></video></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
27<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
28with me
29<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
30the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
31otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/the-strange-case-of-elasticsearch-allocation-failure.html b/public/the-strange-case-of-elasticsearch-allocation-failure.html
deleted file mode 100755
index fdb32a0..0000000
--- a/public/the-strange-case-of-elasticsearch-allocation-failure.html
+++ /dev/null
@@ -1,64 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>The strange case of Elasticsearch allocation failure</title><meta name=description content="I&amp;#39;ve been using Elasticsearch in production for 5 years now and never had asingle problem with it."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>The strange case of Elasticsearch allocation failure</h1><p>Mar 29, 2020<div><p>I've been using Elasticsearch in production for 5 years now and never had a
7single problem with it. Hell, never even known there could be a problem. Just
8worked. All this time. The first node that I deployed is still being used in
9production, never updated, upgraded, touched in anyway.<p>All this bliss came to an abrupt end this Friday when I got notification that
10Elasticsearch cluster went warm. Well, warm is not that bad right? Wrong!
11Quickly after that I got another email which sent chills down my spine. Cluster
12is now red. RED! Now, shit really hit the fan!<p>I tried googling what could be the problem and after executing allocation
13function noticed that some shards were unassigned and 5 attempts were already
14made (which is BTW to my luck the maximum) and that meant I am basically fucked.
15They also applied that one should wait for cluster to re-balance itself. So, I
16waited. One hour, two hours, several hours. Nothing, still RED.<p>The strangest thing about it all was, that queries were still being fulfilled.
17Data was coming out. On the outside it looked like nothing was wrong but
18everybody that would look at the cluster would know immediately that something
19was very very wrong and we were living on borrowed time here.<blockquote><p><strong>Please, DO NOT do what I did.</strong> Seriously! Please ask someone on official
20forums or if you know an expert please consult him. There could be million of
21reasons and these solution fit my problem. Maybe in your case it would
22disastrous. I had all the data backed up and even if I would fail spectacularly
23I would be able to restore the data. It would be a huge pain and I would loose
24couple of days but I had a plan B.</blockquote><p>Executing allocation and told me what the problem was but no clear solution yet.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>GET /_cat/allocation?format=json
25</span></span></code></pre><p>I got a message that <code>ALLOCATION_FAILED</code> with additional info <code>failed to create shard, failure ioexception[failed to obtain in-memory shard lock]</code>. Well
26splendid! I must also say that our cluster is capable more than enough to handle
27the traffic. Also JVM memory pressure never was an issue. So what happened
28really then?<p>I tried also re-routing failed ones with no success due to AWS restrictions on
29having managed Elasticsearch cluster (they lock some of the functions).<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>POST /_cluster/reroute?retry_failed=true
30</span></span></code></pre><p>I got a message that significantly reduced my options.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{
31</span></span><span style=display:flex><span> &#34;Message&#34;: <span style=color:#a31515>&#34;Your request: &#39;/_cluster/reroute&#39; is not allowed.&#34;</span>
32</span></span><span style=display:flex><span>}
33</span></span></code></pre><p>After that I went on a hunt again. I won't bother you with all the details
34because hours/days went by until I was finally able to re-index the problematic
35index and hoped for the best. Until that moment even re-indexing was giving me
36errors.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>POST _reindex
37</span></span><span style=display:flex><span>{
38</span></span><span style=display:flex><span> &#34;source&#34;: {
39</span></span><span style=display:flex><span> &#34;index&#34;: <span style=color:#a31515>&#34;myindex&#34;</span>
40</span></span><span style=display:flex><span> },
41</span></span><span style=display:flex><span> &#34;dest&#34;: {
42</span></span><span style=display:flex><span> &#34;index&#34;: <span style=color:#a31515>&#34;myindex-new&#34;</span>
43</span></span><span style=display:flex><span> }
44</span></span><span style=display:flex><span>}
45</span></span></code></pre><p>I needed to do this multiple times to get all the documents re-indexed. Then I
46dropped the original one with the following command.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>DELETE /myindex
47</span></span></code></pre><p>And re-indexed again new one in the original one (well by name only).<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>POST _reindex
48</span></span><span style=display:flex><span>{
49</span></span><span style=display:flex><span> &#34;source&#34;: {
50</span></span><span style=display:flex><span> &#34;index&#34;: <span style=color:#a31515>&#34;myindex-new&#34;</span>
51</span></span><span style=display:flex><span> },
52</span></span><span style=display:flex><span> &#34;dest&#34;: {
53</span></span><span style=display:flex><span> &#34;index&#34;: <span style=color:#a31515>&#34;myindex&#34;</span>
54</span></span><span style=display:flex><span> }
55</span></span><span style=display:flex><span>}
56</span></span></code></pre><p>On the surface it looks like all is working but I have a long road in front of
57me to get all the things working again. Cluster now shows that it is in Green
58mode but I am also getting a notification that the cluster has processing status
59which could mean million of things.<p>Godspeed!</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
60<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
61with me
62<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
63the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
64otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/tmux-sane-defaults.html b/public/tmux-sane-defaults.html
deleted file mode 100755
index b38894f..0000000
--- a/public/tmux-sane-defaults.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Sane defaults for tmux with more visible statusbar</title><meta name=description content="# Remap prefix from &amp;#39;C-b&amp;#39; to &amp;#39;M-a&amp;#39;."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Sane defaults for tmux with more visible statusbar</h1><p>May 25, 2023<div><pre><code class=language-conf># Remap prefix from 'C-b' to 'M-a'.
7unbind C-b
8set-option -g prefix M-a
9bind-key M-a send-prefix
10
11# Split panes using | and -.
12bind | split-window -h
13bind - split-window -v
14unbind '&quot;'
15unbind %
16
17# Start counting windows with 1.
18set-option -g allow-rename on
19set -g base-index 1
20setw -g pane-base-index 1
21
22# Statusbar: purple bg and white fg.
23set -g status-bg '#480b8e'
24set -g status-fg '#ffffff'
25
26# Active window: black bg and white fg.
27set -g window-status-current-format &quot;#[fg=#ffffff]#[bg=#111111]#[fg=#ffffff]#[bg=#111111] #I:#W #[fg=#ffffff]#[bg=#111111]&quot;
28
29# Disable mouse mode (tmux 2.1 and above).
30set -g mouse off
31</code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
32<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
33with me
34<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
35the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
36otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/trying-to-build-a-new-kind-of-terminal-emulator.html b/public/trying-to-build-a-new-kind-of-terminal-emulator.html
deleted file mode 100755
index e670f3a..0000000
--- a/public/trying-to-build-a-new-kind-of-terminal-emulator.html
+++ /dev/null
@@ -1,191 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Trying to build a New kind of terminal emulator for the modern age</title><meta name=description content="Over the past few weeks, I have been really thinking about terminal emulators,how we interact with computers, the separation of text-based programs and GUIones."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Trying to build a New kind of terminal emulator for the modern age</h1><p>Jan 26, 2023<div><p>Over the past few weeks, I have been really thinking about terminal emulators,
7how we interact with computers, the separation of text-based programs and GUI
8ones. To be perfectly honest, I got pissed off one evening when I was cleaning
9up files on my computer. Normally, I go into console and do <code>ncdu</code> and check
10where the junk is. Then I start deleting stuff. Without any discrimination,
11usually. But when it comes to screenshots, I have learned that it's good to keep
12them somewhere near if I need to refer to something that I was doing. I am an
13avid screenshot taker. So at that point I checked Pictures folder and also did a
14basic search <code>find . -type f -name "*.jpg"</code> for all the JPEG files in my home
15directory and immediately got pissed off. Why can’t I see thumbnails in my
16terminal? I know why, but why in the year of 2022 this is still a problem. I am
17used to traversing my disk via terminal. I am faster, and I am more comfortable
18this way. But when it comes to visualization, I then need to revert to GUI
19applications and again find the same file to see it. I know that programs like
20<code>feh</code> and <code>sxiv</code> are available, but I would just like to see the preview. Like
21<a href=https://jupyter.org/>Jupyter notebook</a> or something similar. Just having it
22inline. Part of a result.<p>It also didn’t help that I was spending some time with the <a href=https://plan9.io/plan9/>Plan
239</a> Operating system. More specifically
24<a href=http://9front.org/>9FRONT</a>. The way that <a href=http://acme.cat-v.org/>ACME editor</a>
25handles text editing is just wonderful. Different and fresh somehow, even though
26it’s super old.<p>So, I went on a lookout for an interesting way of visualizing results of some
27query. I found these applications to be outstanding examples of how not to be a
28captive of a predetermined way of doing things.<ul><li><a href=https://www.wolfram.com/mathematica/>Wolfram Mathematica</a><li><a href=https://jupyter.org/>Jupyter notebooks</a><li><a href=http://www.9front.org>Plan 9 / 9FRONT</a><li><a href=https://templeos.org/>Temple OS</a><li><a href=https://www.gnu.org/software/emacs/>Emacs</a></ul><p>My idea is not as out there as ACME is, but it is a spin on the terminal
29emulators. I like the modes that Vi/Vim provides you with. I like the way the
30Emacs does its own <code>M-x</code> <code>M-c</code>. Furthermore, I really like how Mathematica and
31Jupyter present the data in a free flowing form. And I love how Temple OS is
32basically a C interpreter on some level.<blockquote><p><strong>Note:</strong> This is part 1 of the journey. Nowhere finished yet. I am just
33tinkering with this at the moment. This whole thing can easily spectacularly
34fail.</blockquote><p>So I started. I knew that I wanted to have the couple of modes, but I didn’t
35like the repetition of keystrokes, so the only option was to have some sort of
36toggle and indicate to the user that they are in a special mode. Like Vi does
37for Normal and Visual mode.<p>These modes would for the first version be:<ul><li><em>Preview mode</em> (toggle with Ctrl + P)<ul><li>When this mode would be enabled, the <code>ls</code> command would try to find images
38from the results and display thumbnails from them in the terminal itself.
39No ASCII art. Proper images. In a grid!</ul><li><em>Detach mode</em> (toggle with Ctrl + D)<ul><li>When this mode would be enabled, every command would open a new window
40and execute that command in it. This would be useful for starting <code>htop</code>
41in a separate window.</ul></ul><p>The reason for having these modes togglable is to not ask for previews every
42time. You enable a mode and until you disable it, it behaves that way. Purely
43out of ergonomic reasons.<p>I would like to treat every terminal I open as a session mentally. When I start
44using the terminal, I start digging deeper into the issue I am trying to
45resolve. And while I am doing this, I would like to open detached windows
46etc. A lot of these things can be done easily with something like
47<a href=https://i3wm.org/>i3</a>, but also that pull you out of the context of what you
48were doing. I would like to orchestrate everything from one single point.<p>In planning for this project, I knew that I would need to use a language like C
49and a library such as <a href=https://www.libsdl.org/>SDL2</a> in order to achieve the
50desired results. I had considered other options, but ultimately determined that
51<a href=https://www.libsdl.org/>SDL2</a> was the best fit based on its capabilities and
52reputation in the programming community.<p>At first, I thought the idea of a hardware accelerated terminal was a bit of a
53joke. It seemed like such a niche and unnecessary feature, especially given the
54fact that terminal emulators have been around for decades and have always relied
55on software rendering. But to be fair, <a href=https://alacritty.org/>Alacritty</a> is
56doing the same thing. Well, they are doing a remarkable job at it.<p>So, I embarked on a journey. Everything has to start somewhere. For me, it
57started with creating a window! It has to start somewhere. 🙂<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green>// Oh, Hi Mark!
58</span></span></span><span style=display:flex><span><span style=color:green>// Create the window, obviously.
59</span></span></span><span style=display:flex><span><span style=color:green></span>SDL_Window *window = SDL_CreateWindow(
60</span></span><span style=display:flex><span> WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
61</span></span><span style=display:flex><span> WINDOW_WIDTH, WINDOW_HEIGHT,
62</span></span><span style=display:flex><span> SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
63</span></span></code></pre><p>I continued like this to get some text displayed on the screen.<p>I noted that
64<a href=https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_Solid><code>TTF_RenderText_Solid</code></a>
65rendered text really poorly. There were no antialiasing at all. In my wisdom, I
66never checked the documentation. Well, that was a fail. To uneducated like me:
67<code>TTF_RenderText_Solid</code> renders Latin1 text at fast quality to a new 8-bit
68surface. So, that's why the texts looked like shit. No wonder.<p>Remarks on <code>TTF_RenderText_Solid</code>: This function will allocate a new 8-bit,
69palettized surface. The surface's 0 pixel will be the colorkey, giving a
70transparent background. The 1 pixel will be set to the text color.<p>After I replaced it with
71<a href=https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_LCD><code>TTF_RenderText_LCD</code></a> which
72renders Latin1 text at LCD subpixel quality to a new ARGB surface, the text
73started looking good. Really make sure you read the documentation. It’s actually
74good. As a side note, you can find all the documentation regarding <a href=https://wiki.libsdl.org/>SDL2 on
75their Wiki</a>.<p>After that was done, I started working on displaying other things like <code>Preview</code>
76and <code>Detach</code> modes. This wasn’t really that hard. In SDL2 you can check all the
77available events with <code>while (SDL_PollEvent(&amp;event) > 0)</code> and have a bunch of
78switch statements to determine which key is currently being pressed. More about
79keys, <a href=https://documentation.help/SDL/sdlkey.html>SDLKey</a> and mroe about
80pooling the events on
81<a href=https://documentation.help/SDL/sdlpollevent.html>SDL_PollEvent</a>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>while</span> (SDL_PollEvent(&amp;event) &gt; 0)
82</span></span><span style=display:flex><span>{
83</span></span><span style=display:flex><span> <span style=color:#00f>switch</span> (event.type)
84</span></span><span style=display:flex><span> {
85</span></span><span style=display:flex><span> <span style=color:#00f>case</span> SDL_QUIT:
86</span></span><span style=display:flex><span> running = false;
87</span></span><span style=display:flex><span> <span style=color:#00f>break</span>;
88</span></span><span style=display:flex><span>
89</span></span><span style=display:flex><span> <span style=color:#00f>case</span> SDL_TEXTINPUT:
90</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (!meta_key_pressed)
91</span></span><span style=display:flex><span> {
92</span></span><span style=display:flex><span> strncat(input_prompt_text, event.text.text, 1);
93</span></span><span style=display:flex><span> update_input_prompt = true;
94</span></span><span style=display:flex><span> }
95</span></span><span style=display:flex><span> <span style=color:#00f>break</span>;
96</span></span><span style=display:flex><span> }
97</span></span><span style=display:flex><span>}
98</span></span></code></pre><p>After that was somewhat working correctly, I started creating a struct that
99would hold all the commands and results and I call them Cells. Yes, I stole that
100naming idea from Jupyter.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>typedef</span> <span style=color:#00f>struct</span>
101</span></span><span style=display:flex><span>{
102</span></span><span style=display:flex><span> <span style=color:#2b91af>char</span> *command;
103</span></span><span style=display:flex><span> <span style=color:#2b91af>char</span> *result;
104</span></span><span style=display:flex><span> SDL_Surface *surface;
105</span></span><span style=display:flex><span> SDL_Texture *texture;
106</span></span><span style=display:flex><span> SDL_Rect rect;
107</span></span><span style=display:flex><span>} Cell;
108</span></span></code></pre><p>I am at a place now where I am starting to implement scrolling. This will for
109sure be fun to code. Memory management in C is super easy. 😂<p>I have also added a simple <a href=https://en.wikipedia.org/wiki/INI_file>INI file like
110configuration</a> support. It is done in an
111<a href=https://github.com/nothings/stb/blob/master/docs/stb_howto.txt>STB style of
112header</a> and maps
113to specific options supported by the terminal. It is not universal, and the code
114below demonstrates how I will use it in the future.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#ifndef CONFIG_H
115</span></span></span><span style=display:flex><span><span style=color:#00f>#define CONFIG_H
116</span></span></span><span style=display:flex><span><span style=color:#00f></span>
117</span></span><span style=display:flex><span><span style=color:green>/*
118</span></span></span><span style=display:flex><span><span style=color:green># This is a comment
119</span></span></span><span style=display:flex><span><span style=color:green>
120</span></span></span><span style=display:flex><span><span style=color:green># This is the first configuration option
121</span></span></span><span style=display:flex><span><span style=color:green>dettach=value11111
122</span></span></span><span style=display:flex><span><span style=color:green>
123</span></span></span><span style=display:flex><span><span style=color:green># This is the second configuration option
124</span></span></span><span style=display:flex><span><span style=color:green>preview=value22222
125</span></span></span><span style=display:flex><span><span style=color:green>
126</span></span></span><span style=display:flex><span><span style=color:green># This is the third configuration option
127</span></span></span><span style=display:flex><span><span style=color:green>debug=value33333
128</span></span></span><span style=display:flex><span><span style=color:green>*/</span>
129</span></span><span style=display:flex><span>
130</span></span><span style=display:flex><span><span style=color:green>// Define a struct to hold the configuration options
131</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>typedef</span> <span style=color:#00f>struct</span>
132</span></span><span style=display:flex><span>{
133</span></span><span style=display:flex><span> <span style=color:#2b91af>char</span> dettach[256];
134</span></span><span style=display:flex><span> <span style=color:#2b91af>char</span> preview[256];
135</span></span><span style=display:flex><span> <span style=color:#2b91af>char</span> debug[256];
136</span></span><span style=display:flex><span>} Config;
137</span></span><span style=display:flex><span>
138</span></span><span style=display:flex><span><span style=color:green>// Read the configuration file and return the options as a struct
139</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>extern</span> Config read_config_file(<span style=color:#00f>const</span> <span style=color:#2b91af>char</span> *filename)
140</span></span><span style=display:flex><span>{
141</span></span><span style=display:flex><span> <span style=color:green>// Create a struct to hold the configuration options
142</span></span></span><span style=display:flex><span><span style=color:green></span> Config config = {0};
143</span></span><span style=display:flex><span>
144</span></span><span style=display:flex><span> <span style=color:green>// Open the configuration file
145</span></span></span><span style=display:flex><span><span style=color:green></span> FILE *file = fopen(filename, <span style=color:#a31515>&#34;r&#34;</span>);
146</span></span><span style=display:flex><span>
147</span></span><span style=display:flex><span> <span style=color:green>// Read each line from the file
148</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#2b91af>char</span> line[256];
149</span></span><span style=display:flex><span> <span style=color:#00f>while</span> (fgets(line, <span style=color:#00f>sizeof</span>(line), file))
150</span></span><span style=display:flex><span> {
151</span></span><span style=display:flex><span> <span style=color:green>// Check if this line is a comment or empty
152</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>if</span> (line[0] == <span style=color:#a31515>&#39;#&#39;</span> || line[0] == <span style=color:#a31515>&#39;\n&#39;</span>)
153</span></span><span style=display:flex><span> <span style=color:#00f>continue</span>;
154</span></span><span style=display:flex><span>
155</span></span><span style=display:flex><span> <span style=color:green>// Parse the line to get the option and value
156</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#2b91af>char</span> option[128], value[128];
157</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (sscanf(line, <span style=color:#a31515>&#34;%[^=]=%s&#34;</span>, option, value) != 2)
158</span></span><span style=display:flex><span> <span style=color:#00f>continue</span>;
159</span></span><span style=display:flex><span>
160</span></span><span style=display:flex><span> <span style=color:green>// Set the value of the appropriate option in the config struct
161</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>if</span> (strcmp(option, <span style=color:#a31515>&#34;dettach&#34;</span>) == 0)
162</span></span><span style=display:flex><span> {
163</span></span><span style=display:flex><span> strncpy(config.option1, value, <span style=color:#00f>sizeof</span>(config.option1));
164</span></span><span style=display:flex><span> }
165</span></span><span style=display:flex><span> <span style=color:#00f>else</span> <span style=color:#00f>if</span> (strcmp(option, <span style=color:#a31515>&#34;preview&#34;</span>) == 0)
166</span></span><span style=display:flex><span> {
167</span></span><span style=display:flex><span> strncpy(config.option2, value, <span style=color:#00f>sizeof</span>(config.option2));
168</span></span><span style=display:flex><span> }
169</span></span><span style=display:flex><span> <span style=color:#00f>else</span> <span style=color:#00f>if</span> (strcmp(option, <span style=color:#a31515>&#34;debug&#34;</span>) == 0)
170</span></span><span style=display:flex><span> {
171</span></span><span style=display:flex><span> strncpy(config.option3, value, <span style=color:#00f>sizeof</span>(config.option3));
172</span></span><span style=display:flex><span> }
173</span></span><span style=display:flex><span> }
174</span></span><span style=display:flex><span>
175</span></span><span style=display:flex><span> <span style=color:green>// Close the configuration file
176</span></span></span><span style=display:flex><span><span style=color:green></span> fclose(file);
177</span></span><span style=display:flex><span>
178</span></span><span style=display:flex><span> <span style=color:green>// Return the configuration options
179</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>return</span> config;
180</span></span><span style=display:flex><span>}
181</span></span><span style=display:flex><span>
182</span></span><span style=display:flex><span><span style=color:#00f>#endif
183</span></span></span></code></pre><p>This is as far as I managed to get for now. I have a daily job and this
184prohibits me to work on these things full time. But I should probably get back
185and finish this. At least have a simple version working out, so I can start
186testing it on my machines. Fingers crossed. 🕵️‍♂️</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
187<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
188with me
189<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
190the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
191otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/tying-out-helix-code-editor.html b/public/tying-out-helix-code-editor.html
deleted file mode 100755
index 68967c4..0000000
--- a/public/tying-out-helix-code-editor.html
+++ /dev/null
@@ -1,34 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi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editor</title><meta name=description content="I have been searching for a lightweight code editor for quite some time."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Trying out Helix code editor as my main editor</h1><p>Jun 30, 2022<div><p>I have been searching for a lightweight code editor for quite some time. One of
7the main reasons was that I wanted something that doesn't burn through CPU and
8RAM usage is not through the roof. I have been mostly using Visual Studio Code.
9It's been an outstanding editor. I have no quarrel with it at all. It's just
10time to spice life up with something new.<p>I have been on this search for a couple of years. I have tried Vim, Neovim,
11Emacs, Doom Emacs, Micro and couple more. Among most of them, I liked Micro and
12Doom Emacs the most. Micro editor was a little too basic for me. And Doom Emacs
13was a bit too hardcore. This does not reflect on any of the editors. It's just
14my personal preference.<blockquote><p>I tried Helix Editor about a year ago. But I didn't pay attention to it.
15Tried it and saw it's similar to Vi and just said no. I was premature to
16dismiss it.</blockquote><p>One of the things I actually miss is line wrapping for certain files. When
17writing Markdown, line wrapping would be very helpful. Editing such a document
18is frustrating to say the least. Some of the Markdown to HTML converters don't
19take kindly of new lines between sentences. Not paragraphs, sentences. And I use
20Markdown to write this blog you are reading.<p>But other than this, I have been extremely satisfied by it. It's been a pleasant
21surprise. There have been zero issues with the editor.<p>One thing to do before you are able to use autocompletion and make use Language
22Server support is to install the language server with NPM.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>npm install -g typescript typescript-language-server
23</span></span></code></pre><p>I am still getting used to the keyboard shortcuts and getting better. What Helix
24does really well is packing in sane defaults and even though because currently
25there is no plugin support I haven't found any need for them. It has all that
26you would need. It goes to extreme measures to show a user what is going on with
27popups that show you what the keyboard shortcuts are.<p>And it comes us packed with many
28<a href=https://github.com/helix-editor/helix/wiki/Themes>really good themes</a>.<p><img src=/assets/helix-editor/editor.png alt=Editor><p>It's still young but has this mature feeling to it. It has sane defaults and
29mimics Vim (works a bit differently, but the overall idea is similar).</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
30<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
31with me
32<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
33the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
34otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/using-digitalocean-spaces-object-storage-with-fuse.html b/public/using-digitalocean-spaces-object-storage-with-fuse.html
deleted file mode 100755
index cfe235f..0000000
--- a/public/using-digitalocean-spaces-object-storage-with-fuse.html
+++ /dev/null
@@ -1,247 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Using DigitalOcean Spaces Object Storage with FUSE</title><meta name=description content="Couple of months ago DigitalOcean introduced newproduct calledSpaces whichis Object Storage very similar to Amazon&amp;#39;s S3."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Using DigitalOcean Spaces Object Storage with FUSE</h1><p>Jan 16, 2018<div><p>Couple of months ago <a href=https://www.digitalocean.com>DigitalOcean</a> introduced new
7product called
8<a href=https://blog.digitalocean.com/introducing-spaces-object-storage/>Spaces</a> which
9is Object Storage very similar to Amazon's S3. This really peaked my interest,
10because this was something I was missing and even the thought of going over the
11internet for such functionality was in no interest to me. Also in fashion with
12their previous pricing this also is very cheap and pricing page is a no-brainer
13compared to AWS or GCE. <a href=https://www.digitalocean.com/pricing/>Prices are clearly and precisely defined and
14outlined</a>. You must love them for that
15:)<h2 id=initial-requirements>Initial requirements</h2><ul><li>Is it possible to use them as a mounted drive with FUSE? (tl;dr YES)<li>Will the performance degrade over time and over different sizes of objects?
16(tl;dr NO&amp;YES)<li>Can storage be mounted on multiple machines at the same time and be writable?
17(tl;dr YES)</ul><blockquote><p>Let me be clear. This scripts I use are made just for benchmarking and are not
18intended to be used in real-life situations. Besides that, I am looking into
19using this approaches but adding caching service in front of it and then
20dumping everything as an object to storage. This could potentially be some
21interesting post of itself. But in case you would need real-time data without
22eventual consistency please take this scripts as they are: not usable in such
23situations.</blockquote><h2 id=is-it-possible-to-use-them-as-a-mounted-drive-with-fuse>Is it possible to use them as a mounted drive with FUSE?</h2><p>Well, actually they can be used in such manor. Because they are similar to <a href=https://aws.amazon.com/s3/>AWS
24S3</a> many tools are available and you can find many
25articles and <a href="https://stackoverflow.com/search?q=s3+fuse">Stackoverflow items</a>.<p>To make this work you will need DigitalOcean account. If you don't have one you
26will not be able to test this code. But if you have an account then you go and
27<a href="https://cloud.digitalocean.com/droplets/new?size=s-1vcpu-1gb&amp;region=ams3&amp;distro=debian&amp;distroImage=debian-9-x64&amp;options=private_networking,install_agent">create new
28Droplet</a>.
29If you click on this link you will already have preselected Debian 9 with
30smallest VM option.<ul><li>Please be sure to add you SSH key, because we will login to this machine
31remotely.<li>If you change your region please remember which one you choose because we will
32need this information when we try to mount space to our machine.</ul><p>Instuctions on how to use SSH keys and how to setup them are available in
33article <a href=https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets>How To Use SSH Keys with DigitalOcean
34Droplets</a>.<p><img src=/assets/do-fuse/fuse-droplets.png alt="DigitalOcean Droplets"><p>After we created Droplet it's time to create new Space. This is done by clicking
35on a button <a href=https://cloud.digitalocean.com/spaces/new>Create</a> (right top
36corner) and selecting Spaces. Choose pronounceable <code>Unique name</code> because we
37will use it in examples below. You can either choose Private or Public, it
38doesn't matter in our case. And you can always change that in the future.<p>When you have created new Space we should <a href=https://cloud.digitalocean.com/settings/api/tokens>generate Access
39key</a>. This link will guide
40to the page when you can generate this key. After you create new one, please
41save provided Key and Secret because Secret will not be shown again.<p><img src=/assets/do-fuse/fuse-spaces.png alt="DigitalOcean Spaces"><p>Now that we have new Space and Access key we should SSH into our machine.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># replace IP with the ip of your newly created droplet</span>
42</span></span><span style=display:flex><span>ssh root@IP
43</span></span><span style=display:flex><span>
44</span></span><span style=display:flex><span><span style=color:green># this will install utilities for mounting storage objects as FUSE</span>
45</span></span><span style=display:flex><span>apt install s3fs
46</span></span><span style=display:flex><span>
47</span></span><span style=display:flex><span><span style=color:green># we now need to provide credentials (access key we created earlier)</span>
48</span></span><span style=display:flex><span><span style=color:green># replace KEY and SECRET with your own credentials but leave the colon between them</span>
49</span></span><span style=display:flex><span><span style=color:green># we also need to set proper permissions</span>
50</span></span><span style=display:flex><span>echo <span style=color:#a31515>&#34;KEY:SECRET&#34;</span> &gt; .passwd-s3fs
51</span></span><span style=display:flex><span>chmod 600 .passwd-s3fs
52</span></span><span style=display:flex><span>
53</span></span><span style=display:flex><span><span style=color:green># now we mount space to our machine</span>
54</span></span><span style=display:flex><span><span style=color:green># replace UNIQUE-NAME with the name you choose earlier</span>
55</span></span><span style=display:flex><span><span style=color:green># if you choose different region for your space be careful about -ourl option (ams3)</span>
56</span></span><span style=display:flex><span>s3fs UNIQUE-NAME /mnt/ -ourl=https://ams3.digitaloceanspaces.com -ouse_cache=/tmp
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span><span style=color:green># now we try to create a file</span>
59</span></span><span style=display:flex><span><span style=color:green># once you mount it may take a couple of seconds to retrieve data</span>
60</span></span><span style=display:flex><span>echo <span style=color:#a31515>&#34;Hello cruel world&#34;</span> &gt; /mnt/hello.txt
61</span></span></code></pre><p>After all this you can return to your browser and go to <a href=https://cloud.digitalocean.com/spaces>DigitalOcean
62Spaces</a> and click on your created
63space. If file hello.txt is present you have successfully mounted space to your
64machine and wrote data to it.<p>I choose the same region for my Droplet and my Space but you don't have to. You
65can have different regions. What this actually does to performance I don't know.<p>Additional information on FUSE:<ul><li><a href=https://github.com/s3fs-fuse/s3fs-fuse>Github project page for s3fs</a><li><a href=https://en.wikipedia.org/wiki/Filesystem_in_Userspace>FUSE - Filesystem in Userspace</a></ul><h2 id=will-the-performance-degrade-over-time-and-over-different-sizes-of-objects>Will the performance degrade over time and over different sizes of objects?</h2><p>For this task I didn't want to just read and write text files or uploading
66images. I actually wanted to figure out if using something like SQlite is viable
67in this case.<h3 id=measurement-experiment-1-file-copy>Measurement experiment 1: File copy</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># first we create some dummy files at different sizes</span>
68</span></span><span style=display:flex><span>dd <span style=color:#00f>if</span>=/dev/zero of=10KB.dat bs=1024 count=10 <span style=color:green>#10KB</span>
69</span></span><span style=display:flex><span>dd <span style=color:#00f>if</span>=/dev/zero of=100KB.dat bs=1024 count=100 <span style=color:green>#100KB</span>
70</span></span><span style=display:flex><span>dd <span style=color:#00f>if</span>=/dev/zero of=1MB.dat bs=1024 count=1024 <span style=color:green>#1MB</span>
71</span></span><span style=display:flex><span>dd <span style=color:#00f>if</span>=/dev/zero of=10MB.dat bs=1024 count=10240 <span style=color:green>#10MB</span>
72</span></span><span style=display:flex><span>
73</span></span><span style=display:flex><span><span style=color:green># now we set time command to only return real</span>
74</span></span><span style=display:flex><span>TIMEFORMAT=%R
75</span></span><span style=display:flex><span>
76</span></span><span style=display:flex><span><span style=color:green># now lets test it</span>
77</span></span><span style=display:flex><span>(time cp 10KB.dat /mnt/) |&amp; tee -a 10KB.results.txt
78</span></span><span style=display:flex><span>
79</span></span><span style=display:flex><span><span style=color:green># and now we automate</span>
80</span></span><span style=display:flex><span><span style=color:green># this will perform the same operation 100 times</span>
81</span></span><span style=display:flex><span><span style=color:green># this will output results into separated files based on objecty size</span>
82</span></span><span style=display:flex><span>n=0; <span style=color:#00f>while</span> (( n++ &lt; 100 )); <span style=color:#00f>do</span> (time cp 10KB.dat /mnt/10KB.$n.dat) |&amp; tee -a 10KB.results.txt; <span style=color:#00f>done</span>
83</span></span><span style=display:flex><span>n=0; <span style=color:#00f>while</span> (( n++ &lt; 100 )); <span style=color:#00f>do</span> (time cp 100KB.dat /mnt/100KB.$n.dat) |&amp; tee -a 100KB.results.txt; <span style=color:#00f>done</span>
84</span></span><span style=display:flex><span>n=0; <span style=color:#00f>while</span> (( n++ &lt; 100 )); <span style=color:#00f>do</span> (time cp 1MB.dat /mnt/1MB.$n.dat) |&amp; tee -a 1MB.results.txt; <span style=color:#00f>done</span>
85</span></span><span style=display:flex><span>n=0; <span style=color:#00f>while</span> (( n++ &lt; 100 )); <span style=color:#00f>do</span> (time cp 10MB.dat /mnt/10MB.$n.dat) |&amp; tee -a 10MB.results.txt; <span style=color:#00f>done</span>
86</span></span></code></pre><p>Files of size 100MB were not successfully transferred and ended up displaying
87error (cp: failed to close '/mnt/100MB.1.dat': Operation not permitted).<p>As I suspected, object size is not really that important. Sadly I don't have the
88time to test performance over periods of time. But if some of you would do it
89please send me your data. I would be interested in seeing results.<p><strong>Here are plotted results</strong><p>You can download <a href=/assets/do-fuse/copy-benchmarks.tsv>raw result here</a>.
90Measurements are in seconds.</p><script src=//cdn.plot.ly/plotly-latest.min.js></script><div id=copy-benchmarks></div><script>
91(function(){
92 var request = new XMLHttpRequest();
93 request.open("GET", "/assets/do-fuse/copy-benchmarks.tsv", true);
94 request.onload = function() {
95 if (request.status >= 200 && request.status < 400) {
96 var payload = request.responseText.trim();
97 var tsv = payload.split("\n");
98 for (var i=0; i<tsv.length; i++) { tsv[i] = tsv[i].split("\t"); }
99 var traces = [];
100 var headers = tsv[0];
101 tsv.shift();
102 Array.prototype.forEach.call(headers, function(el, idx) {
103 var x = [];
104 var y = [];
105 for (var j=0; j<tsv.length; j++) {
106 x.push(j);
107 y.push(parseFloat(tsv[j][idx].replace(",", ".")));
108 }
109 traces.push({ x: x, y: y, type: "scatter", name: el, line: { width: 1, shape: "spline" } });
110 });
111 var copy = Plotly.newPlot("copy-benchmarks", traces, { legend: {"orientation": "h"}, height: 400, margin: { l: 40, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: "execution time in seconds", titlefont: { size: 12 } }, xaxis: { title: "fn(i)", titlefont: { size: 12 } } });
112 } else { }
113 };
114 request.onerror = function() { };
115 request.send(null);
116})();
117</script><p>As far as these tests show, performance is quite stable and can be predicted
118which is fantastic. But this is a small test and spans only over couple of
119hours. So you should not completely trust them.<h3 id=measurement-experiment-2-sqlite-performanse>Measurement experiment 2: SQLite performanse</h3><p>I was unable to use database file directly from mounted drive so this is a no-go
120as I suspected. So I executed code below on a local disk just to get some
121benchmarks. I inserted 1000 records with DROPTABLE, CREATETABLE, INSERTMANY,
122FETCHALL, COMMIT for 1000 times to generate statistics. As you can see
123performance of SQLite is quite amazing. You could then potentially just copy
124file to mounted drive and be done with it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> time
125</span></span><span style=display:flex><span><span style=color:#00f>import</span> sqlite3
126</span></span><span style=display:flex><span><span style=color:#00f>import</span> sys
127</span></span><span style=display:flex><span>
128</span></span><span style=display:flex><span><span style=color:#00f>if</span> len(sys.argv) &lt; 3:
129</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;usage: python sqlite-benchmark.py DB_PATH NUM_RECORDS REPEAT&#34;</span>)
130</span></span><span style=display:flex><span> exit()
131</span></span><span style=display:flex><span>
132</span></span><span style=display:flex><span><span style=color:#00f>def</span> data_iter(x):
133</span></span><span style=display:flex><span> <span style=color:#00f>for</span> i <span style=color:#00f>in</span> range(x):
134</span></span><span style=display:flex><span> <span style=color:#00f>yield</span> <span style=color:#a31515>&#34;m&#34;</span> + str(i), <span style=color:#a31515>&#34;f&#34;</span> + str(i*i)
135</span></span><span style=display:flex><span>
136</span></span><span style=display:flex><span>header_line = <span style=color:#a31515>&#34;</span><span style=color:#a31515>%s</span><span style=color:#a31515>\t</span><span style=color:#a31515>%s</span><span style=color:#a31515>\t</span><span style=color:#a31515>%s</span><span style=color:#a31515>\t</span><span style=color:#a31515>%s</span><span style=color:#a31515>\t</span><span style=color:#a31515>%s</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span> % (<span style=color:#a31515>&#34;DROPTABLE&#34;</span>, <span style=color:#a31515>&#34;CREATETABLE&#34;</span>, <span style=color:#a31515>&#34;INSERTMANY&#34;</span>, <span style=color:#a31515>&#34;FETCHALL&#34;</span>, <span style=color:#a31515>&#34;COMMIT&#34;</span>)
137</span></span><span style=display:flex><span><span style=color:#00f>with</span> open(<span style=color:#a31515>&#34;sqlite-benchmarks.tsv&#34;</span>, <span style=color:#a31515>&#34;w&#34;</span>) <span style=color:#00f>as</span> fp:
138</span></span><span style=display:flex><span> fp.write(header_line)
139</span></span><span style=display:flex><span>
140</span></span><span style=display:flex><span>start_time = time.time()
141</span></span><span style=display:flex><span>conn = sqlite3.connect(sys.argv[1])
142</span></span><span style=display:flex><span>c = conn.cursor()
143</span></span><span style=display:flex><span>end_time = time.time()
144</span></span><span style=display:flex><span>result_time = CONNECT = end_time - start_time
145</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;CONNECT: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
146</span></span><span style=display:flex><span>
147</span></span><span style=display:flex><span>start_time = time.time()
148</span></span><span style=display:flex><span>c.execute(<span style=color:#a31515>&#34;PRAGMA journal_mode=WAL&#34;</span>)
149</span></span><span style=display:flex><span>c.execute(<span style=color:#a31515>&#34;PRAGMA temp_store=MEMORY&#34;</span>)
150</span></span><span style=display:flex><span>c.execute(<span style=color:#a31515>&#34;PRAGMA synchronous=OFF&#34;</span>)
151</span></span><span style=display:flex><span>result_time = PRAGMA = end_time - start_time
152</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;PRAGMA: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
153</span></span><span style=display:flex><span>
154</span></span><span style=display:flex><span><span style=color:#00f>for</span> i <span style=color:#00f>in</span> range(int(sys.argv[3])):
155</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;#</span><span style=color:#a31515>%i</span><span style=color:#a31515>&#34;</span> % (i))
156</span></span><span style=display:flex><span>
157</span></span><span style=display:flex><span> start_time = time.time()
158</span></span><span style=display:flex><span> c.execute(<span style=color:#a31515>&#34;drop table if exists test&#34;</span>)
159</span></span><span style=display:flex><span> end_time = time.time()
160</span></span><span style=display:flex><span> result_time = DROPTABLE = end_time - start_time
161</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;DROPTABLE: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
162</span></span><span style=display:flex><span>
163</span></span><span style=display:flex><span> start_time = time.time()
164</span></span><span style=display:flex><span> c.execute(<span style=color:#a31515>&#34;create table if not exists test(a,b)&#34;</span>)
165</span></span><span style=display:flex><span> end_time = time.time()
166</span></span><span style=display:flex><span> result_time = CREATETABLE = end_time - start_time
167</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;CREATETABLE: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
168</span></span><span style=display:flex><span>
169</span></span><span style=display:flex><span> start_time = time.time()
170</span></span><span style=display:flex><span> c.executemany(<span style=color:#a31515>&#34;INSERT INTO test VALUES (?, ?)&#34;</span>, data_iter(int(sys.argv[2])))
171</span></span><span style=display:flex><span> end_time = time.time()
172</span></span><span style=display:flex><span> result_time = INSERTMANY = end_time - start_time
173</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;INSERTMANY: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
174</span></span><span style=display:flex><span>
175</span></span><span style=display:flex><span> start_time = time.time()
176</span></span><span style=display:flex><span> c.execute(<span style=color:#a31515>&#34;select count(*) from test&#34;</span>)
177</span></span><span style=display:flex><span> res = c.fetchall()
178</span></span><span style=display:flex><span> end_time = time.time()
179</span></span><span style=display:flex><span> result_time = FETCHALL = end_time - start_time
180</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;FETCHALL: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
181</span></span><span style=display:flex><span>
182</span></span><span style=display:flex><span> start_time = time.time()
183</span></span><span style=display:flex><span> conn.commit()
184</span></span><span style=display:flex><span> end_time = time.time()
185</span></span><span style=display:flex><span> result_time = COMMIT = end_time - start_time
186</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;COMMIT: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
187</span></span><span style=display:flex><span>
188</span></span><span style=display:flex><span> print
189</span></span><span style=display:flex><span> log_line = <span style=color:#a31515>&#34;</span><span style=color:#a31515>%f</span><span style=color:#a31515>\t</span><span style=color:#a31515>%f</span><span style=color:#a31515>\t</span><span style=color:#a31515>%f</span><span style=color:#a31515>\t</span><span style=color:#a31515>%f</span><span style=color:#a31515>\t</span><span style=color:#a31515>%f</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#34;</span> % (DROPTABLE, CREATETABLE, INSERTMANY, FETCHALL, COMMIT)
190</span></span><span style=display:flex><span> <span style=color:#00f>with</span> open(<span style=color:#a31515>&#34;sqlite-benchmarks.tsv&#34;</span>, <span style=color:#a31515>&#34;a&#34;</span>) <span style=color:#00f>as</span> fp:
191</span></span><span style=display:flex><span> fp.write(log_line)
192</span></span><span style=display:flex><span>
193</span></span><span style=display:flex><span>start_time = time.time()
194</span></span><span style=display:flex><span>conn.close()
195</span></span><span style=display:flex><span>end_time = time.time()
196</span></span><span style=display:flex><span>result_time = CLOSE = end_time - start_time
197</span></span><span style=display:flex><span>print(<span style=color:#a31515>&#34;CLOSE: </span><span style=color:#a31515>%g</span><span style=color:#a31515> seconds&#34;</span> % (result_time))
198</span></span></code></pre><p>You can download <a href=/assets/do-fuse/sqlite-benchmarks.tsv>raw result here</a>. And
199again, these results are done on a local block storage and do not represent
200capabilities of object storage. With my current approach and state of the test
201code these can not be done. I would need to make Python code much more robust
202and check locking etc.<div id=sqlite-benchmarks></div><script>
203(function(){
204 var request = new XMLHttpRequest();
205 request.open("GET", "/assets/do-fuse/sqlite-benchmarks.tsv", true);
206 request.onload = function() {
207 if (request.status >= 200 && request.status < 400) {
208 var payload = request.responseText.trim();
209 var tsv = payload.split("\n");
210 for (var i=0; i<tsv.length; i++) { tsv[i] = tsv[i].split("\t"); }
211 var traces = [];
212 var headers = tsv[0];
213 tsv.shift();
214 Array.prototype.forEach.call(headers, function(el, idx) {
215 var x = [];
216 var y = [];
217 for (var j=0; j<tsv.length; j++) {
218 x.push(j);
219 y.push(parseFloat(tsv[j][idx].replace(",", ".")));
220 }
221 traces.push({ x: x, y: y, type: "scatter", name: el, line: { width: 1, shape: "spline" } });
222 });
223 var sqlite = Plotly.newPlot("sqlite-benchmarks", traces, { legend: {"orientation": "h"}, height: 400, margin: { l: 50, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: "execution time in seconds", titlefont: { size: 12 } } });
224 } else { }
225 };
226 request.onerror = function() { };
227 request.send(null);
228})();
229</script><h2 id=can-storage-be-mounted-on-multiple-machines-at-the-same-time-and-be-writable>Can storage be mounted on multiple machines at the same time and be writable?</h2><p>Well, this one didn't take long to test. And the answer is <strong>YES</strong>. I mounted
230space on both machines and measured same performance on both machines. But
231because file is downloaded before write and then uploaded on complete there
232could potentially be problems is another process is trying to access the same
233file.<h2 id=observations-and-conslusion>Observations and conslusion</h2><p>Using Spaces in this way makes it easier to access and manage files. But besides
234that you would need to write additional code to make this one play nice with you
235applications.<p>Nevertheless, this was extremely simple to setup and use and this is just
236another excellent product in DigitalOcean product line. I found this exercise
237very valuable and am thinking about implementing some sort of mechanism for
238SQLite, so data can be stored on Spaces and accessed by many VM's. For a project
239where data doesn't need to be accessible in real-time and can have couple of
240minutes old data this would be very interesting. If any of you find this
241proposal interesting please write in a comment box below or shoot me an email
242and I will keep you posted.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
243<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
244with me
245<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
246the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
247otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/using-goaccess-with-nginx-to-replace-google-analytics.html b/public/using-goaccess-with-nginx-to-replace-google-analytics.html
deleted file mode 100755
index 9424885..0000000
--- a/public/using-goaccess-with-nginx-to-replace-google-analytics.html
+++ /dev/null
@@ -1,96 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Using GoAccess with Nginx to replace Google Analytics</title><meta name=description content="IntroductionI know!"><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Using GoAccess with Nginx to replace Google Analytics</h1><p>Jan 25, 2021<div><h2 id=introduction>Introduction</h2><p>I know! You cannot simply replace Google Analytics with parsing access logs and
7displaying a couple of charts. But to be honest, I actually never used Google
8Analytics to the fullest extent and was usually interested in seeing page hits
9and which pages were visited most often.<p>I recently moved my blog from Firebase to a VPS and also decided to remove
10Google Analytics tracking code from the site since its quite malicious and
11tracks users across other pages also and is creating a profile of a user, and
12I've had it. But I also need some insight of what is happening on a server and
13which content is being read the most etc.<p>I have looked at many existing solutions like:<ul><li><a href=https://umami.is/>Umami</a><li><a href=https://github.com/sheshbabu/freshlytics>Freshlytics</a><li><a href=https://matomo.org/>Matomo</a></ul><p>But the more I looked at them the more I noticed that I am replacing one evil
14with another one. Don't get me wrong. Some of these solutions are absolutely
15fantastic but would require installation of databases and something like PHP or
16Node. And I was not ready to put those things on my fresh server. Also having
17Docker installed is out of the question.<h2 id=opting-for-log-parsing>Opting for log parsing</h2><p>So, I defaulted to parsing already existing logs and generating HTML reports
18from this data.<p>I found this amazing software <a href=https://goaccess.io/>GoAccess</a> which provides
19all the functionalities I need, and it's a single binary. Written in Go.<p>GoAccess can be used in two different modes.<p><img src=/assets/goaccess/goaccess-dash-term.png alt="GoAccess Terminal"></p><center><i>Running in a terminal</i></center><p><img src=/assets/goaccess/goaccess-dash-html.png alt="GoAccess HTML"></p><center><i>Running in a browser</i></center><p>I, however, need this to run in a browser. So, the second option is the way to
20go. The Idea is to periodically run cronjob and export this report into a folder
21that gets then server by Nginx behind a Basic authentication.<h2 id=getting-nginx-ready>Getting Nginx ready</h2><p>I choose Ubuntu on <a href=https://www.digitalocean.com/>DigitalOcean</a>. First I
22installed <a href=https://nginx.org/en/>Nginx</a>, and
23<a href=https://letsencrypt.org/getting-started/>Letsencrypt</a> certbot and all the
24necessary dependencies.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># log in as root user</span>
25</span></span><span style=display:flex><span>sudo su -
26</span></span><span style=display:flex><span>
27</span></span><span style=display:flex><span><span style=color:green># first let&#39;s update the system</span>
28</span></span><span style=display:flex><span>apt update &amp;&amp; apt upgrade -y
29</span></span><span style=display:flex><span>
30</span></span><span style=display:flex><span><span style=color:green># let&#39;s install</span>
31</span></span><span style=display:flex><span>apt install nginx certbot python3-certbot-nginx apache2-utils
32</span></span></code></pre><p>After all this is installed we can create a new configuration for a statistics.
33Stats will be available at <code>stats.domain.com</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># creates directory where html will be hosted</span>
34</span></span><span style=display:flex><span>mkdir -p /var/www/html/stats.domain.com
35</span></span><span style=display:flex><span>
36</span></span><span style=display:flex><span>cp /etc/nginx/sites-available/default /etc/nginx/sites-available/stats.domain.com
37</span></span><span style=display:flex><span>nano /etc/nginx/sites-available/stats.domain.com
38</span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>server</span> {
39</span></span><span style=display:flex><span> <span style=color:#00f>root</span> <span style=color:#a31515>/var/www/html/stats.domain.com</span>;
40</span></span><span style=display:flex><span> <span style=color:#00f>server_name</span> <span style=color:#a31515>stats.domain.com</span>;
41</span></span><span style=display:flex><span>
42</span></span><span style=display:flex><span> <span style=color:#00f>index</span> <span style=color:#a31515>index.html</span>;
43</span></span><span style=display:flex><span> <span style=color:#00f>location</span> <span style=color:#a31515>/</span> {
44</span></span><span style=display:flex><span> <span style=color:#00f>try_files</span> $uri $uri/ =404;
45</span></span><span style=display:flex><span> }
46</span></span><span style=display:flex><span>}
47</span></span></code></pre><p>Now we check if the configuration is ok. We can do this with <code>nginx -t</code>. If all
48is ok, we can restart Nginx with <code>service nginx restart</code>.<p>After all that you should add A record for this domain that points to IP of a
49droplet.<p>Before enabling SSL you should test if DNS records have propagated with <code>curl stats.domain.com</code>.<p>Now, it's time to provision TLS certificate. To achieve this, you execute
50command <code>certbot --nginx</code>. Follow the wizard and when you are asked about
51redirection always choose 2 (always redirect to HTTPS).<p>When this is done you can visit <a href=https://stats.domain.com>https://stats.domain.com</a> and you should get 404
52not found error which is correct.<h2 id=getting-goaccess-ready>Getting GoAccess ready</h2><p>If you are using Debian like system GoAccess should be available in repository.
53Otherwise refer to the official website.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>apt install goaccess
54</span></span></code></pre><p>To enable Geo location we also need one additiona thing.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>cd /var/www/html/stats.stats.com
55</span></span><span style=display:flex><span>wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb
56</span></span></code></pre><p>Now we create a shell script that will be executed every 10 minutes.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>nano /var/www/html/stats.domain.com/generate-stats.sh
57</span></span></code></pre><p>Contents of this file should look like this.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#!/bin/sh
58</span></span></span><span style=display:flex><span><span style=color:#00f></span>
59</span></span><span style=display:flex><span>zcat -f /var/log/nginx/access.log* &gt; /var/log/nginx/access-all.log
60</span></span><span style=display:flex><span>
61</span></span><span style=display:flex><span>goaccess <span style=color:#a31515>\
62</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --log-file=/var/log/nginx/access-all.log <span style=color:#a31515>\
63</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --log-format=COMBINED <span style=color:#a31515>\
64</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --exclude-ip=0.0.0.0 <span style=color:#a31515>\
65</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --geoip-database=/var/www/html/stats.domain.com/GeoLite2-City.mmdb <span style=color:#a31515>\
66</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --ignore-crawlers <span style=color:#a31515>\
67</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --real-os <span style=color:#a31515>\
68</span></span></span><span style=display:flex><span><span style=color:#a31515></span> --output=/var/www/html/stats.domain.com/index.html
69</span></span><span style=display:flex><span>
70</span></span><span style=display:flex><span>rm /var/log/nginx/access-all.log
71</span></span></code></pre><p>Because after a while nginx creates multiple files with access logs we use
72<a href=https://linux.die.net/man/1/zcat><code>zcat</code></a> to extract Gziped contents and create
73a file that has all the access logs. After this file is used we delete it.<p>If you want to exclude your home IP's result look at the <code>--exclude-ip</code> option
74in script and instead of <code>0.0.0.0</code> add your own home IP address. You can find
75your home IP by executing <code>curl ifconfig.me</code> from your local machine and NOT
76from the droplet.<p>Test the script by executing <code>sh /var/www/html/stats.domain.com/generate-stats.sh</code> and then checking
77<code>https://stats.domain.com</code>. If you can see stats instead of 404 than you are
78set.<p>It's time to add this script to cron with <code>cron -e</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>*/10 * * * * sh /<span style=color:#00f>var</span>/www/html/stats.domain.com/generate-stats.sh
79</span></span></code></pre><h2 id=securing-with-basic-authentication>Securing with Basic authentication</h2><p>You probably don't want stats to be publicly available, so we should create a
80user and a password for Basic authentication.<p>First we create a password for a user <code>stats</code> with <code>htpasswd -c /etc/nginx/.htpasswd stats</code>.<p>Now we update config file with <code>nano /etc/nginx/sites-available/stats.domain.com</code>. You probably noticed that the
81file looks a bit different from before. This is because <code>certbot</code> added
82additional rules for SSL.<p>Your location portion the config file should now look like. You should add
83<code>auth_basic</code> and <code>auth_basic_user_file</code> lines to the file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>location</span> <span style=color:#a31515>/</span> {
84</span></span><span style=display:flex><span> <span style=color:#00f>try_files</span> $uri $uri/ =404;
85</span></span><span style=display:flex><span> <span style=color:#00f>auth_basic</span> <span style=color:#a31515>&#34;Private</span> <span style=color:#a31515>Property&#34;</span>;
86</span></span><span style=display:flex><span> <span style=color:#00f>auth_basic_user_file</span> <span style=color:#a31515>/etc/nginx/.htpasswd</span>;
87</span></span><span style=display:flex><span>}
88</span></span></code></pre><p>Test if config is still ok with <code>nginx -t</code> and if it is you can restart Nginx
89with <code>service nginx restart</code>.<p>If you now visit <code>https://stats.domain.com</code> you should be prompted for username
90and password. If not, try reopening your browser.<p>That is all. You now have analytics for your server that gets refreshed every 10
91minutes.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
92<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
93with me
94<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
95the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
96otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html b/public/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html
deleted file mode 100755
index 05907b6..0000000
--- a/public/using-sentiment-analysis-for-clickbait-detection-in-rss-feeds.html
+++ /dev/null
@@ -1,55 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Using sentiment analysis for clickbait detection in RSS feeds</title><meta name=description content="Initial thoughtsOne of the things that interested me for a while now is if major wellestablished news sites use click bait titles to drive additional traffic totheir sites and generate additional impressions."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Using sentiment analysis for clickbait detection in RSS feeds</h1><p>Oct 19, 2019<div><h2 id=initial-thoughts>Initial thoughts</h2><p>One of the things that interested me for a while now is if major well
7established news sites use click bait titles to drive additional traffic to
8their sites and generate additional impressions.<p>Goal is to see how article titles and actual content of article differ from each
9other and see if titles are clickbaited.<h2 id=preparing-and-cleaning-data>Preparing and cleaning data</h2><p>For this example I opted to just use RSS feed from a new website and decided to
10go with <a href=https://www.theguardian.com>The Guardian</a> World news. While this gets
11us limited data (~40) articles and also description (actual content) is trimmed
12this really doesn't reflect the actual article contents.<p>To get better content I could use web scraping and use RSS as link list and
13fetch contents directly from website, but for this simple example this will
14suffice.<p>There are couple of requirements we need to install before we continue:<ul><li><code>pip3 install feedparser</code> (parses RSS feed from url)<li><code>pip3 install vaderSentiment</code> (does sentiment polarity analysis)<li><code>pip3 install matplotlib</code> (plots chart of results)</ul><p>So first we need to fetch RSS data and sanitize HTML content from description.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> re
15</span></span><span style=display:flex><span><span style=color:#00f>import</span> feedparser
16</span></span><span style=display:flex><span>
17</span></span><span style=display:flex><span>feed_url = <span style=color:#a31515>&#34;https://www.theguardian.com/world/rss&#34;</span>
18</span></span><span style=display:flex><span>feed = feedparser.parse(feed_url)
19</span></span><span style=display:flex><span>
20</span></span><span style=display:flex><span><span style=color:green># sanitize html</span>
21</span></span><span style=display:flex><span><span style=color:#00f>for</span> item <span style=color:#00f>in</span> feed.entries:
22</span></span><span style=display:flex><span> item.description = re.sub(<span style=color:#a31515>&#39;&lt;[^&lt;]+?&gt;&#39;</span>, <span style=color:#a31515>&#39;&#39;</span>, item.description)
23</span></span></code></pre><h2 id=perform-sentiment-analysis>Perform sentiment analysis</h2><p>Since we now have cleaned up data in our <code>feed.entries</code> object we can start with
24performing sentiment analysis.<p>There are many sentiment analysis libraries available that range from rule-based
25sentiment analysis up to machine learning supported analysis. To keep things
26simple I decided to use rule-based analysis library
27<a href=https://github.com/cjhutto/vaderSentiment>vaderSentiment</a> from
28<a href=https://github.com/cjhutto>C.J. Hutto</a>. Really nice library and quite easy to
29use.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>from</span> vaderSentiment.vaderSentiment <span style=color:#00f>import</span> SentimentIntensityAnalyzer
30</span></span><span style=display:flex><span>analyser = SentimentIntensityAnalyzer()
31</span></span><span style=display:flex><span>
32</span></span><span style=display:flex><span>sentiment_results = []
33</span></span><span style=display:flex><span><span style=color:#00f>for</span> item <span style=color:#00f>in</span> feed.entries:
34</span></span><span style=display:flex><span> sentiment_title = analyser.polarity_scores(item.title)
35</span></span><span style=display:flex><span> sentiment_description = analyser.polarity_scores(item.description)
36</span></span><span style=display:flex><span> sentiment_results.append([sentiment_title[<span style=color:#a31515>&#39;compound&#39;</span>], sentiment_description[<span style=color:#a31515>&#39;compound&#39;</span>]])
37</span></span></code></pre><p>Now that we have this data in a shape that is compatible with matplotlib we can
38plot results to see the difference between title and description sentiment of an
39article.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> matplotlib.pyplot <span style=color:#00f>as</span> plt
40</span></span><span style=display:flex><span>
41</span></span><span style=display:flex><span>plt.rcParams[<span style=color:#a31515>&#39;figure.figsize&#39;</span>] = (15, 3)
42</span></span><span style=display:flex><span>plt.plot(sentiment_results, drawstyle=<span style=color:#a31515>&#39;steps&#39;</span>)
43</span></span><span style=display:flex><span>plt.title(<span style=color:#a31515>&#39;Sentiment analysis relationship between title and description (Guardian World News)&#39;</span>)
44</span></span><span style=display:flex><span>plt.legend([<span style=color:#a31515>&#39;title&#39;</span>, <span style=color:#a31515>&#39;description&#39;</span>])
45</span></span><span style=display:flex><span>plt.show()
46</span></span></code></pre><h2 id=results-and-assets>Results and assets</h2><ol><li>Because of the small sample size further conclusions are impossible to make.<li>Rule-based approach may not be the best way of doing this. By using deep
47learning we would be able to get better insights.<li><strong>Next step would be to</strong> periodically fetch RSS items and store them over a
48longer period of time and then perform analysis again and use either machine
49learning or deep learning on top of it.</ol><p><img src=/assets/sentiment-analysis/guardian-sa-title-desc-relationship.png alt="Relationship between title and description"><p>Figure above displays difference between title and description sentiment for
50specific RSS feed item. 1 means positive and -1 means negative sentiment.<p><a href=/assets/sentiment-analysis/sentiment-analysis.ipynb>» Download Jupyter Notebook</a><h2 id=going-further>Going further</h2><ul><li><a href=https://github.com/bswiss/news_mood>Twitter Sentiment Analysis by Bryan Schwierzke</a><li><a href=https://github.com/thisandagain/sentiment>AFINN-based sentiment analysis for Node.js by Andrew Sliwinski</a><li><a href=https://github.com/adeshpande3/LSTM-Sentiment-Analysis>Sentiment Analysis with LSTMs in Tensorflow by Adit Deshpande</a><li><a href=https://github.com/abdulfatir/twitter-sentiment-analysis>Sentiment analysis on tweets using Naive Bayes, SVM, CNN, LSTM, etc. by Abdul Fatir</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
51<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
52with me
53<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
54the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
55otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/wap-mobile-web-before-the-web.html b/public/wap-mobile-web-before-the-web.html
deleted file mode 100755
index 255e1ae..0000000
--- a/public/wap-mobile-web-before-the-web.html
+++ /dev/null
@@ -1,120 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Wireless Application Protocol and the mobile web before the web</title><meta name=description content="A little stroll down the history laneAbout two weeks ago, I watched this outstanding documentary on YouTubeSpringboard: the secret history of the first realsmartphone about the history ofsmartphones and phones in general."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Wireless Application Protocol and the mobile web before the web</h1><p>Dec 30, 2021<div><h2 id=a-little-stroll-down-the-history-lane>A little stroll down the history lane</h2><p>About two weeks ago, I watched this outstanding documentary on YouTube
7<a href="https://www.youtube.com/watch?v=b9_Vh9h3Ohw">Springboard: the secret history of the first real
8smartphone</a> about the history of
9smartphones and phones in general. It brought back so many memories. I never had
10an actual smartphone before the Android. The closest to smartphone was <a href=https://www.gsmarena.com/sony_ericsson_p1-1982.php>Sony
11Ericsson P1</a>. A fantastic
12phone and I broke it in Prague after a party and that was one of those rare
13occasions where I was actually mad at myself. But nevertheless, after that
14phone, the next one was an Android one.<p>Before that, I only owned normal phones from Nokia and Siemens etc. Nothing
15special, actually. These are the phones we are talking about. Before 2007.
16Apple and Android phones didn't exist yet.<p>These phones were rocking:<ul><li>No selfie cameras.<li>~2 inch displays.<li>~120 MHz beast CPU's.<li>144p main cameras.<li>But they had a headphone jack.</ul><p>Let's take a look at these beauties.<p><img src=/assets/wap/phones.gif alt="Old phones"><h2 id=wap---wireless-application-protocol>WAP - Wireless Application Protocol</h2><p>Not that one! We are talking about Wireless Application Protocol and not Cardi
17B's song 😃<p>WAP stands for Wireless Application Protocol. It is a protocol designed for
18micro-browsers, and it enables the access of internet in the mobile devices. It
19uses the mark-up language WML (Wireless Markup Language and not HTML), WML is
20defined as XML 1.0 application. Furthermore, it enables creating web
21applications for mobile devices. In 1998, WAP Forum was founded by Ericson,
22Motorola, Nokia and Unwired Planet whose aim was to standardize the various
23wireless technologies via protocols.
24<a href=https://www.geeksforgeeks.org/wireless-application-protocol/>(source)</a><p>WAP protocol was resulted by the joint efforts of the various members of WAP
25Forum. In 2002, WAP forum was merged with various other forums of the industry,
26resulting in the formation of Open Mobile Alliance (OMA).
27<a href=https://www.geeksforgeeks.org/wireless-application-protocol/>(source)</a><p>These were some wild times. Devices had tiny screens and data transmission rates
28were abominable. But they were capable of rendering WML (Wireless Markup
29Language). This was very similar to HTML, actually. It is a markup language,
30after all.<p>These pages could be served by <a href=https://apache.org/>Apache</a> and could be
31generated by CGI scripts on the backend. The only difference was the limited
32markup language.<h2 id=wml---wireless-markup-language>WML - Wireless Markup Language</h2><p>Just like web browsers use HTML for content structure, older mobile device
33browsers use WML - if you need to support really old mobile phones using WML
34browsers, you will need to know about it. WML is XML-based (an XML vocabulary
35just like XHTML and MathML, but not HTML) and does not use the same metaphor as
36HTML. HTML is a single document with some metadata packed away in the head, and
37a body encapsulating the visible page. With WML, the metaphor does not envisage
38a page, but rather a deck of cards. A WML file might have several pages or cards
39contained within it.
40<a href=https://www.w3.org/wiki/Introduction_to_mobile_web>(source)</a><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;?xml version=&#34;1.0&#34;?&gt;</span>
41</span></span><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE wml PUBLIC &#34;-//WAPFORUM//DTD WML 1.1//EN&#34; &#34;http://www.wapforum.org/DTD/wml_1.1.xml&#34;&gt;</span>
42</span></span><span style=display:flex><span>&lt;wml&gt;
43</span></span><span style=display:flex><span> &lt;card id=<span style=color:#a31515>&#34;home&#34;</span> title=<span style=color:#a31515>&#34;Example Homepage&#34;</span>&gt;
44</span></span><span style=display:flex><span> &lt;p&gt;Welcome to the Example homepage&lt;/p&gt;
45</span></span><span style=display:flex><span> &lt;/card&gt;
46</span></span><span style=display:flex><span>&lt;/wml&gt;
47</span></span></code></pre><p>There is an amazing tutorial on <a href=https://www.tutorialspoint.com/wml/index.htm>Tutorialpoint about
48WML</a>.<h2 id=converting-digg-to-wml>Converting Digg to WML</h2><p>This task is completely useless and not really feasible nowadays, but I had to
49give it a try for old-time sake. Since the data is already there in a form of
50RSS feed, I could take this feed and parse it and create a WML version of the
51homepage.<p>We will need:<ul><li>Python3 + Pip<li>ImageMagick<li>feedparser and mako templating</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># for fedora 35</span>
52</span></span><span style=display:flex><span>sudo dnf install ImageMagick python3-pip
53</span></span><span style=display:flex><span>
54</span></span><span style=display:flex><span><span style=color:green># tempalting engine for python</span>
55</span></span><span style=display:flex><span>pip install mako --user
56</span></span><span style=display:flex><span>
57</span></span><span style=display:flex><span><span style=color:green># for parsing rss feeds</span>
58</span></span><span style=display:flex><span>pip install feedparser --user
59</span></span></code></pre><p>Project folder structure should look like the following.<pre><code>12:43:53 m@khan wap → tree -L 1
60.
61├── generate.py
62└── template.wml
63
64</code></pre><p>After that, I created a small template for the homepage.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;?xml version=&#34;1.0&#34;?&gt;</span>
65</span></span><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE wml PUBLIC &#34;-//WAPFORUM//DTD WML 1.2//EN&#34; &#34;http://www.wapforum.org/DTD/wml_1.2.xml&#34;&gt;</span>
66</span></span><span style=display:flex><span>
67</span></span><span style=display:flex><span>&lt;wml&gt;
68</span></span><span style=display:flex><span>
69</span></span><span style=display:flex><span> &lt;card title=<span style=color:#a31515>&#34;Digg - What the Internet is talking about right now&#34;</span>&gt;
70</span></span><span style=display:flex><span>
71</span></span><span style=display:flex><span> % for item in entries:
72</span></span><span style=display:flex><span> &lt;p&gt;&lt;img src=<span style=color:#a31515>&#34;/images/${item.id}.jpg&#34;</span> width=<span style=color:#a31515>&#34;175&#34;</span> height=<span style=color:#a31515>&#34;95&#34;</span> alt=<span style=color:#a31515>&#34;${item.title}&#34;</span> /&gt;&lt;/p&gt;
73</span></span><span style=display:flex><span> &lt;p&gt;&lt;small&gt;${item.kicker}&lt;/small&gt;&lt;/p&gt;
74</span></span><span style=display:flex><span> &lt;p&gt;&lt;big&gt;&lt;b&gt;${item.title}&lt;/b&gt;&lt;/big&gt;&lt;/p&gt;
75</span></span><span style=display:flex><span> &lt;p&gt;${item.description}&lt;/p&gt;
76</span></span><span style=display:flex><span> % endfor
77</span></span><span style=display:flex><span>
78</span></span><span style=display:flex><span> &lt;/card&gt;
79</span></span><span style=display:flex><span>
80</span></span><span style=display:flex><span>&lt;/wml&gt;
81</span></span></code></pre><p>And the parser that parses RSS feed looks like this.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> os
82</span></span><span style=display:flex><span><span style=color:#00f>import</span> feedparser
83</span></span><span style=display:flex><span><span style=color:#00f>from</span> mako.template <span style=color:#00f>import</span> Template
84</span></span><span style=display:flex><span>
85</span></span><span style=display:flex><span>os.system(<span style=color:#a31515>&#39;mkdir -p www/images&#39;</span>)
86</span></span><span style=display:flex><span>
87</span></span><span style=display:flex><span>template = Template(filename=<span style=color:#a31515>&#39;template.wml&#39;</span>)
88</span></span><span style=display:flex><span>
89</span></span><span style=display:flex><span>feed = feedparser.parse(<span style=color:#a31515>&#39;https://digg.com/rss/top.xml&#39;</span>)
90</span></span><span style=display:flex><span>
91</span></span><span style=display:flex><span>entries = feed.entries[:15]
92</span></span><span style=display:flex><span>
93</span></span><span style=display:flex><span><span style=color:#00f>for</span> entry <span style=color:#00f>in</span> entries:
94</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#39;Processing image with id </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#39;</span>.format(entry.id))
95</span></span><span style=display:flex><span> os.system(<span style=color:#a31515>&#39;wget -q -O www/images/</span><span style=color:#a31515>{}</span><span style=color:#a31515>.jpg &#34;</span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;&#39;</span>.format(entry.id, entry.links[1].href))
96</span></span><span style=display:flex><span> os.system(<span style=color:#a31515>&#39;convert www/images/</span><span style=color:#a31515>{}</span><span style=color:#a31515>.jpg -type Grayscale -resize 175x -depth 3 -quality 30 www/images/</span><span style=color:#a31515>{}</span><span style=color:#a31515>.jpg&#39;</span>.format(entry.id, entry.id))
97</span></span><span style=display:flex><span>
98</span></span><span style=display:flex><span>html = template.render(entries = entries)
99</span></span><span style=display:flex><span>
100</span></span><span style=display:flex><span><span style=color:#00f>with</span> open(<span style=color:#a31515>&#39;www/index.wml&#39;</span>, <span style=color:#a31515>&#39;w+&#39;</span>) <span style=color:#00f>as</span> fp:
101</span></span><span style=display:flex><span> fp.write(html)
102</span></span></code></pre><p>This script will create a folder <code>www</code> and in the folder <code>www/images</code> for
103storing resized images.<blockquote><p>Be sure you don't use SSL and use just normal HTTP for serving the content.
104These old phones will have problems with TLS 1.3 etc.</blockquote><p>If you look at the python file, I convert all the images into tiny B&amp;W images.
105They should be WBMP (Wireless BitMaP) but I choose JPEGs for this, and it seems
106to work properly.<p>Because I currently don't have a phone old enough to test it on, I used an
107emulator. And it was really hard to find one. I found <a href=http://wap-proof.sharewarejunction.com/>WAP
108Proof</a> on shareware junction, and it
109did the job well enough. I will try to find and actual device to test it on.<p><video src=/assets/wap/emulator.mp4 controls></video><p>If you are using Nginx to serve the contents, add a directive to the hosts file
110that will automatically server <code>index.wml</code> file.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>server</span> {
111</span></span><span style=display:flex><span> <span style=color:#00f>index</span> <span style=color:#a31515>index.wml</span> <span style=color:#a31515>index.html</span> <span style=color:#a31515>index.htm</span> <span style=color:#a31515>index.nginx-debian.html</span>;
112</span></span><span style=display:flex><span>}
113</span></span></code></pre><h2 id=conclusion>Conclusion</h2><p>Well, this was pointless, but very fun! I hope you enjoyed it as much as I did.
114I will try to find an old phone to test it on. If you have any questions, feel
115free to ask in the comments.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
116<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
117with me
118<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
119the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
120otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/what-i-ve-learned-developing-ad-server.html b/public/what-i-ve-learned-developing-ad-server.html
deleted file mode 100755
index 44e8d61..0000000
--- a/public/what-i-ve-learned-developing-ad-server.html
+++ /dev/null
@@ -1,126 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>What I've learned developing ad server</title><meta name=description content="For the past year and half I have been developing native advertising server thatcontextually matches ads and displays them in different template forms onvariety of websites."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>What I've learned developing ad server</h1><p>Apr 17, 2017<div><p>For the past year and half I have been developing native advertising server that
7contextually matches ads and displays them in different template forms on
8variety of websites. This project grew from serving thousands of ads per day to
9millions.<p>The system is made from couple of core components:<ul><li>API for serving ads,<li>Utils - cronjobs and queue management tools,<li>Dashboard UI.</ul><p>Initial release was using <a href=https://www.mongodb.com/>MongoDB</a> for full-text
10search but was later replaced by <a href=https://www.elastic.co/>Elasticsearch</a> for
11better CPU utilization and better search performance. This provided us with many
12amazing functionalities of <a href=https://www.elastic.co/>Elasticsearch</a>. You should
13check it out if you do any search related operations.<p>Because the premise of the server is to provide native ad experience, they are
14rendered on the client side via simple templating engine. This ensures that ads
15can be displayed number of different ways based on the visual style of the
16page. And this makes JavaScript client library quite complex.<p>So now that you know basic information about the product lets get into the
17lessons we learned.<h2 id=aggregate-everything>Aggregate everything</h2><p>After beta version was released everything (impressions, clicks, etc) was
18written in nanosecond resolution in the database. At that time we were using
19<a href=https://www.postgresql.org/>PostgreSQL</a> and database quickly grew way above
20200GB in disk space. And that was problematic. Statistics took disturbingly long
21time to aggregate. Also using indexes on stats table in database was no help
22after we reached 500 million datapoints.<blockquote><p>There is a marketing product information and there is real life experience.
23And the tend to be quite the opposite.</blockquote><p>This was the reason that now everything is aggregated on daily basis and this
24data is then fed to Elastic in form of daily summary. With this we achieved we
25can now track many more dimensions such as zone, channel and platform
26information. And with this information we can now adapt occurrences of ads on
27specific places more precisely.<p>We have also adapted <a href=https://redis.io/>Redis</a> as a full-time citizen in our
28stack. Because Redis also stores information on a local disk we have some sort
29of backup if server would accidentally suffer some failure.<p>All the real-time statistics for ad serving and redirecting is presented as
30counters in Redis instance and daily extracted and pushed to Elastic.<h2 id=measure-everything>Measure everything</h2><p>The thing about software is that we really don't know how well it is performing
31under load until such load is presented. When testing locally everything is fine
32but when on production things tend to fall apart.<p>As a solution for this we are measuring everything we can. Function execution
33time (by encapsulating functions with timers), server performance (cpu, memory,
34disk, etc), Nginx and <a href=https://uwsgi-docs.readthedocs.io/>uWSGI</a> performance.
35We sacrifice a bit of performance for the sake of this information. And we store
36all this information for later analysis.<p><strong>Example of function execution time</strong><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{
37</span></span><span style=display:flex><span> &#34;get_final_filtered_ads&#34;: {
38</span></span><span style=display:flex><span> &#34;counter&#34;: 1931250,
39</span></span><span style=display:flex><span> &#34;avg&#34;: 0.0066143431,
40</span></span><span style=display:flex><span> &#34;elapsed&#34;: 12773.9500310003
41</span></span><span style=display:flex><span> },
42</span></span><span style=display:flex><span> &#34;store_keywords_statistics&#34;: {
43</span></span><span style=display:flex><span> &#34;counter&#34;: 1931011,
44</span></span><span style=display:flex><span> &#34;avg&#34;: 0.0004605267,
45</span></span><span style=display:flex><span> &#34;elapsed&#34;: 889.2821669996
46</span></span><span style=display:flex><span> },
47</span></span><span style=display:flex><span> &#34;match_by_context&#34;: {
48</span></span><span style=display:flex><span> &#34;counter&#34;: 1931011,
49</span></span><span style=display:flex><span> &#34;avg&#34;: 0.0055960716,
50</span></span><span style=display:flex><span> &#34;elapsed&#34;: 10806.0758889999
51</span></span><span style=display:flex><span> },
52</span></span><span style=display:flex><span> &#34;match_by_high_performance&#34;: {
53</span></span><span style=display:flex><span> &#34;counter&#34;: 262,
54</span></span><span style=display:flex><span> &#34;avg&#34;: 0.0152770229,
55</span></span><span style=display:flex><span> &#34;elapsed&#34;: 4.00258
56</span></span><span style=display:flex><span> },
57</span></span><span style=display:flex><span> &#34;store_impression_stats&#34;: {
58</span></span><span style=display:flex><span> &#34;counter&#34;: 1931250,
59</span></span><span style=display:flex><span> &#34;avg&#34;: 0.0006189991,
60</span></span><span style=display:flex><span> &#34;elapsed&#34;: 1195.4419869999
61</span></span><span style=display:flex><span> }
62</span></span><span style=display:flex><span>}
63</span></span></code></pre><p>We have also started profiling with <a href=https://pymotw.com/2/profile/>cProfile</a>
64and then visualizing with <a href=http://kcachegrind.sourceforge.net/>KCachegrind</a>.
65This provides much more detailed look into code execution.<h2 id=cache-control-is-your-friend>Cache control is your friend</h2><p>Because we use Javascript library for rendering ads we rely on this script
66extensively and when in need we need to be able to change behavior of the script
67quickly.<p>In our case we can not simply replace javascript url in html code. It usually
68takes a day or two for the guys who maintain sites to change code or add
69?ver=xxx attribute. And this makes rapid deployment and testing very difficult
70and time consuming. There is a limitation of how much you can test locally.<p>We are now in the process of integrating <a href=https://www.google.com/analytics/tag-manager/>Google Tag
71Manager</a> but couple of websites
72are developed on ASP.net platform that have some problems with tag manager. With
73a solution below we are certain that we are serving latest version of the
74script.<p>And it only takes one mistake and users have the script cached and in case of
75caching it for 1 year you probably know where the problem is.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># nginx ➜ /etc/nginx/sites-available/default
76</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#00f>location</span> <span style=color:#a31515>/static/</span> {
77</span></span><span style=display:flex><span> <span style=color:#00f>alias</span> <span style=color:#a31515>/path-to-static-content/</span>;
78</span></span><span style=display:flex><span> <span style=color:#00f>autoindex</span> off;
79</span></span><span style=display:flex><span> <span style=color:#00f>charset</span> <span style=color:#a31515>utf-8</span>;
80</span></span><span style=display:flex><span> <span style=color:#00f>gzip</span> on;
81</span></span><span style=display:flex><span> <span style=color:#00f>gzip_types</span> <span style=color:#a31515>text/plain</span> <span style=color:#a31515>application/javascript</span> <span style=color:#a31515>application/x-javascript</span> <span style=color:#a31515>text/javascript</span> <span style=color:#a31515>text/xml</span> <span style=color:#a31515>text/css</span>;
82</span></span><span style=display:flex><span> <span style=color:#00f>location</span> ~<span style=color:#a31515>*</span> <span style=color:#a31515>\.(ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)</span>$ {
83</span></span><span style=display:flex><span> <span style=color:#00f>expires</span> <span style=color:#a31515>1y</span>;
84</span></span><span style=display:flex><span> <span style=color:#00f>add_header</span> <span style=color:#a31515>Pragma</span> <span style=color:#a31515>public</span>;
85</span></span><span style=display:flex><span> <span style=color:#00f>add_header</span> <span style=color:#a31515>Cache-Control</span> <span style=color:#a31515>&#34;public&#34;</span>;
86</span></span><span style=display:flex><span> }
87</span></span><span style=display:flex><span> <span style=color:#00f>location</span> ~<span style=color:#a31515>*</span> <span style=color:#a31515>\.(css|js|txt)</span>$ {
88</span></span><span style=display:flex><span> <span style=color:#00f>expires</span> <span style=color:#a31515>3600s</span>;
89</span></span><span style=display:flex><span> <span style=color:#00f>add_header</span> <span style=color:#a31515>Pragma</span> <span style=color:#a31515>public</span>;
90</span></span><span style=display:flex><span> <span style=color:#00f>add_header</span> <span style=color:#a31515>Cache-Control</span> <span style=color:#a31515>&#34;public,</span> <span style=color:#a31515>must-revalidate&#34;</span>;
91</span></span><span style=display:flex><span> }
92</span></span><span style=display:flex><span>}
93</span></span></code></pre><p>Also be careful when redirecting to url in your python code. We noticed that if
94we didn't precisely setup cache control and expire headers in response we didn't
95get the request on the server and therefore couldn't measure clicks. So when
96redirecting do as follows and there will be no problems.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># python ➜ bottlepy web micro-framework</span>
97</span></span><span style=display:flex><span>response = bottle.HTTPResponse(status=302)
98</span></span><span style=display:flex><span>response.set_header(<span style=color:#a31515>&#34;Cache-Control&#34;</span>, <span style=color:#a31515>&#34;no-store, no-cache, must-revalidate&#34;</span>)
99</span></span><span style=display:flex><span>response.set_header(<span style=color:#a31515>&#34;Expires&#34;</span>, <span style=color:#a31515>&#34;Thu, 01 Jan 1970 00:00:00 GMT&#34;</span>)
100</span></span><span style=display:flex><span>response.set_header(<span style=color:#a31515>&#34;Location&#34;</span>, url)
101</span></span><span style=display:flex><span><span style=color:#00f>return</span> response
102</span></span></code></pre><blockquote><p>Cache control in browsers is quite aggressive and you need to be precise to
103avoid future problems. We learned that lesson the hard way.</blockquote><h2 id=learn-nginx>Learn NGINX</h2><p>When deciding on a web server we went with Nginx as a reverse proxy for our
104applications. We adapted micro-service oriented architecture early in the
105project to ensure when we scale we can easily add additional servers to our
106cluster. And Nginx was crucial to perform load balancing and static content
107delivery.<p>At first our config file was quite simple and later grew larger. After patching
108and adding new settings I sat down and learned more about the guts of Nginx.
109This proved to be very useful and we were able to squeeze much more out of our
110setup. So I advise you to take your time and read through the
111<a href=https://nginx.org/en/docs/>documentation</a>. This saved us a lot of headache.
112Googling for solutions only goes so far.<h2 id=use-redismemcached>Use Redis/Memcached</h2><p>As explained above we are using caching basically for everything. It is the
113corner stone of our services. At first we were very careful about the quantity
114of things we stored in <a href=https://redis.io/>Redis</a>. But we later found out that
115the memory footprint is very low even when storing large amount of data in it.<p>So we gradually increased our usage to caching whole HTML outputs of dashboard.
116This improved our performance in order of magnitude. And by using native TTL
117support this goes hand in hand with our needs.<p>The reason why we choose <a href=https://redis.io/>Redis</a> over
118<a href=https://memcached.org/>Memcached</a> was the nature of scalability of Redis out
119of the box. But all this can be achieved with Memcached.<h2 id=conclusion>Conclusion</h2><p>There are a lot more details that could have been written and every single topic
120in here deserves it's own post but you probably got the idea about the problems
121we faced.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
122<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
123with me
124<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
125the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
126otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/what-would-dna-sound-if-synthesized.html b/public/what-would-dna-sound-if-synthesized.html
deleted file mode 100755
index 17209a7..0000000
--- a/public/what-would-dna-sound-if-synthesized.html
+++ /dev/null
@@ -1,204 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>What would DNA sound if synthesized to an audio file</title><meta name=description content="IntroductionLately, I have been thinking a lot about the nature of life, what are thefoundation blocks of life and things like that."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>What would DNA sound if synthesized to an audio file</h1><p>Jul 5, 2022<div><h2 id=introduction>Introduction</h2><p>Lately, I have been thinking a lot about the nature of life, what are the
7foundation blocks of life and things like that. It's remarkable how complex and
8on the other hand simple the creation is when you look at it. The miracle of
9life keeps us grounded when our imagination goes wild. If the DNA are the blocks
10of life, you could consider them to be an API nature provided us to better
11understand all of this chaos masquerading as order.<p>I have been reading a lot about superintelligence and our somehow misguided path
12to create general artificial intelligence. What would the building blocks or our
13creation look like? Is the compression really the ultimate storage of
14information? Will our creation also ponder this questions when creating new
15worlds for themselves, or will we just disappear into the vastness of
16possibilities? It is a little offensive that we are playing God whilst being
17completely ignorant of our own reality. Who knows! Like many other
18breakthroughs, this one will also come at a cost not known to us when it finally
19happens.<p>To keep things a bit lighter, I decided to convert some popular DNA sequences
20into an audio files for us to listen to. I am not the first one, nor I will be
21the last one to do this. But it is an interesting exercise in better
22understanding the relationship between art and science. Maybe listening to DNA
23instead of parsing it will find a way into better understanding, or at least
24enjoying the creation and cryptic nature of life.<h2 id=dna-encoding-and-primer-example>DNA encoding and primer example</h2><p>I have been exploring DNA in the past in my post from about 3 years ago in
25<a href=/encoding-binary-data-into-dna-sequence.html>Encoding binary data into DNA
26sequence</a> where I have been
27converting all sorts of data into DNA sequences.<p>This will be a similar exercise but instead of converting to DNA, I will be
28generating tones from Nucleotides.<table><thead><tr><th>Nucleotides<th>Note<th>Frequency<tbody><tr><td><strong>A</strong> (Adenine)<td>A<td>440 Hz<tr><td><strong>C</strong> (Cytosine)<td>C<td>783.99 Hz<tr><td><strong>G</strong> (Guanine)<td>G<td>523.25 Hz<tr><td><strong>T</strong> (Thymine)<td>D<td>587.33 Hz</table><p>Since we do not have T in equal-tempered scale, I choose D to represent T note.<p>You can check <a href=https://pages.mtu.edu/~suits/notefreqs.html>Frequencies for equal-tempered scale, A4 = 440
29Hz</a>. For this tuning, we also
30choose <code>Speed of Sound = 345 m/s = 1130 ft/s = 770 miles/hr</code>.<p>Now that we have this out of the way, we can also brush up on the DNA sequencing
31a bit. This is a famous quote I also used for the encoding tests, and it goes
32like this.<blockquote><p>How wonderful that we have met with a paradox. Now we have some hope of
33making progress.
34― Niels Bohr</blockquote><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>&gt;SEQ1
35</span></span><span style=display:flex><span>GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA
36</span></span><span style=display:flex><span>GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA
37</span></span><span style=display:flex><span>ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA
38</span></span><span style=display:flex><span>ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT
39</span></span><span style=display:flex><span>GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT
40</span></span><span style=display:flex><span>GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC
41</span></span><span style=display:flex><span>AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC
42</span></span><span style=display:flex><span>AACC
43</span></span></code></pre><p>This is what we gonna work with to get things rolling forward, when creating
44parser and waveform generator.<h2 id=parsing-dna-data>Parsing DNA data</h2><p>This step is rather simple one. All we need to do is parse input DNA sequence in
45<a href=https://en.wikipedia.org/wiki/FASTA_format>FASTA format</a> well known in
46<a href=https://en.wikipedia.org/wiki/Bioinformatics>Bioinformatics</a> to extract single
47Nucleotides that will be converted into separate tones based on equal-tempered
48scale explained above.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>nucleotide_tone_map = {
49</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;A&#39;</span>: 440,
50</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;C&#39;</span>: 523.25,
51</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;G&#39;</span>: 783.99,
52</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;T&#39;</span>: 587.33, <span style=color:green># converted to D</span>
53</span></span><span style=display:flex><span>}
54</span></span><span style=display:flex><span>
55</span></span><span style=display:flex><span><span style=color:#00f>def</span> split(word):
56</span></span><span style=display:flex><span> <span style=color:#00f>return</span> [char <span style=color:#00f>for</span> char <span style=color:#00f>in</span> word]
57</span></span><span style=display:flex><span>
58</span></span><span style=display:flex><span><span style=color:#00f>def</span> generate_from_dna_sequence(sequence):
59</span></span><span style=display:flex><span> <span style=color:#00f>for</span> nucleotide <span style=color:#00f>in</span> split(sequence):
60</span></span><span style=display:flex><span> print(nucleotide, nucleotide_tone_map[nucleotide])
61</span></span></code></pre><h2 id=generating-sine-wave>Generating sine wave</h2><p>Because we are essentially creating a long stream of notes we will be appending
62sine notes to a global array we will later use for creating a WAV file out of
63it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> math
64</span></span><span style=display:flex><span>
65</span></span><span style=display:flex><span><span style=color:#00f>def</span> append_sinewave(freq=440.0, duration_milliseconds=500, volume=1.0):
66</span></span><span style=display:flex><span> <span style=color:#00f>global</span> audio
67</span></span><span style=display:flex><span>
68</span></span><span style=display:flex><span> num_samples = duration_milliseconds * (sample_rate / 1000.0)
69</span></span><span style=display:flex><span>
70</span></span><span style=display:flex><span> <span style=color:#00f>for</span> x <span style=color:#00f>in</span> range(int(num_samples)):
71</span></span><span style=display:flex><span> audio.append(volume * math.sin(2 * math.pi * freq * (x / sample_rate)))
72</span></span><span style=display:flex><span>
73</span></span><span style=display:flex><span> <span style=color:#00f>return</span>
74</span></span></code></pre><p>The sine wave generated here is the standard beep. If you want something more
75aggressive, you could try a square or saw tooth waveform.<h2 id=generating-a-wav-file-from-accumulated-sine-waves>Generating a WAV file from accumulated sine waves</h2><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> wave
76</span></span><span style=display:flex><span><span style=color:#00f>import</span> struct
77</span></span><span style=display:flex><span>
78</span></span><span style=display:flex><span><span style=color:#00f>def</span> save_wav(file_name):
79</span></span><span style=display:flex><span> wav_file = wave.open(file_name, <span style=color:#a31515>&#39;w&#39;</span>)
80</span></span><span style=display:flex><span> nchannels = 1
81</span></span><span style=display:flex><span> sampwidth = 2
82</span></span><span style=display:flex><span>
83</span></span><span style=display:flex><span> nframes = len(audio)
84</span></span><span style=display:flex><span> comptype = <span style=color:#a31515>&#39;NONE&#39;</span>
85</span></span><span style=display:flex><span> compname = <span style=color:#a31515>&#39;not compressed&#39;</span>
86</span></span><span style=display:flex><span> wav_file.setparams((nchannels, sampwidth, sample_rate, nframes, comptype, compname))
87</span></span><span style=display:flex><span>
88</span></span><span style=display:flex><span> <span style=color:#00f>for</span> sample <span style=color:#00f>in</span> audio:
89</span></span><span style=display:flex><span> wav_file.writeframes(struct.pack(<span style=color:#a31515>&#39;h&#39;</span>, int(sample * 32767.0)))
90</span></span><span style=display:flex><span>
91</span></span><span style=display:flex><span> wav_file.close()
92</span></span></code></pre><p>44100 is the industry standard sample rate - CD quality. If you need to save on
93file size, you can adjust it downwards. The standard for low quality is, 8000 or
948kHz.<p>WAV files here are using short, 16 bit, signed integers for the sample size.
95So, we multiply the floating-point data we have by 32767, the maximum value for
96a short integer.<blockquote><p>It is theoretically possible to use the floating point -1.0 to 1.0 data
97directly in a WAV file, but not obvious how to do that using the wave module
98in Python.</blockquote><h2 id=generating-spectograms>Generating Spectograms</h2><p>I have tried two methods of doing this and both were just fine. I however opted
99out to use the <a href=https://linux.die.net/man/1/sox>SoX - Sound eXchange, the Swiss Army knife of audio
100manipulation</a> one because it didn't require
101anything else.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sox output.wav -n spectrogram -o spectrogram.png
102</span></span></code></pre><p>An example spectrogram of Ludwig van Beethoven Symphony No. 6 First movement.</p><audio controls><source src=/assets/dna-synthesized/symphony-no6-1st-movement.mp3 type=audio/mpeg></audio><p><img src=/assets/dna-synthesized/symphony-no6-1st-movement.png alt="Ludwig van Beethoven Symphony No. 6 First movement"><p>The other option could also be in combination with
103<a href=http://www.gnuplot.info/>gnuplot</a>. This would require an intermediary step,
104however.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sox output.wav audio.dat
105</span></span><span style=display:flex><span>tail -n+3 audio.dat &gt; audio_only.dat
106</span></span><span style=display:flex><span>gnuplot audio.gpi
107</span></span></code></pre><p>And input file <code>audio.gpi</code> that would be passed to gnuplot looks something like
108this.<pre><code># set output format and size
109set term png size 1000,280
110
111# set output file
112set output &quot;audio.png&quot;
113
114# set y range
115set yr [-1:1]
116
117# we want just the data
118unset key
119unset tics
120unset border
121set lmargin 0
122set rmargin 0
123set tmargin 0
124set bmargin 0
125
126# draw rectangle to change background color
127set obj 1 rectangle behind from screen 0,0 to screen 1,1
128set obj 1 fillstyle solid 1.0 fillcolor rgbcolor &quot;#ffffff&quot;
129
130# draw data with foreground color
131plot &quot;audio_only.dat&quot; with lines lt rgb 'red'
132</code></pre><h2 id=pre-generated-sequences>Pre-generated sequences</h2><p>What I did was take interesting parts from an animal's genome and feed it to a
133tone generator script. This then generated a WAV file and I converted those to
134MP3, so they can be played in a browser. The last step was creating a
135spectrogram based on a WAV file.<h3 id=niels-bohr-quote>Niels Bohr quote</h3><audio controls><source src=/assets/dna-synthesized/quote/out.mp3 type=audio/mpeg></audio><p><img src=/assets/dna-synthesized/quote/spectogram.png alt=Spectogram><h3 id=mouse>Mouse</h3><p>This is part of a mouse genome <code>Mus_musculus.GRCm39.dna.nonchromosomal</code>. You
136can get <a href=http://ftp.ensembl.org/pub/release-106/fasta/mus_musculus/dna/>genom data
137here</a>.</p><audio controls><source src=/assets/dna-synthesized/mouse/out.mp3 type=audio/mpeg></audio><p><img src=/assets/dna-synthesized/mouse/spectogram.png alt=Spectogram><h3 id=bison>Bison</h3><p>This is part of a bison genome <code>Bison_bison_bison.Bison_UMD1.0.cdna</code>. You can
138get <a href=http://ftp.ensembl.org/pub/release-106/fasta/bison_bison_bison/cdna/>genom data
139here</a>.</p><audio controls><source src=/assets/dna-synthesized/bison/out.mp3 type=audio/mpeg></audio><p><img src=/assets/dna-synthesized/bison/spectogram.png alt=Spectogram><h3 id=taurus>Taurus</h3><p>This is part of a taurus genome <code>Bos_taurus.ARS-UCD1.2.cdna</code>. You can get
140<a href=http://ftp.ensembl.org/pub/release-106/fasta/bos_taurus/cdna/>genom data
141here</a>.</p><audio controls><source src=/assets/dna-synthesized/taurus/out.mp3 type=audio/mpeg></audio><p><img src=/assets/dna-synthesized/taurus/spectogram.png alt=Spectogram><h2 id=making-a-drummer-out-of-a-dna-sequence>Making a drummer out of a DNA sequence</h2><p>To make things even more interesting, I decided to send this data via MIDI to my
142<a href=https://www.elektron.se/en/model-samples>Elektron Model:Samples</a>. This is a
143really cool piece of equipment that supports MIDI in via USB and 3.5 mm audio
144jack.<p>Elektron is connected to my MacBook via USB cable and audio out is patched to a
145Sony Bluetooth speaker I have that supports 3.5 mm audio in. Elektron doesn't
146have internal speakers.<p><img src=/assets/dna-synthesized/elektron/IMG_0619.jpg alt><p><img src=/assets/dna-synthesized/elektron/IMG_0620.jpg alt><p><img src=/assets/dna-synthesized/elektron/IMG_0622.jpg alt><p>For communicating with Elektron, I choose <code>pygame</code> Python module that has MIDI
147built in. With this, it was rather simple to send notes to the device. All I did
148was map MIDI notes to the actual Nucleotides.<p>Before all of this I also checked Audio MIDI Setup app under MacOS and checked
149MIDI Studio by pressing ⌘-2.<p><img src=/assets/dna-synthesized/elektron/midi-studio.jpg alt><p>The whole script that parses and send notes to the Elektron looks like this.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>import</span> pygame.midi
150</span></span><span style=display:flex><span><span style=color:#00f>import</span> time
151</span></span><span style=display:flex><span>
152</span></span><span style=display:flex><span>pygame.midi.init()
153</span></span><span style=display:flex><span>
154</span></span><span style=display:flex><span>print(pygame.midi.get_default_output_id())
155</span></span><span style=display:flex><span>print(pygame.midi.get_device_info(0))
156</span></span><span style=display:flex><span>
157</span></span><span style=display:flex><span>player = pygame.midi.Output(1)
158</span></span><span style=display:flex><span>player.set_instrument(2)
159</span></span><span style=display:flex><span>
160</span></span><span style=display:flex><span><span style=color:#00f>def</span> send_note(note, velocity):
161</span></span><span style=display:flex><span> <span style=color:#00f>global</span> player
162</span></span><span style=display:flex><span> player.note_on(note, velocity)
163</span></span><span style=display:flex><span> time.sleep(0.3)
164</span></span><span style=display:flex><span> player.note_off(note, velocity)
165</span></span><span style=display:flex><span>
166</span></span><span style=display:flex><span>
167</span></span><span style=display:flex><span>nucleotide_midi_map = {
168</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;A&#39;</span>: 60,
169</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;C&#39;</span>: 90,
170</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;G&#39;</span>: 160,
171</span></span><span style=display:flex><span> <span style=color:#a31515>&#39;T&#39;</span>: 180, <span style=color:green># is D</span>
172</span></span><span style=display:flex><span>}
173</span></span><span style=display:flex><span>
174</span></span><span style=display:flex><span><span style=color:#00f>with</span> open(<span style=color:#a31515>&#34;quote.fa&#34;</span>) <span style=color:#00f>as</span> f:
175</span></span><span style=display:flex><span> sequence = f.read().replace(<span style=color:#a31515>&#39;</span><span style=color:#a31515>\n</span><span style=color:#a31515>&#39;</span>, <span style=color:#a31515>&#39;&#39;</span>)
176</span></span><span style=display:flex><span>
177</span></span><span style=display:flex><span><span style=color:#00f>for</span> nucleotide <span style=color:#00f>in</span> [char <span style=color:#00f>for</span> char <span style=color:#00f>in</span> sequence]:
178</span></span><span style=display:flex><span> print(<span style=color:#a31515>&#34;Playing nucleotide </span><span style=color:#a31515>{}</span><span style=color:#a31515> with MIDI note </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(
179</span></span><span style=display:flex><span> nucleotide, nucleotide_midi_map[nucleotide]))
180</span></span><span style=display:flex><span> send_note(nucleotide_midi_map[nucleotide], 127)
181</span></span><span style=display:flex><span>
182</span></span><span style=display:flex><span><span style=color:#00f>del</span> player
183</span></span><span style=display:flex><span>pygame.midi.quit()
184</span></span></code></pre><p><video src=/assets/dna-synthesized/elektron/elektron.mp4 controls></video><p>All of this could be made much more interesting if I choose different
185instruments for different Nucleotides, or doing more funky stuff with Elektron.
186But for now, this should be enough. It is just a proof of concept. Something to
187play around with.<h2 id=going-even-further>Going even further</h2><p>As you probably notice, the end results are quite similar to each other. This is
188to be expected because we are operating only with 4 notes essentially. What
189could make this more interesting is using something like
190<a href=https://supercollider.github.io/>Supercollider</a> to create more interesting
191sounds. By transposing notes or using effects based on repeated data in a
192sequence. Possibilities are endless.<p>It is really astonishing what can be achieved with a little bit of code and an
193idea. I could see this becoming an interesting background soundscape instrument
194if done properly. It could replace random note generator with something more
195intriguing, biological, natural.<p>I actually find the results fascinating. I took some time and listened to this
196music of nature. Even though it's quite the same, it's also quite different.
197The subtle differences on repeat kind of creates music on its own. Makes you
198wonder. It kind of puts Occam’s Razor in its place. Nature for sure loves to
199make things as energy efficient as possible.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
200<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
201with me
202<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
203the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
204otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/who-knows-what-the-world-will-look-like-tomorrow.html b/public/who-knows-what-the-world-will-look-like-tomorrow.html
deleted file mode 100755
index 491b6c4..0000000
--- a/public/who-knows-what-the-world-will-look-like-tomorrow.html
+++ /dev/null
@@ -1,75 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Who knows what the world will look like tomorrow</title><meta name=description content="This site has gone through a lot of changes over the years."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Who knows what the world will look like tomorrow</h1><p>Jul 8, 2023<div><p>This site has gone through a lot of changes over the years. From being written
7in Flask and Bottle to moving on to static site generators. I have used and
8tested probably 10s of them my now. From homebrew solutions to the biggest and
9the baddest. From Bash scripts to Node.js disasters. I've seen some things, no
10doubt. Not all bad.<p>I'have been closely observing the web and where the trends are going, and I
11don't like what I see. Instead of internet being this weird place where
12experimentation is happening, it all became stale and formulized. Boring,
13actually. Really boring. And sad. Where is that old, revolutionary FU spirit I
14remember? It's still there, I know. But it's being drowned by the voices of
15mediocrity and formulaic boredom.<p>It almost feels like that the internet stopped for 10 years and only now
16something has started happening. With all the insanity around the world. People
17hating people without actual reasons, just because it's fashionable to hate and
18crowd is saying so. Sad state of affairs.<p>All this is contributing to this overall negativity masked as apathy. Everybody
19walking in lockstep. Instead of being creative are bold, we are just
20re-inventing the world and making the same mistakes. Maybe, just maybe, some
21things are good enough and there is no need to try to be too smart for our own
22good. After N-attempts, maybe something should click inside our heads to maybe
23say: "This thing, opinion, etc. is actually really good, and even after several
24attempts it still holds."<p>The older I get, the more careful I am of my own thoughts and why I think the
25way I think. More and more, I try to understand people with opposite
26opinions. Far from perfect, but closer to bearable. And then I see people
27hearing or reading a thing on internet and let's fucking goooooo! Strong
28opinions are a sign of a weak and uneducated mind. I am more and more sure of
29this.<p>It's gotten to a point where you can with great certainty deduce a person's
30personality based on one or two opinions. How boring have we become. No wonder
31people can't talk to each other. These would be very quick conversations anyway.<p>I just got remembered of a song, "Hi Ren". The ending talks about being stiff
32and not being able to dance. Such an amazing metaphor. And we as people have
33gone so far, we can't even walk or even crawl normally anymore. We have
34forgotten that the most beautiful things in life have a great deal of
35uncertainty about them. We want instant gratification. Not only that, but we
36want absolute obedience. Complete control over others, because we have zero
37control of ourselves. And all the lies we could tell ourselves will not help us
38in this situation.<p>It is funny how I catch myself from time to time being a complete idiot. It's
39like having an outer body experience. I can see myself being an idiot, and
40cannot stop myself. It serves as a learning lesson to stop before speaking. To
41think before saying. And to crawl before walking.<p>So there is still time. We can dance once more. All we need to do is stop for a
42second. Me and you. Us two is a start. Let's not try to change the world, but
43rather nudge ourselves just a tiny bit. And if we only did that. Each of us
44nudged ourselves a small, tiny bit, the world would heal. If we would just put
45down the phones and ignored Internet for a day or two. Put visiting websites
46that feed on us on hold. Listened to just one sentence and try to understand it
47from a person who we completely disagree with. I truly believe that this is
48possible.<p>Life is about suffering and joy. And instead of wishing suffering on others and
49excepting joy for yourselves, we should for a brief moment want suffering for
50ourselves and wish joy on others. Wouldn't that be an amazing sight to see?<p>I caught myself hating on Rust. And I deeply thought about it afterward. Why did
51I do it? It is obviously not for me. So why the hell was I being so negative
52towards it? I think that I know the answer. I was negative because that is
53easy. Because it's much easier to hate on things than to say to yourself: "Well,
54you know what? This is not for me. I will focus on creation and not
55destruction. This is who I want to be. This is what fills me with joy and
56purpose." Where joy is keeping me happy and purpose scares the shit out of me
57and keeps me honest. This is who I want to be. Admit to myself when I am wrong
58and accept the faults that I have without reservation and with courage march on.<p>I just realized that this blog post is a sort of therapy for me. It's
59cathartic. Going thought the history of this site and remembering all the
60decisions and annoyances that came with it. When I was cursing at the tools. And
61time moved on, and the site is still here. It serves as a reminder that
62perseverance wins at the end. If we just let things go.<p>This came with a decision that simplifying life and removing all the unnecessary
63negativity is key. Rather than worrying about what the internet is saying, what
64the world is trying to take from you, you are the only one who can say no. And
65create instead of destroy.<p>I don't have an ending for this post, so I will say this. We live in the most
66amazing times in the recorded history, and we should be internally grateful for
67it. Create and study, this should be my mantra. Just create and let the world
68happen. And you feel yourself to be too certain, stop and check how deep in the
69shit you are already. Strong opinions are a sign of a weak and uneducated
70mind. Hate and disdain is for the weak.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
71<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
72with me
73<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
74the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
75otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/wireless-sensor-networks.html b/public/wireless-sensor-networks.html
deleted file mode 100755
index 814dc93..0000000
--- a/public/wireless-sensor-networks.html
+++ /dev/null
@@ -1,38 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width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8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Wireless sensor networks</title><meta name=description content="Zigbee networks have this wonderful capability to self-heal, which means theycan reorder connections between them if one of them is inoperable."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Wireless sensor networks</h1><p>Oct 24, 2013<div><p>Zigbee networks have this wonderful capability to self-heal, which means they
7can reorder connections between them if one of them is inoperable. This works
8our of the box when you deploy them. But you have to have in mind that achieving
9this is not as easy as you would think. None of it is plug&amp;play. So to make
10your life a bit easier, here are some pointers which, I hope, will help you.<ul><li>Be careful when you are ordering your equipment abroad. There are many rules
11and regulations you need to comply before you get your Xbee radios. What they
12do is they wait until you prove that you won’t use the technology for some
13kind of evil take over control of the world project :). For this, they have
14EAR (Export Administration Regulations) which basically means “This product
15may require a license to export from the United States.”.<li>I don’t know if this applies for every country, but when we purchased our Xbee
16radios from Mouser, this was mandatory! What we needed to do was to print out
17a form and write information about our company and send them a copy via
18email. With this document, we proved that we are a legitimate company.<li>When you complete your purchase and send all the documentation, you are not
19clear yet. Then customs will take it from there :). There will be some
20additional costs. Before purchasing, make sure you have as much information
21about costs as possible. Because it can get costly in the end.<li>I suggest you use companies from your country. You can seriously cut your
22costs. Here in Slovenia, the best option so far as I know is Farnell. And
23based on my personal experience, they rock! All I need to say!<li>Make plans when ordering larger quantities. Do not, I say, do not make your
24orders in December! :) Believe me! You will have problems with stock they can
25provide for you. So, we were forced to buy some things from Mouser, which was
26extremely painful because of all the regulations you need to obey when
27importing goods from the USA.<li>Make sure that firmware version on your Xbee radios is exactly the same! Do
28not get creative!!! I propose using templates. You can get template by
29exporting settings/profile in X-CTU application. Make sure you have enabled
30“Upgrade firmware” so you can be sure each radio has the same firmware.<li>And again: make plans! Plan everything! In months advanced! You will thank me
31later :)<li>Test, test, test. Wireless networks can be tricky.</ul><p>If you are serious, I suggest you buy this book, Building Wireless Sensor
32Networks. You will get a glimpse of how networks work in lumens terms. It is a
33good starting point for everybody who wants to build wireless networks.<p><strong>Additional resources:</strong><ul><li><a href=http://www.digi.com/aboutus/export/generalexportinfo>http://www.digi.com/aboutus/export/generalexportinfo</a><li><a href=http://doresearch.stanford.edu/research-scholarship/export-controls/export-controlled-or-embargoed-countries-entities-and-persons>http://doresearch.stanford.edu/research-scholarship/export-controls/export-controlled-or-embargoed-countries-entities-and-persons</a><li><a href=http://www.bis.doc.gov/licensing/exportingbasics.htm>http://www.bis.doc.gov/licensing/exportingbasics.htm</a></ul></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
34<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
35with me
36<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
37the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
38otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file
diff --git a/public/write-iso-usb.html b/public/write-iso-usb.html
deleted file mode 100755
index ff32282..0000000
--- a/public/write-iso-usb.html
+++ /dev/null
@@ -1,12 +0,0 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Write ISO to USB Key</title><meta name=description content="Write ISO to USB key."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Write ISO to USB Key</h1><p>May 8, 2023<div><p>Write ISO to USB key. Nothing fancy here.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>sudo dd <span style=color:#00f>if</span>=iso_file.iso of=/dev/sdX bs=4M status=progress conv=fdatasync
7</span></span></code></pre></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
8<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
9with me
10<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
11the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
12otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file