I hereby claim:
- I am swang on github.
- I am swang (https://keybase.io/swang) on keybase.
- I have a public key ASDjnHZWBRFTaUfB2zLYm6UrXGmUc3VIQdHVWlR9DaqYugo
To claim this, I am signing this object:
// fill an 100-element array with zero (0 = closed, 1 = open) | |
let lockers = new Array(100).fill(0) | |
// iterate 1-100 in outer loop, iterate i-100, jumping to every i-th term | |
for (let i = 1; i <= 100; i++) { | |
for (let j = i; j <= 100; j += i) { | |
// flip switch on locker value | |
lockers[j - 1] = !lockers[j - 1] ? 1 : 0 | |
} | |
} |
for f in *.wav; do ffmpeg -i "$f" -vn -ar 44100 -ac 2 -ab 64k -f mp3 "${f%.wav}.mp3"; done; |
~/Projects/ipfs/station (master): npm run build | |
> [email protected] build /Users/Projects/ipfs/station | |
> npm run clean && npm run build:webpack && npm run build:babel && npm run copy | |
> [email protected] clean /Users/Projects/ipfs/station | |
> rimraf build && mkdir build | |
I hereby claim:
To claim this, I am signing this object:
https://nodejs.org/docs/v0.8.26/api/ |
/*global module, console*/ | |
function MediumEditor(elements, options) { | |
'use strict'; | |
this.init(elements, options); | |
} | |
if (typeof module === 'object') { | |
module.exports = MediumEditor; | |
} |
function MediumEditor(elements, options) { | |
'use strict'; | |
return this.init(elements, options); | |
} | |
if (typeof module === 'object') { | |
module.exports = MediumEditor; | |
} | |
(function (window, document) { |
fn main() { | |
let mut counter = 1u; | |
while counter <= 100 { | |
let result = | |
match counter { | |
z if z % 15 == 0 => ~"FizzBuzz", | |
z if z % 3 == 0 => ~"Fizz", | |
z if z % 5 == 0 => ~"Buzz", | |
_ => counter.to_str() |
Just a small function I wrote to show how much of a scam MLM marketing is.
By default it assumes you want to have 10 people below you peddling wares in your name, and then also assumes the population to be about the number in the US when I made this gist (317,291,776).
drops = document.querySelectorAll("table.Tst-table tr td.Ta-end:nth-child(even)") | |
adds = document.querySelectorAll("table.Tst-table tr td.Ta-end:nth-child(odd)") | |
owners = document.querySelectorAll("table.Tst-table tr td.Ta-start.Nowrap") | |
for (var i = 0; i < adds.length; i++) { if (!/W \(.*\)/i.test(owners[i].innerText) || parseInt(adds[i].innerText, 10) < parseInt(drops[i].innerText, 10)) { adds[i].parentNode.style.display = 'none' } } |