Skip to content

Instantly share code, notes, and snippets.

View castrolem's full-sized avatar
🇦🇩
Remote

Luis Castro castrolem

🇦🇩
Remote
View GitHub Profile

Keybase proof

I hereby claim:

  • I am castrolem on github.
  • I am castrolemmt (https://keybase.io/castrolemmt) on keybase.
  • I have a public key ASBmC-mr9PDK0oolmhjDxIHVtJfejZnkbPaPjQJz455DHQo

To claim this, I am signing this object:

@castrolem
castrolem / flatten_array.js
Last active November 14, 2017 15:30
Performant ES6 array of arrays flatten.
let arr = [[1,2,[3]], 4];
const flatten = arr => {
let i = 0;
while (i < arr.length) {
if (Array.isArray(arr[i])) {
arr.splice(i, 1, ...arr[i])
} else {
i++
}
}
@castrolem
castrolem / index.html
Created September 10, 2012 21:15
Created this timeline feature for a company project
<div id="history">
<div id="history_clock">
<div id="clockface">
<div id="clockglare"></div>
<div id="clockarm_1" ></div>
<div id="clockarm_2"></div>