Skip to content

Instantly share code, notes, and snippets.

View Denperidge's full-sized avatar

Cat Denperidge

View GitHub Profile
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs.buildPackages; [
git
nodejs_22
pnpm
bash
];
# The shellHook below includes a workaround for
# https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/
@Denperidge
Denperidge / launchkey_25_MK2_clone_hero_drums.py
Last active May 23, 2025 18:40 — forked from Klepvink/launchkey_25_MK2.py
Python scripts that puts a rainbow fade on the novation launchkey 25 MK2 LED-lights. Original script was written by David Madison (https://www.partsnotincluded.com/how-to-control-the-leds-on-a-novation-launchkey-mini-ii/)
#
# Launchkey Mini II Sweep Animation
# by David Madison © 2018
# www.partsnotincluded.com
#
#
# Modified to work for the Launchkey 25 MK2.
# Instead of the original sweep, it now displays
{ pkgs, config, ... }:
with pkgs; stdenv.mkDerivation rec {
pname = "caddy";
version = "2.6.2";
dontUnpack = true;
nativeBuildInputs = [ git go xcaddy ];
configurePhase = ''
@Denperidge
Denperidge / default.nix
Created March 3, 2024 22:29
Another attempt at Caddy with plugins!
{ lib
, stdenv
, fetchFromGitHub
, nixosTests
, caddy
, testers
, installShellFiles
, autoPatchelfHook
}:
let
@Denperidge
Denperidge / default.nix
Last active March 3, 2024 22:21
Attempt at a Caddy package with an addon!
{ lib, stdenv, fetchurl, autoPatchelfHook }:
stdenv.mkDerivation rec {
pname = "caddy-plugin";
version = "0.1.0";
src = fetchurl {
url = "https://caddyserver.com/api/download?os=linux&arch=arm64&p=github.com%2Fcaddy-dns%2Fporkbun";
};
nativeBuildInputs = [
@Denperidge
Denperidge / default.nix
Last active March 1, 2024 16:40
Nix caddy with modules maybe?
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, caddy
, testers
, installShellFiles
}:
let
version = "2.7.6";
# Based on https://github.com/actions/starter-workflows/blob/main/pages/static.yml
name: Build static & deploy to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@Denperidge
Denperidge / date-recursive.py
Created March 4, 2023 14:43
Hope to move this to a dedicated script repo soon! But for backups sake:
from glob import glob
from pathlib import Path
from sys import argv
from os import system
from re import search, RegexFlag
from datetime import datetime
#exiftool -r "-FileCreateDate<DateTimeOriginal" "-FileModifyDate<FileCreateDate" "%1%"
DATE_FORMAT_STRING = "%Y%m%d_%H%M%S__" # == yyyyMMdd_HHmmss__
NAME_FORMATTED = r"[^a-z]{1,}_{2}"
@Denperidge
Denperidge / gh-card-png.sh
Created January 2, 2023 16:29
Leverages the gh-card project to create PNG's. Because Google Docs doesn't support SVG's.
#!/bin/bash
read -p 'User: ' user
repo='Placeholder'
while [ "$repo" ]
do
read -p 'Repo: ' repo
wget "https://gh-card.dev/repos/$user/$repo.svg"
inkscape "$repo.svg" --export-type=png -h 540 -o "$repo.png"
@Denperidge
Denperidge / azerty-power-to-ltgt.md
Last active December 6, 2022 13:16
Typing <> on a qwerty keyboard converted to azerty is a challenge, so lets make it a bit simpler

Normally you have to type SHIFT+ALTGR+W/X for <>, which is not, good.

This command will remap the ²³ key to be <> for the current session

xmodmap -e "keycode 49 = less greater less greater backslash backslash backslash"

How I got the relevant keycodes & names (mostly added for future references)