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
$ sudo make install | |
node cli.js install npm | |
npm info it worked if it ends with ok | |
npm info using npm@0.3.0 | |
npm info using node@v0.4.0-pre | |
npm info fetch http://registry.npmjs.org/npm/-/npm-0.2.17.tgz | |
npm info calculating sha1 /tmp/npm-1297247221156/1297247221156-0.8592270885128528/tmp.tgz | |
npm info shasum da3ef5c631a377a6df266a933c2e92d361bcd3a6 | |
npm info calculating sha1 /usr/local/lib/node/.npm/.cache/npm/0.2.17/package.tgz | |
npm info shasum 7aa61f06f35622cfc329b13dccaf3cae498c344c |
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: #4B7399; | |
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
# Source: http://codekata.pragprog.com/2007/01/kata_two_karate.html | |
# | |
# Method takes an integer search target and a sorted array of integers. | |
# It should return the integer index of the target in the array, or -1 | |
# if the target is not in the array. | |
# | |
# Test data: | |
def test_chop | |
assert_equal(-1, chop(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
# Eg Given I am logged in as @mislav | |
# | |
Given /^I am logged in as @(\w+)$/ do |username| | |
visit "/login/#{username}" | |
@current_user = User.find_by_login(username) | |
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
module App | |
module Middleware | |
class OmniAuthConfigurator | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
current_domain = env["SERVER_NAME"] || env["HTTP_X_FORWARDED_FOR"] | |
website = Website.find_by_domain(current_domain) |
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
marko@harman:~$ sudo gem install rails | |
[sudo] password for marko: | |
Successfully installed activesupport-3.0.0 | |
Successfully installed i18n-0.4.1 | |
Successfully installed activemodel-3.0.0 | |
Successfully installed rack-1.2.1 | |
Successfully installed rack-mount-0.6.13 | |
Successfully installed tzinfo-0.3.23 | |
Successfully installed erubis-2.6.6 | |
Successfully installed actionpack-3.0.0 |
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
Missing rack.input (RuntimeError) | |
./vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb:47:in `rewrite_url' | |
(eval):17:in `reserve_patron_restaurant_path' | |
./features/support/paths.rb:15:in `path_to' | |
./features/step_definitions/web_steps.rb:24:in `/^(?:|I )go to (.+)$/' | |
features/lander.feature:8:in `And I go to lander reserve path' |
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 | |
# Creates a blank textile file with basic YAML front matter for | |
# your Jekyll blog. Then it launches gvim so that you can start | |
# writing immediately. | |
# | |
# Assumes your posts are in ./blog/_posts and that you're using a layout | |
# called 'post'. | |
if ARGV.empty? |
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/bash | |
# Infinite rainbow in terminal | |
yes "$(seq 1 255)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .01; done |
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 | |
# | |
# A hook script for the git post-receive event of a Jekyll web site's repository. | |
# It needs to unset the GIT_DIR environment variable which is otherwise fixed | |
# to siterepo/.git. Remember to chmod +x post-receive. | |
echo "Running post-receive hook..." | |
cd /var/siteroot && env -i git pull && jekyll |