Skip to content

Instantly share code, notes, and snippets.

View bigloudjeff's full-sized avatar

Jeff West bigloudjeff

View GitHub Profile
@mdesenfants
mdesenfants / CLAUDE.md
Last active November 3, 2025 10:21
CLAUDE.md

.NET Project Guidelines

This works as a basic starter guide for Claude Code in .NET 9.0.

It's also available as a blog post at https://www.teleos.ltd.

Development Environment

Prerequisites

  • .NET 9 SDK
@Washi1337
Washi1337 / TinySharp.cs
Last active January 5, 2025 18:55
A program to emit a tiny .NET binary program printing Hello World to the standard output. Blog post: https://blog.washi.dev/posts/tinysharp/
using System.Text;
using AsmResolver;
using AsmResolver.DotNet;
using AsmResolver.DotNet.Builder.Metadata.Blob;
using AsmResolver.DotNet.Builder.Metadata.Strings;
using AsmResolver.DotNet.Code.Cil;
using AsmResolver.DotNet.Signatures;
using AsmResolver.IO;
using AsmResolver.PE;
using AsmResolver.PE.DotNet.Builder;
@b0gdanw
b0gdanw / ESD to ISO on macOS.txt
Last active September 29, 2025 06:07
Converting ESD files to ISO images on macOS
ESD to ISO on macOS
https://gist.github.com/b0gdanw/e36ea84828dbd19e03eff6158f1fc77c
Converting ESD files to ISO images on macOS
- download Parallels Desktop 18 for Mac Image from https://www.parallels.com/products/desktop/download/
- at the moment https://download.parallels.com/desktop/v18/18.2.0-53488/ParallelsDesktop-18.2.0-53488.dmg
- open/mount the dmg
- copy prl_esd2iso and libwimlib.1.dylib from /Volumes/Parallels\ Desktop\ 18/Parallels\ Desktop.app/Contents/ to /usr/local/bin/ and /usr/local/lib/
sudo ditto /Volumes/Parallels\ Desktop\ 18/Parallels\ Desktop.app/Contents/MacOS/prl_esd2iso /usr/local/bin/prl_esd2iso
@Sidneys1
Sidneys1 / stail.sh
Created January 26, 2023 20:00
Short-Tail
#!/usr/bin/env bash
HELP="Usage: $0 [-n LINES] [-p PREFIX] [-w] [-h]
Continuously displays the last '-n' lines of 'stdin'.
Parameters:
-n Number of lines to display (default: 5).
-p PREFIX Prefix lines with 'PREFIX'.
-w Preserve blank lines (default: false).
-h Display this help
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@pudquick
pudquick / brew.md
Last active May 5, 2025 21:30
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

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.

brew install --cask font-cascadia-code
brew install --cask font-cascadia-code-pl
brew install --cask font-cascadia-mono
brew install --cask font-cascadia-mono-pl
@jcayzac
jcayzac / capture_timelapse.sh
Last active June 16, 2023 21:31
Timelapse screen capture for macOS
# Start a 1fps screen capture to `~/Movies/timelapse - <end-datetime>.webm`.
# Requires ffmpeg+libvpx installed: `brew install ffmpeg`.
# Press `q` to stop.
capture_timelapse() {
local output="$HOME/Movies/timelapse - $(date '+%y-%m-%d %H%M%S').webm"
local device=$(set +e +o pipefail; ffmpeg -f avfoundation -list_devices true -i '' 2>&1 | sed -En 's#^.*\[([a0-9]+)\] Capture screen 0#\1#p'; true)
if [ -n "$device" ]
then
printf 'Capturing timelapse to "%s"…\nPress Q to stop.\n' "$output"
ffmpeg \
@CMCDragonkai
CMCDragonkai / sed_awk_perl_one_liners.md
Created July 4, 2018 03:27
Sed, Awk and Perl One Liners #cli

Sed, Awk and Perl One Liners

It's my opinion that you should only use sed, awk and perl as one liners.

If you are going to write a script, use a more structured language like Python or Haskell.

However for text processing on the Unix shell, you definitely need things like sed, awk and `perl!

Even before you reach for these tools, you can sometimes accomplish what you need with cut, head, tail, paste, join, tr, uniq, comm and more.