Skip to content

Instantly share code, notes, and snippets.

@timothyb89
timothyb89 / chart.png
Last active February 28, 2018 15:40
Threshold Engine Proposal
chart.png
@timothyb89
timothyb89 / local.js
Created June 16, 2017 23:13
child_process memory issue local reproduction attempt
// use to attempt to reproduce locally like so:
// docker run --rm=true -v $(pwd)/local.js:/local.js node:6.11.0 node -e "require('./local').reproduce_sync_exec()"
const child_process = require('child_process');
const os = require('os');
function debug() {
const free = os.freemem();
const total = os.totalmem();
@timothyb89
timothyb89 / index.js
Last active June 16, 2017 22:51
GCF memory usage bug
const child_process = require('child_process');
const os = require('os');
function debug() {
const free = os.freemem();
const total = os.totalmem();
console.log('process: ', process.memoryUsage(), 'os: ', {
free, total,
usedMiB: (total - free) / (1024 * 1024)
@timothyb89
timothyb89 / Wacom Configurator.md
Last active October 13, 2020 04:23
A small Python utility to easily set wacom tablet settings

A quick and dirty Python utility to set wacom tablet settings.

To use, run with no arguments. Options are configured in init_wacom(). Make sure to pip install sh first.

Button mappings can either be a key or mouse button sequence, or a Python function to be executed.

For function actions, write the logic, run wacom, and open your keybinding application choice - the keyboard shortcut settings in GNOME or KDE work well. Configure a new mapping

@timothyb89
timothyb89 / Main.java
Last active August 29, 2015 14:02
lifx-java bug
package org.timothyb89.lifx.java.test;
import java.io.IOException;
import org.timothyb89.eventbus.EventHandler;
import org.timothyb89.lifx.bulb.BulbStatusUpdatedEvent;
import org.timothyb89.lifx.bulb.LIFXColor;
import org.timothyb89.lifx.bulb.PowerState;
import org.timothyb89.lifx.gateway.Gateway;
import org.timothyb89.lifx.gateway.GatewayBulbDiscoveredEvent;
import org.timothyb89.lifx.gateway.GatewayDisconnectedEvent;
@timothyb89
timothyb89 / baresympy.py
Created February 28, 2014 19:56
SymPy in IPython with naked constants
#
# ~/.config/ipython/extensions/baresympy.py
#
#
# This automatically "Sympifies" naked constants (i.e. performs S(123) automatically)
# It's smart enough to keep compatibility with SymPy functionality (e.g. plot ranges)
# but will probably break your console for anything not SymPy related.
#
# Use "%load_ext baresympy" to load, or add it to your IPython profile.