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 use ls, echo, grep; whatever you are looking for. | |
| # I wanted a list of just the rails migration filename timestamps, e.g. | |
| $ ls rails_app/db/migrate/ | xargs -n1 | ruby -e "puts $<.read.scan(/\d*/)" |
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
| # Node.js is exports; Rails is window | |
| global = if typeof exports isnt 'undefined' then exports else window | |
| global.namespace = (target, name, block) -> | |
| [target, name, block] = [global, arguments...] if arguments.length < 3 | |
| top = target | |
| target = target[item] or= {} for item in name.split '.' | |
| block target, top | |
| # Declare your class |
NewerOlder