This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -x | |
pacmd load-module module-remap-sink sink_name=mono master=$(pacmd list-sinks | grep -m 1 -oP 'name:\s<\K.*(?=>)') channels=2 channel_map=mono,mono |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x -e -o pipefail | |
: for deb-multimedia keyring, browse http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring | |
ansible -i localhost, -c local localhost -m apt_repository -a 'repo="deb http://www.deb-multimedia.org stable main non-free"' | |
ansible -i localhost, -c local localhost -m apt_repository -a 'repo="deb http://www.deb-multimedia.org testing main non-free"' | |
ansible -i localhost, -c local localhost -m apt_repository -a 'repo="deb http://www.deb-multimedia.org unstable main non-free"' | |
: for dropbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WINNAME="${1?usage: "$0" windowname}" | |
set -e | |
TMP=$(mktemp) | |
trap 'rm -f $TMP' EXIT | |
eval "$(xdotool getmouselocation --shell)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMG=${1?usage: $0 <img>} | |
NAME=wheezy32 | |
set -e -x | |
rm -f "${IMG}.vmdk" package.box | |
VBoxManage convertfromraw "$IMG" "${IMG}.vmdk" --format vmdk | |
VBoxManage unregistervm "$NAME" --delete || : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=${1?usage: $0 <dir>} | |
NAME=${DIR##*/} | |
set -e -x | |
rm -rf "$DIR" | |
trap 'set +e; umount "$DIR/proc"; umount "$DIR/sys"; rm -rf "$DIR"' EXIT INT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=${1?usage: $0 <dir> <img>} | |
OUT=${2?usage: $0 <dir> <img>} | |
set -e -x | |
rm -f "$OUT" | |
trap 'rm -f $OUT' EXIT INT | |
virt-make-fs --partition=mbr --type=ext3 --format=raw --size=+300M "$DIR" "$OUT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'dummy' | |
config.ssh.forward_agent = 'true' | |
config.vm.synced_folder '.', '/vagrant', type: 'sshfs' # only works with ubuntu | |
config.vm.provider :aws do |aws, override| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEV=${1?must specify a device} | |
function finish { | |
for d in boot dev/pts dev proc sys; do | |
if test -d "$PWD/usbroot/$d" && mount | grep -q "$PWD/usbroot/$d"; then | |
umount "$PWD/usbroot/$d" | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script: | |
- true TESTS RUN HERE | |
- true Test if we .gitignore test files | |
- TMP=$(tempfile) | |
- git ls-files . --exclude-standard --others | tee "$TMP" | |
- if test -s "$TMP"; then false; else true; fi | |
- true Test if we .gitignore any tracked files | |
- git ls-files -i --exclude-standard | tee "$TMP" | |
- if test -s "$TMP"; then false; else true; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x -e | |
: gc conteiners | |
docker ps --filter 'status=exited' -q | xargs -r docker rm | |
docker ps --filter 'status=created' -q | xargs -r docker rm | |
: gc images | |
docker images --filter "dangling=true" -q | xargs -r docker rmi |