Skip to content

Instantly share code, notes, and snippets.

View mwhooker's full-sized avatar

Matthew Hooker mwhooker

  • tbd
  • San Francisco
View GitHub Profile
#include <Wire.h>
#include "rgb_lcd.h"
rgb_lcd lcd;
const int colorR = 255;
const int colorG = 0;
const int colorB = 0;
// Rocoder library: https://github.com/PaulStoffregen/Encoder
@mwhooker
mwhooker / g-shocks.md
Last active May 21, 2022 06:22
g-shock comparison
Name Series Model Moon Analog Hands Other Price Link
MASTER OF G - LAND MUDMASTER GWG1000-1A1 X Barometer/altimeter, compass, thermometer, Solar, Time Adjustment, $800.00 https://www.casio.com/us/watches/gshock/product.GWG-1000-1A/
MASTER OF G - LAND MUDMASTER GWG2000-1A3 X "" $800 https://www.casio.com/us/watches/gshock/product.GWG-2000-1A3/
MASTER OF G - LAND MUDMASTER GGB100-1A X compass, altimeter/barometer, temperature reader and pedometer. $380 https://www.casio.com/us/watches/gshock/product.GG-B100-1A/
MASTER OF G - LAND MUDMAN G9300-1 X compass, thermometer $220 https://www.casio.com/us/watches/gshock/product.G-9300-1/
G-LIDE GBX-100 Series GBX100-1 X Moon, Tide, sunrise/set, step count $160.00 https://www.casio.com/us/watches/gshock/product.GBX-100-1/
G-SHOCK MOVE GBD-H1000 SERIES GBDH1000-1 GPS, pedometer, altimeter, barometer, compass, hea
tosort = [7, 8, 9, 4, 7, 6, 3, 6, 6, 5]
sort = func(arr){
less = []
equal = []
greater = []
r = []
if length(arr) <= 1 {
return arr
}
@mwhooker
mwhooker / main.go
Last active August 15, 2019 23:47
decimal comparison
package main
import (
"fmt"
"math/big"
"github.com/cockroachdb/apd"
ericl "github.com/ericlagergren/decimal"
shopspring "github.com/shopspring/decimal"
)
{
"Reservations": [
{
"OwnerId": "596968041798",
"ReservationId": "r-0c36780ea7b7baeb9",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<!-- Autounattend_x64-UEFI_sample.xml
This file automates the Windows installation.
Before using this file:
* Replace ProductKey with a product key for the edition of Windows you are installing
(example: Windows 8 Pro)
@mwhooker
mwhooker / zebra.md
Created March 3, 2017 21:01 — forked from joyrexus/zebra.md
Norvig's treatment of the zebra puzzle.
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="2048"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
{
"builders": [
{
"export_path": "image.tar",
"image": "alpine",
"run_command": [
"-d",
"-i",
"-t",
"{{.Image}}",
-- Logs begin at Sun 2016-05-08 04:39:51 UTC, end at Mon 2016-05-09 22:25:45 UTC. --
May 09 22:24:57 ip-10-0-41-1.ec2.internal dockerd[1639]: time="2016-05-09T22:24:57.014266535Z" level=info msg="GET /version"
May 09 22:24:57 ip-10-0-41-1.ec2.internal dockerd[1639]: time="2016-05-09T22:24:57.729975133Z" level=info msg="=== BEGIN goroutine stack dump ===
goroutine 37 [running]:
github.com/docker/docker/pkg/signal.DumpStacks()
/build/amd64-usr/var/tmp/portage/app-emulation/docker-1.9.1-r3/work/docker-1.9.1/.gopath/src/github.com/docker/docker/pkg/signal/trap.go:67 +0x98
github.com/docker/docker/daemon.setupDumpStackTrap.func1(0xc820016cc0)
/build/amd64-usr/var/tmp/portage/app-emulation/docker-1.9.1-r3/work/docker-1.9.1/.gopath/src/github.com/docker/docker/daemon/debugtrap_unix.go:18 +0x5e
created by github.com/docker/docker/daemon.setupDumpStackTrap
/build/amd64-usr/var/tmp/portage/app-emulation/docker-1.9.1-r3/work/docker-1.9.1/.gopath/src/github.com/docker/docker/daemon/debugtrap_unix.go:20 +0x12a