Monthly Shaarli

All links of one month in a single page.

December, 2022

Storing encrypted data in Amazon S3

Combining s3fs and encfs for encrypted, transparent locally-available file storage on any cloud (S3) provider.

Tools mentioned are a little old and potentially superseded, see data encryption comparison https://links.martyoeh.me/shaare/rFw2Mw

WIFI disconnects when in standby : LineageOS

unstable wifi connection might fix samsung galaxy s4 connection issues

A concise explanatino of: systemd Requires vs Wants

The difference is captured pretty well in the naming:

Wants tries to start any unit listed in the list, but proceeds with its own process even if any of them do not start.

Requires will not start the unit in question unless all required units also successfully start.

Tshark | tshark.dev

In-depth tutorial on using the wireshark cli the whole network analysis workflow: capturing packets, analyzing packets, and interpreting packets.

Network Troubleshooting from the Command-Line with TShark

Basic setup and usage of tshark, the commandline companion of wireshark. Goes through the basics.

GitHub - pubs/pubs: Your bibliography on the command line

Another bibliography manager for the command line. This one seems fairly nice: It keeps everything in plain-text (unlike papis), seems fairly customizable and extensible (unlike bibman), has some quality of life features like doi/arxiv import, git versioning and a plugin system.

Having used it a little - it is fairly nice, except for two niggling issues: with around 1000 library entries it becomes pretty sloow and it does not allow for advanced query syntax, even though it seems like it would support it. Author search only search in last names and you can not use any boolean logic to search for anything not tagged a certain way for example. These two issues are pretty major for larger libraries.

Sync Zotero Library to Nextcloud - Matthias Lohr

How to use your own Nextcloud instance to synchronize your Zotero Library using Zotero's WebDAV Synchronization Feature.

Explains some nice details which would otherwise definitely stand in the way of easy sharing (e.g. individual folder sharing, webdav credentials, paths, and so on). Very useful!

GitHub - kedro-org/kedro: A Python framework for creating reproducible, maintainable and modular data science code.

Reproducible datasci - you create data ingestors, then create small modules of transformation (the engineering), then do whatever you want with the data (the science).

Seems quite nice for larger projects and like it could save you some time down the road (forking another project off an existing or returning to an old project with its standardized nature).

bash - How to determine where an environment variable came from? - Unix & Linux Stack Exchange

Seeing where environment variables get set, logging every execution of zsh/bash into a file. Really clever use of fd and shows how easy it is with zsh.

GitHub - natpen/awesome-wayland: A curated list of Wayland code and resources.

Nice collection of wayland-enabled tools.

Supplementary lists:

suspend - GNOME: disable sleep on lid close - Unix & Linux Stack Exchange

Good explanations of handling the laptop close event in Linux (Gnome) - with separations for docked/connected to hub or when just using the laptop.

dnkl/fuzzel: Application launcher for wlroots based Wayland compositors

rofi's drun mode, or dmenu alternative for wayland - but fuzzy!

Data-at-rest encryption - ArchWiki

Nicely detailed overview of different encryption options for your (linux) files. Lists advantages and disadvantages and should be considered a starting point for considerations of encryption options.

GitHub - tinted-theming/home

An application and/or evolution of the base16 idea, containing links for colors and tools for application of the colors to a variety of desktop applications.

[root tip] [How To] Use systemd to mount ANY device - Tutorials - Manjaro Linux Forum

