Skip to content

Instantly share code, notes, and snippets.

@jankeromnes
jankeromnes / ASS.md
Created Nov 22, 2021 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk
View ASS.md

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

View docker-build.logs
building base image
initializing base image context
UGit operations complete location=/workspace/init
running base image build
Step 1/23 : FROM gitpod/workspace-full:latest
latest: Pulling from gitpod/workspace-full
Digest: sha256:25718cdee428df7bb6a4fc99793e73b51ab5387085dcebd66273ff5734c64e48
Status: Image is up to date for gitpod/workspace-full:latest
---> 1a449f4b5a13
@jankeromnes
jankeromnes / spectrum-to-discourse.js
Last active Jul 8, 2021
Quick-and-dirty Node.js hack to export Spectrum threads & import them to Discourse
View spectrum-to-discourse.js
const fs = require('fs');
const https = require('https');
const querystring = require('querystring');
// All image URLs, in case you want to re-import them to Discourse (this script just links Discourse to the Spectrum images)
let images = [];
let comments = {};
// Map Spectrum usernames to existing Discourse usernames, in order to post comments as actual users (otherwise this script posts comments as user 'discobot', but mentions the Spectrum username in first line of comment. You can also fix it manually afterwards.)
const discourseUsers = {
@jankeromnes
jankeromnes / ephemeral.diff
Created Jan 7, 2019
Some old work-in-progress diff about janitor.technology
View ephemeral.diff
Commits:
- redirect when code=&state= URL parameters have been used
- save access token creation date and redirect tokens
- expire access tokens after 30 days
- save machine spawn time
- delete any container from admin page
- delete container/token after a timeout (but remember across server restarts)
- after spawn, redirect to specific container ID in Containers page
commit e30a726f79b24fe71257b27babf82ee644c8e4bb
@jankeromnes
jankeromnes / db.json
Created Mar 26, 2018
A redacted db.json file for https://janitor.technology with a project, admin user, 2 machines and 3 hosts.
View db.json
{
"hostname": "janitor.technology",
"letsencrypt": {
"email": "admin@example.com",
"key": "-----BEGIN RSA PRIVATE KEY-----\r\n[REDACTED]\r\n-----END RSA PRIVATE KEY-----\r\n"
},
"https": {
"ca": [
"-----BEGIN CERTIFICATE-----\r\n[REDACTED]\r\n-----END CERTIFICATE-----\r\n"
],
@jankeromnes
jankeromnes / firefox-cloud9-config-examples.js
Created Jul 17, 2017
Configuring Cloud9 IDE for Firefox (brain dump with examples)
View firefox-cloud9-config-examples.js
/*
└─ your.plugin
├─ builders // https://cloud9-sdk.readme.io/v0.1/docs/builders
| └─ firefox.build {
"cmd": ["./mach", "build", "$file", "$args"],
"env": {},
"selector": "source.ext"
}
├─ runners // https://cloud9-sdk.readme.io/v0.1/docs/runners
| └─ haskell.run {
@jankeromnes
jankeromnes / benchmark-pem-vs-rsacompat-vs-openssl.js
Created Jul 17, 2017
Benchmarking RSA certificate generation speed (PEM vs RSA Compat vs OpenSSL)
View benchmark-pem-vs-rsacompat-vs-openssl.js
let exec = require('child_process').exec;
let forge = require('node-forge');
let rsa = require('rsa-compat').RSA;
let pem = require('pem');
function generateWithOpenSSL (callback) {
let start = Date.now();
exec('openssl genrsa 4096', (error, stdout, stderr) => {
View janitor-april-fools.js
(function(a){a[Math.floor(Math.random()*a.length)](document.body)})([
function(b){b.style.fontFamily='cursive'},
function(b){b.style.color='#f06'},
function(b){b.style.cursor='cell'},
function(b){b.style.cursor='crosshair'},
function(b){b.style.cursor='help'},
function(b){b.style.cursor='move'},
function(b){b.style.cursor='none'},
function(b){b.style.cursor='not-allowed'},
function(b){b.style.cursor='pointer'},
@jankeromnes
jankeromnes / devices.js
Last active Dec 3, 2021
List of common devices and their properties
View devices.js
// This list of common devices was put together from various online sources by me, Jan Keromnes.
//
// The device features are:
// - name: The device brand and model(s).
// - width: The viewport width.
// - height: The viewport height.
// - pixelRatio: The screen's pixel ratio (e.g. HiDPI > 1).
// - userAgent: The device's UserAgent string on the web.
// - touch: Whether the device's screen is touch-enabled.
//
@jankeromnes
jankeromnes / fxosdevices.js
Last active Oct 11, 2019
List of Firefox OS devices and their properties
View fxosdevices.js
// This list has moved to https://github.com/jankeromnes/devices/
// It's also hosted on a CDN: https://code.cdn.mozilla.net/devices/devices.json
var devices = {
"TYPES": [ "phones", "tablets", "laptops", "televisions", "consoles", "watches" ],
"phones": [
{
"name": "Firefox OS Flame",
"width": 320,
"height": 570,
"pixelRatio": 1.5,