Skip to content

Instantly share code, notes, and snippets.


Ryan Hitchman rmmh

View GitHub Profile
View gist:6bcc6de6153f0467b1bec686a9ad832d
#!/usr/bin/env python3
# an experiment in using a large corpus of phrases to generate initialisms from
import re
import zipfile
from nltk import tokenize
phrases = {}
rmmh /
Created Jan 10, 2019
Minecraft Mod: Optimine 1.3_01v2 Source Code.
import org.lwjgl.opengl.GL11;
public abstract class bb {
protected pd b;
private ic a = new dx();
private bw e = new bw();
protected float c = 0.0F;
protected float d = 1.0F;
rmmh /
Last active Jan 10, 2019
Source code for the 2011 McRegion Minecraft mod, which was included in Beta 1.3. and are the integration points.
** 2011 January 5
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
rmmh /
Last active Jan 10, 2019
Source for part of the ancient Minecraft FastRender mod. Pick the closest 3 chunks to render without doing a full sort.
public boolean a(ei camera, boolean firstRun)
hz cmp = new hz(camera);
bz[] toAdd = new bz[3]; //TODO: throughout: bz should be something like "Chunk"
ArrayList<bz> nearChunks = null;
int pendingChunkSize = this.m.size();
int pendingChunkRemoved = 0;
rmmh /
Last active Nov 1, 2018
Compute the number of possible lengths expressed with Johansson's standard 81 inch gauge blocks, as described in
gages = range(1001, 1010) + range(1010, 1491, 10) + range(500, 9501, 500) + range(10000, 40001, 10000)
assert len(gages) == 81
def get_dists(n):
# Return distances using the LARGEST blocks possible.
# Track whether a block is used in a combination using a bitset.
if n == 0:
return {gages[0]: 1 << 0}
this = gages[n]
rmmh /
Created Oct 12, 2018
A straightforward docker container differ, originally used for Kubernetes test infrastructure. Consider using instead.
#!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
rmmh /
Last active Jul 31, 2018
Simple script to adjust a series of photos to add missing exif date information in a series of photos.
#!/usr/bin/env python
# Problem: Our maternity photos were mixed digital and film,
# and the exif dates/times for the film photos were wrong, preventing
# "sort by date" working in Google Photos.
# Solution: the filenames are in the right order, simply interpolate
# over the gaps to inject "correct" times.
rmmh / query.gql
Created Jul 31, 2017
Example Github GraphQLv4 Usage
View query.gql
rateLimit {
repository(owner: "kubernetes", name: "kubernetes") {
pullRequests(last: 5, states: OPEN) {
nodes {
rmmh /
Last active Mar 19, 2018
Tiny .torrent file creator.
#!/usr/bin/env python2
A tiny .torrent file creator with no external dependencies.
Easy to hack!
import argparse
import hashlib
import os
rmmh / Github Helvetica.user.js
Created Jul 11, 2016
Github recently changed their default text font. This restores it to the previous settings -- Helvetica is prettier than Ubuntu Sans on Linux.
View Github Helvetica.user.js
// ==UserScript==
// @name Github Helvetica
// @namespace
// @description Github recently changed their default text font. This restores it to the previous settings -- Helvetica is prettier than Ubuntu Sans on Linux.
// @author Ryan Hitchman
// @homepage
// @match*
// @match https://**
// @run-at document-start
// @version 0.20160711225447
You can’t perform that action at this time.