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
#latest ovs | |
wget -qO- http://openvswitch.org/releases/openvswitch-2.5.0.tar.gz | tar xzvf - | |
cd openvswitch-2.5.0 | |
#dependencies | |
apt-get update && apt-get install -y graphviz autoconf automake bzip2 debhelper dh-autoreconf libssl-dev libtool openssl procps python-all python-qt4 python-twisted-conch python-zopeinterface | |
#build debs | |
DEB_BUILD_OPTIONS='parallel=8' fakeroot debian/rules binary |
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
package main | |
import ( | |
"crypto/x509" | |
"encoding/pem" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
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
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"os" | |
) | |
const ( |
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 | |
#os check | |
case `uname -s` in | |
Darwin) OS="osx";; | |
Linux) OS="linux64";; | |
*) echo "unknown os: $(uname -s)" && exit 1;; | |
esac | |
#version check | |
echo -n "checking latest version... " | |
VER=`curl -sI https://github.com/zyedidia/micro/releases/latest | grep Location | sed "s~^.*tag\/v~~" | tr -d '\n' | tr -d '\r'` |
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
#tmux helper | |
echo '#!/bin/bash | |
NAME="${1}" | |
if [[ "$NAME" = "" ]]; then | |
tmux ls | |
else | |
tmux attach-session -t "$NAME" || tmux new-session -s "$NAME" | |
fi' > /usr/local/bin/tm && | |
chmod +x /usr/local/bin/tm |
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 | |
# concat multiple mp3 files into a single mp3 | |
# installation: | |
# chmod +x tomp3 and save to /usr/local/bin/tomp3 | |
# usage: tomp3 <DIR> [NAME] | |
# finds all mp3 files in DIR, writes a single mp3 to NAME.mp3 | |
# set NAME to --preview to list mp3s in the order they will | |
# be concatenated. | |
# requires: ffmpeg |
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 these in your environment/profile (NOT HERE) | |
AWS_ACCESS_KEY="" | |
AWS_SECRET_KEY="" | |
function s3get { | |
#helper functions | |
function fail { echo "$1" > /dev/stderr; exit 1; } | |
#dependency check |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Comment: GPGTools - https://gpgtools.org | |
mQENBFOraBABCACwTSt0zrIvHgKQVigkukGghPy+04IbIZPSjALucermep/qQij5 | |
RDkXEgNulSceHJp7cAfm48QLXgC7mxNTqLRX/dW6HpErHVjH/3JffITZW/rCIeEA | |
ULAj2b/7N/e7VpcujhotH0m8g/jVCOiX+f+LxHJNYEW734+DUe3qcorbKWSHTR1t | |
2WY5oOxd//4F+0CYCcy+8Jkl6lv//Yz/7EHNUEHp/If+TiIEf2gnfI08Qlbfefz1 | |
n7MUk0ixSrfF8cxmQ8YBOstp/ruQD0lD7Qz1/K9Z10U9Fmlvtq5cj3M70QCI+Qn+ | |
Fcr+6lnltqR5l4OBqYeJ6+kwQbMCtaSwdWjdABEBAAG0IkphaW1lIFBpbGxvcmEg | |
PGpwaWxsb3JhQGdtYWlsLmNvbT6JAT0EEwEKACcFAlOraBACGwMFCQeGH4AFCwkI |
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
# $ apt install rdiff | |
# $ rdiff --help | |
# Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]] | |
# [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]] | |
# [OPTIONS] patch BASIS [DELTA [NEWFILE]] | |
# Options: | |
# -v, --verbose Trace internal processing | |
# -V, --version Show program version | |
# -?, --help Show this help message |