Skip to content

Instantly share code, notes, and snippets.

@hoshinolina
hoshinolina / asahi_linux_paypal_fix.user.js
Last active November 27, 2025 18:42
Asahi Linux PayPal Block Fix
// ==UserScript==
// @name PayPal Asahi Linux Fix
// @version v1.0
// @description Fix PayPal banning Asahi Linux
// @author Asahi Lina
// @match https://www.paypal.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=paypal.com
// @grant unsafeWindow
// ==/UserScript==
@jstarcher
jstarcher / EndeavourOS-Nvidia-fixes.md
Created July 9, 2024 02:44
Stable Nvidia + Wayland on EndeavourOS (Arch) with working Suspend

This guide was created for EndeavourOs Endeavour Release which if using the Online installer, as of July 2024, will provide Plasma 6.1 and Nvidia 555 drivers. This guide shows using Grub but will work with systemd-boot as well if you follow steps for kernel params.

  1. Create file /etc/modprobe.d/nvidia.conf with the following contents
options nvidia_drm modeset=1
options nvidia_drm fbdev=1
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
@heysanil
heysanil / unhide-files.sh
Created March 13, 2024 02:00
Bash script to recursively hide all files in a directory and its subdirectories
#!/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
@alexaandru
alexaandru / chi.go
Created February 14, 2024 16:40
Chi-like syntactic sugar layer on top of stdlib http.ServeMux
// Chi-like syntactic sugar layer on top of stdlib http.ServeMux.
package main
import (
"net/http"
"slices"
)
type (
middleware func(http.Handler) http.Handler
@mfenniak
mfenniak / immich.nix
Last active September 20, 2024 20:58
NixOS configuration for Immich, based upon upstream docker-compose.yml
{ 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

Setting up qemu VM using nix flakes

Did you know that it is rather easy to setup a VM to test your NixOs configuration?

Create simple flake:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@kconner
kconner / macOS Internals.md
Last active November 6, 2025 09:43
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@moe93
moe93 / unUpvoteReddit.js
Created March 30, 2023 04:54
Remove reddit upvotes in bulk
// 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
@ianthetechie
ianthetechie / bhyve-debian.md
Created February 1, 2023 04:39
A short guide on setting up Debian guests in bhyve

A short guide on setting up Debian guests in bhyve

I have a problem. I need to run some Docker containers for work. Docker, as you may know, has a design that is tightly coupled to Linux. This is rather unfortunate since my desktop is running FreeBSD, and my laptop is running its distant cousin, macOS. Normally I'd just do such things on my Mac, but 1) my desktop has a lot more storage, and 2) the Docker images in question are amd64 already. Also I just wanted a challenge, so let's set up a VM to run Docker on FreeBSD.

Aside in case you're wondering why Docker runs on your Mac: Docker Desktop actually ships a hypervisor,

@IgnisDa
IgnisDa / devcontainer.sh
Last active October 1, 2025 06:28
Helix devcontainer
#!/usr/bin/env bash
set -e
remove_flag=""
if [ "$1" = "true" ]; then
remove_flag="--remove-existing-container"
fi
# Generate certificate