This file contains hidden or 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
-module(echo_supervisor). | |
-behaviour(supervisor). | |
%% API | |
-export([start_link/0]). | |
%% Supervisor callbacks | |
-export([init/1]). | |
-define(SERVER, ?MODULE). |
This file contains hidden or 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
-module(echo_server). | |
-behaviour(gen_server). | |
%% Server API | |
-export([start_link/3, stop/1]). | |
%% Client API | |
-export([echo/1, assassinate/1]). | |
%% gen_server callbacks |
This file contains hidden or 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
-module(stopwatch). | |
-behaviour(gen_server). | |
%% Server API | |
-export([start_link/0, stop/0]). | |
%% Client API | |
-export([start_timer/0, stop_timer/0, read_timer/0]). | |
%% gen_server callbacks |
This file contains hidden or 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
function getTwoThings( callback ) { | |
var peopleRequest = $.getJSON( '/data/people.json' ); | |
var taskRequest = $.getJSON( '/data/tasks.json' ); | |
$.when( peopleRequest, taskRequest ) | |
.done(function( people, tasks ) { | |
callback( people[0].people, tasks[0].tasks ); | |
}); | |
} |
This file contains hidden or 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
#Steps | |
pkgin install couchdb | |
svccfg import /opt/local/share/smf/manifest/couchdb.xml | |
svcadm enable couchdb | |
#Test | |
curl http://127.0.0.1:5984/ | |
{"couchdb":"Welcome","version":"1.0.1"} |
This file contains hidden or 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
# -*- mode: Makefile; fill-column: 80; comment-column: 75; -*- | |
ERL = $(shell which erl) | |
ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/*/ebin | |
REBAR=$(shell which rebar) | |
ifeq ($(REBAR),) | |
$(error "Rebar not available on this system") |
This file contains hidden or 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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
This file contains hidden or 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
; vim: filetype=clojure | |
(logging/init :file "riemann.log") | |
(tcp-server) | |
(udp-server) | |
(ws-server) | |
(periodically-expire 10) |
This file contains hidden or 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 'formula' | |
class Kindlegen < Formula | |
url 'http://s3.amazonaws.com/kindlegen/KindleGen_Mac_i386_v2_7.zip' | |
homepage 'http://www.amazon.com/gp/feature.html?docId=1000234621' | |
md5 'b041f83c720ff7b9181e576c0a82140c' | |
version '2.7' | |
skip_clean 'bin' |
This file contains hidden or 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 "deb http://backports.debian.org/debian-backports squeeze-backports main contrib" >> /etc/apt/sources.list | |
echo "deb http://ftp.de.debian.org/debian sid main" >> /etc/apt/sources.list | |
apt-get update | |
apt-get upgrade | |
apt-get install libevent-dev autoconf pkg-config gcc g++ libncurses5-dev make | |
mkdir tmux | |
cd tmux | |
wget "http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120203.tar.gz" | |
tar -zxf tmux-for-iTerm2-20120203.tar.gz | |
cd tmux-for-iTerm2-20120203/ |