Skip to content

Instantly share code, notes, and snippets.

View aisamu's full-sized avatar

Samuel Tschiedel aisamu

View GitHub Profile
@mwolson
mwolson / README.md
Last active May 20, 2025 01:21
gptel-manual-complete.el

gptel-manual-complete.el

This is an example of how the existing gptel-rewrite.el file can be used to perform completion on an entire function, replacing what's already written so far in that function.

Setup

To use:

@amiorin
amiorin / README.md
Last active June 17, 2025 20:49
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@jackrusher
jackrusher / webdav.clj
Last active June 18, 2025 20:13
A minimal webdav server/synthetic filesystem that works with JVM Clojure and babashka. See comments for instructions!
(ns webdav
(:require [clojure.string :as str]
[clojure.data.xml :as xml]
[org.httpkit.server :as hk-server]))
;; add the XML namespace that we'll use later
(xml/alias-uri 'd "DAV:")
(defn dissoc-in
"Should be in the standard library..."
@jbott
jbott / install.sh
Last active May 21, 2025 09:28 — forked from mx00s/install.sh
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
#
# NixOS install script synthesized from:
#
# - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings)
# - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs)
# - NixOS Manual (https://nixos.org/nixos/manual/)
# - Original gist by @nuxeh (https://gist.github.com/nuxeh/35fb0eca2af4b305052ca11fe2521159)
#
@MarkRoddy
MarkRoddy / parse_s3_access_logs.sql
Last active April 29, 2025 22:35
DuckDB: Query S3 Access Logs
/*
Usage: you'll want to search for the strings <bucket> and <prefix>, and insert the S3 bucket where your access
logs are being delivered. Use (or delete) <prefix> to filter to a subset of your logs.
*/
/*
These commented out configuration settings you can either run yourself in the REPL and source this file using
`.read parse_s3_access_logs.sql`, or you can uncomment them and supply values for yourself.
@pmonks
pmonks / java-members.clj
Last active December 14, 2024 20:59
Pretty prints results from clojure.reflect/reflect on an object or class in an idiomatic Clojure fashion
;
; Copyright © 2023 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
@timstott
timstott / install.sh
Last active March 16, 2025 21:20 — forked from mx00s/install.sh
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
# Original https://gist.github.com/mx00s/ea2462a3fe6fdaa65692fe7ee824de3e
#
# NixOS install script synthesized from:
#
# - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings)
# - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs)
# - NixOS Manual (https://nixos.org/nixos/manual/)
#
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
@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.
@mtnygard
mtnygard / Github_Issues_in_Org.md
Created November 16, 2021 21:14
GitHub Issues as org-agenda TODOs w/ links & searchable/filterable labels.

GitHub Issues as org-agenda TODOs w/ links & searchable/filterable labels

gh issue list --limit 10000 --json number,title,url,labels \
    | jq -r '.[]|"** TODO [["+.url+"]["+(.number|tostring)+"]] "+.title+" "+":"+(.labels|map(.name)|join(":"))+":"' \
    | sed 's|::||g'

Credit to @dysinger