Skip to content

Instantly share code, notes, and snippets.

@gom
gom / phpbrew.rb
Last active December 15, 2015 02:09 — forked from dataich/phpbrew.rb
require 'formula'
class Phpbrew < Formula
homepage 'https://github.com/c9s/phpbrew'
url 'https://github.com/c9s/phpbrew/tarball/1.8.16'
sha1 'ae4801d8f5c004677b7889b88ffbd4539def1d9b'
head 'https://github.com/c9s/phpbrew/tarball/master'
depends_on 'automake'
@gom
gom / rlsp.rb
Created November 9, 2009 05:02 — forked from h0rs3r4dish/rlsp.rb
#!/usr/bin/ruby
RLSP_VERSION = "1.4.1"
class Lambda
attr_accessor :args, :body
def initialize(args=[],body="")
@args = (args.class == Array) ? args : [args]
@body = body
end
class Object
def send_through(object, *args)
object.dispatcher_for(self).call(self, *args)
end
end
module Dispatcher
class DispatcherNotFound < StandardError; end
def self.extended(klass)
# Usage:
# ruby twitter_stream_api_test.rb USERNAME PASSWORD
require 'rubygems'
require "socket"
require 'base64'
require 'json'
username, password = *ARGV[0..1]