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.
- .NET 9 SDK
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.
| 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; |
| 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 |
| #!/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 |
| $ 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 |
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:
sudo to forcefully change permissions of some directory to be owned by your accountGavin Sinclair, January 2022
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 |
| # 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 \ |
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.