Skip to content

Instantly share code, notes, and snippets.

@anna328p
anna328p / isa.md
Last active November 13, 2020 04:19

ISA Spec

Registers

These are the standard registers:

DEC BIN Name Width Purpose
0 0000 Z 16 Wired to 0000h
1 0001 A 16 Accumulator
@anna328p
anna328p / closest-color.rb
Created June 2, 2020 06:56
Closest color
# Closest Color Algorithm
require 'matrix'
RGB_XYZ_MATRIX = Matrix[
[ 0.4124564, 0.3575761, 0.1804375 ],
[ 0.2126729, 0.7151522, 0.0721750 ],
[ 0.0193339, 0.1191920, 0.9503041 ]
]
@anna328p
anna328p / fanpuppetmaster.ino
Created April 27, 2020 13:55
Fan PuppetMaster
// int const pin_led_low = 27;
// int const pin_led_med = 26;
// int const pin_led_high = 25;
// int const pin_led_in = 33;
// int const pin_led_out = 32;
// int const pin_led_exch = 35;
// int const pin_led_am = 34;
//
// int const pin_btn_pwr = 12;
// int const pin_btn_airflow = 14;
@anna328p
anna328p / xorshift64.gs
Created February 10, 2020 00:17
xorshift64 RNG implemented in Google Apps Script
function xor(state1, state2) {
var x = state1.slice()
x[0] ^= state2[0]
x[1] ^= state2[1]
return x
}
/*
state:
[ state[0] ][ state[1] ]
@anna328p
anna328p / aig4tb.md
Last active April 6, 2024 13:31
Arch Installation Guide for Total Beginners

Arch Installation Guide for Total Beginners

Guide by anna328p/alienpirate5.

This is meant as a companion for the official Arch install guide: https://wiki.archlinux.org/index.php/Installation_guide

This document is a guide for installing Arch Linux from the live system booted with the official installation image.

This document will walk you through the Arch Linux installation process based on the Arch Wiki installation guide. You will need to refer to the wiki for links; this guide just explains the steps in more detail. Keep in mind that this

Chapter 1

It was a dark and stormy night.

[3:48 PM] Moros: My friend keeps saying "cheer up man it could be worse, you could be stuck underground in a hole full of water"
I know he means well...
[3:49 PM] Moros: After God created 24 hours of alternating darkness and light, one of the angels asked him, "what are you going to do now?"
God said,
"I think I'm going to call it a day."
[3:50 PM] Moros: What's the fastest liquid on earth?
Milk. It's pasteurized before you see it.
Template Text 11111
Template Text 11111
1059692290788631588331616127615751985773244519398141061835910128170697435748013914729752493965298602252120994430676253643445279166245427939549453479782565131035906411094304045210136398263971896622897114226859820805324666428999784796894413838862444413110252825230865214687151798353502102406093204298969222796074884723366278432935465647352223759867856082524973344717536353659707202182931176740236017455773593675028123603303707112813483922172780955842566967324608083114749828330005044883104366559430341696010520049431030764480697551347018623173298495675642583027080504721571687073317167483182271667276171637094050975601475928953535890522642336660916822131787144034243098438956854786978014912038463198111783626092550933166962406687259532569262647785596039905404913454889433277418116054929192201273505596947602596576436481347092547049315785303469155825019053379193442281323938890103849371334131670161306579425110112798350385919681977502971743134303508564724083158282