Skip to content

Instantly share code, notes, and snippets.

View zoffyzhang's full-sized avatar
💻
coding

Zoffy Zhang zoffyzhang

💻
coding
View GitHub Profile
(function() {
handleAddListener('load', getTiming)
function handleAddListener(type, fn){
if(window.addEventListener){
window.addEventListener(type, fn)
}else{
window.attachEvent('on' + type, fn)
}
@zoffyzhang
zoffyzhang / reverseFlatten.js
Last active December 7, 2017 03:48
reverseFlatten
// I wrote this file in order to reverse the result from https://gist.github.com/aherve/3c958b02c8262e64e0873f05377129f1
const expand = (array, eachGroupSize) => {
return array.reduce((acc, item, index) => {
index % eachGroupSize === 0 ? acc.push([]) : null
acc[acc.length - 1].push(item)
return acc
}, [])
}
@zoffyzhang
zoffyzhang / cloudSettings
Last active July 15, 2020 06:14
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-15T06:14:16.679Z","extensionVersion":"v3.4.3"}