Skip to content

Instantly share code, notes, and snippets.

View zacs's full-sized avatar

Zac zacs

View GitHub Profile
@zacs
zacs / lssdr.sh
Last active September 1, 2026 11:42
A bash function to list out all the SDRs (software-defined radios) on a host, along with any processes holding onto them. Ready to paste into your .zshrc or whatever you use.
# lssdr — list SDR USB devices, their serials, and which process/container
# holds each one. Works across Docker containers.
# Privileged containers get their own mknod'd /dev nodes, so inode-based
# matching misses their claims; this scans /proc/*/fd symlink targets.
# Output looks like:
# /dev/bus/usb/002/002 Blog_V4 serial:00000001 free
# /dev/bus/usb/002/003 NESDR_SMArt_v5 serial:00001004 free
# /dev/bus/usb/002/004 AIRSPY serial:AIRSPY_SN:B01861DC39508C1F HELD by 32600 (trunk-recorder) [container:9a98570483dd]
# /dev/bus/usb/002/005 NESDR_SMArt_v5 serial:00001002 free
@zacs
zacs / uptime_kuma-github_dark.css
Last active July 14, 2026 14:50
An Uptime Kuma theme that looks like Github Dark
/* ========================================
GITHUB DARK — UPTIME KUMA STATUS PAGE
VERSION: v12
Faithful to GitHub's Primer dark theme:
Mona Sans (GitHub's typeface), flat bordered
boxes, green primary buttons, Primer label
pills, full-bleed flash banner.
6px corners on containers; heartbeat cells
stay hard-square (contribution-graph style).
----------------------------------------
@zacs
zacs / tars-lines.txt
Last active October 16, 2026 03:42
Every line spoken by TARS in Interstellar. Not many, but in case you want to train a NN or Markov chain.
How did you find this place?
You had the coordinates for this facility marked on your map. Where did you get them?
How did you find us?
All here, Mr Cooper. Plenty of slaves for my robot colony.
I have a cue light I can turn on when I’m joking, if you like.
You can use it to find your way back to the ship after I blow you out the airlock.
One hundred percent.
Ninety percent.
Absolute honesty isn’t always the most diplomatic, or safe form of communication with emotional beings.
Eight months to Mars, then counter-orbital slingshot around.
@zacs
zacs / flac_to_mp3.sh
Created April 23, 2016 20:02
FLAC to 320CBR MP3
for a in *.flac; do
ffmpeg -i "$a" -ab 320k -map_metadata 0 -id3v2_version 3 "${a[@]/%flac/mp3}"
done

Keybase proof

I hereby claim:

  • I am zacs on github.
  • I am zacs (https://keybase.io/zacs) on keybase.
  • I have a public key whose fingerprint is 3841 1CC6 F197 1927 FD7B EABA FDE5 227D 120D 7755

To claim this, I am signing this object:

@zacs
zacs / LebowskiPhrases.csv
Last active September 3, 2024 07:58
Text segmentation analysis of the Big Lebowski script, looking for multi-word phrase size and frequency.
Phrase Word Count Frequency
this is what happens when you fuck a stranger in the ass 12 2
he lives in north hollywood on radford near the in-and-out burger 11 2
it's a complicated case maude lotta ins lotta outs 9 2
so what the fuck are you talking about 8 2
what the fuck are you talking about 7 6
what the fuck is he talking about 7 2
we know that this is your homework 7 2
we throw the money out of the 7 2
you're out of your element this chinaman 7 2
@zacs
zacs / footnotes.js
Created January 19, 2014 02:44
Code for adding Grantland-style footnotes to Jekyll.
var Utils = {
cache: {},
watchResize: function(callback) {
//throttled resize
var resizing;
callback.size = 0;
function done()
{
var curr_size = window.innerWidth;
clearTimeout(resizing);
@zacs
zacs / hack.sh
Created April 6, 2012 20:51 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2322839/hack.sh | sh
#