$ adb forward tcp:1080 tcp:1080
$ adb shell monkey --port 1080
$ telnet localhost 1080
tap 150 200
| export CLICOLOR=1 | |
| export LSCOLORS=Exfxcxdxbxegedabagacad |
| alias pbcopy='xclip -selection clipboard' | |
| alias pbpaste='xclip -selection clipboard -o' | |
| # ssh tunnel | |
| alias gateway='ssh -D4444 [email protected]' |
| " enable syntax highlighting | |
| if has("syntax") | |
| syntax on | |
| endif | |
| " remember the last edited position | |
| if has("autocmd") | |
| au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | |
| autocmd BufRead,BufNewFile *.jade setlocal ft=jade | |
| endif |
| # https://trac.ffmpeg.org/wiki/Encode/H.264 | |
| # https://trac.ffmpeg.org/wiki/Encode/AAC | |
| # -map 0 -c copy: copy all remaining streams | |
| # -pix_fmt yuv420p: be compatible with most players | |
| # high quality video, high quality audio | |
| avconv -i input.mov -map 0 -c copy -c:v libx264 -preset veryslow -pix_fmt yuv420p -crf 17 -c:a libfdk_aac -vbr 4 output.mov | |
| # high quality *compatible* full-hd video, high quality audio |
| ### Performance | |
| # The values for the following options are dependent on the system's hardware | |
| # and Internet connection speed. To find the optimal values read: | |
| # Optimize Your BitTorrent Download Speed. | |
| min_peers = 40 | |
| max_peers = 52 | |
| min_peers_seed = 10 | |
| max_peers_seed = 52 |
Sinon sample code from Best Practices for Spies, Stubs and Mocks in Sinon.js
| 'use strict'; | |
| var EventEmitter = require('events').EventEmitter; | |
| var bot = { | |
| sayHi: function(name) { | |
| console.log('hi ' + name); | |
| }, | |
| emitter: new EventEmitter() | |
| }; |
$ node index.js // local url
$ NODE_ENV=heroku node index.js // heroku url