Skip to content

Instantly share code, notes, and snippets.

View gburd's full-sized avatar

Greg Burd gburd

View GitHub Profile
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#
@jtuple
jtuple / claim_dryrun.erl
Created January 26, 2012 19:19
Perform ring claim dry run, reporting new ring and would-be pending transfers
%% Claim dry-run / simulation code
%%
%% If running outside attached Riak shell, must have Riak libs in codepath and
%% proper cookie / long-form node name. Eg:
%% erl -pa RIAK/deps/*/ebin -setcookie riak -name [email protected]
%%
%% Run node/2 passing in cluster claimaint and number of new nodes to test:
%% Add 1 node: claim_dryrun:node('[email protected]', 1)
%% Add 2 nodes: claim_dryrun:node('[email protected]', 2)
%% ...
@redjohn
redjohn / Gemfile
Created February 7, 2012 02:11
Riak testing
source :rubygems
gem 'riak-client'
@david-mcneil
david-mcneil / datomic-tutorial-snippet.clj
Created March 17, 2012 15:03
Port of part of the datomic tutorial to Clojure
(ns datomic-tutorial (:import [datomic Peer Util]
[java.io FileReader]))
;;create database
(Peer/createDatabase "datomic:mem://seattle")
(Peer/createDatabase "datomic:mem://seattle")
(let [conn (Peer/connect "datomic:mem://seattle")]
;; setup sample schema
(.get (.transact conn
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@rzezeski
rzezeski / gist:2485252
Created April 25, 2012 01:28
New `riak-admin transfers` output
@jaredmorrow
jaredmorrow / smartos.md
Created May 7, 2012 17:31
Building erlang on SmartOS

Building Riak on SmartOS, the hard way

Build Machine

Here is some information on the build machine I'm using for reference:

  1. Dataset

    $ dsadm list

UUID OS PUBLISHED URN

@stuarthalloway
stuarthalloway / gist:2645453
Created May 9, 2012 15:22
Datomic queries against Clojure collections
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
42)
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
@marcuswestin
marcuswestin / gitup.md
Created May 9, 2012 20:26
Update current git repo
@jboner
jboner / latency.txt
Last active December 3, 2025 15:36
Latency Numbers Every Programmer Should Know
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