Skip to content

Instantly share code, notes, and snippets.

View jjcall's full-sized avatar
💭
I may be slow to respond.

Jason Calleiro jjcall

💭
I may be slow to respond.
View GitHub Profile
@jjcall
jjcall / env.rb
Created September 2, 2009 21:42 — forked from tpope/env.rb
Tells webrat to use selenium on specific scenarios
# Enable Webrat's Selenium mode if one or more scenarios is tagged @selenium
Webrat.configure do |config|
config.mode = :rails
ObjectSpace.each_object(Cucumber::Ast::Features) do |features|
config.mode = :selenium if features.tag_count('selenium').nonzero?
end
end
git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null)
if [[ -n $ref ]]; then
echo "[%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}]"
fi
}
# makes color constants available
autoload -U colors
colors
# Variation on Hashrocket's script for managing the git process
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
# Create shell scripts out of each of these, put them in your path (~/bin for example)
# chmod 755 them and use like this:
#
# This version of hack is totally different than Hackrockets. I feel that hack implies
# that you are getting started, not finishing up. sink is Hashrockets hack.
#
# $ hack branch_name
# Test and Implement until done
# usage: rails new APP_NAME -m http://gist.github.com/627198.txt -TJ
# the -T drops test-unit and the -J drops prototype
gem "pg"
gem "omniauth"
gem "paperclip"
gem "haml"
gem "sass"
# virtualenv aliases
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html
alias v='workon'
alias v.deactivate='deactivate'
alias v.mk='mkvirtualenv --no-site-packages'
alias v.mk_withsitepackages='mkvirtualenv'
alias v.rm='rmvirtualenv'
alias v.switch='workon'
alias v.add2virtualenv='add2virtualenv'
alias v.cdsitepackages='cdsitepackages'
@jjcall
jjcall / Rakefile
Created August 13, 2011 02:46 — forked from adamstac/Rakefile
Wordperss deployment with rake and rsync
ssh_user = "user@domain.com" # for rsync deployment
remote_root = "~/path/to/remote/" # for rsync deployment
namespace :styles do
desc "Clear styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv css/*"
end
desc "Generate styles"
@jjcall
jjcall / Rakefile
Created September 15, 2011 15:18
Wordpress theme deployment script
ssh_user = "USERNAME"
remote_path = "PATH TO THEME"
namespace :styles do
desc "Clear styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv styles.css"
end
desc "Generate styles"
@jjcall
jjcall / answer1.js
Created November 8, 2011 15:48
Codeacademy Gist
function increment(start, timesToIncrement) {
var counter = 0;
while( counter !== timesToIncrement) {
start++
}
return start;
}
function say(word) {
console.log(word);
}
function execute(someFunction, value) {
someFunction(value);
}
execute(say, "Hello");
function execute (someFunction, value) {
someFunction(value);
}
execute(function(word) { consnole.log (word) }, "hello");