Skip to content

Instantly share code, notes, and snippets.

View caisah's full-sized avatar
💻
🐵 🙉 🙈 🙊 🐵

caisah

💻
🐵 🙉 🙈 🙊 🐵
View GitHub Profile
@caisah
caisah / gist:2aee81d5f39eefd5d3d2a4ecd8683d66
Last active March 22, 2022 17:38 — forked from czottmann/gist:3402842
Bug report template
#### Issue description
#### Medium data:
1. OS Name:
2. OS Version:
3. Browser Name:
4. Browser Version:
?5. Url:
var fs = require('fs');
// string generated by canvas.toDataURL()
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0"
+ "NAAAAKElEQVQ4jWNgYGD4Twzu6FhFFGYYNXDUwGFpIAk2E4dHDRw1cDgaCAASFOffhEIO"
+ "3gAAAABJRU5ErkJggg==";
// strip off the data: url prefix to get just the base64-encoded bytes
var data = img.replace(/^data:image\/\w+;base64,/, "");
var buf = new Buffer(data, 'base64');
fs.writeFile('image.png', buf);

Keybase proof

I hereby claim:

  • I am caisah on github.
  • I am caisah (https://keybase.io/caisah) on keybase.
  • I have a public key ASBJKzply_5aJt-AlFntVadGn4J-H-Mb7WGxpfnDk0cawQo

To claim this, I am signing this object:

@caisah
caisah / timezones.js
Last active May 10, 2017 10:23
Oracle Corporation’s version 1.7.0_79 has 623 time zone IDs.
const TIMEZONES = [
{
"text": "ACT",
"value": "ACT"
},
{
"text": "AET",
"value": "AET"
},
{
[
"Afrojack",
"Armin van Buuren",
"Dimitri Vegas and Like Mike",
"Hardwell",
"Martin Garrix",
"Tiesto",
"Faithless",
"Parov Stelar",
"Chase and Status DJ Set",
[
"Skrillex",
"Sigur Ros",
"Bring Me The Horizon",
"Bastille",
"Paul Kalkbrenner",
"Gorgon City",
"Enter Shikari",
"Rusko",
"Flux Pavilion",
'use strict';
var fs = require('fs');
var request = require('request');
var Q = require('q');
var cheerio = require('cheerio');
function parseListen(txt) {
return parseInt(txt.listens.replace(new RegExp(',', 'g'), ''), 10);
}
Band Name Unique Listeners on last.fm
Faithless 1,312,646
Pendulum & Verse DJ Set 1,272,355
Armin van Buuren 982,603
Parov Stelar 784,528
Scooter 689,881
Clean Bandit 510,283
Afrojack 495,549
Martin Garrix 399,259
Band Name Unique Listeners on last.fm
Skrillex 1,333,419
Bring Me The Horizon 908,990
Bastille 835,527
God Is An Astronaut 629,675
Panda 607,853
Flux Pavilion 603,874
Enter Shikari 591,701
Dex 560,690