Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"math"
"os"
"path"
@dustin
dustin / README.md
Last active August 29, 2015 14:23
WS2812 demo with 13 LEDs
@dustin
dustin / README.md
Last active August 29, 2015 14:23
WS2812 Capture from strandtest
@dustin
dustin / README.md
Last active August 29, 2015 14:23
WS2812 Capture from strandtest

Keybase proof

I hereby claim:

  • I am dustin on github.
  • I am dlsspy (https://keybase.io/dlsspy) on keybase.
  • I have a public key whose fingerprint is B6EC 2150 5EA7 13F4 CAE7 C97F 3E27 8F07 9642 290F

To claim this, I am signing this object:

#!/bin/sh
nodes=`cbfsclient http://cbfs:8484/ info -t '{{ range $n, $v := .Nodes }} {{ $n }}.cbfs.west.spy.net {{ end }}'`
for n in $nodes
do
echo $n
curl -i -XPOST http://$n:8484/.cbfs/exit/
sleep 2
done
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Hello, Nasty
owGbwMvMwMVop97PPs1Jk5/x9JYkhmBex5tumXnpqUUFRZl5JVYKjq6OrqZmZpYK
ppZuRsaOhoYKZgZu5m6OlqYKro7mrsbGBo4KLs4W5saWlgZcKDqdTA0dTV2M3RTc
XIAqLY0MFCwNLU3NDQyMFMwNDcyNDVwMFFwsDEwNnYzNUHWamBq4uBk6OyuYGbtZ
ODlZAC03czFwMnIxVHB0cjZ2dnRzVDB2tDCydDF14upkqmFhYORiSGNlAjk+XqSB
AQj0GDQyi4tLU4t00wqKHPLySxJLMvPzivXyC1LzCtIL9NIy00oyMvKLilNzE/P0
8lJLnMxcnY0MTQ1MgW41NHYzcXZ0NXe2NHczdjUyt3AzMLc0MzEysjRwY+DiFICF
@dustin
dustin / weblog.go
Created January 14, 2014 05:25
Simple tool for being a web server and and reporting what's happening. I use this for debugging client apps mostly.
package main
import (
"flag"
"log"
"net/http"
"time"
)
var addr = flag.String("addr", ":3232", "binding address")
@dustin
dustin / githubstats.go
Created December 31, 2013 21:45
Pulling out my public events from 2013.
// Process github event data exports.
//
// Go here for more info: http://www.githubarchive.org/
package main
import (
"compress/gzip"
"encoding/csv"
"encoding/json"
"io"
@dustin
dustin / inside.txt
Last active January 1, 2016 13:49
fuse debug
# when inside the directory (using .)
# test program works correctly to completion
2013/12/27 15:30:18 fuse req: Access [ID=0xf Node=0x9 Uid=501 Gid=20 Pid=496] mask=0x4
2013/12/27 15:30:18 fuse req: Access [ID=0xd Node=0x1 Uid=501 Gid=20 Pid=38] mask=0x1
2013/12/27 15:30:18 fuse req: Access [ID=0x11 Node=0x8 Uid=501 Gid=20 Pid=38] mask=0x1
2013/12/27 15:30:18 fuse req: Access [ID=0x12 Node=0x1 Uid=501 Gid=20 Pid=38] mask=0x1
2013/12/27 15:30:18 fuse req: Access [ID=0x13 Node=0x8 Uid=501 Gid=20 Pid=38] mask=0x1
2013/12/27 15:30:18 fuse req: Access [ID=0x2 Node=0x9 Uid=501 Gid=20 Pid=38] mask=0x0
2013/12/27 15:30:18 fuse req: Access [ID=0x3 Node=0x9 Uid=501 Gid=20 Pid=38] mask=0x0