Skip to content

Instantly share code, notes, and snippets.

View micooz's full-sized avatar
:octocat:

Micooz Lee micooz

:octocat:
  • Earth
  • 05:45 (UTC +08:00)
View GitHub Profile
@ilblog
ilblog / README.md
Last active August 15, 2024 18:49
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
@bellbind
bellbind / crypto-sha256.js
Last active November 2, 2017 02:58
[emscripten][WebAssembly]SHA256 implementation
"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);
@robertknight
robertknight / istanbul.md
Last active December 23, 2023 20:01
How Istanbul works

Istanbul Notes

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:

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active November 14, 2024 09:13
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@jboner
jboner / latency.txt
Last active November 16, 2024 21:28
Latency Numbers Every Programmer Should Know
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