Skip to content

Instantly share code, notes, and snippets.

View Fordi's full-sized avatar

Bryan Elliott Fordi

View GitHub Profile
@Fordi
Fordi / econ_101.h
Last active April 15, 2021 05:58
Macro versions of pinMode and digitalWrite. Tend to be faster and smaller.
/**
* This file will reduce the size of and improve the performance of certain arduino code
* 1. It strips away about 310 bytes of overhead by replacing the implicit main function with a minimal one (which will also be faster)
* 2. It replaces the library `pinMode` and `digitalWrite` code with register-based variants - saving 120
* bytes - and which which perform faster than the built-ins for single-pin changes (for multi-pin changes,
* use the registers yourself).
*/
#ifndef ECON_101
#define ECON_101
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script>
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
function playSound(arr) {
var buf = new Float32Array(arr.length)
(() => {
const letters = {
a: 'ay',
b: 'bee',
c: 'see',
d: 'dee',
e: 'eee',
f: 'eff',
g: 'jee',
h: 'aitch',
@Fordi
Fordi / CatBugVenn.svg
Created August 12, 2020 21:26
CatBug Venn Diagram, designed by Vincent Caduc - https://www.threadless.com/product/5222 <- If they sell them again, buy here.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Fordi
Fordi / mmx-gen.html
Created July 30, 2020 08:35
MegaMan X Password generator
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="ISO-8859-1">
<title>Mega Man X1 Password Generator</title>
<script type="module" defer>
import { render, html, css, useState } from 'https://unpkg.com/@fordi-org/buildless';
const heart = 'Heart Tank';
const subTank = 'Sub-tank';
const levels = {
@Fordi
Fordi / Mixed grain waffles.md
Last active April 3, 2020 04:50
Waffle iron experiments

1/4 c. cut oats
1 c. cooked farro
1/4 c yogurt
1/2 c milk
1/2 c. flour
1 tbsp. honey, plus more for serving
1 tsp. baking powder
1/4 tsp. baking soda
1/4 tsp. salt
1 large eggs

A Terawatt a year

An immodest proposal

A rough estimate of CO₂ forcing on atmospheric temperature is that about 300 billion metric tonnes of CO₂ warms the earth by about 0.5 °C. We presently emit around 38 billion metric tonnes of CO₂ a year.

Given the goal of avoiding another half-degree of warming, that gives us a clear target: if we linearly decrease our fossil fuel use to zero, we have 10 years to do it, starting now.

If you actually hope to avoid climate change, the only thing I want to hear from you from here on out is "A terawatt a year", or something pursuant to that. You can fight about what makes that 1 TW a year, but it's what we need.

State Name Phone Address City/State Zip
AK Murkowski, Lisa (202) 224-6665 522 Hart Senate Office Building Washington, D.C. 20510
AK Sullivan, Dan (202) 224-3004 302 Hart Senate Office Building Washington, D.C. 20510
AL Shelby, Richard C. (202) 224-5744 304 Russell Senate Office Building Washington, D.C. 20510
AR Boozman, John (202) 224-4843 141 Hart Senate Office Building Washington, D.C. 20510
AR Cotton, Tom (202) 224-2353 326 Russell Senate Office Building Washington, D.C. 20510
AZ McSally, Martha (202) 224-2235 404 Russell Senate Office Building Washington, D.C. 20510
CO Gardner, Cory (202) 224-5941 354 Russell Senate Office Building Washing

Setup:

Each player picks their character's race, class and name. These are only for prosaic purposes. Players must also name a missile attack, melee attack.

Each player draws five cards. These are action cards:

  • Club: Melee damage. You can attack anything near you. As armor, halves melee damage before action check.
@Fordi
Fordi / Politifact Truthfulness.user.js
Last active October 14, 2019 17:49
Politifact "Truthfulness" score
// ==UserScript==
// @name PolitiFact "Truthfulness"
// @match https://www.politifact.com/personalities/*
// @updateUrl https://gist.githubusercontent.com/Fordi/a46b9437859f5b613d863527abb8719f/raw/Politifact%2520Truthfulness.user.js
// ==/UserScript==
(function() {
'use strict';
const weights = [1, 0.75, 0.5, 0.25, 0, -0.5];
const template = ({ sum, total }) => {