Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl- Copy/paste from the command line:
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
sudo apt-get install vim tmux git curl| # go into the directory where .zshrc is located. Usually ~ | |
| cd /Users/YourUserName | |
| # open .zshrc file | |
| vi .zshrc | |
| # add this line to end of .zshrc | |
| alias rake='noglob rake' |
Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.
Source: When to use self vs this -stackoverflow
| (function (root) { | |
| var type = function (o) { | |
| // handle null in old IE | |
| if (o === null) { | |
| return 'null'; | |
| } | |
| // handle DOM elements |