Skip to content

Instantly share code, notes, and snippets.

@devn
devn / index.txt
Created February 27, 2012 04:40 — forked from gus/index.txt
Ruby/Clojure analogs
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
@devn
devn / gist:2019102
Created March 12, 2012 01:08 — forked from rsanheim/gist:1871433
ec2_display.sh
#!/bin/bash
export DISPLAY=":$(ps -ef|grep '.*nxagent.*-[D].*' | cut -d':' -f5).0"
xhost +SI:localuser:pair
@devn
devn / at_all.clj
Created March 12, 2012 22:24 — forked from ctford/at_all.clj
A short piano piece in Overtone
(ns overtunes.songs.at-all
(:use
[overtone.live :only [at now]]
[overtone.inst.sampled-piano :only [sampled-piano]]))
(defn bpm [beats-per-minute]
(let [start (now)
ms-per-minute (* 60 1000)
ms-per-beat (/ ms-per-minute beats-per-minute)]
#(+ start (* ms-per-beat %))))
@devn
devn / ci.sh
Created March 28, 2012 16:20 — forked from rsanheim/ci.sh
Simple continuous deployment via Jenkins and Capistrano for all branches. Wire this up with Github post receive hooks from Jenkins for best results.
#!/bin/bash -x
# This should be your "script/ci" checked into version control, and then wired as your sole build step in Jenkins.
#
# Simplifying Assumptions:
#
# * You build all branches
# * You want to deploy all branches.
# * You wired up an SSH key to your CI server appropriately so it can talk to your deployment target(s) via Cap
@devn
devn / hack.sh
Created March 31, 2012 17:54 — forked from erikh/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
#
@devn
devn / scsh-brew-install
Created April 7, 2012 15:53
scsh build issue
`brew --config`:
HOMEBREW_VERSION: 0.9
HEAD: fbbf0b2e5a860a4235bd91ac0d3353288e2cb9f4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.2.1
@devn
devn / gist:2330105
Created April 7, 2012 16:22
lush build error
src/lush-2.0.1> make
for d in src ; \
do ( cd $d && make all ) || exit ; done
g++ -DHAVE_CONFIG_H -DNO_DEBUG -Wall -O3 -mmmx -msse -I../include -I/usr/X11/include -I/usr/X11/include/freetype2 -o lush2 at.o binary.o cref.o calls.o arith.o check_func.o date.o dh.o dump.o eval.o fileio.o fltlib.o fpu.o function.o event.o graphics.o htable.o idx1.o idx2.o idx3.o idx4.o index.o io.o list.o main.o math.o misc.o cmm.o module.o number.o oostruct.o regex.o storage.o string.o symbol.o toplevel.o user.o weakref.o ps_driver.o rng.o lisp_driver.o x11_driver.o unix.o cpp.o -L/usr/X11/lib -lXft -R/usr/X11/lib -lSM -lICE -lX11 -lreadline -lcurses -lutil -ldl -lm
Undefined symbols for architecture x86_64:
"_FcNameParse", referenced from:
_getfont in x11_driver.o
"_FcPatternDestroy", referenced from:
_getfont in x11_driver.o
"_FcPatternGet", referenced from:
@devn
devn / lush.rb
Created April 7, 2012 16:29
lush formula
require 'formula'
class Lush < Formula
url 'http://downloads.sourceforge.net/project/lush/lush2/lush-2.0.1.tar.gz'
homepage 'http://lush.sourceforge.net/'
md5 '35547934a3038a34ef64272cec51c60b'
def install
# will not build 64-bit
ENV.m32
(ns interface.boot
"This namespace is only used while developing
to start and stop an internal webserver."
(:use [ring.adapter.jetty :only [run-jetty]]
[ring.middleware.stacktrace :only [wrap-stacktrace]])
(:require [interface.routes :as routes])
(:gen-class))
(def ^:dynamic *port* 8081)