View 0_reuse_code.js
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View switch-headphones.sh
#!/usr/bin/env bash | |
SINK_SPEAKERS="alsa_output.pci-0000_00_1b.0.analog-stereo" | |
SINK_HEADPHONES="alsa_output.usb-Logitech_Logitech_G930_Headset-00-Headset.analog-stereo" | |
pacmd stat | grep "Default sink name" | grep --quiet "$SINK_SPEAKERS" | |
if [ $? == 0 ] | |
then | |
pacmd set-default-sink "$SINK_HEADPHONES" \ |
View bash-history.sh
export HISTSIZE="" | |
if [ "$PS1" ]; then | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
fi |