(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| wait4eth1() { | |
| CNT=0 | |
| until ip a show eth1 | grep -q UP | |
| do | |
| [ $((CNT++)) -gt 60 ] && break || sleep 1 | |
| done | |
| sleep 1 | |
| } | |
| wait4eth1 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // PASTE THIS IN YOUR CONSOLE ( worx best in chrome ) | |
| // `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~ | |
| // chrome console: OPTION + COMMAND + J | |
| // firefox console: OPTION + COMMAND + K | |
| // `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~ | |
| // WARNING FLASHING LIGHTS!!!! | |
| setInterval(function(){ | |
| d=document.getElementsByTagName('div'); | |
| for(i=0; i<d.length; i++) { |
| // The API accepts the page parameter and returns the pagination info in meta | |
| { | |
| "messages": [ ... ], | |
| "meta": { | |
| "pagination": { | |
| "total_pages": 3, | |
| "current_page": 1, | |
| "total_count": 55 | |
| } |
| # Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files | |
| # for Pry binding references | |
| # | |
| # Installation | |
| # | |
| # ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit | |
| # | |
| # Based on | |
| # | |
| # http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/ |