Skip to content

Instantly share code, notes, and snippets.

Erhhung Yuan erhhung

  • Silicon Valley
Block or report user

Report or block erhhung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@erhhung
erhhung / throttled.js
Last active Aug 11, 2018
Throttled download progress bar example for "bubkoo/ascii-progress"
View throttled.js
var ProgressBar = require('../index.js');
var bars = [];
var total = 1000;
var left = total;
var count = 0;
var simul = 5;
var timer = setInterval(function () {
View gist:d08a46687949bc11c684657c88b899f9
Verifying my Blockstack ID is secured with the address 1Bi1NDUmdb4nXzcWW1Xm9DXxKvuAFqnJDf https://explorer.blockstack.org/address/1Bi1NDUmdb4nXzcWW1Xm9DXxKvuAFqnJDf
@erhhung
erhhung / images2video.js
Created Oct 7, 2016
Node.js class to encode a sequence of image files into VP9 WEBM video using FFmpeg.
View images2video.js
/*
* encode image sequence into WEBM video
*/
import {exec} from 'child-process-promise';
import format from 'string-template';
import fsAsync from 'file-async';
import shell from 'shelljs';
import path from 'path';
import os from 'os';
@erhhung
erhhung / depthmap-loader.js
Created Sep 15, 2016
Load 16-bit PNG depth map using PngToy
View depthmap-loader.js
class DepthmapLoader {
/**
* load 16-bit PNG depthmap from URL and return
* the normalized bitmap as a Canvas ImageData
*
* @param {string} url - URL of PNG image
* @return {Promise} -> {width,height,imageData}
*/
fetch(url) {
let pngtoy = new PngToy();
You can’t perform that action at this time.