Marcus Folkesson

Embedded Linux Artist

TIL - raw HTML in Hugo

TIL - raw HTML in Hugo TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post I'm using Hugo [1] for this website setup [2] and find it very satisfying. I can write all my content in reStructured Text [3] and create a website out from it. Today I needed to add a part of raw HTML into one of my pages and that was when I found Shortcodes [4] in which is very useful.

TIL - Parse command output from shell

TIL - Parse command output from shell TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Parse text output in shell scripts is something that is needed every now and then. It used to be some clever pipeline with regular expressions, grep, cut or even awk. But now I've started to use read for such things, and it has helped me a lot.

TIL - Reuse your SSH connection

TIL - Reuse your SSH connection TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post OpenSSH has the feature to reuse an existing SSH connection for multiple subsequent connections to the same host. It will improve your workflow because it reduces the time it takes to establish a new connection and in cases where you have to type a password, the time saving is even more.

TIL - xxd color support

TIL - xxd color support TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Today (2 January 2024), version 9.1 of the Vim editor has been released [1]! xxd [2] is a utility that is distributed with Vim and is my go-to-tool when it comes to view or manipulating binary files. cover

TIL - git credential storage

TIL - git credential storage TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post When using SSH as transport protocol for connecting to remotes you could use a key without need to type a username nor password. Unfortunately, this is not possible when the underlaying protocol is HTTPS as it requires a username and password for every connection made.

TIL - docker scratch image

TIL - Docker scratch image TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post The scratch image is the smallest possible image for docker. It does not contain any libraries nor other executables. It is simply a new, fresh and empty setup of namespaces. The FROM scratch line is even a no-op [1] in the Dockerfile, which results in that it will not create an extra layer in you image.

TIL - sort in vim

TIL - Sort in VIM TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post After 15+ years of daily VIM usage I just discovered the :sort function. Quite embarassing. It is also possible to sort in revese ( :sort!) and remove duplicate lines ( :sort u). cover

TIL - notmuch-lore

TIL - notmuch-lore TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Notmuch [1] is an mail indexer and is a great tool to search in high-volume mailboxes (e.g. mailing lists). Being subscribed to all these mailing lists and retreiving all mails over IMAP daily could be quite annoying and harm your mail quota.

TIL - git man-pages

TIL - git man-pages TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post I'm a big user of man-pages. Today I found a set of pages that I've not noticed before when I was reading man git: SEE ALSO gittutorial(7), gittutorial-2(7), giteveryday(7), gitcvs-migration(7), gitglossary(7), gitcore-tutorial(7), gitcli(7), The Git User’s Manual[1], gitworkflows(7) Especially

TIL - Git --color-moved

TIL - Git --color-moved TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Did you know that Git is able to detect moved blocks and use different colors from the usual added/removed lines? Me neither until now. The paremeter is --color-moved and has been around since v0.4.0, so there is no new feature. cover