Skip to content

Instantly share code, notes, and snippets.

View tuommaki's full-sized avatar

Tuomas Mäkinen tuommaki

  • Gevulot
  • Finland
View GitHub Profile
@tuommaki
tuommaki / keybase.md
Created January 3, 2018 08:17
Keybase proof

Keybase proof

I hereby claim:

  • I am tuommaki on github.
  • I am tuommaki (https://keybase.io/tuommaki) on keybase.
  • I have a public key whose fingerprint is 95DD 8E68 F10A C0E5 0CB9 1852 AC07 0C50 9D5B 6A41

To claim this, I am signing this object:

@tuommaki
tuommaki / pa-enable-fiio.sh
Last active December 25, 2015 01:39
Script to enable attached FiiO E07K USB DAC/AMP in PulseAudio & move existing audio streams on the fly to FiiO.
#!/bin/sh
SINK_NAME=$(pacmd list-sinks|grep -e 'name: <.*FiiO.*>' | sed 's/.*<\([^>]*\)>.*/\1/')
test -n "$SINK_NAME" && pacmd set-default-sink "$SINK_NAME" 2>&1 > /dev/null || echo "error: No sink found for FiiO"
pacmd list-sink-inputs | grep index | while read line
do
pacmd move-sink-input $(echo $line | cut -f2 -d' ') "$SINK_NAME" 2>&1 >/dev/null
done