Skip to content

Instantly share code, notes, and snippets.

@auramo
auramo / gist:0fd4a3a2cc145009411abf5805e732cc
Created May 11, 2016 12:45
Yegge for the lack of a nail
For the lack of a nail,
throw new HorseshoeNailNotFoundException("no nails!");
For the lack of a horseshoe,
EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot();
For the lack of a horse,
RidersGuild.getRiderNotificationSubscriberList().getBroadcaster().run(
new BroadcastMessage(StableFactory.getNullHorseInstance()));
const password = 'kuikka'
const keyIv = cryptoUtils.deriveAES256KeyAndIv(password.replace(/\s/g, ''))
const maxFileSize = 2 * 1024 * 1024 * 1024
const isMeb = fileName => /\.meb$/.test(fileName)
const isZip = fileName => isMeb(fileName) || /\.zip$/.test(fileName)
const isEncryptedZip = fileName => /\.zip\.bin$/.test(fileName)
const isEncryptedJson = fileName => /\.json\.bin$/.test(fileName)
const readZipContents = (zipFileName, zipContents) => {
@auramo
auramo / prettier-idea.md
Created May 17, 2018 17:37
Prettier IDEAan

Add prettier to Intellij IDEA

npm install -g prettier
which prettier

-> ^ remember the path

IDEA: settings -> external tools -> add new

@auramo
auramo / body_count.py
Created March 27, 2020 19:56
Jenkkien ruumiit pääsiäiseks
days = 16
current_body_count = 400
body_count = current_body_count
for d in range(1, days+1):
if d % 3 == 0:
body_count = body_count * 2
print("body count: ", body_count)