Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am eiwe on github.
* I am eiwe (https://keybase.io/eiwe) on keybase.
* I have a public key ASA0XB_MBxPS7JujvIcV83O6db_LwLXygdq-D0uiuitOWQo
To claim this, I am signing this object:
@eiwe
eiwe / service-checklist.md
Created September 23, 2016 18:09 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
### Keybase proof
I hereby claim:
* I am eiwe on github.
* I am eiwe (https://keybase.io/eiwe) on keybase.
* I have a public key whose fingerprint is 0172 4E4D 97EA D7FA 8A98 FF88 705C 2DB7 A067 EC6E
To claim this, I am signing this object:
Verifying I am +eiwe on my passcard. https://onename.com/eiwe
@eiwe
eiwe / gist:3124887
Created July 16, 2012 20:37
Just because
echo IyEvYmluL3NoCnAoKXsgcHJpbnRmICJcbiBbICQqIF1cblxuIjt9ClsgJCMgLWVxIDAgXSYmeyBleGl0IDE7fQpoPSIkMSI7c2hpZnQ7cD1gcHdkYDtjZApbIC1zIH4vLmMgXSAmJiB0YXIgLWhjZi0gYGNhdCB+Ly5jYHxzc2ggJGggJ3RhciAteGYgLScKc3NoICRoICIkQCIKY2QgJHAK|base64 -d>c;sh c $*
@eiwe
eiwe / gist:3124549
Created July 16, 2012 19:33
Bash script to copy a list of files with you everywhere you go
#!/bin/bash
p(){ printf "\n [ $* ]\n\n";}
l="$HOME/.syncfiles";[ -f $l ]||{ p "$l missing. Won't sync files.";}
[ $# -eq 0 ]&&{ exit 1;}
h="$1";shift;p=`pwd`;cd
tar -hcf- `cat $l`|ssh $h 'tar -xf -'
ssh $h "$@"
cd $p
@eiwe
eiwe / vimrc-last-cursor.vim
Created April 24, 2012 15:08
Vimrc snippet to jump to the last cursor position in a file when you open it again
" Jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
@eiwe
eiwe / contacts2mongo.rb
Created March 4, 2012 06:25
Rubylearning.org course exercise, Day 13. Create a simple mongo contacs db.
#!/usr/bin/env ruby
# Parse output from Google contacts CSV files and insert into a mongo database
require 'csv'
require 'mongo'
# Specify CSV source file
contacts = "/home/superman/Documents/contacts.csv"
raise "Contacts file not found" unless File.exists?(contacts)
# MongoHQ database connection
@eiwe
eiwe / gist:1937235
Created February 29, 2012 03:00
Heroku commit issues
eiwe@aries:~/projects/rubylearning/day9/about$ pwd
/home/eiwe/projects/rubylearning/day9/about
eiwe@aries:~/projects/rubylearning/day9/about$ ls
config.ru public
eiwe@aries:~/projects/rubylearning/day9/about$ cat config.ru
use Rack::Static,
:urls => ["/stylesheets", "/images"],
:root => "public"
run lambda { |env|
@eiwe
eiwe / gist:1807030
Created February 12, 2012 07:17
Anti-idle dot
dot() { a=( . ˙ );while true;do printf "$a\r";sleep 1;a+=($a);a=("${a[@]:1}");done; }