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
/** | |
* Override or insert variables into the node templates. | |
* | |
* @param $vars | |
* An array of variables to pass to the theme template. | |
* @param $hook | |
* The name of the template being rendered ("node" in this case.) | |
*/ | |
function YOURTHEME_preprocess_node(&$vars, $hook) { |
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
require 'autotest/growl' | |
require 'autotest/fsevent' | |
Autotest.add_hook :initialize do |at| | |
unless ARGV.empty? | |
at.find_directories = ARGV.dup | |
end | |
end | |
if ENV['AUTOTEST'] and not ENV['AUTOTEST'].empty? |
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
describe "#all_projects" do | |
before(:each) do | |
@user = Factory(:user) | |
@owned_project = Factory(:project, :owner => @user) | |
@project_user1 = Factory(:project_user, :user => @user) | |
@project_user2 = Factory(:project_user, :user => @user) | |
end | |
it "should return two projects" do | |
@user.all_projects.count.should == 3 |
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
describe "Answer.for_parent_slug" do | |
before(:each) do | |
site = Factory(:site) | |
@page = Factory(:page) | |
@page2 = Factory(:page) | |
@answer = Factory(:answer, :parent_slug => @page.slug, :question => "Question 1", :site_id => site.id) | |
@answer2 = Factory(:answer, :parent_slug => @page2.slug, :question => "Question 2", :site_id => site.id) | |
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
" NOTE: You must, of course, install the ag script | |
" in your path. | |
" On Debian / Ubuntu: | |
" sudo apt-get install ag-grep | |
" On your vimrc: | |
" let g:agprg="ag-grep -H --nocolor --nogroup --column" | |
" | |
" With MacPorts: | |
" sudo port install p5-app-ag |
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
source ~/.bin/git-prompt.sh | |
# Colors from http://wiki.archlinux.org/index.php/Color_Bash_Prompt # misc | |
NO_COLOR='\e[0m' #disable any colors # regular colors | |
BLACK='\e[0;30m' | |
RED='\e[0;31m' | |
GREEN='\e[0;32m' | |
YELLOW='\e[0;33m' | |
BLUE='\e[0;34m' | |
MAGENTA='\e[0;35m' |
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
nnoremap <leader>ls :OpenSpecInSplit<cr> | |
nnoremap <leader>FF :ToggleCurrentDescribeFocus<cr> | |
nnoremap <leader>FA :FocusCurrentDescribe<cr> | |
nnoremap <leader>FD :UnFocusCurrentDescribe<cr> | |
fun! OpenSpecInSplit() | |
let file = expand('%:p') | |
if match(file, "app/") >= 0 | |
if match(file, "assets/javascripts") >= 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
nnoremap <leader>ls :OpenSpecInSplit<cr> | |
fun! OpenFilesInSplit(left, right) | |
if a:left == a:right | |
return | |
endif | |
only | |
exec "edit " . a:left | |
exec "vs " . a:right |
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
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch('config/environments/test.rb') | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') { :rspec } | |
watch(%r{^spec/factories/.+\.rb$}) | |
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
- (void) midiSource:(PGMidiSource*)midi midiReceived:(const MIDIPacketList *)packetList |
OlderNewer