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
// in app/assets/javascripts/application.js | |
//= require jquery | |
//= require jquery_ujs | |
//= require ./stitch_header | |
//= require_tree . |
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 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds |
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
task :eg => %w[eg:examples eg:acceptance] | |
namespace :eg do | |
ExampleRoot = Rails.root+'examples' | |
task :examples => :test_env do | |
in_example_root do | |
FileList.new(ExampleRoot+'*.eg.rb').each {|eg| run_eg eg } | |
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
upstream <%= @app.id %> { | |
server unix:<%= @app.socket.to_s %> fail_timeout=0; | |
} | |
server { | |
listen 80; | |
root <%= @app.docroot.to_s %>; | |
# arb change |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
# this includes ^ | |
require File.expand_path('../lib/rake_dev',__FILE__) | |
require(File.join(File.dirname(__FILE__), 'config', 'boot')) | |
require 'rake' | |
require 'rake/testtask' | |
require 'rake/rdoctask' |
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
" http://gist.github.com/gists/412549 | |
" | |
" Paste syntax highlighted code into Keynote for presentational yum. | |
" by Lachie Cox | |
" | |
" put all this into your .vimrc | |
" (I might wrap it into a plugin one day) | |
" | |
" You could probably do the whole thing from vim, but I wanted to tweak to HTML | |
" a bit before pasting, so I pass the HTML to a ruby script (Gisted below) |
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
task :cache => :environment do | |
hydra = Typhoeus::Hydra.hydra | |
LocationWalker.each_location do |url| | |
req = # build request | |
hydra.queue | |
end | |
hydra.on_complete do |response| | |
if response.success? | |
LocationCacher.cache(response.body) # can give you headers too if you need 'em |
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 | |
# [You need dropbox - http://dropbox.com/] | |
# cd ~/Dropbox | |
# mkdir ssh | |
# cd ssh | |
# git init | |
# cd .git/hooks | |
# [paste this file into post-commit] | |
# chmod 755 post-commit |
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
# Simple script for adding and updating vim bundles to your setup. | |
# | |
# Throw it into your .vim diretory. | |
# | |
# cd ~/.vim | |
# thor vim:update | |
# thor vim:add git://github.com/tpope/vim-rails.git | |
# | |
require 'pathname' | |
require 'pp' |
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
delimiter = "[-/.]+" | |
century_prefix = "(?:19|20)" | |
under_ten = "(?:0[1-9]+)" | |
ten_to_twelve = "(?:1[012]+)" | |
ten_and_under_thirty = "(?:[12]+[0-9]+)" | |
thirties = "(?:3[01]+)" | |
pattern = %r[ | |
( |