Skip to content

Instantly share code, notes, and snippets.

Yona Appletree Yona-Appletree

Block or report user

Report or block Yona-Appletree

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View timeclock-sanity.js
function showDialog() {
const form = document.createElement("form");
const textarea = document.createElement("textarea"); = "100%"; = "25em";
const button = document.createElement("button");
button.innerText = "Submit"; = "block";
View MongoStrings.kt
* Helper for building strings using mongo update operators. By declaring all the operators as variables in this object,
* they can be used without special escape. e.g. MongoUpdateString { """{$set:{"name":"Luke Skywalker"}}""" }
object MongoUpdateString {
inline operator fun invoke(callback: MongoUpdateString.() -> String) = callback()
val currentDate = "\$currentDate"
val inc = "\$inc"
Yona-Appletree /
Last active Aug 8, 2017
LEDscape Image Instructions

LEDscape Arch Image

Download and flash the image

  1. Download the image:

  2. Flash it to an sd card, where /dev/rdiskN is the device node of your SD card

    xz -dc ledscape-arch-linux.img.xz | sudo dd of=/dev/rdiskN bs=4m

Boot the Beaglebone from the SD Card:

  1. Power off the beaglebone,
View ietest.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Yona-Appletree / geodesic.scad
Last active Aug 29, 2015
Geodesic slicing using geodesic library from thing:10725
View geodesic.scad
include <platonic.scad>
// Matrix Math Helpers
function remove(list, removeI, i=0) = (i >= len(list))
? []
: concat(i==removeI?[]:[list[i]], remove(list, removeI, i+1));
function det(m) = let(r=[for(i=[0:1:len(m)-1]) i]) det_help(m, 0, r);
function det_help(m, i, r) = len(r) == 0 ? 1 :
Yona-Appletree / gist:ecf74d65f7cc09eaad46
Created May 25, 2015
Turtle shape function for openSCAD
View gist:ecf74d65f7cc09eaad46
function sum(parts, i=0) = (i < len(parts)-1) ? (parts[i] + sum(parts, i+1)) : parts[i];
function turtlePoints(
i = 0,
prev = [0,0]
) = let(
s = sum(commands[i]),
current = i == 0 ? s : (prev + s)
) concat(
Yona-Appletree / ws2811_bridge.ino
Created Sep 9, 2013
A simple Arduino program which uses Adafruit's NeoPixel library to relay serial-level RGB data to a series of WS2811-compatible LED modules attached to an output pin. The use of Adafurit's library requires double buffering in the serial-receive code, reducing the number of LEDs that can be driven with a single Arduino. It's possible that code co…
View ws2811_bridge.ino
// include the neo pixel library
#include <Adafruit_NeoPixel.h>
// The number of LEDs being driven. This dictates how much data is expected in each frame read from the serial port.
static const int NUM_LEDS = 256;
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
You can’t perform that action at this time.