Skip to content

Instantly share code, notes, and snippets.

@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 / 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.

@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.
//