This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { spawnSync } = require('child_process') | |
const { createReadStream, existsSync, readFileSync } = require('fs') | |
const { access } = require('fs/promises') | |
const https = require('https') | |
const conf = { | |
default: 'index.html', | |
log: { | |
access: false, | |
error: true }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gist = async (id, d = document, s = [ | |
'//api.github.com/gists/', | |
'?callback=', | |
'__gg', | |
'script']) => { | |
const load = (raw, src) => { | |
const el = d.createElement(s[3]) | |
raw && (el.innerHTML = raw) || (el.src = src) | |
d.head.appendChild(el) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Firework { | |
done = false | |
exploded = false | |
particles = [] | |
constructor(ctx, gravity, x, y, vel) { | |
this.col = { h: Util.rand(360), a: Util.rand(0.5, 0.9) } | |
this.ctx = ctx | |
this.grav = gravity | |
this.vel = vel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// makes dummy ad call, if errored assumes blocker present | |
((d, src) => { | |
const s = d.createElement('script') | |
s.addEventListener('error', () => { | |
console.log('ad blocker present') | |
// tell them how their content theft makes you feel appreciated... | |
}) | |
s.async = true | |
s.src = src | |
d.head.appendChild(s) |