Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / colors.json5
Last active February 6, 2025 21:18
Double Commander "colors.json" file - colors from "Crystal Color Center" and eza
{
Styles : [
{
Name : "Light",
FilePanel : {
CursorBorderColor : -2147483635,
ForeColor : 13421772,
BackColor : 0,
BackColor2 : 0,
MarkColor : 10875385,
@milnak
milnak / Texas Hold 'Em Poker Tournament Rules.md
Last active February 5, 2025 06:52
Texas Hold 'Em Poker Tournament Rules

Texas Hold 'Em Poker Tournament Rules

Adapted from Bill Costin

The Game

Texas Hold 'Em is Seven Card Stud where each player gets two down cards; "Hole" cards with the remaining five up cards; "Community" cards being placed in the center of the table which all players use to complete their hand.

@milnak
milnak / Web Search Engine Queries.md
Last active March 3, 2025 01:08
Web Search Engine Queries

Web Search Engine Queries

For use with ueli.

File location on Windows: $env:AppData\ueli\ueli9.settings.json

Table created using:

$s="|Name|Prefix|Url|`n|----|------|---|`n"; (Get-Content "$env:AppData/ueli/ueli9.settings.json" | ConvertFrom-Json).'extension[CustomWebSearch].customSearchEngines' | Sort-Object name | ForEach-Object { $s+="|{0}|{1}|``{2}``|`n" -f $_.name,$_.prefix,$_.url }; $s
@milnak
milnak / Get Windows Product Key from PowerShell.ps1
Last active February 5, 2025 06:55
Get Windows Product Key from PowerShell
# Derived from WinProdKeyFinder
# https://github.com/mrpeardotnet/WinProdKeyFinder
$digitalProductId = (Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').DigitalProductId
# First byte appears to be length
if ($digitalProductId[0] -ne $digitalProductId.Length) {
throw 'Invalid length.'
}
$ProductId = [Text.Encoding]::UTF8.GetString($digitalProductId[8..30])
@milnak
milnak / Controls-for-GTA-IV.md
Last active January 5, 2025 04:06
Controls for GTA IV

Controls for GTA IV

Adapted from the GTA IV Wiki

General

Control PC 360
Take phone out Up D-Pad Up
@milnak
milnak / photoshop-shortcuts.md
Last active February 15, 2025 22:38
Photoshop Keyboard Shortcuts #photoshop #keyboard

Photoshop Keyboard Shortcuts (most common)

Tips:

  • On Mac, Option = Alt, Command = Ctrl.
  • You can view, edit, and summarize keyboard shortcuts in the Keyboard Shortcuts dialog box, Edit > Keyboard Shortcuts.

Tools

|Command|Shortcut|

@milnak
milnak / ripgrep-rg-quick-reference.md
Last active March 21, 2025 16:12
RipGrep (rg) Quick Reference

RipGrep (rg) Quick Reference

These are the most commonly used switches I use in rg.

Command Description
rg pattern Search pattern in current dir recursively
rg pattern utils.py Search in a single file utils.py
rg pattern src/ Search in dir src/ recursively
rg '^We' test.txt Regex searching support (lines starting with We)
@milnak
milnak / scoop-db.ps1
Created November 26, 2024 17:02
Read scoop bucket files and output powershell objects suitable for filtering
function arch_specific($prop, $manifest, $architecture) {
if ($manifest.architecture) {
$val = $manifest.architecture.$architecture.$prop
if ($val) { return $val } # else fallback to generic prop
}
if ($manifest.$prop) { return $manifest.$prop }
}
$scoopdir = Join-Path ([Environment]::GetFolderPath('UserProfile')) 'scoop'
@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' }, `