Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / 1-README.md
Last active March 5, 2026 21:32
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@ruario
ruario / small-slackware.md
Last active February 24, 2026 17:34
A short guide to quickly setting up a small Slackware install

Setting up a "small" Slackware install

Intro

Before you do this, reconsider if it is really needed. More often than not, it isn't. This is why.

A common reason for attempting a minimal install is an expectation that Slackware will run faster. This is not true. Some example, (IMHO) valid, reasons for stripping back the install include:

  • Installing on a device with limited disk space, where it is hard to add additional storage
  • A setup where there is an ongoing cost to rent disk space (e.g. a Virtual Private Server)
@ruario
ruario / make-install-remove.md
Last active February 5, 2026 15:48
Uninstalling (removing) a package installed via make install. No make uninstall target required

make install, uninstall help (howto remove)

Background

A common mistake for users who are new to Linux (and even a few seasoned users) is to install a package from source without any clear idea about how they will remove it in the future, should they want to.

The classic instructions to install a source package are ./configure && make && make install. This (or slight variants) can work nicely for installation but

@ruario
ruario / clump.sh
Last active January 25, 2026 08:34
A fast, simple and small, streaming archiver
#!/usr/bin/env bash
#
# A fast, simple and small, streaming archiver.
#
# Usage is similar to cpio but without path length limits, file size limits,
# or complex metadata handling. It is intentionally minimal and only supports
# regular files and symbolic links. It restores modification times and
# permissions for regular files.
#
# Modes:
@ruario
ruario / sco-newc-extension.md
Last active January 18, 2026 19:56
# SCO cpio (newc) 9 EiB file size extension
@ruario
ruario / inode-truncation-cpio.md
Last active January 18, 2026 19:05
GNU cpio and inode truncation considerations

GNU cpio and inode truncation considerations

The following explains how inode truncation in classic cpio formats (odc and newc) interacts with hardlinked files, and under what conditions you may encounter problems.

TL;DR

Unless you are still using cpio for full system backups, this is probably a non‑issue. Nonetheless, to ensure correct hardlink preservation with GNU cpio:

@ruario
ruario / mac_keyboard_tweaks.md
Last active January 12, 2026 10:23
Norwegian Macbook Keyboard Tweaks (Ubuntu 24.04 and 25.10)

Norwegian Macbook Keyboard Tweaks (Ubuntu 24.04/25.10)

This patch modifies the Norwegian Macintosh keyboard layout on Ubuntu Linux to better match that of a modern Macbook's physical labels and expectations:

  • Replaces | (pipe) with ' (apostrophe) as the primary symbol for the key below esc
  • Promotes $ to Shift+4
  • Introduces as AltGr+4
  • Demotes ¤ (currency) to Shift+AltGr+4 (since this is hardly used these days)
  • Swaps the order of the dead keys of the ´ (acute) and ​`​ (grave) acents on the key to left of backspace
  • Enables access to higher level symbols by setting the right-most Alt ⌥ (Option) key as AltGr
@ruario
ruario / linux-rar-arm64.md
Last active January 4, 2026 15:29
Running RAR for Linux on arm64

Running RAR for Linux on arm64

TL;DR This guide shows how to run the x86_64 Linux RAR binary on arm64 using QEMU user-mode or FEX¹, and compares their performance. If you do not want to read further, simply install either of them via your package manager and then run the script included with this gist, to automatically download, configure and install RAR.

¹ FEX only adds about 13% overhead.

Intro

RAR is a strong archiving option on Linux when you need features other formats do not provide, such as built‑in recovery records, archive‑level deduplication, robust multi‑volume handling, advanced filters, archive content search & manipulation, strong encryption, etc. [Full comparison with other Linux archivers]

@ruario
ruario / related.sh
Last active January 3, 2026 15:58
A simple script to locate files associated with a software install on Linux, BSD and macOS Ventura (version 13) and above
@ruario
ruario / TAR-RAR-7‑Zip-Info‑ZIP-linux.md
Last active December 22, 2025 11:59
TAR vs RAR vs 7‑Zip vs Info‑ZIP on Linux

Tar vs Rar vs 7‑Zip vs Info‑ZIP on Linux

TL;DR

  • tar: Full Linux filesystem metadata and special file support.
  • rar: Extensive feature set: permissions, ownership, recovery, deduplication, filtering, archive content manipulation, strong encryption, etc.
  • 7z: Strong encryption where open source is a requirement.
  • zip: Maximum compatibility.

Note: They are actually all widely supported for extraction by common libaries. You will not realistically find a modern system, configured for desktop use, that cannot open all of these but zip will be less confusing to non-technical users and has wider support on legacy, mobile and embedded platforms out of the box.