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
# Welcome to Episkopos! | |
# Now, I know you are all wondering what madness has crawled out of my twisted | |
# mind and into your computer. This is a register based virtual machine... | |
# written completely in bash. | |
# Don't look at me like that, its a great idea. | |
# Think of a world where bash is compiled to bash and run on bash. Its an endless | |
# recursive cycle. The name comes from discordianism, which I often turn to | |
# when I'm writing something particularlly nutty. | |
declare -A general_reg=(["r0"]=0 ["r1"]=0 ["r2"]=0 ["r3"]=0 ["r4"]=0 ["r5"]=0 ["ze"]=0 ["tr"]=1) |
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
This playbook has been removed as it is now very outdated. |
This file has been truncated, but you can view the full file.
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 random | |
def random_words(num, separator='-'): | |
""" | |
Return `num`-random concatinated to each other. | |
They will be joined by `separator` | |
""" |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
# sshtail.py | |
# A script to tail a file across many systems at once | |
# Author: Luke Macken <[email protected]> | |
# License: GPLv3+ | |
import getpass | |
import subprocess | |
servers = ['app1', 'app2', 'app3', 'app4', 'app5', 'app6', 'app7'] | |
logfile = '/var/log/httpd/access_log' |
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 python | |
# A simple script that can be used to turn URLs into links | |
# | |
# Using within a pipeline: | |
# | |
# $ echo 'http://lewk.org' | linkify | |
# <a href="http://lewk.org">http://lewk.org</a> | |
# | |
# Using on a file: | |
# |
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
.*.swp |
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
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery | |
set nocompatible | |
set autoindent | |
set tabstop=2 | |
set showmatch | |
set vb t_vb= | |
set ruler | |
set nohls | |
set incsearch | |
syntax on |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | 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
# Gitosis setup instructions for Fedora | |
# copied from http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way | |
# and modified to work on Fedora | |
# Comment out the next two lines after you've changed this script to match your config | |
echo "This is not meant to be run as a script!" | |
exit 0 | |
# do you have setuptools or distribute? if not, run these commands | |
cd ~/src |
NewerOlder