Monthly Shaarli

All links of one month in a single page.

January, 2023

ooh.directory

A collection of (at this moment) 1384 blogs about every topic. Somewhat curated by hand and sorted by rough topics. Contains some smaller but also quite a few bigger blogs (hackaday, Macrumours, etc).

GitHub - joouha/euporie: Jupyter notebooks in the terminal

Jupyter notebooks in the terminal. Run complete notebooks from your commandline for exploratory data analysis, before you use something like quarto for more permanent rendering. Seems very neat.

Hydra | Hydra

A framework for elegantly configuring complex applications.

Configuration management for python projects, may be useful to store simple and repeatable configurations for data science projects as well.

bash printf with new line - Stack Overflow

To print e.g. newline characters with bash printf which interprets the characters EVEN FROM A VARIABLE, do printf "%b" "my\nnewline\nvariable".

printf's %b format specifier was meant specifically to replace echo -e (actually, the XSI extension to echo which calls for special interpretation of the arguments by default. -e was never specified and is disallowed by POSIX.), and is identical in virtually every way including a few differences from $'...' and the format string argument to printf.

GitHub - rustdesk/rustdesk: Open source virtual / remote desktop infrastructure for everyone! The open source TeamViewer alternative. Display and control your PC and Android devices from anywhere at anytime.

Remote desktop software that is open source. Really nice alternative to teamviewer, splashtop, remmina and other RDP implementations.

GitHub - juanfont/headscale: An open source, self-hosted implementation of the Tailscale control server

An open source, self-hosted implementation of the Tailscale control server

Adding supplementary tables and figures in LaTeX | Byte Size Biology

A way to separate multiple table or figure environments in latex:

\newcommand{\beginsupplement}{%
        \setcounter{table}{0}
        \renewcommand{\thetable}{S\arabic{table}}%
        \setcounter{figure}{0}
        \renewcommand{\thefigure}{S\arabic{figure}}%
     }

Then, when your supplement starts, just add the line:

\beginsupplement

Voila! Instant “Table S1” and “Figure S1”. Enjoy.

GitHub - krateng/maloja: Self-hosted music scrobble database to create personal listening statistics and charts

Your own lastfm! Sweet if you just wanna track and get an overview of your listening habits without all the tra-ra of social connections.

text processing - Printing every Nth line out of a large file into a new file - Unix & Linux Stack Exchange

To print every N  th line, use

sed -n '0~Np'

It is written in the form first~step(print). For example, to copy every 5th line of oldfile to newfile, do

sed -n '0~5p' oldfile > newfile
sed -n '2~5p' oldfile

would print lines 2, 7, 12, 17, 22, 27, …, up to the end of the file.

Note: This approach requires GNU sed, as the first ~step address form is a non-portable extension. (Some old versions of GNU sed may require the 5~5 form as opposed to the 0~5 form.)

GitHub - usememos/memos: An open-source, self-hosted memo hub with knowledge management and socialization

A self-hosted version somewhat akin to something like nomie or jrnl. Supports markdown and can be interacted with through API - so could easily also be integrated with for example jrnl to auto-upload or download new entries.

dnkl/yambar: Modular status panel for X11 and Wayland

yambar - Modular status panel for X11 and Wayland, inspired by https://github.com/jaagr/polybar and thus somewhere between polybar and waybar. Except for (afaik) not relying on GTK as dependencies (which waybar does)

imv: Image viewer for X11/Wayland

An image viewer akin to feh or nsxiv, but working natively with wayland!

automatic luks decryption, TPM, secure boot
GitHub - alexhallam/tv: 📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

A fantastic tool for the commandline to quickly get a single view of a csv file. Auto-spaces, auto-indents, automatically tries to find the right numeric scale to display one csv file. Quick, easy, sweet!

(Called tidy-viewer on Archlinux AUR and command)

Tilde Expansion (Bash Reference Manual)

Tilde (~) goes beyond just denoting the user's home directory in bash:

~fred/foo
# The subdirectory foo of the home directory of the user fred

~+/foo
# $PWD/foo

~-/foo
# ${OLDPWD-'~-'}/foo

~N
# The string that would be displayed by ‘dirs +N’

~+N
# The string that would be displayed by ‘dirs +N’

~-N
# The string that would be displayed by ‘dirs -N’
bash - You can avoid executing aliases with a backslash at the beginning of a command
$ \curl -L https://get.rvm.io | bash -s stable --ruby

There's no error, it's a little hack to avoid using a curl shell alias if any exists.

This works too :

'curl' (...)
"curl" (...)
/usr/bin/curl (...)
command curl (...)
command -p curl (...)

How to set up a KVM / QEMU Windows 10 VM

Setting up Windows 10 in KVM, using virt-manager. Goes through step-by-step for driver installation and so on, very helpful

Undo block breaking in vim with <c-g>u

Finding the use of <C-G>u was a little hidden. To find out more in vim-help: i_CTRL-G_u or undo-break.

For markdown I have the following mappings in ~/.vim/after/ftplugin/markdown.vim:

" Break undo sequence at punctuation marks
inoremap <buffer> . .<c-g>u
inoremap <buffer> ! !<c-g>u
inoremap <buffer> ? ?<c-g>u
inoremap <buffer> , ,<c-g>u

I don't think that this makes a difference in my workflow, because I seldom use undo on text that I just typed. It is more likely that I undo a formatting, deletion or copy command.

