Skip to content

Instantly share code, notes, and snippets.

@david-jarman
david-jarman / Convert-ToAlac.ps1
Created January 16, 2026 03:21
Converts .flac files to .m4a (Apple Lossless) while preserving directory structure
# FLAC to ALAC Converter
# Converts .flac files to .m4a (Apple Lossless) while preserving directory structure
param(
[switch]$DryRun
)
$SourceDir = "$env:USERPROFILE\Music"
$DestDir = "G:\Music\Automatically Add to iTunes"
{
"model": "claude-opus-4-5",
"enabledPlugins": {
"csharp-lsp@claude-plugins-official": true,
"commit-commands@claude-plugins-official": true,
"microsoft-docs@microsoft-docs-marketplace": true,
"code-simplifier@claude-plugins-official": true
},
"hooks": {
"Notification": [
# PowerShell script to split MKV file by chapters using ffmpeg and ffprobe
param(
[string]$InputFile,
[string]$OutputPrefix = "Chapter"
)
# Get chapter information from the file in JSON format
# ffprobe extracts metadata; we're specifically requesting chapter information
$chapterJson = ffprobe -v quiet -print_format json -show_chapters $InputFile | ConvertFrom-Json
[alias]
root = rev-parse --show-toplevel
undo = reset HEAD^
[user]
name = David Jarman
email = davidbjarman@gmail.com
[core]
autocrlf = true
[push]
autoSetupRemote = true
@david-jarman
david-jarman / plugins.md
Last active August 5, 2025 22:10
llm-plugins
@david-jarman
david-jarman / .zshrc
Created April 24, 2025 15:26
zsh configuration
# Set custom prompt
PROMPT='%1~ %# '
. "$HOME/.local/bin/env"
@david-jarman
david-jarman / wiql_unmodified.md
Last active March 10, 2025 19:24
Output of markitdown for getting wiql documentation
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory = $true)]
[string]
$ProgramName
)
# Search environment variables
Write-Output "Searching Environment Variables..."
Get-ChildItem Env: | Where-Object { $_.Value -like "*$ProgramName*" }
@david-jarman
david-jarman / RestoreBOMs.ps1
Created January 3, 2024 22:18
Add back BOMs that were removed in your branch
$baseBranch = "master"
$currentBranch = "your-branch"
$modifiedFiles = git diff --name-only $baseBranch $currentBranch
foreach ($file in $modifiedFiles) {
$originalContent = git show ${$baseBranch}:"$file"
$currentContent = Get-Content $file -Raw -AsByteStream
$currentContentString = Get-Content $file -Raw
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"osc99": true,
"blocks": [
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "shell",