This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float xoff = 0.0; | |
| float yoff = 0.0; | |
| void setup() { | |
| size(600, 600); | |
| } | |
| void draw() { | |
| noStroke(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Emitter = require('events').EventEmitter; | |
| var emitter = new Emitter(); | |
| var io = require('socket.io')(); | |
| var fwd = require('forward-events'); | |
| var nsp = io.of('/what-time-is-it'); | |
| fwd(emitter, nsp); | |
| setInterval(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (a) a.stop(); | |
| console.time('create'); | |
| a = context.createBufferSource(); | |
| a.buffer = buffers[(Math.random() * buffers.length) | 0]; | |
| a.connect(context.destination); | |
| console.timeEnd('create'); | |
| a.noteOn(0); | |
| create: 0.068ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "activity": "aerobics", | |
| "geo": false, | |
| "place": true, | |
| "color": "bc4fff", | |
| "units": "duration,calories" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| up | |
| install coreutils | |
| install ffmpeg | |
| install rbenv | |
| install ruby-build | |
| install rbenv-gemset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var audio = new Audio(); | |
| audio.src = '/path/to/audio.wav'; | |
| function play() { | |
| audio.pause(); | |
| audio.currentTime = 0; | |
| audio.play(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ time ./script/bootstrap.py | |
| real 5m14.329s | |
| user 1m22.303s | |
| sys 0m37.695s | |
| $ time ./script/build.py | |
| ninja: Entering directory `out/Release' | |
| [1010/1010] STAMP Atom.app | |
| ninja: Entering directory `out/Debug' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <body> | |
| <script> | |
| var worker = new Worker('./worker.js'); | |
| worker.onmessage = function(e) { | |
| console.log(e.data); | |
| }; | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ time vagrant up | |
| Bringing machine 'default' up with 'virtualbox' provider... | |
| ==> default: Importing base box 'precise64'... | |
| ==> default: Matching MAC address for NAT networking... | |
| ==> default: Setting the name of the VM: vagrant-rails_default_1397616077541_57517 | |
| ==> default: Fixed port collision for 22 => 2222. Now on port 2200. | |
| ==> default: Clearing any previously set network interfaces... | |
| ==> default: Preparing network interfaces based on configuration... | |
| default: Adapter 1: nat | |
| ==> default: Forwarding ports... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| gem 'rsvg2' |