Skip to content

Instantly share code, notes, and snippets.

View frankleonrose's full-sized avatar

Frank Leon Rose frankleonrose

View GitHub Profile
@frankleonrose
frankleonrose / platformio.ini
Created July 11, 2017 04:49
Building for TTN OTAA example on Feather M0 for debugging using PlatformIO and BlackMagic Probe
; Instructions
; - Install PlatformIO IDE Package within Atom and then choose PlatformIO / Install Shell Commands menu item
; - Alternatively install PlatformIO command line only (when you install for Atom it will want you to then remove the cli version)
; - Upgrade to development version of atmelsam platform using the following commands
; pio platform uninstall atmelsam
; pio platform install https://github.com/platformio/platform-atmelsam.git
; - Make a directory myproject
; - Copy this fileinto it as platformio.ini
; - Copy ttn-otaa.ino to myproject/src/main.cpp
; - Make sure that arm-none-eabi-gdb is on your path. Might have to run:
@frankleonrose
frankleonrose / IsNotFuture
Created October 28, 2014 17:01
IsNotFuture - Scala
trait IsNotFuture[F] {
type T
def apply(f: F): T
}
object IsNotFuture {
def apply[F](implicit isf: IsNotFuture[F]) = isf
implicit def mkFuture[A] = new IsNotFuture[Future[A]] {
type T = Int // Doesn't matter
@frankleonrose
frankleonrose / index.html
Last active January 3, 2016 09:29
Skelos Plot
<!DOCTYPE html>
<meta charset="utf-8">
<title>Skelos Plot</title>
<style>
body {
font: 10px sans-serif;
}
.chord path {
@frankleonrose
frankleonrose / ParameterView.java
Created December 11, 2012 20:32
Simple class to create a set of controlP5.Slider controllers from a POJO with setValueName(<Numeric Type>) methods. Optional Range annotation and getting of default value.
// I ran into a weird unknown method invocation with cp5magic (perhaps because I have to use Processing 1.5.1 because of bugs in 2.0b).
// That combined with having classes with setParamName1(numeric) style setters, I wrote this. Enjoy.
/*
Usage:
public class MyParameterClass {
double myParameter = 100d;
@Range(max=200)
public void setMyParameter(double v) { myParameter = v; }
public double getMyParameter() { return myParameter; }