Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
#!/bin/bash | |
# Function to recursively process files and folders | |
process_directory() { | |
local directory="$1" | |
# Loop through each item in the directory | |
for item in "$directory"/*; do | |
# Check if the item is a file | |
if [[ -f "$item" ]]; then |
// Chi-like syntactic sugar layer on top of stdlib http.ServeMux. | |
package main | |
import ( | |
"net/http" | |
"slices" | |
) | |
type ( | |
middleware func(http.Handler) http.Handler |
{ config, ... }: | |
let | |
immichHost = "immich.example.com"; # TODO: put your immich domain name here | |
immichRoot = "/tank/immich"; # TODO: Tweak these to your desired storage locations | |
immichPhotos = "${immichRoot}/photos"; | |
immichAppdataRoot = "${immichRoot}/appdata"; | |
immichVersion = "release"; | |
immichExternalVolume1 = "/tank/BackupData/Google Photos/[email protected]"; # TODO: if external volumes are desired |
// A script to remove reddit upvotes in bulk | |
// | |
// _______ INSTRUCTIONS _______ | |
// ____________________________ | |
// Go to old reddit and navigate to "upvoted" tab then run this script in the command panel. | |
// Once the page refreshes, re-run script. | |
// | |
// If you feel like automating this script, have at it, I am too lazy to do it. | |
// | |
// AUTHOR : Mohammad Odeh |
Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.
These steps may not be required if NixOS/nix#2374 is resolved.
These commands are required for both Fedora Workstation and Fedora Silverblue
Gavin Sinclair, January 2022
I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.
The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
#!/bin/bash | |
# Usage: ww -f "window class filter" -c "run if not found" | |
# Usage: ww -fa "window title filter" -c "run if not found" | |
## Find and contribute to a more updated version https://github.com/academo/ww-run-raise | |
POSITIONAL=() | |
while [[ $# -gt 0 ]]; do | |
key="$1" |