Skip to content

Instantly share code, notes, and snippets.

@jocafa
jocafa / _.md
Created December 8, 2013 20:13
midistuff
@jocafa
jocafa / papersvg.html
Created February 15, 2013 23:09
Simulating the "print" look from geometryoftheday using mask images
<!DOCTYPE html>
<html>
<head>
<title>Paper SVG</title>
<style type="text/css">
body {
background-image: url(noise.png);
background-color: #eee;
}
</style>
task 'proto', 'retrieve, extract, and compile proto files', ->
version = '0.2.1.p0'
tmpPath = './tmp'
gemFile = "atlas-#{version}.gem"
defPath = path.join tmpPath, 'definitions'
protoPath = path.join defPath, 'atlas'
schemaPath = path.join defPath, 'schema.desc'
rpcPath = path.join tmpPath, 'lib', 'atlas', 'rpc', 'config', 'rpc.yml'
gemPath = path.join tmpPath, gemFile
destPath = './proto'
coffeefiles = $(filter-out %.test.coffee,$(shell find \
Nixie/js/Nixie.coffee \
Nixie/js/models/*.coffee \
Nixie/js/collections/*.coffee \
Nixie/js/Module.coffee \
Nixie/js/modules/*.coffee \
Nixie/js/Nixie.Controller.coffee \
))
all: \
sys = require 'sys'
fs = require 'fs'
util = require 'util'
childProc = require 'child_process'
coffee = require 'coffee-script'
stylus = require 'stylus'
uglify = require 'uglify-js'
_ = require 'underscore'
_.mixin(require('underscore.string'))
#AuthModule@-webkit-keyframes authShake {
0% {
-webkit-transform: translate3d(0px, 0px, 0px);
}
10% {
-webkit-transform: translate3d(40px, 0px, 0px);
}
30% {
RingNavigator_radius = 96
RingNavigator_sliceAngle = (PI * 2) / 8
RingNavigator_positionIcon(n)
x = cos(n * RingNavigator_sliceAngle) * RingNavigator_radius
y = sin(n * RingNavigator_sliceAngle) * RingNavigator_radius
x = unit(~~x, px)
y = unit(~~y, px)
-webkit-transform: translate3d(x, y, 0px)
background-image: -webkit-gradient(linear, 0 0, 32 32,
color-stop(0.00, #ddd),
color-stop(0.25, #ddd),
color-stop(0.26, #eee),
color-stop(0.50, #eee),
color-stop(0.51, #ddd),
color-stop(0.75, #ddd),
color-stop(0.76, #eee),
color-stop(1.00, #eee)
);
class Thingy
constructor: ->
@
Object.defineProperties Thingy.prototype,
foo:
get: ->
@.foo
set: (nv) ->
@.foo = nv
@jocafa
jocafa / gist:967083
Created May 11, 2011 19:06
A Cakefile
sys = require 'sys'
fs = require 'fs'
util = require 'util'
childProc = require 'child_process'
coffee = require 'coffee-script'
stylus = require 'stylus'
uglify = require 'uglify-js'
_ = require 'underscore'
_.mixin(require('underscore.string'))