Skip to content

Instantly share code, notes, and snippets.

View hsuh's full-sized avatar
🦕

Hsu Hlaing hsuh

🦕
  • Edinburgh
  • 20:33 (UTC -12:00)
View GitHub Profile
@hsuh
hsuh / gist:d47bc8ddaaed1dbc2f38
Created May 20, 2014 14:14
angular error: Error: $parse:isecdom Referencing a DOM node in Expression
To solve this write an explicit return for your coffeescript function.
"They've only disallowed accessing DOM nodes in expressions, not in directives. Your code is only broken because of Coffeescript's bad habit of automatically returning the last value in a function's scope. Angular detects that the function has returned a DOM node and throws an exception to keep you safe. Add an explicit "return" to the end of each of those functions and they should work fine."
discussion: https://groups.google.com/forum/#!topic/angular/bsTbZ86WAY4
@hsuh
hsuh / gist:e93f06377a2c82d12897
Last active August 29, 2015 14:01
rake db tasks
db:create creates the database for the current env
db:create:all creates the databases for all envs
db:drop drops the database for the current env
db:drop:all drops the databases for all envs
db:migrate runs migrations for the current env that have not run yet
db:migrate:up runs one specific migration
db:migrate:down rolls back one specific migration
db:migrate:status shows current migration status
db:migrate:rollback rolls back the last migration
db:forward advances the current schema version to the next one
Notes from - http://nvie.com/posts/a-successful-git-branching-model/
The main branches
master
develop
Supporting branches
Feature branches
Release branches
Hotfix branches
@hsuh
hsuh / gist:1749ac70846095f3af4c
Created May 12, 2014 19:14
killing a screen session
kill" will only kill one screen window. To "kill" the complete session, use quit.
Example
$ screen -X -S [session # you want to kill] quit