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
body { | |
background-color: #FFF; | |
font-family: Verdana, Helvetica, Arial; | |
font-size: 14px; | |
} | |
a img { | |
border: none; | |
} | |
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/sh | |
export SRC=/Users/mig/src | |
export CLOJURE=$SRC/clojure | |
export CLASSPATH=$CLOJURE/clojure-contrib/clojure-contrib.jar:$CLOJURE/clojure-trunk/clojure.jar | |
for file in $SRC/jars/*.jars; do | |
JARS=$JARS:$file | |
done | |
CLASSPATH=$CLASSPATH$JARS | |
java -cp $CLASSPATH jline.ConsoleRunner clojure.lang.Repl |
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 Mocha | |
module ObjectMethods | |
def stub_path(path) | |
path = path.split('.') if path.is_a? String | |
raise "Invalid Argument" if path.empty? | |
part = path.shift | |
mock = Mocha::Mockery.instance.named_mock(part) | |
exp = self.stubs(part) | |
if path.length > 0 | |
exp.returns(mock) |
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
# Sending Public Key to Remote Servers | |
function authme { | |
ssh $1 'cat >>.ssh/authorized_keys' <~/.ssh/id_rsa.pub | |
} |
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
(defun refresh-file () | |
(interactive) | |
(revert-buffer t t t) | |
) | |
(global-set-key [f5] 'refresh-file) |
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
curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz | |
tar xvzf gettext-0.17.tar.gz | |
cd gettext-0.17 | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
cd .. | |
sudo perl -MCPAN -e 'shell' | |
cpan> install Locale::gettext |
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
class TopExitPagesReport | |
include Garb::Resource | |
include ReportHelper | |
metrics :pageviews, :exit_rate, :exits | |
dimensions :request_uri | |
def self.results_for(profile, date) | |
new(profile, date) | |
end |
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
document.cookie.split(';').each(function(cookie) { | |
if(cookie.indexOf('__utmz') != '-1') utmz = cookie; | |
}); | |
var cpc_regex = new RegExp(".*?utmcmd=([a-z]+)\|"); | |
medium = utmz.match(cpc_regex)[1]; | |
var gclid_regex = new RegExp(".*?utmgclid=([\_0-9A-Za-z]+)\|"); | |
adwords = utmz.match(gclid_regex)[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
# mig_rails_template.rb | |
file 'config/routes.rb', <<-CODE | |
ActionController::Routing::Routes.draw do |map| | |
end | |
CODE | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/favicon.ico" |