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
| Rails3 - CheatSheet - CommandLine | |
| rails new ApplicationName – Create a new application | |
| rails _3.0.9_ new ApplicationName – Create a new application with a specific version of rails | |
| rails generate/g model ModelName – Creates a model with the specified model_name | |
| rails generate/g controller ControllerName – Creates a controller with the specified controller_name | |
| rails generate/g migration MigrationName – Creates a migration with the specified migration_name | |
| rails generate/g scaffold ModelName ControllerName – A shortcut for creating your controller, model and view files etc. | |
| rails destroy controller ControllerName – Destroys the created controller and its related file. | |
| rails destroy model - Destroys the created model and its related file. |
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
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |
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
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |
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
| #export PS1="\[\e[1;30;32m\]| => \[\e[0m\]" | |
| alias ss="script/server" | |
| alias sc="script/console" | |
| alias d="ls -G" | |
| alias ll="d" | |
| alias lsd="ls -lahG" | |
| alias cdt="cd ~/code/dtime_web" | |
| alias cdtd="cd ~/code/oms" | |
| alias gs="git status" |
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
| set_trace_func proc { |event, file, line, id, binding, classname| | |
| printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname | |
| } | |
| t = Test.new | |
| t.test | |
| set_trace_func nil |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="description" content="Pratik Ringshia's website"> | |
| <meta name="keywords" content="pratik ringshia, pratik, ringshia, personal, website"> | |
| <link rel="icon" type="image/x-icon" href="/favicon.ico" /> | |
| <style type="text/css"> |
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
| <li class="user" data-name="John Resig" data-city="Boston" | |
| data-lang="js" data-food="Bacon"> | |
| <b>John says:</b> <span>Hello, how are you?</span> | |
| </li> |
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
| var app = express.createServer(); | |
| app.get('/', function(req, res){ | |
| res.send('Hello World'); | |
| }); | |
| app.listen(3000); |
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
| public int deviationAmount = 20; | |
| public ArrayList trackers = new ArrayList(); | |
| Hashtable trackerLookup = new Hashtable(); | |
| private ArrayList ended; | |
| private TouchTracker tracker; | |
| private ArrayList movements; | |
| .... | |
| void Update () { | |
| // clean all touches (so they know if they aren't updated after we pull info) | |
| for(i=0;i<trackers.Count;i++) |
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
| alias gc='git commit -am' | |
| alias lsd='ls -la' | |
| alias coed='cd ~/code/collegeonly && mate .' | |
| alias cost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start && rake sunspot:solr:start && rake sunspot:solr:start RAILS_ENV=cucumber && | |
| rake redis:development:start && rake redis:test:start && script/server -p2323' | |
| alias gco='git co' | |
| alias ss="script/server" | |
| alias sc="script/console" | |
| alias cdco="cd ~/code/collegeonly" | |
| alias cdan="cd ~/code/achievenext" |