Skip to content

Instantly share code, notes, and snippets.

View dethe's full-sized avatar

Dethe Elza dethe

View GitHub Profile
@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
require 'rubygems'
require 'cairo'
require 'rmagick'
img = Magick::Image::read('test.jpg').first
puts 'Getting bounding box'
width = img.columns
height = img.rows
puts 'Finding stride for width ' + width.to_s
class Foo
constructor: (args...) ->
# do something with args
class Bar extends Foo
constructor: (args...) ->
super(args...)
new Bar(1,2,3)