Skip to content

Instantly share code, notes, and snippets.

@jankeromnes
jankeromnes / ASS.md
Created November 22, 2021 15:31 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

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.

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 July 8, 2021 12:45
Quick-and-dirty Node.js hack to export Spectrum threads & import them to Discourse
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 January 7, 2019 14:13
Some old work-in-progress diff about janitor.technology
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 March 26, 2018 13:44
A redacted db.json file for https://janitor.technology with a project, admin user, 2 machines and 3 hosts.
{
"hostname": "janitor.technology",
"letsencrypt": {
"email": "[email protected]",
"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 July 17, 2017 12:13
Configuring Cloud9 IDE for Firefox (brain dump with examples)
/*
└─ 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 July 17, 2017 12:09
Benchmarking RSA certificate generation speed (PEM vs RSA Compat vs OpenSSL)
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) => {
(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 December 3, 2021 09:40
List of common devices and their properties
// 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 October 11, 2019 01:14
List of Firefox OS devices and their properties
// 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,