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 ErbEngine < Haml::Engine | |
def push_script(text, preserve_script, in_tag = false, preserve_tag = false, | |
escape_html = false, nuke_inner_whitespace = false) | |
push_text "<%= #{text.strip} %>" | |
end | |
def push_silent(text, can_suppress = false) | |
push_text "<% #{text.strip} %>" | |
end | |
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
# DESCRIPTION: Cap task to setup the current (initialized) git directory as a remote repository. | |
# | |
# INSTALL: Copy to home directory as ~/.caprc | |
# RUN: cap git:setup scm=t | |
# | |
# AUTHOR: Geoffrey Grosenbach http://peepcode.com | |
# | |
# Assumes ability to run commands as sudo and the presence of a "git" user and group on remote server. | |
# The Capistrano :user is used only to connect and setup directories. | |
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
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
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
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
# 16 workers and 1 master | |
worker_processes (rails_env == 'production' ? 16 : 4) | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app 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
/* A Trivial LLVM LISP | |
* Copyright (C) 2008-2009 David Robillard <[email protected]> | |
* | |
* Parts from the Kaleidoscope tutorial <http://llvm.org/docs/tutorial/> | |
* by Chris Lattner and Erick Tryzelaar | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. |
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
set :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 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
// Drives the Bieber-graph at http://awesometown.no.de. | |
// Run through a recent-ish version of node.js. | |
var sys = require('sys'), | |
http = require('http'), | |
twitter = http.createClient(80, 'search.twitter.com'), | |
twitterPath = "/search.json?&q=bieber", | |
chartId = "4c7a650eba12e9c41d000005", | |
interval = 5000, | |
lastId = null; |
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
require 'eventmachine' | |
EM.run do | |
SEKRET_SAUCE = EM.attach( | |
open(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null', 'w') | |
) | |
EM.start_server('0.0.0.0', 80, Module.new do | |
def post_init; proxy_incoming_to(SEKRET_SAUCE); end | |
end) | |
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
/* | |
Less CSS3 utils. | |
Usage: | |
.fooClass { | |
border: 3px solid #000; | |
.vbg-gradient(#FFF, #CCC); | |
.hbox(); | |
} | |
*/ |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
OlderNewer