Skip to content

Instantly share code, notes, and snippets.

View MCluck90's full-sized avatar

Mike Cluck MCluck90

View GitHub Profile
@MCluck90
MCluck90 / people.json
Created August 12, 2020 15:12
List of people
[
"Ada Lovelace",
"Marie Curie",
"Janaki Ammal",
"Chien-Shiung Wu",
"Katherine Johnson",
"Rosalind Franklin",
"Vera Rubin",
"Gladys West",
"Flossie Wong-Staal",
@MCluck90
MCluck90 / settings.json
Last active March 8, 2019 20:45
Vim VS Code settings
{
...,
"vim.handleKeys": {
"<C-k>": false,
"<C-w>": false,
"<C-r>": false,
"<C-b>": false,
"<C-v>": false
},
...,
@MCluck90
MCluck90 / inheritance.rs
Last active February 21, 2019 21:39
Inheritance-like problem in Rust
/// Problem: there is a lot of duplication in function implementations.
/// The two types should have the same interface but use a different underlying type.
///
/// How can I reduce the amount of duplication and avoid having to update the code in two places?
/// In other languages, I would define a base class which accepts a generic type for the `SoundSource`s
/// but I don't know how to solve this sort of problem in Rust.
struct Sound {
// Shared properties
is_playing: bool,
@MCluck90
MCluck90 / programming-fonts-userscript.js
Last active January 21, 2019 22:03
Keyboard controls for Programming Font - Test Drive (http://app.programmingfonts.org)
// ==UserScript==
// @name Programming Fonts Controls
// @namespace https://mcluck90.github.io/
// @version 1.0
// @description Allow you to control the Programming Fonts Test Drive with your keyboard
// @author You
// @match http://app.programmingfonts.org/
// @grant none
// ==/UserScript==
@MCluck90
MCluck90 / pre-commit
Created July 1, 2013 20:20
A simple pre-commit hook which runs JSHint on all of the JS files you've changed.
#!/bin/bash
# Runs JSHint on your JS files before a commit
# Place in .git/hooks/pre-commit and chmod +x .git/hooks/pre-commit
if git rev-parse --verify HEAD >/dev/null 2>&1; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi