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
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: |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
" Vim color file | |
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration) | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
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 bash | |
# Configuration | |
SERVER='myserver' | |
DEPLOY_TO='/path/to/app' | |
EXCLUDE='*.swp .git/ db/sphinx/ tmp/ log/' | |
DRY_RUN=false | |
DEPLOY_GEM_PATH='/opt/ec/ruby/1.8.7/lib/ruby/gems/1.8' |
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
# Simple bijective function | |
# Basically encodes any integer into a base(n) string, | |
# where n is ALPHABET.length. | |
# Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047 | |
ALPHABET = | |
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//) | |
# make your own alphabet using: | |
# (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join |
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
/* $Id: colorize.c 3816 2004-07-03 17:01:32Z lefevre $ | |
* | |
* Colorize the standard input. Written for zsh stderr coloring. | |
* This was taken from a mail archive on the subject of colorizing | |
* the stderr stream in zsh. It was written by Vincent Lefèvre as far | |
* as I know. It is here so it can be used in a brew formula. | |
* | |
* The intended usage is to place a line like the following in your zshrc | |
* exec 2>>(colorize `tput bold; tput setaf 1` `tput sgr0` > /dev/tty &) | |
* |
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
diff --git a/metacity-1/metacity-theme-3.xml b/metacity-1/metacity-theme-3.xml | |
index 0e285a9..52d8c54 100644 | |
--- a/metacity-1/metacity-theme-3.xml | |
+++ b/metacity-1/metacity-theme-3.xml | |
@@ -46,17 +46,14 @@ | |
<distance name="right_titlebar_edge" value="1"/> | |
</frame_geometry> | |
-<frame_geometry name="max" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false"> | |
+<frame_geometry name="max" has_title="false" parent="normal" rounded_top_left="false" rounded_top_right="false"> |
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 bootcamp.factorial) | |
(defn fast-factorial [number] | |
(loop [n number factorial 1] | |
(if (zero? n) | |
factorial | |
(recur (- n 1) (* factorial n))))) | |
(defn fast-no-loop-factorial | |
([number] (fast-no-loop-factorial number 1)) |
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
chdir /var/www/rails_apps/the_one | |
env RAILS_ENV=production | |
exec /usr/bin/bundle exec unicorn_rails -c config/unicorn.rb | |
respawn | |
# This start on stanza works, but it's simplistic | |
# Will add a stop on stanza once I make up my mind about stop on | |
start on runlevel [3] |
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
NAME=project | |
VERSION=0.0.1 | |
DIRS=etc lib bin sbin share | |
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null` | |
INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null` | |
DOC_FILES=*.md *.txt | |
PKG_DIR=pkg | |
PKG_NAME=$(NAME)-$(VERSION) |
OlderNewer