Difficulty: ★☆☆☆☆ Disk device recognition Manjaro uses udev (see Arch Wiki) to load devices at boot time. The loading of devices is arbitrary and therefore you cannot predict which device will be available at a given path. But static device names do exist and you can assign specific locations to your device and thus ensure e.g. scripts will work as expected. What to learn Overview of system mount units Structure and Content of a mount unit Mount at boot (immediate mount) Mount on demand (m...

Erianna | Charles R. Portwood II - Encrypted BTRFS backups with Minio, Systemd, and Restic

A really nice overview and somewhat in-depth explanation of setting up a nice backup system with restic and systemd. Written exclusively for btrfs I am not sure why, since most of the instructions should work with most any underlying filesystem.

KMIJPH/bibman: A simple CLI bibliography manager - bibman - Codeberg.org

Another cli bibliography/library manager. Has a simple cli, can import/export to bibtex, link files to citations, be invoked by neovim telescope.

It seems alright but less well developed/smaller in scope than some other cmdline bib managers. Unfortunately uses plain regex for bibtex parsing which makes me doubtful for its robustness.

muchsync

A sync program for notmuch. Can pull down you mail from a (notmuch-enabled) mail server through ssh and sync multiple machines easily.

I am not entirely sure for the intended architecture yet, but it seems to either want your actual mail server directly running notmuch and you use only this script to sync to all machines (Option A) or you use mbsync etc to grab your stuff from another server (Gmail, Fastmail, Proton,..) on a single machine and then use muchsync to sync all other machines to that one (Option B).

GitHub - containers/toolbox: Tool for interactive command line environments on Linux

Tool for interactive command line environments on Linux. Similar concept to distrobox, and somewhat of the predecessor I suppose (or at least it seems a more limited scope).

Maps a containerized environment to the host resources, allowing you to more seamlessly work on the guest environment.

[bspwm] Taking notes in Zathura : unixporn

A comment on pdf annotation on unix systems. Go to the link for follow-up links to spacemacs and the layer in question:

Zathura is amazing, but if you want to take notes in a more or less zathura style pdf-editor (more than just reader), then I would recommend you to check out Spacemacs with its pdf layer. It has all features that Zathura has, but it adds very strong annotation features, it is mind blowing. You have a pdf-editor right within your vim-like editor. With org-noter you can send annotations directly to your org files (the video uses Emacs bindings, but the Spacemacs project uses a perfect Vim rebuild within Emacs). Spacemacs additionally comes with the amazing org-mode for organizing your notes. Due to the Spacemacs layer system, it is very easily installed (I assume you are on a GNU/linux type of system, as you are already using Zathura). There even exists an option to highlight using the keyboard only, although in this case I find it easier to use the mouse.

GitHub - nitnelave/lldap: Light LDAP implementation

Super promising LDAP service for self-hosting (and specifically targeted at smaller self-hosted setups, with many examples - for Nextcloud, Bookstack, Jellyfin, Emby, Gitea, etc).

Chapter 34. Mounting file systems on demand Red Hat Enterprise Linux 8 | Red Hat Customer Portal

Nice article for automounting in different ways (scroll to chapter 34)

Sudden battery charge drop issues

Can be either indicative of an old/broken battery (broken cell, no correct level measurement, sudden drops) or necessary re-calibration. Re-calibration can be especially required if the firmware/settings put a maximum to charge that is different than 100% (e.g. ~80% to keep a mostly-AC laptop alive longer) and using this exclusively over longer periods of time.

GitHub - gcla/termshark: A terminal UI for tshark, inspired by Wireshark

A TUI companion to tshark which brings back some kind of wireshark-like interface for it. Seems a bit trying to catch your own tail, but could be useful over headless clients etc!

Use curl to access a WebDAV server?

A cheat sheet with all the related curl commands available for WebDAV. Very neat!

curl -X GET https://webdav.filestash.app/README.org -> Read a file

curl -T welcome.msg -u "username:password" --dump-header - https://webdav.filestash.app/welcome.msg -> upload a file

curl -X DELETE 'https://example.com/webdav/test' -> delete something

curl -X MKCOL --dump-header - "https://webdav.filestash.app/test' -> create a folder

The username password function works on any command.

Be aware that:

  • listing files is slightly more complicated since you get results back in XML form
  • If using e.g. Nextcloud shares, the path is always example.com/public.php/webdav/path/to/your/file with the token that is actually in the link being used having to be put into both username and password
GitHub - hackerb9/lsix: Like "ls", but for images

Like "ls", but for images. Shows thumbnails in terminal using sixel graphics. - GitHub - hackerb9/lsix: Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.

Finding the physical address of swapfile on btrfs | Setting up hibernation on btrfs

For the error '202803 – Hibernation does not work with BTRFS and swapfile on 5.0 kernel. Cannot find swap device.'

  • btrfs physical_location is different from normal filefrag physical address.
  • There is a tool to get the physical address of the swapfile in the comments

The full process is described here: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file_on_Btrfs

Remember to divide by pagesize!

GitHub - 89luca89/distrobox: Use any linux distribution inside your terminal.

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with.

Essentially creates containers for the requested distro but also integrates the home directory, maps X11/Wayland sockets, devices, journals, ssh agent and so on - it basically maps your host resources automatically to the guest machine so you can work on it as if it was your actual machine.

Unified Remote – Remote Control App for your Computer

The one remote control (mouse, keyboard, but also a lot more) application between ios and linux that works relatively painlessly. If using portable app - make sure to run it sudo to have the connections be able to authenticate.

Not open source unfortunately.

GitHub - Forceu/Gokapi: Lightweight selfhosted Firefox Send alternative without public upload

Upload stuff and share with others, have it be deleted automatically after a while, or a certain amount of downloads. Simple, efficient, AWS S3 supported.

GitHub - ahrm/sioyek: Sioyek is a PDF viewer designed for reading research papers and technical books.

Sioyek is a PDF viewer designed for reading research papers and technical books.

Has basic scroll, mark, highlight functionality but an interesting 'portal' one. You link one location in the document to another (opened in another window) and the extra window always displays the closest linked location as you read along. Seems useful for consulting e.g. figures or tables while also reading along the main text at the same time.

Can also be extended for OCR, text-to-speech, auto-download and translation which seems good.

Cross-platform