Skip to content

Instantly share code, notes, and snippets.

View dethe's full-sized avatar

Dethe Elza dethe

View GitHub Profile
@dethe
dethe / coldata3.js
Last active December 14, 2015 22:09
var visualizations = {};
var data = {
"format": "CollusionSaveFile",
"version": "1.0",
"token": "{0ccd56d1-2f59-2142-8f72-e4d12dd64769}",
"connections": [
[
"lanistaads.com",
"rubiconproject.com",
1362156908018,
@dethe
dethe / trails.js
Last active December 10, 2015 05:08
Slightly more complex Waterbear example using the rectangle sprites
var global = new Global();
(function(){
var local = new Local();
local.canvas = document.createElement("canvas");
local.canvas.setAttribute("width", global.stage_width);
local.canvas.setAttribute("height", global.stage_height);
global.stage.appendChild(local.canvas);
local.ctx = local.canvas.getContext("2d");
local.ctx.textAlign = "center";
var main = function(){
@dethe
dethe / random_circles.js
Last active October 13, 2015 04:57
Simplest example of a Waterbear script (for Javascript canvas)
local.count_1 = 0;
(function() {
setInterval(function() {
local.count_1++;
var point_2 = {
x: randint(0, global.stage_width),
y: randint(0, global.stage_height)
};
var radius_2 = randint(20, 50);
var color_2 = "rgb(" + randint(0, 255) + "," + randint(0, 255) + "," + randint(0, 255) + ")";
@dethe
dethe / blacklightworms.pjs
Created September 11, 2012 19:56
Example code to test processing.js embeddeding in Tumblr
int number = 15;
float[] x = new float[number];
float[] y = new float[number];
float[] r = new float[number];
float[] theta = new float[number];
float[] offset = new float[number];
int minRadius = 30;
int maxRadius = 60;
void setup(){
@dethe
dethe / waterbear.json
Created February 23, 2012 06:07
Huzzah 2
{"scripts":[{"klass":"control","label":"when program runs","script":"function _start(){[[1]]}_start();","containers":1,"trigger":true,"locals":[],"sockets":[],"contained":[{"klass":"strings","label":"alert [string]","script":"window.alert({{1}});","containers":0,"locals":[],"sockets":["Huzzah!"],"contained":[],"next":""}],"next":""}],"title":"Huzzah 2","version":"0.4","plugin":"canvas","type":"application/json","format":"waterbear script"}
@dethe
dethe / waterbear.json
Created February 23, 2012 05:59
Huzzah 2
scriptfunction _start(){[[1]]}_start();labelwhen program runsklasscontrollocalssocketstriggertruenextcontainers1containedscriptwindow.alert({{1}});labelalert [string]klassstringslocalssocketsHuzzah!nextcontainers0contained
@dethe
dethe / settings.json
Created February 21, 2012 06:10
Huzzah!
{}
@dethe
dethe / dabblet.css
Created February 19, 2012 06:42
Dabble dabble toil and travail
/**
* Dabble dabble toil and travail
*/
background: #f06;
background: linear-gradient(47deg, #f06, yellow, #049, #000, #F0F);
min-height:100%;
/**
* Additional content section / block functions for body.
*/
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso'));
exports = module.exports = function(req, options, callback) {
@dethe
dethe / gist:721274
Created November 30, 2010 07:01
response from couchdb on attachment upload
Request URL:http://localhost:5984/kinzin/layout_sign_in
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Length:550139
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryTMHEvBA4sZ200O6E
Origin:http://localhost:5984
Referer:http://localhost:5984/kinzin/_design/obloq/_show/block/layout_sign_in
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-ca) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4