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
daily | |
missingok | |
rotate 30 | |
compress | |
delaycompress | |
sharedscripts | |
/Users/deploy/Sites/rails.example.com/shared/log/*.log { | |
postrotate | |
touch /Users/deploy/Sites/rails.example.com/current/tmp/restart.txt |
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
function background(iterator, produceNextValue, callbacks) { | |
var value = {}, hasValue = produceNextValue(value); | |
callbacks = callbacks || Object.extend([], { | |
after: function(callback) { | |
this.push(callback); | |
return this; | |
} | |
}); | |
if (hasValue) { |
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
# Create a ~/.twitter/credentials.yml file. | |
# Example: | |
# name: twittername | |
# password: password | |
require 'rubygems' | |
require 'rest_client' | |
path = File.join(File.join(ENV['HOME'], ".twitter"), "credentials.yml") | |
user = YAML::load_file(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
class User < ActiveRecord::Base | |
# AuthLogic config | |
acts_as_authentic do |config| | |
config.validates_format_of_login_field_options = { :with => /\A\w[\w\-_]+\z/, :message => "should use only letters, numbers, and -_ please." } | |
end | |
RESERVED_LOGINS = %w( join signin sign-in signout sign-out profile handle ) + | |
%w( admin sysadmin user username nick upload download static movie video ). | |
map { |l| [l, l.pluralize] }.flatten.freeze |
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
(* | |
Open a new tab in Safari (and move focus to the URL bar) | |
I have this configured as a Quicksilver trigger for ctrl+alt+T | |
*) | |
tell application "Safari" to activate | |
tell application "System Events" | |
tell process "Safari" | |
click menu item "New Tab" of menu "File" of menu bar 1 | |
end tell |
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 library for downloading issues of Harpers from the archives. | |
# | |
# To use, log in to the archives from your web browser. Then set the | |
# HARPERS_ARCHIVE_COOKIE environment variable to the value of the .harpers.org | |
# "archive" cookie, which you can find by visiting the following URL while on | |
# the Harpers website: | |
# | |
# javascript:prompt("HARPERS_ARCHIVE_COOKIE",document.cookie.match(/(?:;|^)\s*archive=(.+?)(?:;|$)/)[1]) | |
# | |
# Example: |
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
# Rails template for Rails 2.3. Work in progress. | |
# By Henrik Nyh (http://henrik.nyh.se) 2009-03-29. Public domain. | |
# Usage: rails myapp -m http://gist.github.com/87341.txt | |
META_AUTHOR = "Henrik Nyh (http://henrik.nyh.se)" | |
JQUERY_VERSION = "1.3.2" | |
APP_NAME = File.basename(Dir.pwd) | |
git :init |
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
# Rails template for Rails 2.3. Work in progress. | |
# By Henrik Nyh (http://henrik.nyh.se) 2009-03-29. Public domain. | |
# Usage: rails myapp -m http://gist.github.com/87341.txt | |
META_AUTHOR = "Henrik Nyh (http://henrik.nyh.se)" | |
JQUERY_VERSION = "1.3.2" | |
APP_NAME = File.basename(Dir.pwd) | |
git :init |