Skip to content

Instantly share code, notes, and snippets.

Joshua Koo zz85

Block or report user

Report or block zz85

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
View after.sh
Testing ciphers using signature preferences of size: 1
Creating ThreadPool of size: 8
Digests: SHA256 ClientAuth: None Vers: Default ... PASSED
Digests: SHA384 ClientAuth: None Vers: Default ... PASSED
Digests: SHA1 ClientAuth: None Vers: Default ... PASSED
Digests: SHA384 ClientAuth: None Vers: Default ... PASSED
Digests: SHA1 ClientAuth: None Vers: Default ... PASSED
Digests: SHA224 ClientAuth: None Vers: Default ... PASSED
Digests: SHA224 ClientAuth: None Vers: Default ... PASSED
Digests: SHA256 ClientAuth: None Vers: Default ... PASSED
@zz85
zz85 / du.rs
Created Apr 29, 2019
Rust Disk Usage
View du.rs
use std::io;
use std::fs::{self, DirEntry};
use std::path::Path;
use std::env;
/**
* compile: rustc du.rs
* run: compare
* /usr/bin/time -lp ./du ~/Documents
* /usr/bin/time -lp du -sk ~/Documents
@zz85
zz85 / drunk_videospeed.js
Last active Oct 28, 2018
drunk video script
View drunk_videospeed.js
/**
* seeing how @thespite gets drunk
* https://twitter.com/thespite/status/1056264007450062848
*/
e = t => t < .5 ? 2 * t * t : -1 + (4 - 2 * t ) * t,
n = _ => performance.now(), cT = n(),
nT = cT,
cV = 1,
nV = 1,
@zz85
zz85 / postions.js
Last active Aug 24, 2018
Portfolio Positions
View postions.js
const Ib = require('ib');
var ib = new Ib()
function getPositions(ib, cb) {
ib.on('position', onPositions)
ib.reqPositions()
var positions = [];
var pending = null;
@zz85
zz85 / animals.proto
Created Apr 27, 2018
Java Protobuf Any vs Oneof
View animals.proto
message Dog {
}
message Cat {
}
message Elephant {
View index.js
const express = require('express')
const app = express()
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(4444, () => console.log('Example app listening on port 4444!'))
process.on('message', function(packet) {
console.log('process message received', packet, process.env.pm_id, process.env.NODE_APP_INSTANCE)
@zz85
zz85 / README
Last active Mar 21, 2018
Audio Experiements
View README
Idea: use web rtc/ web audio to record a short audio clip, do pitch changing on it
Links
- http://recordrtc.org/
- https://github.com/danielstorey/WebAudioTrack
- https://www.webrtc-experiment.com/msr/audio-recorder.html
View GPUComputationRenderer.js
/**
* @author yomboprime https://github.com/yomboprime
*
* GPUComputationRenderer, based on SimulationRenderer by zz85
*
* The GPUComputationRenderer uses the concept of variables. These variables are RGBA float textures that hold 4 floats
* for each compute element (texel)
*
* Each variable has a fragment shader that defines the computation made to obtain the variable in question.
* You can use as many variables you need, and make dependencies so you can use textures of other variables in the shader
@zz85
zz85 / DragControls.js
Last active Mar 6, 2018
Spline / Path Bend Modifier for Three.js
View DragControls.js
/*
* @author zz85 / https://github.com/zz85
* @author mrdoob / http://mrdoob.com
* Running this will allow you to drag three.js objects around the screen.
*/
THREE.DragControls = function ( _objects, _camera, _domElement ) {
if ( _objects instanceof THREE.Camera ) {
@zz85
zz85 / greenlet.js
Last active Jun 17, 2019
Greenlet.js Annotated
View greenlet.js
// This is @zz85's attempt to understand and annotate the greenlet.js lib
// from https://github.com/developit/greenlet/blob/master/greenlet.js
/** Move an async function into its own thread.
* @param {Function} fn The (async) function to run in a Worker.
*/
export default function greenlet(fn) { // greenlet takes in a function as argument
let w = new Worker( // creates a web worker
URL.createObjectURL( // that has a local url
new Blob([ // created from a blob that has the following content
You can’t perform that action at this time.