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
define [ | |
"easel_filters" | |
], ({ColourFilter}) -> | |
# split hex colour into r,g,b | |
# | |
# Usage: | |
# hex2rgb 0xff0000 # => [255, 0, 0] |
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
define [ | |
"easel" | |
"easel_filters" | |
], ({}, {ColourFilter}) -> | |
# tint helper | |
# pass in r,g,b or a HEX value | |
# HEX value in this form: 0xFFFFFF |
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
# gup and friends | |
function git_current_branch() { | |
git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///' | |
} | |
alias grb='git rebase -p' | |
alias gup_base='git fetch origin && grb origin/$(git_current_branch)' |
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 |