View 0_reuse_code.js
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View cgminer
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: cgminer | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts cgminer | |
# Description: Start script for cgminer | |
### END INIT INFO |
View php-cgi.rb
# Homebrew Formula for PHP 5.2.14 as php-cgi (for nginx, etc.) | |
require 'formula' | |
class PhpCgi <Formula | |
@url='http://www.php.net/get/php-5.2.14.tar.bz2/from/www.php.net/mirror' | |
@version='5.2.14' | |
@homepage='http://php.net/' | |
@md5='bfdfc0e62fe437020cc04078269d1414' |
View org.redis.server.plist
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.redis.server</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/redis-server</string> |
View hash_options_whitespace
HoptoadNotifier.notify(:error_class => "video_manipulator:thumbnail", | |
:error_message => ex.message, | |
:backtrace => ex.backtrace, | |
:parameters => {:options => options}) | |
versus | |
HoptoadNotifier.notify( :error_class => "video_manipulator:thumbnail", | |
:error_message => ex.message, | |
:backtrace => ex.backtrace, |
View factories.rb
Factory.define :application do |factory| | |
factory.attachment(:sample, "public/samples/sample.doc", "application/msword") | |
end |
View test_helper.rb
# Allows you to use the :session key in your tests | |
# (when using rack-test). | |
# | |
# get "/", {}, :session => {:user => 1} | |
# | |
class Test::Unit::TestCase | |
include Rack::Test::Methods | |
def app | |
Sinatra::Application |