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 | |
# A quick and dirty script for quickly SSHing to local vagrant virtual machines. | |
# It assumes default Vagrant port forwards. Your first VM is at 2222, your second | |
# is at 2200. Anything more than that and you're in trouble. | |
# Why? Because: | |
# | |
# $ ( time vagrant ssh -c echo ) 2>&1 | grep real | |
# real 0m4.870s |
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
" Don't enter vi-compatible mode if called as 'vi' instead of 'vim' | |
set nocompatible | |
" Show the mode (duh) | |
set showmode | |
" Syntax hilighting (duh) | |
syntax on | |
" Allow edited files to set modes in a modeline. |
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 | |
function usage() { | |
echo "usage: $0 <volume (0-100)> <say args...>" | |
echo | |
echo "Unmutes and sets the system volume to volume%, passing the remaining" | |
echo "arguments to the OSX \`say' command, restoring volume / mute setting" | |
echo "to previous values after the speech has completed." | |
exit 1 | |
} |
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
su - alan | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist | |
exit | |
cat <<EOF | at tomorrow | |
osascript -e 'set volume output muted false' | |
osascript -e 'set volume output volume 100' | |
open "http://www.youtube.com/watch?v=sTSA_sWGM44" | |
EOF |
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
awk '/^[0-9]{2}:[0-9]{2} <@twgbot> (Game|Fun) starting! (.*):/ { sub("^(.*:){2}\\s",""); total += NF; count++ } END {print "Average of " total/count " players per game. " count " games played."}' \#werewolf.log |
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
{ | |
"Statement": [ | |
{ | |
"Sid": "PackerSecurityGroupAccess", | |
"Action": [ | |
"ec2:CreateSecurityGroup", | |
"ec2:DeleteSecurityGroup", | |
"ec2:DescribeSecurityGroups", | |
"ec2:AuthorizeSecurityGroupIngress", | |
"ec2:RevokeSecurityGroupIngress" |
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
{ | |
"Statement": [ | |
{ | |
"Sid": "PackerAMIAccess", | |
"Action": [ | |
"ec2:CreateImage", | |
"ec2:RegisterImage", | |
"ec2:DescribeImages" | |
], | |
"Effect": "Allow", |
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 | |
rdom () { local IFS=\> ; read -d \< E C ;} | |
base_ami=$(while rdom; do | |
if [[ $E = description ]]; then | |
if [[ $C =~ ^ami- ]]; then | |
echo $C | |
fi | |
fi | |
done < /var/lib/jenkins/jobs/packer-base/lastSuccessful/build.xml | head -n 1) |
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 | |
# Debian package dependencies: html-xml-utils qprint w3m | |
parcel=$1 | |
from=$2 | |
to=$3 | |
tmp=/tmp/parcelforce_$parcel |
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 | |
# usage: ./remove-mkv-subtitles.sh [--no-dry] [path(s)] | |
# Script to find MKV files in the given paths and remove subtitle tracks from them. Dry run by default. | |
# (usually) non-default dependencies: mkvtoolnix, dc | |
remvsub(){ | |
set -e |
OlderNewer