ffmeg as worker can be found at https://github.com/Kagami/ffmpeg.js/
Final build can be obtained via wget https://unpkg.com/[email protected]/ffmpeg-worker-mp4.js
ffmeg as worker can be found at https://github.com/Kagami/ffmpeg.js/
Final build can be obtained via wget https://unpkg.com/[email protected]/ffmpeg-worker-mp4.js
"use strict"; | |
const fs = require("fs"); | |
const names = process.argv.slice(2); | |
names.forEach(name => { | |
const hash = require("crypto").createHash("sha256"); | |
const rs = fs.createReadStream(name); | |
rs.on("readable", _ => { | |
const buf = rs.read(); | |
if (buf) hash.update(buf); |
These are some notes I made while reviewing hypothesis/client#156 to understand how Istanbul works
Istanbul instruments code in order to generate code coverage metrics for tests by adding code to record lines, statements etc. that are executed.
It adds a global __coverage__
variable to the generated code which is a map from file path
to coverage information. The code for each module is then augmented with:
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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 |