Skip to content

Instantly share code, notes, and snippets.

View Finkregh's full-sized avatar
🚲

Oluf Lorenzen Finkregh

🚲
View GitHub Profile
@pcorpet
pcorpet / get_pylint_enabled_rules.py
Created September 19, 2024 07:47
Script to help migrate Pylint config to Ruff.
#!/usr/bin/python3
# Script to help migrate Pylint config to Ruff.
#
# It lists enabled Pylint rules, Pylint rules that are enabled but already covered by Ruff rules,
# and the Ruff rules not enabled yet that match enabled Pylint rules.
#
# Largely based on https://github.com/astral-sh/ruff/issues/970
import re
import subprocess
from collections.abc import Mapping, Sequence
@cjbayliss
cjbayliss / dark-mode.js
Last active December 10, 2024 23:21
dark-mode.js
// ==UserScript==
// @name dark-mode
// @match *://*/*
// @grant none
// @version 1.1
// @author cjb
// @run-at document-start
// ==/UserScript==
const adjustColors = () => {
@TobiX
TobiX / Caddyfile
Last active January 3, 2025 10:53
Caddy Tar Pit
# Tar pit
@shit {
path */.env
path /wp-login.php
}
handle @shit {
root * /srv/www
vars compression gzip
@is_br header Accept-Encoding *br*
vars @is_br compression br
@llimllib
llimllib / install.sh
Last active January 2, 2025 10:40
The script I use to set up a new mac just the way I like it
#!/usr/bin/env bash
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
# previous install notes at:
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70
# https://gist.github.com/llimllib/3fc4fefcfc0152dad8c58201246d8802
#
# this script's URL is: https://gist.github.com/llimllib/c4dd0a98a426022b0365d4c0a9090460
@jmatsushita
jmatsushita / README
Last active June 28, 2025 11:41
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [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.
@Wingysam
Wingysam / git-archive.user.js
Last active June 4, 2025 13:50
Git Archive
// ==UserScript==
// @name Git Archive
// @namespace http://wingysam.xyz/
// @version 2.4
// @description Mirror every git repo you look at to gitea
// @author Wingy <[email protected]>
// @include *
// @grant GM_xmlhttpRequest
// @grant GM_notification
// @grant GM_openInTab
@LilithWittmann
LilithWittmann / autobahn.md
Last active January 14, 2025 12:25
autobahn.md
# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active May 29, 2024 12:35
My growing list of Rust programs to use.
@probonopd
probonopd / Wayland.md
Last active July 3, 2025 03:09
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

image

Source: https://x.com/LundukeJournal/status/1940441670098809093

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.