Skip to content

Instantly share code, notes, and snippets.

Simen Svale Skogsrud simen

View GitHub Profile
View build.coffee
THREE = require('../lib/three')
CSG = require('../lib/csg')
ThreeBSP = require('../lib/threecsg')
toSTL = require('./to_stl')
fs = require('fs')
eachGrunnkrets = require('./each_grunnkrets')
incomes = require('./incomes')
ClipperLib = require('../lib/clipper_lib')
clipperScale = 1.0
View svgagogo
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 1000 0 1000" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <path fill="black" d="M -1126.445270022432624 249.064955425385676 L -1152.44526617978272 260.064953842455338 -1158.445265968651029 263.064953746714139 -1165.445262428094111 266.064952241125354 -1170.445259755165807 269.064950646239936 -1289.445263124840949 329.064952544729522 -1301.445263269001771 335.064952636499243 -1301.445352711721171 335.064773751061125 -1289.445352867616748 329.064773809320116 -1170.445356356168304 269.064775368758944 -1165.445353688037812 266.064773759012041 -1158.445350154629
View timelapse.coffee
dropbox = require 'dropbox-node'
strftime = require 'strftime'
child_process = require 'child_process'
client = new dropbox.DropboxClient("<api key>", "<api secret>",
'<user token>', '<user secret>')
command = "fswebcam"
options = ['--no-banner', '--resolution', '800x600', '--skip', '10', '--frames', '50', '--no-timestamp', '--save', 'snapshot.jpg']
@simen
simen / hammer.rb
Created Oct 12, 2012
Hammer Pebbles through Varnish
View hammer.rb
require 'curb'
loop do
t = Time.now
url = "http://www.op.no/api/grove/v1/posts/post.track:apdm.bandwagon.innerwest.op.135234$135237,post.track:apdm.bandwagon.innerwest.op.135234$135239,post.track:apdm.bandwagon.innerwest.op.135234$135241,post.track:apdm.bandwagon.innerwest.op.145785$145788,post.track:apdm.bandwagon.innerwest.op.5746$5749,post.track:apdm.bandwagon.innerwest.op.6093$6407,post.track:apdm.bandwagon.innerwest.op.145785$145808,post.track:apdm.bandwagon.innerwest.op.5746$5748,post.track:apdm.bandwagon.innerwest.op.5295$114847,post.track:apdm.bandwagon.innerwest.op.5295$99085,?"
http = Curl.get(url)
if http.response_code != 200
puts
puts
puts "GET #{url}"
puts t.to_s
@simen
simen / gist:1433530
Created Dec 5, 2011
Match with constraint counting
View gist:1433530
"identity:7" => [1,2,4]
"realm:mittap" => [1,3,4]
"body:'Hello…' => [4]
1: rule: {identity: 7, realm: 'mittap'}, number_of_constraints: 2
2: rule: {identity: 7}, number_of_constraints: 1
3: rule: {identity: 8, realm: 'mittap'}, number_of_constraints: 2
4: rule: {identity: 7, realm: 'mittap', body: "Hello from number 7"}, number_of_constraints: 3
message = {identity: 7, body: "Hello from number 7"}
You can’t perform that action at this time.