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
# now can try this: | |
# https://github.com/abuiles/ember-watson | |
# this command replaces all '#each x in y' with '#each y as |x|' under current folder and subfolders | |
grep -R '#each' * -l | xargs -n1 perl -pi -w -e 's/#each ([\w.]+) in ([\w.]+)/#each $2 as |$1|/g' |
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
# monkey patching Ember.TextField so that you can add delay=500 to make the | |
# TextField to update the binding value in debounced manner with delay of 500ms. | |
# That is it will only update the value if there is a unsubmitted change and | |
# no user input for the specified delay period. | |
# While no delay spcified, it's just the plain Ember.TextField | |
# usage in handlebars: | |
# {{view Ember.TextField valueBinding="someValue" delay=500}} | |
Ember.TextField.reopen { | |
delay: null # delayed period for updating the binding value in ms | |
_debouncedSet: (key,value,delay)->Ember.run.debounce(this, Ember.set, this, key, value, delay) |
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
# Color table: | |
# 0 Black . leave color unchanged | |
# 1 Red b blue | |
# 2 Green c cyan | |
# 3 Brown / yellow d default color | |
# 4 Blue g green b bold | |
# 5 Purple k blacK B blinking | |
# 6 Cyan m magenta d dim | |
# 7 White r red r reverse | |
# 8 unused/illegal w white s standout |