This file contains 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
require 'rubygems' | |
require 'eventmachine' | |
class Handler | |
include EventMachine::Deferrable | |
def takes_long_time(seconds = 5) | |
sleep(seconds) | |
puts "Awoke after #{seconds} seconds." | |
succeed(seconds) |
This file contains 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
[14:09] steveb: hah! i had that problem | |
[14:09] steveb: and you're going to ask me how i fixed it | |
[14:09] steveb: and i dont know | |
[14:09] kamalfariz_: steveb: how did you fix it? |
This file contains 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
# | |
# Chef Client Config File | |
# | |
log_level :info | |
log_location STDOUT | |
ssl_verify_mode :verify_none | |
registration_url "http://localhost:4000" | |
openid_url "http://localhost:4001" | |
template_url "http://localhost:4000" |
This file contains 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 common = require('../common'), | |
assert = common.assert; | |
var Script = process.binding("evals").Script; | |
var sandbox = Script.createContext({x: "x"}); | |
sandbox.window = sandbox; | |
//Script.runInContext("window = this;", sandbox); |
This file contains 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 app = require('app') | |
var assert = require('assert') | |
var db = app.db; | |
var get_state = function(callback) { | |
db.get('_state', function(err,doc) { | |
if(err) { |
This file contains 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 app = require('app') | |
var assert = require('assert') | |
var db = app.db; | |
var get_state = function(cb) { | |
db.get('_state', function(err,doc) { | |
if(err) { |
This file contains 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
<html> | |
<head> | |
<title>Test</title> | |
<style type="text/css"> | |
div { | |
position: absolute; | |
height: 200px; | |
} | |
.slide { |
This file contains 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
require 'celluloid' | |
class FuturePlexer | |
class DrainedError < StandardError; end | |
attr_accessor :futures | |
def initialize(futures) | |
self.futures = futures | |
end |
This file contains 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
require 'celluloid' | |
def pusher(condition) | |
sleep 5 | |
condition.signal 'Wibble' | |
end | |
def puller(condition) | |
value = condition.wait | |
puts "Pulled: #{value}" |
OlderNewer