Skip to content

Instantly share code, notes, and snippets.

View bnferguson's full-sized avatar

Brandon Ferguson bnferguson

View GitHub Profile
@yogeek
yogeek / Dockerfile
Last active April 17, 2024 11:57
Gosu usage in Docker
FROM ubuntu
RUN apt-get install ...
# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
@NyxCode
NyxCode / tpm2.md
Last active August 21, 2017 15:39 — forked from jblang/tpm2.md
TPM2 Protocol Description

TPM2 Protocol Implementation

Introduction

Frame data is transferred inside packets (similar to DMX, for example). A frame is an image representing a matrix or a light scene.

The packets start and end with one-byte characters. In between are a few control bytes followed by the payload. There is no set size for a payload; it is transmitted with each packet. This makes the protocol quite flexible. There are enough bytes in a single packet for an RGB matrix with 21,845 pixels, but if you just want to control an RGBW lamp, that only requires 9 bytes. The variable frame size means there is no overhead, allowing for maximum transfer speed.

TPM2 Packet Structure

@juliamae
juliamae / brady_mascot_fears.md
Last active December 29, 2016 16:59
Brady win% by mascot type

Brady Win % by Type of Mascot*

Mascot* Win %
horse 63.64%
mythical being 71.43%
industry 72.55%
other animal 72.73%
overall 76.56%
@willurd
willurd / web-servers.md
Last active July 12, 2024 11:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
# igrigorik { ~ } > rvm use jruby
# Using /Users/igrigorik/.rvm/gems/jruby-1.6.2
# igrigorik { ~ } > gem install mvn:org.clojure:clojure
# Successfully installed mvn:org.clojure:clojure-1.3.0.b.1-java
# 1 gem installed
require 'rubygems'
require 'java'
require 'maven/org.clojure/clojure'