Skip to content

Instantly share code, notes, and snippets.

View chrisfinazzo's full-sized avatar

Chris Finazzo chrisfinazzo

View GitHub Profile
@siracusa
siracusa / downie.log
Created June 8, 2026 19:27
WWDC 2026 Keynote download failure in Downie
Starting download [980dd516f7639fb5c4be333fac4c2ad5] for <XUHLSQuality>: [AAC English - audio-atmos-eac3-640] -> https://events-delivery.apple.com/0601eknundukyswuegvjcidvurtztakr/vod_main_vdhwwrygnmzydhppixlrqwduiqffztdw/audio_main_en_16ch_atmos_640/prog_index.m3u8:
- Number of chunks: 706 - 5 connections
- ["AAC", "English - audio-atmos-eac3-640"]
- direct file URL https://events-delivery.apple.com/0601eknundukyswuegvjcidvurtztakr/vod_main_vdhwwrygnmzydhppixlrqwduiqffztdw/audio_main_en_16ch_atmos_640/prog_index.m3u8
- request header fields ["Sec-Fetch-Dest": "video", "X-Playback-Session-Id": "C5B3F836-0C5C-48DF-A2BB-0623BB3FA7B3", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15", "Connection": "Keep-Alive", "Referer": "https://www.apple.com/apple-events/", "Origin": "https://www.apple.com", "Sec-Fetch-Site": "same-site", "Cookie": "s_fid=093903CAAEA2D914-011FDC14372ABDA6;s_sq=%5B%5BB%5D%5D;s_vi=[CS]v1|35138860052FA611-40001
@troyhunt
troyhunt / Build-Troys-PC.md
Created October 20, 2025 04:04
Help me spec out a replacement PC that absolutely *flies*

Time is money, and my 5+ year old desktop is costing me a heap of it right now. The final straw has come when processing several terabytes of stealer logs which has taken forever. Meanwhile, Stefan has been flying through them with a massive NVMe drive on a fast motherboard.

So, in no particular order, here's what I need it to do:

  1. Read and write multi-terabyte files fast
  2. Run SQL Server locally for both development and querying of large data sets (the latter is especially memory intensive)
  3. Dev environment is largely Visual Studio, SSMS and other (less intensive) tools
  4. Run a gazillion simultaneous Chrome tabs 😛

And here's my current thinking:

#!/bin/sh
# dfn: df normalized, or df not noisy, or df nicely, or df new
#
# Whatever you want to call it, this script makes df useful again.
# It removes read-only disks for Time Machine backups, system volumes
# that can't be modified, unbrowsable volumes, and other stuff you don't
# really care about.
#
# Instead, you get the same drives that you see on your Mac desktop in an
@mdbraber
mdbraber / save-safari-pdf.swift
Last active March 19, 2026 16:27
Save Safari website as PDF (with syncing cookies)
#!/usr/bin/swift
@preconcurrency import WebKit
@preconcurrency import Foundation
@preconcurrency import Darwin
// Disable everything written to stderr
freopen("/dev/null", "w", stderr)
struct Cookie {
@jasonsnell
jasonsnell / countdupes.py
Last active February 8, 2025 22:02
Count Duplicates in List
import subprocess
import re
import sys
from Levenshtein import ratio
from collections import defaultdict, Counter
# Configuration: Adjust as needed
INCLUDE_PARENTHESES = False # Set to True to include parentheticals, False to exclude them
OUTPUT_TO_CLIPBOARD = True # Set to True to copy output to clipboard, False to print to console
@ldavidh
ldavidh / moreFinderTerminal.sh
Last active May 30, 2026 14:14
alternate sel script
#cd into directory in Finder's front window
function cdf() {
finderPath=`osascript -e 'try
tell application "Finder" to set the source_folder to (folder of the front window) as alias
on error
tell application "Finder" to set source_folder to insertion location as alias
end try
return POSIX path of source_folder as string'`
cd "$finderPath"
@ivmirx
ivmirx / mute-mastodon.txt
Last active August 7, 2024 01:28
Filter list for Mastodon, based on mentalhealth.txt by @potatoqualitee
Disclaimer: many of those are extremely important but I believe that social media isn't fit to discuss them
## Politics ##
alt-right
bipartisan
Brexit
Capitol
CCP
China
CIA
@timothyham
timothyham / ipv6guide.md
Last active July 20, 2026 18:26
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@chockenberry
chockenberry / df.sh
Created March 4, 2024 18:51
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | cut -f 3 -w`
@gruber
gruber / Split Tabs to New Window.scpt
Last active December 1, 2025 22:56
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,