Skip to content

Instantly share code, notes, and snippets.

View zeroeth's full-sized avatar
🤖
🐱 🤖 🐱 🤖

[0] zeroeth

🤖
🐱 🤖 🐱 🤖
View GitHub Profile
import processing.serial.*;
Serial myPort; // Create object from Serial class
int linefeed = 10;
/**
* Mixture Grid
* modified from an example by Simon Greenwold.
@zeroeth
zeroeth / triangle.pde
Created July 17, 2014 19:37
triangle points
x1 = sin(TWO_PI/3 * 0);
y1 = cos(TWO_PI/3 * 0);
x2 = sin(TWO_PI/3 * 1);
y2 = cos(TWO_PI/3 * 1);
x3 = sin(TWO_PI/3 * 2);
y3 = cos(TWO_PI/3 * 2);
scale(100);
float magic = 0;
void setup()
{
size(400, 400);
}
void draw()
@zeroeth
zeroeth / color-api.pde
Last active August 29, 2015 14:04
processing JSON
String palette_api = "http://www.colourlovers.com/api/palettes/random?format=json";
JSONObject palette_data;
String[] hex_values;
color colour;
void setup()
{
@zeroeth
zeroeth / arduino-serialIN.ino
Created July 11, 2014 18:20
sample class tests
int led = 13;
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
#!/usr/bin/env python3
import struct
import re
class Wad(object):
"""Encapsulates the data found inside a WAD file"""
def __init__(self, wadFile):
"""Each WAD files contains definitions for global attributes as well as map level attributes"""
@zeroeth
zeroeth / .vimrc
Created May 8, 2014 18:14
vim highlight trailing whitespace
" Highlight whitespace
hi link ExtraWhitespace Error
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" (Optional) Indentation/Whitespace Visibility
" :dig to list characters available for use.
@zeroeth
zeroeth / links.links.links
Created April 30, 2014 15:00
rails form videos