Skip to content

Instantly share code, notes, and snippets.

View mpnordland's full-sized avatar
🏳️‍⚧️
Celebrating Pride

Maya Nordland mpnordland

🏳️‍⚧️
Celebrating Pride
View GitHub Profile
@mpnordland
mpnordland / SpaceMerc.sccprofile
Created June 2, 2019 11:38
SC Controller profile for Space Mercs
{
"_": "",
"buttons": {
"A": {
"action": "button(Keys.BTN_GAMEPAD)"
},
"B": {
"action": "button(Keys.BTN_EAST)"
},
"C": {
@mpnordland
mpnordland / common.py
Last active December 4, 2018 03:05
Advent of Code 2018 Day 3 solution and visualizer
import sys
import re
from os.path import join, dirname
from collections import namedtuple
class Claim(namedtuple("Claim", ['id', 'x', 'y', 'width', 'height'])):
__slots__ = ()
def find(self, array):
return array[self.x:self.x+self.width, self.y:self.y+self.height]
@mpnordland
mpnordland / term-launcher.go
Last active September 22, 2018 07:46
Tiny wrapper that launches a user specifed terminal
// I built this to allow me to launch terminal apps
// for mimetypes in the terminal emulator of my choosing
// Since Firefox uses Glib to lookup and run apps and Glib
// only looks for a hard coded list, I needed something to
// get me in that list. This is my solution.
// Usage:
// Make sure your path includes ~/bin
// early-ish in your login shell's profile
// Build with "go build term-launcher.go"
@mpnordland
mpnordland / python.json
Created March 31, 2018 11:37
A WIP python client config for openapi-codegen
{
"name": "Python",
"type": "client",
"defaults": {
"asyncio": false,
"tornado": false,
"packageName": "swagger_client",
"package": "swagger_client",
"baseNamespace": "swagger_client",
"generatorPackage": "swagger_client",
Verifying that +micahnordland is my Bitcoin username. You can send me #bitcoin here: https://onename.io/micahnordland
@mpnordland
mpnordland / gist:8788021
Created February 3, 2014 17:13
Bookmarklets to quickly check and uncheck checkboxes
Check all
javascript:(function(){$('input[type="checkbox"]').attr('checked',true);})();
Uncheck all
javascript:(function(){$('input[type="checkbox"]').attr("checked",false);})();
These require jQuery, non jQuery versions welcome
Designed to cope with Drupal (TM)