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
I was having a conversation the other day with a friend about the dearth of | |
wine spots in North Austin that served *good wine* at reasonable prices. | |
At the Taste North Austin event today, many of The Domain spots were | |
advertising their happy hours. So my thought is...collect all the | |
happy hour wines, take their price and compare the by the glass price | |
with the retail bottle price, how many ounces they pour (so, compute a $/oz) | |
look at wine ratings, etc...and basically ferret out the best wine deals. Haven't | |
built anything yet, but hope to build a list with some interesting stats soon! | |
Share that information with others and who knows maybe have some wine |
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 'yajl/http_stream' | |
require 'uri' | |
require 'open-uri' | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
# If you've got a ton of either, you'll have to fork and cursor through | |
fr_ids = Yajl::HttpStream.get(URI.parse("http://#{USERNAME}:#{PASSWORD}@api.twitter.com/1/friends/ids/#{USERNAME}.json")) |
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
module Kernel | |
def m(object=Object.new, pattern=nil) | |
methods = object.public_methods(false).sort | |
methods = methods.grep pattern unless pattern.nil? | |
ObjectMethods.new(methods) | |
end | |
class ObjectMethods < Array | |
def inspect | |
puts sort |
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
# Put this in your .irbrc, and then type | |
# "some_object.my_methods" in an IRB session | |
# for less noisy exploration of what objects | |
# can do. | |
class Object | |
def my_methods | |
base_object = case self | |
when Class then Class.new | |
when Module then Module.new |
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
class JsonHax | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env['CONTENT_TYPE'] == 'application/json' | |
env['CONTENT_TYPE'] = 'application/xml' | |
env['REQUEST_URI'].gsub!(/\.json/, '.xml') |
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
#!/usr/bin/env ruby | |
begin | |
require 'rubygems' | |
require 'fastercsv' | |
fn,result = ARGV[0],{} | |
FasterCSV.foreach(fn) do |row| | |
d,p = row[0],row[1] | |
result[d] = 0 if !result[d] |
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 'open-uri' | |
# url dsl -- the ultimate url dsl! | |
# | |
# You just can't beat this: | |
# | |
# $ irb -r url_dsl | |
# >> include URLDSL | |
# => Object | |
# >> http://github.com/defunkt.json |
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
Dd09 | |
150-200k max - if can't get to break even in Valley, those just go away | |
Entrep. who is a good dev - can make it on your own | |
1/2 million on social games, iPhone | |
Versus 120k/year | |
Facebook platform |