http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
| #!/usr/bin/env bash | |
| # script: watch | |
| # author: Mike Smullin <[email protected]> | |
| # license: GPLv3 | |
| # description: | |
| # watches the given path for changes | |
| # and executes a given command when changes occur | |
| # usage: | |
| # watch <path> <cmd...> | |
| # |
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
| //GRobotronics 29/3/2014 | |
| unsigned char i; | |
| unsigned char j; | |
| /*Port Definitions*/ | |
| int Max7219_pinCLK = 2; | |
| int Max7219_pinCS = 1; | |
| int Max7219_pinDIN = 0; |
http://guides.rubyonrails.org/migrations.html
| function getZoomCompensatedBoundingRect(fabricObject){ | |
| //fabricObject is the object you want to get the boundingRect from | |
| fabricObject.setCoords(); | |
| var boundingRect = fabricObject.getBoundingRect(); | |
| var zoom = canvas.getZoom(); | |
| var viewportMatrix = canvas.viewportTransform; | |
| //there is a bug in fabric that causes bounding rects to not be transformed by viewport matrix | |
| //this code should compensate for the bug for now |
| i3 Window Manager |
|---|
| Open terminal: $mod+Enter |
| Split window vertically: $mod+v command |
| Split window horizontally: $mod+h command |
| Change window focus: $mod+arrow-keys |
| Move focused windows: $mod+Shift+arrow-keys |
| Toggle splith/splitv: $mod+e |
| Switch to stacking mode: $mod+s |
| Switch to tabbed mode: $mod+w |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |