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
# coderay formatting | |
# once you paste this into blogger, you MAY have to surround the block with a | |
# div class='hscroll' to get a horizontal scrollbar. | |
# Usage: | |
# Copy your ruby code into the paste buffer, | |
# run this ruby code to format it | |
# paste the newly formatted code into your blog. | |
require 'rubygems' |
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
# dep_inj_1.rb | |
def this | |
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
#!/bin/bash | |
PROJ="/Users/skm/Projects/test" | |
for d in `ls -d */` # get a list of all directories | |
do | |
DIR=${d/\//} # replace trailing / with nothing as in ${stringZ/replacethis/withthis} | |
TARGET_DIR="$PROJ/vendor" | |
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
#!/bin/bash # test change | |
DATE=`date +%m-%e-%y` | |
OUTPUT="versions_as_of_$DATE.txt" | |
rm "$OUTPUT" | |
for d in `ls -d */` # get a list of all directories | |
do | |
DIR=${d/\//} # replace trailing / with nothing as in ${stringZ/replacethis/withthis} | |
GITDIR_ARG="--git-dir=$DIR/.git" | |
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
# If model Thing has fields name, description and photo ... | |
require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') | |
describe "resource(:things)" do | |
describe "a successful POST" do | |
before(:each) do | |
Thing.all.destroy! | |
file = File.new(File.join('path_to_test_photos',"thing_photo.jpg")) |
NewerOlder