Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@colejhudson
colejhudson / Korean Notes.rtf
Last active October 12, 2021 17:10
Circa Friday, October 2, 2020 at 12:26
{\rtf1\ansi\ansicpg1252\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset129 AppleSDGothicNeo-Bold;\f1\fnil\fcharset129 AppleSDGothicNeo-Regular;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww25400\viewh16000\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\f0\b\fs24 \cf0 Cheatsheet:
\f1\b0 \
Some of the common words I\'a1\'afm using below I\'a1\'afm going to replace with Korean\
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:database => "./tables.db"
)
class Term < ActiveRecord::Base
has_many :courses
has_many :sections
@colejhudson
colejhudson / .gitignore
Last active June 14, 2021 08:23
Windows WPF Boilerplate
*.exe

A Quick Note On Parsing RNAV Flight Routes

I was perusing the internet today and came across the FAA's disaster routing playbook. The playbook specifies the routes that a pilot should fly, and along which ATCs should route, in the event that the original destination is unreachable.

Consider the following route to SFO (San Francisco International Airport) [1]:

'''
On the 21st of April, in the year of our lord 2021, Amulet v1.1
was released into the world. Naturally, I wrote a dead simple
mining program for it.
The following program will take an arbitary phrase and surround
it with random characters until it can be satisfactorily
considered an 'amulet'.
[0]: https://text.bargains/amulet/
'''
diff --git a/boot/load.c b/boot/load.c
index f80808c..05d583a 100644
--- a/boot/load.c
+++ b/boot/load.c
@@ -1,10 +1,9 @@
+#include "memory.h"
#include "printf.h"
#include "modes.h"
#include "vga.h"
@colejhudson
colejhudson / main.erl
Last active March 11, 2021 07:26
Lots of nonsense involved in running and/or deploying an Erlang program, this is a small note on how to run one immediately.
% There are two ways to run this file. The first
% is as follows:
%
% $ erlc main.erl
% $ erl -noshell -s main init
%
% Here, `erlc` is compiling the erlang file to beam
% bytecode and writes said bytecode to 'main.beam'.
% Then erl, by default looking in the immediate
% directory, loads any beam files, looks for the
#include <stdio.h>
#define ITOA_CHARS_LEN 16
#define ITOA_CHARS "0123456789ABCDEF"
/* 1. First determine which character to use
* 2. Recurse to a helper with a shared counter, so
* that the first call */
char _itoa(int value, int base, char *str, int size) {