I hereby claim:
- I am tieubao on github.
- I am nntruonghan (https://keybase.io/nntruonghan) on keybase.
- I have a public key whose fingerprint is 672F 6845 AD46 358A A356 544D 890D 921B CBBE 6479
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| # xcode-build-bump.sh | |
| # @desc Auto-increment the build number every time the project is run. | |
| # @usage | |
| # 1. Select: your Target in Xcode | |
| # 2. Select: Build Phases Tab | |
| # 3. Select: Add Build Phase -> Add Run Script | |
| # 4. Paste code below in to new "Run Script" section | |
| # 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
| # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
| #!/bin/bash | |
| # Erlang | |
| ERLANG_VERSION=${ERLANG_VERSION:-19.0} | |
| ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
| ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
| # Elixir | |
| ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.1} | |
| ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" |
| web: MIX_ENV=prod mix phoenix.server |
| inoremap <silent> = =<Esc>:call <SID>ealign()<CR>a | |
| function! s:ealign() | |
| let p = '^.*=\s.*$' | |
| if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) | |
| let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g')) | |
| let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*')) | |
| Tabularize/=/l1 | |
| normal! 0 | |
| call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) | |
| endif |
RPUSH, SADD needs to support multiple valuesOK if successful, or follow the error code.SET will always overwrite the value for that key