Skip to content

Instantly share code, notes, and snippets.

View drichelson's full-sized avatar

Dan Richelson drichelson

View GitHub Profile
@drichelson
drichelson / colorize-maven.sh
Created March 8, 2012 00:16 — forked from mike-ensor/colorize-maven.sh
Colorize Maven output
#!/bin/sh
# Written by Mike Ensor (mike@ensor.cc)
# Copywrite 2012
# Use as needed, modify, have fun!
# This is intended to be used for Maven3 + Mac OSX
#
# To use:
# in your ".bashrc" or ".bash_profile" add the following line:
# source ~/<path to script>/colorize-maven.sh
@drichelson
drichelson / flash.h
Created January 9, 2016 22:45
Teensy 3.2 SerialFlash
#define CS_PIN 10
#define SI_PIN 11
#define SO_PIN 12
#define SCK_PIN 13
#define FILE_NAME "log.txt"
#include <SerialFlash.h>
#include <SPI.h>
SerialFlashFile file;
@drichelson
drichelson / go_metrics_json.go
Created March 11, 2016 03:32
Demonstration of go-metrics json output
package main
import (
"encoding/json"
"fmt"
"github.com/rcrowley/go-metrics"
)
func main() {
// PrefixedRegistry
// Attempt to minimize boilerplate code
func (l *LdApiClient) DoRequest(verb string, resource string, body interface{}, response interface{}, statusCodePredicate func(int) bool) error {
start := time.Now()
url := fmt.Sprintf("%s/%s", l.BaseUri, resource)
pre := verb + " " + url
var bodyJson []byte
var err error
if body != nil {
bodyJson, err = json.Marshal(body)
package us.ledicio.pattern;// In this file you can define your own custom patterns
import heronarts.lx.LX;
import heronarts.lx.LXCategory;
import heronarts.lx.color.LXColor;
import heronarts.lx.model.LXPoint;
import heronarts.lx.parameter.CompoundParameter;
import heronarts.lx.parameter.EnumParameter;
import us.ledicio.Gradient;