Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#pacmd set-default-sink alsa_output.usb-Logitech_Logitech_G933_Gaming_Wireless_Headset-00.analog-stereo
#pacmd set-default-source alsa_input.usb-Logitech_Logitech_G933_Gaming_Wireless_Headset-00.analog-mono
set -e
QUDELIX_SINK="alsa_output.usb-QTIL_Qudelix-5K_USB_DAC_ABCDEF0123456789-00.analog-stereo"
SPEAKER_SINK="alsa_output.pci-0000_0f_00.4.3.iec958-stereo"
STAGE_SINK="alsa_output.usb-ACTIONS_Stage_V2-00.analog-stereo"
BOSE_SINK="bluez_output.78_2B_64_CE_04_03.1"
@jbrechtel
jbrechtel / volume
Created May 15, 2025 00:44
volume raising + lowering script
#!/usr/bin/nu
def main [] {
print "main"
}
def "main raise" [] {
let vol = currentVolume
if ($vol < 100) {
pactl set-sink-volume @DEFAULT_SINK@ $"($vol + 1)%"
@jbrechtel
jbrechtel / apps.nuon
Created May 15, 2025 00:40
Switch Run
[ { name: "Firefox - Personal"
, app_id: "firefox_personal"
, exec: "/usr/lib/firefox/firefox"
, args: ["--class=firefox", "-P", "personal", "--name=firefox_personal"]
}
, { name: "Firefox - Work"
, app_id: "firefox_work"
, exec: "/usr/lib/firefox/firefox"
, args: ["--class=firefox", "-P", "flipstone", "--name=firefox_work"]
}
@jbrechtel
jbrechtel / timezones
Last active September 17, 2018 14:21
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
#!/bin/sh
#pacmd set-default-sink alsa_output.usb-Logitech_Logitech_G933_Gaming_Wireless_Headset-00.analog-stereo
#pacmd set-default-source alsa_input.usb-Logitech_Logitech_G933_Gaming_Wireless_Headset-00.analog-mono
function switchAudio() {
case "$1" in
"logitech")
local sink="alsa_output.usb-Logitech_Logitech_G933_Gaming_Wireless_Headset-00.analog-stereo"
@jbrechtel
jbrechtel / subscription_by_queue_arn.sh
Last active April 22, 2022 10:58
goaws SNS -> SQS subscription
#!/bin/sh
echo "CREATING SUBSCRIPTION WITH QUEUE ARN"
set -e
ENDPOINT_URL="http://localhost:4100"
export AWS_DEFAULT_REGION="us-east-1"
export AWS_SECRET_ACCESS_KEY="fakefakefake"
export AWS_ACCESS_KEY_ID="faketyfakefake"
TOPIC_ARN=$(aws --endpoint-url $ENDPOINT_URL sns create-topic --name test-topic | jq -r ".TopicArn")
/* utilities */
.pull-left {
float: left;
}
.sr-only {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
@jbrechtel
jbrechtel / bikepacking.org
Last active June 28, 2017 18:44
Bikepacking List

Considerations

  • Volume is worse than weight
  • Eat before you’re hungry

Necessary

  • Food (things you can consume quickly and on the bike)
  • Water (more than 2 water bottles. A camelback in a framebag works well here)
  • Shelter with rain fly
@jbrechtel
jbrechtel / uri_join_sucks.rb
Created May 24, 2017 20:27
Why Ruby's URI join sucks.
require 'uri'
base = 'http://google.com'
foo = 'foo'
bar = 'bar'
puts URI::join(base, foo)
puts URI::join(base, foo, bar)