Skip to content

Instantly share code, notes, and snippets.


Tristan Hume trishume

View GitHub Profile
trishume / .slate
Created Nov 20, 2012
My Slate config
View .slate
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout dvorak
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
trishume /
Created May 30, 2022
GDB scripting with GEF
c = gdb.execute
def a(x):
return f"*{hex(x)}"
def w(x):
return f"*(char*){hex(x)}"
class Puppet(GenericCommand):
"""Puppeteer the session"""
trishume / LatencyTester.ino
Last active Jul 13, 2021
Latency Tester and Foot Pedals Teensyduino sketch
View LatencyTester.ino
// Tristan's Foot Pedals and Latency Tester Arduino Program
// Provides 5 buttons: left click, right click, scroll up, scroll down, latency test
// If you don't want all of these you can comment out the buttons you don't need.
#include <Bounce2.h>
#include "Keyboard.h"
const int scrollInterval = 80;
trishume / merlin-sublime-popups.patch
Created Mar 30, 2017
Patch to add type inference and definition popups to Sublime Text's Merlin plugin
View merlin-sublime-popups.patch
diff --git a/Packages/Merlin/ b/Packages/Merlin/
--- a/Packages/Merlin/
+++ b/Packages/Merlin/
@@ -248,6 +248,57 @@
opened_view.run_command("insert_code", { "arg": sig })
+class MerlinInfoPopup:
+ """
+ Pop up a menu at a point describing an expression
trishume / etrace.el
Last active Oct 25, 2020
See new Github Repo version: - Emacs Latency Tracing for the Chromium Catapult Trace Event Format.
View etrace.el
;; This gist has been superseded by a Github repo, new activity will
;; happen at
;;; etrace.el --- Emacs Lisp Tracer -*- lexical-binding: t -*-
;; Released under the MIT license, Copyright Jane Street Group, LLC
;; This module modifies the instrumentation profiler included with
;; Emacs called "elp" to also record trace events for the beginning
;; and end of function calls, and provides a function to write out
;; those events in Chromium JSON trace format.
trishume / 0-sublime.json
Created Oct 5, 2016
Current Sublime Text settings
View 0-sublime.json
"auto_complete_commit_on_tab": true,
"characters": "<",
"selector": "text.html"
"characters": ".",
trishume / Flagsifier.ipynb
Created May 14, 2018
DEF CON Quals 2018 Flagsifier Notebook
View Flagsifier.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
trishume / DataShipper.cs
Created Mar 17, 2016
Tobii EyeX UDP data shipper to VMWare VM host.
View DataShipper.cs
// Used to send data from a VMWare VM running the EyeX software
// with a Steelseries Sentry to a Mac OSX host over UDP.
namespace MinimalGazeDataStream
using EyeXFramework;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Tobii.EyeX.Framework;
trishume / gauss.rb
Created Feb 3, 2015
Ruby Gaussian Elimination Steps
View gauss.rb
# Step-By-Step Gaussian Elimination on Augmented Matrices
# By Tristan Hume
require "rational"
def reduce_down(mat)
# Use each row going down to cancel lower rows
# Each iteration of this loop is one step
rows = mat.length
(0..rows-2).each do |ri1|
trishume / collatz.rb
Created Jul 6, 2011
Collatz conjecture chains in ruby
View collatz.rb
# small recursive version
def collatzr(num,arr = [])
return arr if arr.unshift(num)[0] == 1
num.even? ? collatzr(num / 2,arr) : collatzr(num * 3 + 1,arr)
# pretty looping version
def collatz(num,arr = [])
while num != 1
arr << num
num = num.even? ? num / 2 : num * 3 + 1