View passphrase_generator.sh
This file contains 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
cat /usr/share/dict/words | grep -E "^[a-z]{4,8}$" | gshuf -n 4 | paste -s -d " " - |
View convert_tweets_csv.py
This file contains 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
import csv | |
import re | |
tweets = set() | |
with open('tweets.csv', 'rb') as csvfile: | |
reader = csv.reader(csvfile, delimiter=',', quotechar='"') | |
for row in reader: | |
tweet = unicode(row[5], 'utf-8') | |
tweets.add(tweet) |
View dtruss_open.sh
This file contains 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
sudo dtruss -t open -p PID |
View 01_QR.scala
This file contains 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
object QR extends App{println("(display \"printf %s \\\"Transcript show: 'puts [regsub -all {.} \\\\\\\"};0 nruter;)\\\\\\\\\\\\\\\"eludomdne dne;)\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\(yalpsid\\\\\\\\\\\\$\\\\\\\\\\\\\\\"(tnirp};)\\\\\\\\\\\\\\\";)\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\ n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\t\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"(tnirp;)\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"t\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"?0>2%)j>>\\\\\\\\]1-i\\\\\\\\[s((tnirp)--j;0=>j;6=j(rof;)\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\(etirw\\\\\\\\\\\\$\\\\\\\\\\\\\\\"(tnirp{)++i;htgnel.s=<i;1=i(rof;)\\\\\\\\\\\\\\\" nigeb laitini;RQ eludom\\\\\\\\\\\\\\\"(tnirp;j,i tni;)\\\\\\\\\\\\\\\";RQ dne;)\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\DNE)\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\}s tnirp;)s,\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\ |
View compile_mosh.sh
This file contains 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
#!/usr/bin/env bash | |
sudo apt-get update | |
sudo apt-get install build-essential autoconf automake libprotobuf-dev \ | |
protobuf-compiler libncurses5-dev zlib1g-dev libio-pty-perl | |
./autogen.sh | |
protobuf_CFLAGS=" " protobuf_LIBS="-lprotobuf" ./configure --prefix="/usr" | |
sed -i s/LITE_RUNTIME/SPEED/ src/protobufs/*.proto | |
make |
View gemocalypse.sh
This file contains 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 | |
GEMS=`gem list --no-versions` | |
for x in $GEMS ; do gem uninstall -x --ignore-dependencies $x; done |
View du-sorted.sh
This file contains 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
du -sm * | sort -nr | head -25 |
View superpull.sh
This file contains 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
CWD=`pwd` | |
for i in `find . -type d -maxdepth 1`; do | |
echo $i | |
cd $i | |
git pull --rebase && git submodule update --init --recursive | |
ctags -R * > /dev/null | |
cd $CWD | |
done |
View 0_deterministic_sample.rb
This file contains 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
require 'backports/1.9.1' if RUBY_VERSION < '1.9.1' | |
require 'backports/1.9.2' if RUBY_VERSION < '1.9.2' | |
require 'digest' | |
class Array | |
def deterministic_sample(n, name='') | |
seed = Digest::SHA1.hexdigest(self.sort.map(&:to_s).join << name).to_i(16) | |
prng = Random.new(seed) | |
self.sort.sample(n, :random => prng) | |
end |
View Makefile
This file contains 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
source_files := $(wildcard src/*.jpg) | |
resized_files := $(source_files:src/%.jpg=resized/%.jpg) | |
all: $(resized_files) | |
resized/%.jpg: src/%.jpg | |
convert $< -resize 1920x1080 $@ |