Skip to content

Instantly share code, notes, and snippets.

View matthewellis's full-sized avatar

Matthew Ellis matthewellis

  • Edinburgh, Scotland.
View GitHub Profile
#cloud-config
# include one or more SSH public keys
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClsVLmbF9cg+PK8HhkQAkOy6KjPKzwbu/JgCZeQ5t3kpo8N8LV4493rsh4/Rk5C+LyD7pm5vdMG92Y9AJ8qgUZsFBcsc8j+nEY43xtoIbxP372LMLZzhjAg0P9dyJOdEtKTJMcZtfuggDgS6ecsAGOEZngTXyv5cdgHUCv2vms4AefLecc8vmC72cybKed4oN9NYF1WNGrgKUTt9ybVI9bvTk29AONL0VfzM8x/TkGAASxiREkHhYZk8nUPaaJ+/+v8MSiuRfBs2x4LbRwJjALC4YodlohmaAcmI4tDNA/62hAsdACairqfAT6XCT60/u/zr3ljXym5ttWrL9Xxn7t matthewellis@Matthews-MacBook-Pro.local
@matthewellis
matthewellis / Color-hack.go
Last active January 24, 2017 20:10
Color hack for rgb lightstrip controller
func (c Color) Format() []byte {
//ignoreW := True
ignoreW := uint8(0x00)
if c.UseW {
ignoreW = False
}
return []byte{c.R, c.G, c.B, c.W, ignoreW}
}
@matthewellis
matthewellis / ViewController.swift
Last active February 2, 2016 21:13
Simple Barcode Scanning with Swift 2.1
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {
let session : AVCaptureSession = AVCaptureSession()
var previewLayer : AVCaptureVideoPreviewLayer!
var highlightView : UIView = UIView()
@matthewellis
matthewellis / TLC5971 breakout.jpg
Last active December 19, 2015 17:28 — forked from tmpvar/TLC5971 breakout.jpg
Swapped blue and red write commands as they where in the wrong order.
TLC5971 breakout.jpg