Skip to content

Instantly share code, notes, and snippets.

@purplejacket
purplejacket / williams_defender_settings.txt
Last active April 16, 2023 05:24
Williams Defender Settings -- of particular interest are Functions 08, 17, 18, 19, 21: bonus ship level, free play, start difficulty, progressive difficulty, planet restore frequency
BOOKKEEPING AND EVALUATION TOTALS (Functions 1-7)
=================================================
1. In game over mode, set switch to AUTO-UP and depress ADVANCE. The CRT
indicates Function 1 and total left chute coins.
2. Record audit totals and depress ADVANCE for functions 1-7. To review a
total that has been advanced past, set switch to MANUAL-DOWN and depress
ADVANCE. Functions are displayed one at a time as follows:-
Function Total Description
--------------------------------
@purplejacket
purplejacket / gist:1e0f00331121eaaf161732b6c0c90410
Last active February 6, 2017 04:39 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@purplejacket
purplejacket / andrey_bovykin_undecidable_diophantine_equation.txt
Last active October 2, 2018 18:50
A diophantine equation that's formally undecidable. 125 symbols long. All variables are integers. Formulated by Andrey Bovykin and an associate. "Recent metamathematical wonders and the question of arithmetical realism" https://cast.itunes.uni-muenchen.de/vod/clips/N5l7c5S3Vm/quicktime.mp4 at the 40 minute mark.
∀m ∃N ∀a,b ∃c,d,A,X ∀x,y ∃B,C,F ∀f,g ∃h,i,l,n,r,p,q
x * (y + B - x) * (A + m + B - y)
* [(((f - A)^2 + (g - 1)^2) * (f - B)^2 + (g - x)^2)
* ((f - C)^2 + (g - y)^2 - h - 1)
* (d * g * i + i - c + f)^2
+ (f + h - d * g)^2
+ (B + l + 1 - C)^2
+ (C + n - N)^2
+ (F + r - b * (B + C^2))^2
+ (b * p * (B + C^2) + p - a + F)^2
@purplejacket
purplejacket / molecular_weights.txt
Last active March 28, 2017 17:14
Weight of 1 mole of interesting atoms/molecules/other
1 mole of X weighs ... (Avogadro's constant is 6.0221 x 10^23)
hydrogen 1.00797 g
carbon 12.0107 g
iron 55.845 g
cellulose 162.14 g C6H10O5
uranium 238.02891 g
ATP 507.18 g C10H16N5O13P3 Adenosine Triphosphate
Buckeyball 720.66 g C60
Botox 150000 g C6760H10447N1743O2010S32
@purplejacket
purplejacket / tetris.bas
Created April 7, 2017 00:14
Tetris game circa 1996 - QuickBasic
' QBASIC TETRIS PROGRAM
' TYPE 'QBASIC TETRIS' AT THE DOS PROMPT TO RUN
' ONCE IN QBASIC PRESS F5 TO START
' TO QUIT FROM QBASIC TO DOS PRESS ALT-F THEN E
' ORIGINALLY CREATED BY ALEXEY PAJITNOV
' SHS Programming Class, Spring 1996, midd9354@uidaho.edu
' AUTHORS:
' Larry Cragun Kai Middleton Mary Tormey
' Lyf Gildersleeve Dalton Paull Ryan Turner
@purplejacket
purplejacket / nested_has.js
Created May 27, 2017 00:08
Does object x have a particular attribute (object property) either at the top level, or anywhere down the "has-a" object tree
_ = require('lodash');
x = {a: 1, b: {c: 2}, d: {e: 3, f: {g:4}}};
function nestedHas(object, attrib) {
if (_.has(object, attrib)) {
return true;
}
for (let key in _.pickBy(object, _.isObject)) {
if (nestedHas(object[key], attrib)) {
return true;
@purplejacket
purplejacket / mary_oliver_the_gift.txt
Created May 30, 2017 13:42
Poem by Mary Oliver about a Mockingbird who sang Mahler
Mary Oliver: The Gift
I wanted to thank the mockingbird for the vigor of his song.
Every day he sang from the rim of the field, while I picked
blueberries or just idled in the sun.
Every day he came fluttering by to show me, and why not,
the white blossoms in his wings.
So one day I went there with a machine, and played some songs of
Mahler.
The mockingbird stopped singing, he came close and seemed
@purplejacket
purplejacket / mongodb.service
Created June 23, 2017 21:49
A unit file to manage the MongoDB service -- for Ubuntu 16.04 -- to be located at /etc/systemd/system/mongodb.service -- from setup steps given at https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target
#!/bin/bash
### BEGIN INIT INFO
# Provides: disable-transparent-hugepages
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before: mongod mongodb-mms-automation-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description: Disable Linux transparent huge pages, to improve
@purplejacket
purplejacket / PS1_bashrc.sh
Last active June 24, 2017 05:02
Some colorized prompts - PS1 values - ANSI color escape sequences
# skyportal-experiment
PS1='${debian_chroot:+($debian_chroot)}\[\033[0;33m\]\u\[\033[1;37m\]@\[\033[0;34m\]\[\e[106m\]skyportal-experiment\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# skyportal-staging
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u\[\033[1;37m\]\[\e[100m\]@\[\033[0;34m\]\[\e[102m\]skyportal-staging\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# skyportal-production
PS1='${debian_chroot:+($debian_chroot)}\[\033[0;33m\]\u\[\033[1;37m\]@\[\033[0;34m\]\[\e[106m\]skyportal-experiment\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# local machine