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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
### 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 |
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
# 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' |
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
<?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> |
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
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, |
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
Factory.define :application do |factory| | |
factory.attachment(:sample, "public/samples/sample.doc", "application/msword") | |
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
# 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 |