Skip to content

Instantly share code, notes, and snippets.

@rschroll
rschroll / setinput.sh
Created August 10, 2021 03:25
Wacom Tablet to Window Mapping
#!/bin/bash
# Map the tablet to cover a particular window, while maintaining its aspect
# ratio. If run from the terminal, it allows the user to click on the window
# for mapping. Otherwise, use the currently focused window. Should the
# window aspect ratio not match the tablet aspect ratio, the tablet will
# cover an additional area of the screen, to maintain the correct aspect
# ratio. By default, the window will be aligned with the top-left corner
# of the tablet, but options adjust the horizontal (-l, -c, -r) and vertical
# (-t, -m, -b) alignment.
@rschroll
rschroll / Outages.ipynb
Last active July 30, 2021 01:47
Monkeybrains Outages
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rschroll
rschroll / ProgrammingQuestionsA.ipynb
Created August 19, 2020 23:34
Programming Questions A
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rschroll
rschroll / Presentation.ipynb
Last active February 7, 2020 22:10
Pandas Pipeline
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rschroll
rschroll / Makefile
Created June 23, 2017 18:18
Makefiles and failing commands
.PHONY: good bad ugly good-bad bad-good good-dep bad-dep ugly-dep good-bad-dep bad-good-dep
good:
./good.sh
bad:
./bad.sh
ugly:
./ugly.sh
@rschroll
rschroll / copyright.py
Created November 7, 2015 20:32
Check git history for additional copyright lines
@rschroll
rschroll / autosave
Created August 20, 2015 20:21
Bad index crash
{"changes":[["field",["field: view","field: field","field: kind"],[["e352de5d-b8c0-45bd-be77-b52d03f1215b","ac31178f-bfbf-4c2d-a44b-1681114926b3","output"]],[]],["tag",["tag: view","tag: tag"],[["e352de5d-b8c0-45bd-be77-b52d03f1215b","editor"]],[]],["display name",["display name: id","display name: name"],[["e352de5d-b8c0-45bd-be77-b52d03f1215b","New table!"],["ac31178f-bfbf-4c2d-a44b-1681114926b3","Field A"]],[]],["view",["view: view","view: kind"],[["e352de5d-b8c0-45bd-be77-b52d03f1215b","table"]],[]],["display order",["display order: id","display order: priority"],[["ac31178f-bfbf-4c2d-a44b-1681114926b3",-1]],[]]],"commands":[]}
{"changes":[["display name",["display name: id","display name: name"],[["ac31178f-bfbf-4c2d-a44b-1681114926b3","This is a field"]],[["ac31178f-bfbf-4c2d-a44b-1681114926b3","Field A"]]]],"commands":[]}
{"changes":[["e352de5d-b8c0-45bd-be77-b52d03f1215b",["ac31178f-bfbf-4c2d-a44b-1681114926b3"],[["This is the data"]],[]]],"commands":[]}
{"changes":[["display name",["display name: id"
@rschroll
rschroll / autosave
Created August 18, 2015 19:34
autosave after crash due to NaN in std dev data
{"changes":[["16c0991e-8e0d-4366-a9b2-c05307f312af",["43819319-177b-485f-b90e-fe50fe353d3d","e7f0d874-feb5-49ce-8d31-d7c0e749703f"],[["Aaron Bruno","1868970"],["Adam Levine","192151"],["Aino Jawo","2010943"],["Al Anderson","21764"],["Alan Wilder","2725"],["Alec John Such","124541"],["Alex Tanas","3747648"],["Alex Turner","391170"],["Alvin \"Seeco\" Patterson","21764"],["Andrew Brown","784074"],["Andrew Dost","1871196"],["Andrew Fletcher","2725"],["Andrew Hurley","318185"],["Andrew Phillips","1106902"],["Andy Nicholson","391170"],["Ashton Irwin","3750880"],["Aston \"Family Man\" Barrett","21764"],["Axel Hedfors","1801598"],["Ben Lovett","1567405"],["Ben McKee","2727700"],["Ben Spivak","3747648"],["Bernard \"Touter\" Harvey","21764"],["Bernie Leadon","255680"],["Bill Wyman","20991"],["Bob Marley","21764"],["Brent Kutzle","784074"],["Brian Jones","20991"],["Brian Kelley","3042765"],["Calum Hood","3750880"],["Carlton Barrett","21764"],["Caroline Hjelt","2010943"],["Chad Vaccarino","3601005"],["Charles Kelley","13
@rschroll
rschroll / autosave
Created August 18, 2015 19:31
autosave after std dev of non-chunked data
{"changes":[["16c0991e-8e0d-4366-a9b2-c05307f312af",["43819319-177b-485f-b90e-fe50fe353d3d","e7f0d874-feb5-49ce-8d31-d7c0e749703f"],[["Aaron Bruno","1868970"],["Adam Levine","192151"],["Aino Jawo","2010943"],["Al Anderson","21764"],["Alan Wilder","2725"],["Alec John Such","124541"],["Alex Tanas","3747648"],["Alex Turner","391170"],["Alvin \"Seeco\" Patterson","21764"],["Andrew Brown","784074"],["Andrew Dost","1871196"],["Andrew Fletcher","2725"],["Andrew Hurley","318185"],["Andrew Phillips","1106902"],["Andy Nicholson","391170"],["Ashton Irwin","3750880"],["Aston \"Family Man\" Barrett","21764"],["Axel Hedfors","1801598"],["Ben Lovett","1567405"],["Ben McKee","2727700"],["Ben Spivak","3747648"],["Bernard \"Touter\" Harvey","21764"],["Bernie Leadon","255680"],["Bill Wyman","20991"],["Bob Marley","21764"],["Brent Kutzle","784074"],["Brian Jones","20991"],["Brian Kelley","3042765"],["Calum Hood","3750880"],["Carlton Barrett","21764"],["Caroline Hjelt","2010943"],["Chad Vaccarino","3601005"],["Charles Kelley","13
@rschroll
rschroll / render.vala
Created March 3, 2015 16:41
PDF rendering timing test
// valac render.vala --pkg gtk+-3.0 --pkg poppler-glib
const int WIDTH = 1920;
const int HEIGHT = 1080;
public int main(string[] args) {
if (args.length != 2)
error("Must specify name of PDF file as argument");
File file = File.new_for_commandline_arg(args[1]);