This file contains hidden or 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
navigate to a directory in terminal and type | |
python -m SimpleHTTPServer | |
that will start a simple server on 0.0.0.0:8000 | |
(or what I named in my /etc/hosts file, dev.python.com:8000 ) |
This file contains hidden or 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
#Go To File Bundle. You might need to create the /Bundles directory before you can cd into it. | |
cd ~/Library/Application\ Support/TextMate/Bundles/ | |
git clone git://github.com/amiel/gotofile.tmbundle.git GoToFile.tmbundle | |
#after that, you will want to add some file types that ack wont search by default | |
#source: https://github.com/protocool/ack-tmbundle/wiki/recognizing-files | |
#in terminal, create ~/.ackrc | |
--type-add=ruby=.haml,.rake,.rsel | |
#or, alternately, specify to search all files |
This file contains hidden or 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
test definition can be written as such | |
test "that a new user has a valid name" do | |
#some test stuff | |
end | |
You would use ActiveSupport::TestCase as the parent class of any of your Rails tests. | |
Inside a Test, you are generally trying to do 4 things: | |
1) Set up the data. | |
2) Perform the action that triggers the behavior being tested (i.e. - call to a controller method or call to a model method). |
This file contains hidden or 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
For SSH issues, check here for help: | |
http://help.github.com/troubleshooting-ssh/ |
This file contains hidden or 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
RVM Notes | |
Install a new version of ruby: | |
$ rvm install 1.9.2 | |
use that version: | |
$ rvm use 1.9.2 | |
check the version of ruby being used | |
$ ruby -v |
This file contains hidden or 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
styles = [ | |
{:namespace => "mt", :attribute => "margin-top", :suffix => "px", :max => 500, :min => 0, :step => 1}, | |
{:namespace => "mb", :attribute => "margin-bottom", :suffix => "px", :max => 500, :min => 0, :step => 1}, | |
{:namespace => "ml", :attribute => "margin-left", :suffix => "px" , :max => 500, :min => 0, :step => 1}, | |
{:namespace => "mr", :attribute => "margin-right", :suffix => "px" , :max => 500, :min => 0, :step => 1}, | |
{:namespace => "w", :attribute => "width", :suffix => "px", :max => 1200, :min => 0, :step => 1}, | |
{:namespace => "wp", :attribute => "width", :suffix => "%", :max => 100, :min => 0, :step => 1}, | |
{:namespace => "h", :attribute => "height", :suffix => "px", :max => 500, :min => 0, :step => 1}, | |
{:namespace => "fs", :attribute => "font-size", :suffix => "px", :max => 48, :min => 0, :step => 1}, | |
{:namespace => "p", :attribute => "padding", :suffix =>"px", :max => 40, :min => 0, :step => 1}, |
This file contains hidden or 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
You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: | |
<%= render "shared/header", { :headline => "Welcome", :person => person } %> | |
These can now be accessed in shared/header with: | |
Headline: <%= headline %> | |
First name: <%= person.first_name %> | |
If you need to find out whether a certain local variable has been assigned a value in a particular render call, you need to use the following pattern: |
This file contains hidden or 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
xcode (~4gb, 2+ hour download, 20 minute install ) | |
macports - http://www.macports.org/install.php | |
imagemagick - using install statement from rmagick: http://rmagick.rubyforge.org/install-osx.html | |
sudo port install tiff -macosx imagemagick +q8 +gs +wmf | |
can take over 2 hours to install !!!! | |
git - http://code.google.com/p/git-osx-installer/downloads/list?can=3 (selected *x86_64-leopard.dmg) |
NewerOlder