Skip to content

Instantly share code, notes, and snippets.

View gburd's full-sized avatar

Greg Burd gburd

View GitHub Profile
@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")
@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

@rzezeski
rzezeski / gist:2485252
Created April 25, 2012 01:28
New `riak-admin transfers` output
@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
#
@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
@redjohn
redjohn / Gemfile
Created February 7, 2012 02:11
Riak testing
source :rubygems
gem 'riak-client'
@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)
%% ...
#!/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/
#
@jjcomer
jjcomer / ants.clj
Created December 18, 2011 18:22
Ant Simulation -- From Clojure Concurrency Presentation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;As shown in the presentation: http://blip.tv/clojure/clojure-concurrency-819147
@benjaminws
benjaminws / joyent-smartos.erb
Created October 10, 2011 19:50
joyent-smartos.erb
# shove this in ~/.chef/bootstrap/joyent-smartos.erb
# run knife bootstrap <hostname> -d joyent-smartos
bash -c '
if [ ! -f /opt/local/bin/chef-client ]; then
cd /tmp
pkgin install gcc-compiler gcc-runtime gcc-tools-0 ruby19 scmgit-base scmgit-docs gmake sun-jdk6
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar -xzf rubygems-1.8.10.tgz
cd rubygems-1.8.10