Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / .gitconfig
Created November 12, 2024 23:06
Git config settings for WinMerge
# Install WinMerge per-user from https://winmerge.org/downloads
# or: winget install --id 'WinMerge.WinMerge'
# Then do "git config --edit --global" and add the following:
[diff]
tool = winmerge
[difftool "winmerge"]
name = WinMerge
trustExitCode = true
# For Machine-wide install:
@milnak
milnak / scoop-argumentcompleter.ps1
Created November 7, 2024 18:02
Complete scoop arguments (with ctrl-space) in PowerShell
$argumentCompleterScriptBlock = {
param($wordToComplete, $commandAst, $cursorPosition)
$commands = `
@{Text = 'alias'; Tip = 'Manage scoop aliases' }, `
@{Text = 'bucket'; Tip = 'Manage Scoop buckets' }, `
@{Text = 'cache'; Tip = 'Show or clear the download cache' }, `
@{Text = 'cat'; Tip = 'Show content of specified manifest.' }, `
@{Text = 'checkup'; Tip = 'Check for potential problems' }, `
@{Text = 'cleanup'; Tip = 'Cleanup apps by removing old versions' }, `
@milnak
milnak / scoop-show-cache.py
Created October 23, 2024 22:17
Dump scoop sqllite cache
import sqlite3
database = 'C:/Users/jeffm/scoop/scoop.db'
try:
with sqlite3.connect(database) as conn:
cur = conn.cursor()
cur.execute("""
SELECT DISTINCT
bucket,
@milnak
milnak / python-libraries.md
Created October 10, 2024 20:26
Intersting standard Python Libraries
@milnak
milnak / rpn.py
Last active October 11, 2024 16:39
A surprisingly capable RPN calculator in about 100 lines of Python code
# Based on:
# A surprisingly capable RPN calculator in about 100 lines of Zig code
# https://cryptocode.github.io/blog/docs/prefix-calculator
# Example session:
#
# Python RPN Calculator
# Type mc to clear memory slots, exit to quit.
# # see if 2 + 2 is still 4
# # mc
@milnak
milnak / Buffet Clarinet Identification Guide.md
Last active October 9, 2024 03:27
Buffet Clarinet Identification Guide

Buffet Clarinet Identification Guide

Originally found here

One of the most common questions I get is to identify someone's mystery Buffet clarinet.

Here's a quick guide, and PLEASE comment with any update/clarification/additional info.

Buffet clarinets are generally produced in one of two places: France and Germany.

@milnak
milnak / yamaha-yc-series-sysex.md
Last active October 5, 2024 23:52
Yamaha YC Series keyboard SysEx Bulk Dump Format

Yamaha YC series MIDI dumps

From SoundMondo reface-panel JS

YC61: {
  identity: [0x5C, 0x06],
  groupNumber: [0x7F, 0x1C],
  modelId: 0x09
},
@milnak
milnak / itsmine.ps1
Created October 3, 2024 16:47
Take ownership of a file or folder.
<#
.SYNOPSIS
Take ownership of a file or folder.
.NOTES
takeown.exe and icacls.exe (both included in Windows) need to be in $env:PATH
If a folder is specified, all files and subfolders of that folder will change ownership.
#>
#Requires -RunAsAdministrator
@milnak
milnak / .profile
Last active September 19, 2024 17:46
oh-my-posh configuration
# ___ _
# | _ \_ _ ___ _ __ _ __| |_
# | _/ '_/ _ \ ' \| '_ \ _|
# |_| |_| \___/_|_|_| .__/\__|
# |_|
# Install oh-my-posh (to ~/bin):
# curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin
# Download the themes:
@milnak
milnak / vpx-vpinmame-install.md
Last active September 18, 2024 00:49
Visual Pinball X / VPinMAME Install

Visual Pinball X and VPinMAME Install

I couldn't find easy to follow instructions for setting up Visual Pinball X with VPinMAME, so I created one. I've tested these instructions using Windows 11. With these settings, I can run any VPX game at full speed at 2560x1440 resolution on my i9-9900K CPU with a GTX1050Ti video card.

Replace "D:" with whatever drive you prefer in the instructions that follow.

Installation

Follow these steps in order.