Skip to content

Instantly share code, notes, and snippets.

View reset's full-sized avatar

Jamie Stormbreaker reset

View GitHub Profile
defmodule MyTest do
use ExUnit.Case
setup do
{:ok, pid} = Client.start_link
this = self
probe = fn(response) -> send(this, {:response, response}) end
Client.register_callback(pid, :on_receive, probe)
{:ok, client: pid}
@reset
reset / gist:8606186
Created January 24, 2014 20:53
3 Summer Camps
Young Park - 12:37 PM
hey, do you happen to know of any popular/famous summer camps for kids to learn video game/tech programming?
Jamie Winsor - 12:38 PM
funny enough, I just sat down at my desk after Pat was telling me about this language for teaching kids how to programmer
to program*
http://scratch.mit.edu/
Young Park - 12:38 PM
nice
@reset
reset / gist:5817530
Last active December 18, 2015 17:19
attribute 'chef.chef_server_url',
type: String,
default: -> { Berkshelf.chef_config[:chef_server_url] }
Berkshelf (2.0.0)
Copyright 2012-2013 Riot Games
Jamie Winsor (<[email protected]>)
Josiah Kiehl (<[email protected]>)
Michael Ivey (<[email protected]>)
Justin Campbell (<[email protected]>)
Seth Vargo (<[email protected]>)
[2013-04-29T23:10:41Z] PID[66424] TID[oxf8pe1og] INFO: REST Gateway listening on 0.0.0.0:26100
/Users/reset/.rbenv/versions/1.9.3-p392/gemsets/berkshelf/gems/celluloid-io-0.13.1/lib/celluloid/io/reactor.rb:43: [BUG] Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
-- Control frame information -----------------------------------------------
c:0016 p:0207 s:0057 b:0055 l:000054 d:000054 METHOD /Users/reset/.rbenv/versions/1.9.3-p392/gemsets/berkshelf/gems/celluloid-io-0.13.1/lib/celluloid/io/reactor.rb:43
c:0015 p:0015 s:0049 b:0049 l:000048 d:000048 METHOD /Users/reset/.rbenv/versions/1.9.3-p392/gemsets/berkshelf/gems/celluloid-io-0.13.1/lib/celluloid/io/reactor.rb:21
c:0014 p:0092 s:0045 b:0045 l:000044 d:000044 METHOD /Users/reset/.rbenv/versions/1.9.3-p392/gemsets/berkshelf/gems/celluloid-io-0.13.1/lib/celluloid/io.rb:30
c:0013 p:0022 s:0040 b:0040 l:000039 d:000039 METHOD /Users/reset/.rbenv/versions/1.9.3-p392/gemsets/berkshelf/gems/celluloid-io-0.13.1/lib/celluloid/io/
@reset
reset / gist:5348995
Last active December 16, 2015 00:39
class SupervisionGroup < ::Celluloid::SupervisionGroup
supervise ActorOne, as: :actor_one
end
class ActorOne
include Celluloid
end
class ActorTwo
attr_reader :other_actor
def define_thing(my_proc)
command = InternalCommand.get()
arguments = my_proc.parameters.collect { |type, parameter| parameter }
method_option :force,
type: :boolean,
default: false,
desc: "Run command even if the environment is locked",
aliases: "-f"
desc("#{command.name} #{arguments.map(&:upcase).join(' ')}", command.description)
class Something
include Celluloid
def ruby_script(name, host, options = {})
name = name.split('.rb')[0]
script = File.read(MB.scripts.join("#{name}.rb"))
command = "#{EMBEDDED_RUBY_PATH} -e '#{script}'"
status, response = ssh_command(host, command, options)
case status
module DCell
class << self
# Start combines setup and run! into a single step
def start(options = {})
setup options
run!
end
end
# DCell's actor dependencies
class Thing
def self.main
# do stuff
puts "in main"
end
end
Thing.main