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 | |
# | |
# Update your Cocoa Project build number with git HEAD | |
require 'osx/foundation' | |
INFO_PLIST_FILE = "#{Dir.pwd}/Info.plist" | |
BUILD_NUMBER = (`git show-ref --head --abbrev HEAD | grep -v origin | awk '{print $1}'`).chomp | |
info_plist = OSX::NSMutableDictionary.dictionaryWithContentsOfFile(INFO_PLIST_FILE) |
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
<!-- testing code for Columbus JS UG member --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
$('.navigation li').click(function() { | |
$(this).parents('ul:first li').removeClass('selected').end().addClass('selected'); | |
console.log($(this).parents('ul:first')[0]); | |
}); | |
}); | |
</script> |
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
<!-- Columbus JS Users group --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// | |
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>jQuery addClass "selected" test</title> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript"> | |
$(function() { |
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
export RAILS_APP_TEMPLATE="http://gist.github.com/raw/123068/5db3cf1fbef8d8e0608a2e98afa59c32518fe160/ryanbriones.rb" | |
railst() { | |
if [ $# -gt 1 ]; then | |
railst_usage | |
else | |
rails -m $RAILS_APP_TEMPLATE $1 | |
cd $1 | |
fi | |
} |
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 Ext.grid.GroupingView to provide a workaround to group | |
// by a column that isn't being displayed | |
// | |
// Based on ExtJS 3.0 RC2 | |
// | |
// OR | |
// | |
// you could do it the right way and pass | |
// {hideGroupedColumn: true, showGroupName: false} | |
// to your Ext.grid.GroupingView |
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
1) Put terminal_clone_tab.sh somewhere in | |
your path and make sure it is executable | |
chmod u+x terminal_clone_tab.sh | |
2) Then add the following alias (~/.bash_profile or something) | |
alias nt='terminal_clone_tab.sh' | |
3) Then you can hit nt (for new tab) anywhere | |
and a new tab will open up in same directory. | |
If there is an easier way to do this, let me know nunemaker@gmail.com. |
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/ruby | |
# coverage for modified, added or untracked files in git for a rails application | |
require 'fileutils' | |
require 'rubygems' | |
require 'term/ansicolor' | |
RCOV_OPTS = File.read(File.join(Dir.pwd, 'spec/rcov.opts')).split(/\r?\n/) | |
SPEC_OPTS = File.read(File.join(Dir.pwd, 'spec/spec.opts')).split(/\r?\n/) | |
GIT_STATUS = `git status` |
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/ruby | |
# run coverage on a single file in rails project | |
require 'fileutils' | |
RCOV_OPTS = File.read(File.join(Dir.pwd, 'spec/rcov.opts')).split(/\r?\n/) | |
FILES_TO_RCOV = ARGV | |
SPECS_TO_RCOV = FILES_TO_RCOV.collect do |file| | |
spec = "spec/#{file.sub(/^app\//, '').sub(/\.rb$/, '_spec.rb')}" | |
unless File.exists?(File.join(Dir.pwd, spec)) |
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
# "export" the working-copy to a place we can "jekyll" it. | |
# this can probably be done better. | |
git --bare --git-dir=/home/ryanbriones/sites/ryanbriones/source.git archive master | tar xC /home/ryanbriones/sites/ryanbriones/source | |
jekyll /home/ryanbriones/sites/ryanbriones/source /home/ryanbriones/sites/ryanbriones/public |