<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| 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 |
| // Encrypt where jo is input, and query is output and ENCRPYTION_KEy is key | |
| byte[] input = jo.toString().getBytes("utf-8"); | |
| MessageDigest md = MessageDigest.getInstance("MD5"); | |
| byte[] thedigest = md.digest(ENCRYPTION_KEY.getBytes("UTF-8")); | |
| SecretKeySpec skc = new SecretKeySpec(thedigest, "AES/ECB/PKCS5Padding"); | |
| Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); | |
| cipher.init(Cipher.ENCRYPT_MODE, skc); | |
| byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; |
| function curried(fn) { | |
| var args = Array.prototype.slice.call(arguments, 1); | |
| return function() { | |
| return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, 0))); | |
| } | |
| } | |
| brew update | |
| brew link yasm | |
| brew link x264 | |
| brew link lame | |
| brew link xvid | |
| brew install ffmpeg | |
| ffmpeg wiki: | |
| https://trac.ffmpeg.org/wiki/Encode/MP3 |
| // 함수 호출 타이밍에 조건에 따라 promise 실행 분기 | |
| // val1 == true, val3 == true인 경우: method1 -> method2 -> method3true | |
| // val2 == true, val3 == false인 경우: method1 -> method2 -> method3false | |
| // val1 == false, val3 == true인 경우: method2 -> method3true | |
| // val2 == false, val3 == false인 경우: method2 -> method3false | |
| function run(val1, val3) { | |
| const p = Promise.resolve(null); | |
| if (val1 === true) | |
| p = p.then(method1); | |
| p = p.then(method2); |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| #! /usr/local/bin/bash | |
| MYGITHUB=johngrib | |
| RAW=/tmp/$MYGITHUB-github | |
| TABLE=/tmp/$MYGITHUB-github-table | |
| COLORS=/tmp/$MYGITHUB-github-colors | |
| curl -s https://github.com/$MYGITHUB/ > $RAW | |
| TITLE=`cat /tmp/johngrib-github | pcregrep -M '[0-9,]+ contributions\s*\n\s*in the last year'` |