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 ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
messages = {} | |
first_run = true | |
loop do |
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
#!/bin/env ruby | |
require 'rubygems' | |
require 'eventmachine' | |
def start_nodes(num_nodes, num_messages) | |
EM.run { | |
nodes = [] | |
num_nodes.times do | |
nodes << EM.spawn{|message| |
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
(defmodule hello | |
(export (start 0) (len 1))) | |
(defun start () | |
(: io format '"Hello World!~n")) | |
(defun len (l) | |
(if (== l ()) 0 | |
(+ 1 (len (cdr l))))) |
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
X = fun() -> | |
lists:foldl(fun(Pid, Acc) -> | |
case erlang:process_info(Pid,message_queue_len) of | |
undefined -> | |
Acc; | |
{_, Len} -> | |
if | |
Len > 3 -> | |
[{Len, process_info(Pid)} | Acc]; | |
true -> |
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
function set_current_ssh_auth_sock { | |
current_ssh_auth_sock=${1:-~/.ssh/current_ssh_auth_sock} | |
if [ ! -e "$current_ssh_auth_sock" -o -h "$current_ssh_auth_sock" ] | |
then | |
if file -L "$current_ssh_auth_sock" >/dev/null | |
then | |
SSH_AUTH_SOCK="$current_ssh_auth_sock" | |
else | |
rm -f "$current_ssh_auth_sock" |
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
package main | |
import ( | |
"encoding/line" | |
"fmt" | |
"io" | |
"net" | |
"strings" | |
) |
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
(setq android-mode-sdk-dir "~/android-sdk-mac_86/") | |
(require 'android-mode) | |
(require 'java-mode-indent-annotations) | |
(setq java-mode-hook | |
(function (lambda() | |
(java-mode-indent-annotations-setup)))) |
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
module Cicada where | |
import Data.List (union, intersect) | |
broodA = [4,8..] | |
broodB = [6,12..] | |
broodC = [7,14..] | |
currentBroods = broodA `union` broodB `union` broodC |
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
(ns riaktest.app | |
(:import | |
[com.basho.riak.client RiakFactory])) | |
(def client (RiakFactory/pbcClient)) | |
(defn -main [] | |
(println "woot")) |
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
(defn set-ssl | |
[task & args] | |
(do | |
(System/setProperty "javax.net.ssl.trustStoreProvider" "Apple") | |
(System/setProperty "javax.net.ssl.trustStoreType" "KeychainStore") | |
(System/setProperty "javax.net.debug" "all"))) | |
(def settings {:hooks [set-ssl]}) |