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' |
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
#<UserAgent:0x007fb6521be6e8 @product="Mozilla", @version=#<UserAgent::Version 5.0>, @comment=["Linux", "U", "Android 4.0.3", "ja-jp", "ISW13F Build/V77R60B"]>, #<UserAgent:0x007fb6521b77f8 @product="AppleWebKit", @version=#<UserAgent::Version 534.30>, @comment=["KHTML, like Gecko"]>, #<UserAgent:0x007fb6521b6088 @product="Version", @version=#<UserAgent::Version 4.0>, @comment=nil>, #<UserAgent:0x007fb6521b5340 @product="Mobile", @version=nil, @comment=nil>, #<UserAgent:0x007fb6521b4f80 @product="Safari", @version=#<UserAgent::Version 534.30>, @comment=nil> |