Dev script that does the following:
- Restarts the server on changes (a la node-dev)
- Bundles up browserify
- Restarts and re-bundles on template changes
- Compiles lesscss files
- Reload browser on any change
| #!/bin/sh | |
| # Attempt command, printing all output to stdout, catching errors | |
| # based on a regex, erroring out on all other errors | |
| if output=`some-command 2>&1` | |
| then | |
| echo "$output" | |
| else | |
| if echo "$output" | grep 'regex string' | |
| then | |
| something --other --than bailing |
Dev script that does the following:
With etagres and streaming:
$ nab http://localhost:1041/about
REQ NUM: 100 RTN NUM: 100 QPS: 33 BODY TRAF: 517KB per second
REQ NUM: 300 RTN NUM: 290 QPS: 48 BODY TRAF: 750KB per second
$ ps aux | grep node
gsf 8938 25.2 2.6 757788 104256 pts/8 Sl+ 12:52 0:07 node server.js
$ node-tick-processor
...
ticks parent name
| $ for f in *.avi; do ffmpeg -i $f -strict -2 `basename $f .avi`.mp4; done |
| matchbox-window-manager -use_titlebar no & | |
| exec xterm |
| $ ps aux | grep Iptab | |
| root 2487 0.0 0.0 1216 32 ? S 17:17 0:00 /boot/.IptabLes | |
| root 2489 0.0 0.0 50368 252 ? Sl 17:17 0:00 /boot/.IptabLes | |
| root 2493 0.0 0.0 852 32 ? S 17:17 0:00 /boot/.IptabLex | |
| root 4013 0.0 0.0 9040 188 ? Sl 18:04 0:00 /boot/.IptabLex | |
| root 4209 163 0.0 50952 604 ? Sl 18:19 0:01 /boot/.IptabLes | |
| gsf 4215 0.0 0.0 3428 772 pts/5 R+ 18:19 0:00 grep --color=auto Iptab | |
| $ ps aux | grep Iptab | |
| root 2487 0.0 0.0 1216 32 ? S 17:17 0:00 /boot/.IptabLes | |
| root 2489 0.0 0.0 50368 256 ? Sl 17:17 0:00 /boot/.IptabLes |
rlwrap -c ed (and remember to set blink-matching-paren off in .inputrc)
For indenting lines 9 to EOF (note that 2 spaces follow the last slash): 9,$v/^$/s/^/
Manual for the GNU ed: http://www.gnu.org/software/ed/manual/ed_manual.html
The Definitive Guide (POSIX): http://pubs.opengroup.org/onlinepubs/009604599/utilities/ed.html
| cvlc rtsp://xxx:[email protected]:88/videoMain --sout="#transcode{vcodec=theo,acodec=vorb,ab=128,channels=2,samplerate=44100}:std{access=http{mime=video/ogg},mux=ogg,dst=:8080/vid.ogg}" |
| $ git fetch | |
| $ git reset --hard FETCH_HEAD |
Audio only:
$ cvlc --network-caching=0 --no-video 'http://xxxxxx:xxxxx@xxxxxx/videostream.asf?rate=11'
With video:
$ cvlc --network-caching=0 --fullscreen 'http://xxxxxx:xxxxx@xxxxxx/videostream.asf?rate=11'