Skip to content

Instantly share code, notes, and snippets.

@christianbundy
christianbundy / required.js
Last active Mar 24, 2020
required arguments without explicit names
View required.js
const required = (argumentName = false) => {
try {
const fs = require("fs");
// Get the stack trace.
const copy = Error.prepareStackTrace;
Error.prepareStackTrace = (_, stack) => stack;
const stack = new Error().stack;
Error.prepareStackTrace = copy;
View ssb-scripts.md

opt into public web hosting

sbot publish --type about --about "@your.public.id.here" --publicWebHosting
View for-loop.js
const config = {
init: 1,
condition: x => x <= 256,
each: x => console.info(`INFO: ${x}`),
afterEach: x => x * 2,
};
// DO NOT EDIT BELOW THIS LINE
(() => {
View how-to-fix-frankendebian.md
View equal-months.js
var years = 4;
var d = new Date();
d.setMonth(0);
d.setDate(1);
var last = d.setHours(0, 0, 0, 0);
var next = d.setYear(d.getFullYear() + 1);
var dozenth = (next - last) / 12;
View lock.js
let lock;
const log = (msg) => {
lock = new Promise(async (resolve) => {
await lock;
console.log(msg);
setTimeout(resolve, 1000);
});
};
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOE/PDXPQ9fS5mjhxX0L3wlugWnK3A0q6uD5RKfHJ+4/GcddjlAInh/h772D8sXa9gX93HYUQvfWhHykFM4nLTAqgIhOOCwn2ahlRGlXzAAfA14jSwM5wTkL5zKeNUWB3KGynx0N8DKwlwrn9CYbv66cxD950s49vHkx4oJuc9gGDwDI2NgX2fov3RrPF7tBkzxOFaNlP99W29D+GsMq9kjaSYejygekcfcwzlLPXbzxEV5hCbUYu5plew0B1MpmaXl9XzmxObRXPT6c9B1lF+gGieUuUiq2rkz/jpVzfUE+vtvRhH6ayZN7sTEqbzRWxZ8nVA/FqanoIKtULUQd9qbFpbw0JuVY//yFrzmA5XBeBLeLFHRNnEnLnAUqFL3ShiNVnAgVfukv9KIYtiAS4s6hXCQLMs4WuV3lg7FMk7OHdrYUmWgktWLn/WlljCoTfAlQ6vfhjyuixVYreJbgKX42Mv+/wx41W6jQh0JrJafmq0Jp6AbpaqDSPXVBH4ONfHM4s3MEGTWZiGytZxnJMHnQZMQZMGBP/8AvmzklxwsfxyY9jndLdapd6/Gr3JHbmeH4gmNA648jBpxHyUZJseT93nF+gZ12OfmnmwEj5p9FBGQoiR3ajd/txupN+iQZpk8Il+O9RnH/bYtBCjMNjB6MIZNpDQkPpS6q00hO6Qyw== christianbundy@cuatro.local
@christianbundy
christianbundy / data.csv
Created Jan 5, 2016 — forked from d3noob/.block
Simple d3.js Graph
View data.csv
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
View chromium-os-docker.md
You can’t perform that action at this time.