Skip to content

Instantly share code, notes, and snippets.

@luqizheng
luqizheng / DHT11.cs
Created June 19, 2018 04:45 — forked from Injac/DHT11.cs
DHT11 Sensor driver for Windows 10 IoT Core - C#
//An exact copy of the adafruit DTH-11 driver in C#
//Example usage:
//var gpio = GpioController.GetDefault();
//var dataPin = gpio.OpenPin(5);
@luqizheng
luqizheng / latency.txt
Created June 6, 2016 10:02 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
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
@luqizheng
luqizheng / 0_reuse_code.js
Created December 6, 2015 07:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console