GitHub - navidrome/navidrome: 🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic

Perhaps the best-looking sub/air-sonic server implementation I have seen. Seems to be single user only however from what I can tell, which makes it harder to use with friends. Nevermind, it actually has multi-user support, though it seems to be single-library only.

swhkd: Sxhkd clone for Wayland (works on TTY and X11 too)

A very interesting approach to wayland global key mapping! It uses client-server architecture to both circumvent the issue of no 'global' access being really easy in wayland and on the other hand to prevent leakage abuse on the other.

Seems similar in idea to something like river with the server essentially just receiving shell instructions.

A FreeBSD 11 Desktop How-to » Cooltrainer.org

A guide to a full-featured modern desktop FreeBSD installation.

An impressive writeup going over building out a functional desktop under BSD. Might be a bit long in the tooth today (last updated around 2017) and relying on X11, but otherwise very informative.

Write - a handwritten word processor

Write your notes using handwriting but be able to still use the basic features provided by a word processor: insert text (with automatic paragraph reflowing), delete text or lines, move text, undo and redo, insert links, bookmarks and a table of contents.

Seems really inventive and quite nicely designed as a proof-of-concept. I am not sure how well it would work for larger projects or over longer spans of time but definitely interesting!

GitHub - nwg-piotr/nwg-shell: Installer, updater & meta-package for the nwg-shell project

"a GTK3-based shell for sway Wayland compositor"

Fairly involved window manager shell project - meaning, it will provide all kinds of desktop utilities that make up your interactions: a panel, a dock, a notification center, a file launcher, and so on. Can be used individually or together as a form of lightweight desktop environment on top of e.g. sway.

Modeled somewhat closely on GNOME it seems to provide all necessities for a fully mouse-driven DE on top of any wayland WM.

GitHub - LibreSprite/LibreSprite: Animated sprite editor & pixel art tool -- Fork of the last GPLv2 commit of Aseprite

The forked (in 2016) version of Asesprite, kept with a copyleft license and updated continually.
Does not reach feature parity with the mother program as far as I know, but should be way enough for some simple/intermediate pixel art.

stone kingdoms

An oprn source stronghold 1 -like made with LÖVE

Data Version Control · DVC

Open-source version control system for Data Science and Machine Learning projects. Git-like experience to organize your data, models, and experiments.

A way to track data - even if it is in different locations - alongside code, mimicking its version control. Seems a little complicated but really useful, especially with additional features like data pipelines that are contained

Surge

Shipping web projects should be fast, easy, and low risk. Surge is static web publishing for Front-End Developers, right from the CLI.

Quickly deploy static web pages through the cli. Similar to netlify, now.sh and so on. Can be integrated with e.g. woodpecker ci systems with a simple plugin to have preview environments which get automatically destroyed after merging PRs.

GitHub - Schrodinger-Hat/ImageGoNord: A tool that can convert your rgb images to nordtheme palette

Theme your wallpapers and other images to a couple of well-known color scheme palettes!

bliz: Incredibly easy, interpolated server-side scripting for Gemini.

An interesting take on dynamic gemini pages: You add %%%-delineated code-blocks which execute shell code.
The output is displayed.
You can have inline variables mimicking shell variables prefixed with % as well (e.g. %$my_awesome_variable).

With those two building blocks you have a very simple concept, but leadin gto powerful dynamic execution:
Want to execute an advanced python script? Just call it from your shell code!

I am not entirely sure about security implications, however.

Questions about Runit per-user services : voidlinux

Really good tiny FAQ and addendum to both the void manual and runit FAQ for running user-specific services.

GitHub - fangfufu/httpdirfs: A filesystem which allows you to mount HTTP directory listings, with a permanent cache. Now with Airsonic / Subsonic support!

Going back to using the files on a network like an actual filesystem - even if they're served through HTTP. Very interesting fuse filesystem.

GitHub - Jelmerro/Vieb: Vim Inspired Electron Browser

A vim-inspired browser, just like vimb, pentadactyl, qutebrowser and the others. This one is build on electron in JS, so runs chromium under the hood.

It seems a little less 'bendable' than qutebrowser (with its python configuration and userscript scripting possibilities) but has some nice ideas with its modes especially: Entering the 'url' line you go into explore mode so you can have all kinds of settings and bindings apply in this mode only (as opposed to it being the same as command mode in qutebrowser for example); and especially the 'pointer' mode which mimics you using a mouse in a grid for those web pages which just absolutely refuse to work with key-binds since they feel too modern for such trivialities.

Operating on multiple messages/ a whole tread in neomutt
macro index,pager Y "<tag-thread><tag-prefix><save-message>=Personal/Personal.Archive<enter>" "Archive thread"

By using tag-prefix you can operate on a whole tread of messages at once.

Encrypting GPG passwords

To encrypt your SSH key, use:

ssh-keygen -p -f ~/.ssh/id_rsa

If the encrypted private key is stolen, an attacker needs to brute-force (guess) your password to use it.

To be more resistant to brute force-attacks, specify -a <number> to set the number of rounds used. The default is 16.

ssh-keygen -p -a 500 -f ~/.ssh/id_rsa
~leon_plickat/river-tag-overlay - sourcehut git

A little pop-up for riverwm to inform you of occupied tags, active tags and so on. Can be used in lieu of status bars or similar.

image