Skip to content

Instantly share code, notes, and snippets.

View sowbug's full-sized avatar

Mike Tsao sowbug

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sowbug on github.
  • I am sowbug (https://keybase.io/sowbug) on keybase.
  • I have a public key ASB5RA9_urOndti5yz1PD3yTsS_dKnADrZVPCLTMd5Y7-wo

To claim this, I am signing this object:

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 0
#define NUM_PIXELS (16)
#define NUM_SPRITES (2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, PIN,
@sowbug
sowbug / create_split_secret.sh
Created October 12, 2015 04:12
Use Shamir's Secret Sharing Scheme to split a strong passphrase into five QR codes, any three of which will reconstruct the passphrase.
#!/bin/bash
#
# Use Shamir's Secret Sharing Scheme to split a strong passphrase into
# five QR codes, any three of which will reconstruct the passphrase.
#
# Requires packages qrencode, ssss, and optionally zbarimg.
PASSPHRASE_LENGTH=32
SHARES=5 # max 9 (fix single-digits below if you need more)
MIN_TO_COMBINE=3
@sowbug
sowbug / event.js
Created April 25, 2014 19:38
A different way of letting users know that your Chrome extension or app has been installed/updated
chrome.runtime.onInstalled.addListener(function() {
var options = {
type: "basic",
title: "Version " +
chrome.runtime.getManifest().version +
" installed",
message: "Just thought you'd like to know that this extension is now installed!",
iconUrl: "assets/icon_128.png"
};