Skip to content

Instantly share code, notes, and snippets.

View ahollenbach's full-sized avatar
🌺
hi!

Andrew Hollenbach ahollenbach

🌺
hi!
View GitHub Profile
@ahollenbach
ahollenbach / mdx-provider.tsx
Created February 28, 2022 23:52
An example custom MDXProvider with TailwindCSS styling
import { MDXProvider } from "@mdx-js/react";
import Image from "next/image";
const H1 = (props) => (
<h1 className="text-4xl font-bold mt-6 mb-4">{props.children}</h1>
);
const H2 = (props) => (
<h2 className="text-2xl font-bold mt-6 mb-4">{props.children}</h2>
);
@ahollenbach
ahollenbach / mitigationDataGen.py
Created February 9, 2015 16:03
Sample Mitigation Data Generator
import random
# CLASSES
# one - reduced by 25%
# two - reduced by 50%
# three - lowest possible fine
# neither - no mitigation
data = []
@ahollenbach
ahollenbach / sampleMitigation1.data
Created February 9, 2015 16:00
Sample Mitigation Data
FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,neither
FALSE,FALSE,FALSE,TRUE,FALSE,FALSE,neither
TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,neither
FALSE,FALSE,FALSE,FALSE,TRUE,FALSE,two
TRUE,FALSE,FALSE,FALSE,TRUE,TRUE,two
FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,two
TRUE,FALSE,TRUE,FALSE,TRUE,TRUE,two
FALSE,FALSE,FALSE,FALSE,TRUE,FALSE,two
FALSE,FALSE,FALSE,TRUE,FALSE,FALSE,neither
FALSE,FALSE,TRUE,FALSE,TRUE,FALSE,one
@ahollenbach
ahollenbach / addClusterLabels.js
Created November 15, 2014 05:38
Adds cluster labels to Master's CS courses on RIT CSH Scheduler.
// Author: Andrew Hollenbach (ahollenbach)
// Instructions:
// Copy and paste the js below into a bookmark "URL" field.
// On the CSH scheduler (http://schedule.csh.rit.edu/browse), expand GCCIS > CSCI.
// Click the bookmark to add cluster labels!
javascript:(function(){
var clusters = {
"CG" : "#1abc9c",
"Data" : "#2980b9",
@ahollenbach
ahollenbach / ellie_gould_burn_css
Created February 28, 2014 02:56
Quick fix to remove scrollbars from @plamere's Ellie Goulding three.js demo
body {
margin: 0;
-webkit-box-sizing:border-box;
}
canvas {
display: block;
}
div {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@ahollenbach
ahollenbach / KeyboardShortcuts
Created December 30, 2013 22:01
Adding the standard keyboard ctrl+c/v shortcuts to Noteflight
// Noteflight (http://www.noteflight.com/), a music annotation software for the web,
// has an awesome new HTML5 editor that they are working on. Unfortunately, it doesn't
// support ctrl+c and ctrl+v operations for some reason, (at least on my Windows/Chrome
// configuration), so I wrote a short script to fix that.
var cpy=$(".headerMenuItem:contains('Copy')").first(),
pst=$(".headerMenuItem:contains('Paste')").first();
var CTRL_KEY = 17,
V_KEY = 86,