Previously, we configured nginx to list directories and files in html. Now, let’s add authentication to restrict access to specific directories and files. Basic authentication The simplest web authentication method is basic authentication. It requires an Authorization header in each request. However, browsers don’t support setting a header on...
TLDR Nginx explorer is a minimal web interface for file download/upload using a lua free configuration. git clone https://github.com/izissise/nginx-explorer.git nginx-explorer/ngxp.sh download_icons nginx-explorer/ngxp.sh servethis Genesis Sharing files across devices can be a hassle. Luckily, most devices support HTTP through a browser, which...
The PATH environment variable is read by the shell or libc to find and execute programs, this is how the shell can find /bin/ls when ls is typed in a terminal. Shrink it On Debian based desktop systems the default PATH variable look like this: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games Much of...
Git can change configuration depending on the directory you're in. By using this feature, you can create a directory structure with context-aware Git configurations. Using includeIf in ~/.gitconfig: [include] path = "~/.config/git/main.gitconfig" [includeIf "gitdir:~/work/companyA/**"] path = "~/.config/git/companyA.gitconfig" [includeIf...
Unified Kernel Image UKIs can run on UEFI systems and simplify the distribution of small kernel images. For example, they simplify network booting with iPXE. UKIs make rootfs and kernels composable, making it possible to derive a rootfs for multiple kernel versions with one file for each pair. A Unified Kernel Image (UKI) is a combination of a...
Edk2 Edk2 is the official UEFI implementation. One problem I encountered is that it doesn't provide a way to specify the default boot entry. If you already know what the default boot device or application should be, then it should be possible to set it in the 'to be flashed' file. Here I made a patch that add a PCD option to choose which entry...
Qemu support rootless mode routing of network packets through the host using Slirp, you only need to give the right options to qemu to set this up, without having to tinker with tap interfaces or iptables. However, using it for IPv6 can be a bit more challenging, especially since the documentation lacks IPv6 examples. The Qemu options look like...
Sometimes, I want to use closed-source applications on Linux. While I can usually find a Flatpak version, sometimes only a Snap package is available. For such cases, I've created a simple script https://github.com/izissise/snap2flatpak. It automatically downloads the Snap archive from the Ubuntu server and repacks it as a Flatpak. I haven't...
TLDR: Go to patching Plasma 6 I recently updated to Kde Plasma 6, and it's great except for one minor annoyance: the overview effect is triggered on the touchpad with a 4-finger swipe, and I'd prefer to trigger it with a 3-finger swipe instead. Problem is, the value is hardcoded in the C++ code There is an issue about making it configurable but...
I saw the following youtube video, I like the concept a lot but I only have ffmpeg. In the video we can make up five steps to extract the motion from a normal video set opacity to 50% duplicate video inverse colors on first duplicate time shift on second duplicate overlay duplicates After some trial and error, here's the ffmpeg command I came up...
Linux basic initramfs With a compiled kernel image, it can be useful to load your own initramfs: make it as small as possible considering the features you need create a minimal test environment for the kernel image mount a remote filesystem as the root your own reason Anyways, with the official documentation help, let's create an initramfs. Tool...
Introduction Now that we can execute bash functions remotly, we can scale the execution using GNU Parallel. When one wants to make a change or retrieve one particular piece of information on a whole set of machines, multiple choice are available (ansible, puppet, pssh, consul, ...) each with their own upsides and downsides. Parallel + ssh + func...
Genesis Often when a shell command line start to become a little long, I like to break it down into functions. But things start to get complicated when it involve a remote host. It usually involve spawning a remote shell with ssh and then double escaping lot of characters (ssh and remote shell) in order to properly execute commands. Another...
Genesis It as always been kind of a hassle to do actions upon connecting to a network using network manager, especially if you want your script to run a with user permissions. Maybe you work for multiple companies and you want to setup and run some program when connecting to their VPN. You could setup an up rule on your openvpn configuration but...