Skip to content

Instantly share code, notes, and snippets.


Charlton Trezevant ctrezevant

View GitHub Profile
ctrezevant / debugf.h
Last active May 29, 2020
A tiny little macro to help debug your C code.
View debugf.h
// debugf.h
// Charlton Trezevant - 2018
// MIT license
* To use this macro, simply paste it into your source file (you may also
* include debugf.h if you have many source files). Doing this will define
* the function debugf(), which acts as a thin wrapper around fprintf() with
* a little added pizazz.
robey / apple1-rom.txt
Last active Jul 18, 2019
apple 1 ROM disassembly
View apple1-rom.txt
; the "monitor ROM" of an apple 1 fit in one page (256 bytes).
; this is my attempt to take the disassembled code, give names to the
; variables and routines, and try to document how it worked.
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a
; peripheral chip that drove the keyboard and video. the video was run by a
; side processor that could treat the display as an append-only terminal that
Xjs / wasm-table.go
Created Aug 30, 2018
Call insertRow() from wasm in Go
View wasm-table.go
package main
import (
func main() {
document := js.Global().Get("document")
table := document.Call("getElementById", "myTable")
mndrix / sms.go
Last active Jun 23, 2020
SMS over IRC
View sms.go
// A proxy for sending/receiving SMS via IRC
// This code is part of our family IRC server whose code is available at
// This file won't compile by itself because it's only one file from
// my larger family server (movie hosting, Asterisk dialplan, Git
// hosting, personal assistant, etc).
// Copyright 2018 Michael Hendricks
clipperhouse / medium2md.go
Last active Apr 29, 2019
A Go script to convert Medium export (HTML) to Markdown, for use with Hugo. It’s a one-use type of thing for me, so it ain’t beautiful.
View medium2md.go
// A quick script for converting Medium HTML files to Markdown, suitable for use in a static file generator such as Hugo or Jekyll
package main
import (
nathankerr / Info.plist
Last active Mar 28, 2021
Registering a Go app as a protocol handler under Mac OS X
View Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
ugate /
Last active Jan 25, 2018
NTC C.H.I.P. setup script
# configures/installs common CHIP features (including enabling disabled ones)
# run 'sudo chmod +x && ./' to run the installation
uname -a
cat << _EOF_

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
0XDE57 /
Last active Apr 10, 2021
Firefox about:config privacy settings


about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

andychase /
Last active Mar 17, 2021
Google Forms Slack Notification
// Google Forms Slack Notification
// Andy Chase <>
// License: CC0 1.0 Universal <>
// Install 1: This code goes in ( tools > script editor... ) of your google docs form
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] )
// Setup 1: Put your slack api url below
var POST_URL = "";
function onSubmit(e) {