Using cryptsetup ’s native Opal support to decrypt self-encrypting drive partitions at boot with LUKS and systemd Prior to cryptsetup 2.7.0, using self-encrypting drives (SEDs) on Linux required the use of tools like sedutil to boot in order to use hardware encryption, otherwise the drives were limited to using LUKS software encryption . If you want to encrypt your root or boot partitions via the…
Toll-free bridging is a concept in macOS and iOS development that allows developers to use data types interchangeably between the Core Foundation and Foundation Kit frameworks. About Core Foundation & Foundation Core Foundation belongs to the open-source framework created by Apple as a foundation to build libraries and applications for Mac OS. It is C-based and inspired by Foundation. Foundation,…
You can use find-ubuntu-mirrors to find alternative repository mirrors for Ubuntu. It will check mirror lists and test the mirrors to see if they’re working or not. When it finds mirrors that are compatible with your preferences, it will output the mirrors in Apt’s sources.list format . The script also allows you to find Ubuntu mirrors for different architectures like: ARM ( armhf & aarch64 )…
After running this script, you will be able run npm install -g without sudo , because npm will install packages as your non-root user. The script will set up npm user directories for you, and then add them to your $PATH . Packages can then be installed without root privileges: $ npm install -g yarn $ type yarn yarn is /home/user/.npm-packages/bin/yarn Usage Run the following: $ curl -s…
About Python leaves compiled bytecode in project directories under subdirectories named __pycache__ . Building packages also creates artifacts in project directories. This simple script will delete those build, caching and packaging artifacts for you. Script The following depends on aiopath , which can be found here or installed via PyPI. Click here to see the source code below
click is a Python module used to create command-line interfaces (CLI) for scripts and applications. In the sections below, we’ll look at a method for making sure that click CLI commands are listed in the order they were defined when we invoke the CLI or --help flag. You can skip ahead to the explanation for how our solution works here . Building a CLI with Click Let’s look at a click CLI with a…
About If you use KVM virtualization on Linux, you might be familiar with PCI passthrough . Using an IOMMU, you can make your hardware available to guest operating systems for near native performance. Intel’s solution to make their integrated graphics cards available to virtualized guests is Intel GVT-g . You can use it to virtualize GPUs to hand off to your virtual machines for enhanced…
About On Ubuntu 18.04 and earlier, Firefox is compiled with the GTK Global Menu patch. On newer Ubuntu releases, Firefox isn’t compiled with the patch. You need to hit the Alt key on your keyboard to show the application menu. I use Plasma Desktop with the Window AppMenu Applet to simulate the global menu from macOS. It works with both Qt and GTK applications, but Firefox doesn’t take advantage of…
About This script will emit CFLAGS that enable features that are available on your hardware, but are absent when you set GCC’s architecture flag. For example, if you have a Skylake processor, your individual processor might have features enabled on it that are not shared across all Skylake processors. This script will list those differences. Script The script below requires the 🧵strs package in…
About If you want to export your podcast subscriptions out of Airsonic, you’ll probably want to do so using an OPML file . It’s simply an XML document listing your RSS feed subscriptions that you can import into any RSS feed reader, or podcast client. Unfortunately, Airsonic doesn’t have that feature . However, Airsonic keeps a log of database insertions in a file called airsonic.script . You can…
Update : Looks like this made it to the top of Hacker News . The Issue When casting from YouTube to a Chromecast, sometimes the audio playback will skip and stutter . This issue is independent of the quality of the video, the FPS, or the internet connection. Trying to watch certain videos will reliably cause playback issues on the Chromecast. According to this thread , the playback issue only…
About NFS and WireGuard NFS is a n etwork f ile- s ystem that’s included in the mainline Linux kernel. It’s everywhere that a complete Linux kernel exists. There are Windows and macOS clients for the protocol, and it can be used with Kubernetes and Docker Swarm. Out of the box, the protocol is not encrypted nor does it provide authentication. WireGuard is a VPN protocol that’s in the process of…
Mount your Google Music collection as a drive with MusicFS . As Google Music is being shutdown, this utility will allow those who uploaded their music library to Google Music to back up the songs they uploaded. Features Browse your music collection via artists, albums and songs Play and index your collection with your favorite media player Download and backup your entire collection with ease…
CampFS is an app that lets you stream music and browse Bandcamp as files on your computer. Features With CampFS , you can browse and discover music easily. Search for artists, albums, labels and songs Browse music via tags Find similar artists and albums Stream music with the music player of your choice Access high quality albums Download You can sign up for the open CampFS open beta here ! About…
Background While building out a project, I found the need to process and save streaming resources locally. Users would stream media via an application, and they would need to seek backwards and forwards in the stream. Often, the streaming resource size would be 2-5MB in total. But there were outlier resources that sometimes totaled several hundred megabytes. Sometimes, the user would want to save…
This is a quick post about optimizing algorithms written in Python with NumPy, and implementing the same code in Rust. We’re going to take a look at one of the Advent of Code challenges, solve it, optimize it with NumPy, and then write both of our solutions in Rust . If you’re unfamiliar with Advent of Code, it’s an advent calendar of programming related puzzles which has run each December since…
Background I run a Reddit bot that identifies duplicate submissions , and a companion reverse image search engine . Right now, the bot is active on meme subreddits, but I built a generalized pipeline to mine new Reddit submissions. I decided to track a few other subreddits a few months ago. I wanted to mine contentious subreddits, especially those with identified bot activity. I settled on mining…
Background Sometimes a task will be heavily disk, network or CPU dependent, and will starve other tasks of those resources. It’s important that such tasks won’t steal resources from other tasks. Ideally, some resource intensive tasks would run only when the resources they depend on are idle. That, or resource intensive tasks would have their resource consumption throttled to favor other tasks. In…
Background In this article, we’ll review methods for changing display brightness on a Mac. I personally find it irritating when my display shuts off, or my computer locks down, while I’m still looking at it. This happens frequently when watching videos, following a recipe or slowly trying to grok something on the screen. Therefore, I have my display set to turn off at an interval that’s over 1…