collecting links and documents about the topic
Object Systems (2004, as used in Thief 1998) http://chrishecker.com/images/6/6f/ObjSys.ppt
| // | |
| // BackgroundTask.h | |
| // tomtrack | |
| // | |
| // Created by Liam Edwards-Playne on 13/02/2016. | |
| // | |
| #import "RCTBridgeModule.h" | |
| @interface BackgroundTask : NSObject <RCTBridgeModule> |
| var Promise = require('bluebird'); | |
| var funcs = Promise.resolve([500, 100, 400, 200].map((n) => makeWait(n))); | |
| funcs | |
| .each(iterator) // logs: 500, 100, 400, 200 | |
| .then(console.log) // logs: [ [Function], [Function], [Function], [Function] ] | |
| funcs | |
| .mapSeries(iterator) // logs: 500, 100, 400, 200 |
collecting links and documents about the topic
Object Systems (2004, as used in Thief 1998) http://chrishecker.com/images/6/6f/ObjSys.ppt
| /* | |
| * Fancy ID generator that creates 20-character string identifiers with the | |
| * following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't | |
| * collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters | |
| * that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in |
| /** | |
| * Fancy ID generator that creates 20-character string identifiers with the following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
| * latter ones will sort after the former ones. We do this by using the previous random bits | |
| * but "incrementing" them by 1 (only in the case of a timestamp collision). | |
| */ |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| #!/bin/bash | |
| # Call with a percentage value from 0 to 100 | |
| # 0 means only red and green, 50 means half of blue is shown through | |
| # if you don't give any arguments the calibration is cleared | |
| if [[ -z "$1" ]]; then | |
| echo Clearing all calibrations | |
| xcalib -clear | |
| else |
(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.
| #!/bin/sh | |
| echo -n '{' | |
| # memory as "mem": { "current": 800, "total": 1024, "load", 82 } where amount is in MB and load in % | |
| free -m | awk 'NR==2{printf "\"mem\": { \"current\":%d, \"total\":%d, \"load\": %.2f }", $3,$2,$3*100/$2 }' | |
| echo -n ',' | |
| # diska as "disk": { "current": 6, "total": 40, "used": 19 } where amount is in GB and used in % | |
| df -h | awk '$NF=="/"{printf "\"disk\": { \"current\":%d, \"total\":%d, \"used\": %d }", $3,$2,$5}' |