Sun01Aug

  1. hermès cardholder
dope

    hermès cardholder

    dope

  2. Fri30Jul

  3. [Flash 9 is required to listen to audio.]

    ricky rozay ft yeezy - live fast, die young

    this beat is so RIDICULOUS that when it comes to the instrumental part after ye’s verse I look over both shoulders, and if there is no one there i do this dance…

    sidebar: j.u.s.t.i.c.e. league are also ill as fuck

  4. Tue27Jul

  5. [Flash 9 is required to listen to audio.]

    George Gershwin - Rhapsody in Blue

  6. Sat24Jul

  7. 1100 Biscayne Blvd, Miami, FL

    3 Bedrooms, 2.5 Bathrooms - $850,000

    Real Estate in Miami is crazy cheap. I’ve seen really nice places for less than $100k. This place for example is fucking huge, try getting a comparable place in London or New York for less than $2 mill. Good luck. If I had the right to reside in the US, I’d be getting a mortgage right now and posting up in Miami.

    Peace

    S

  8. Quick Tip: Ruby Class Definition

    Everyone knows this syntax

    class Foo
    
    end

    This is cleaner when you just need to quickly define an empty class:

    Foo = Class.new

    I’m writing this ActiveRecord compliant in memory model implementation called Glamazon for this secret project I’m on at work. I used Class.new’s ability to take a block as the class body to include my library into a testable class, e.g.

    Mule = Class.new { include Glamazon::Base }

    In other Ruby code you might frequently see this used to define error classes:

    class SpecialError < StandardError
    end

    This is way cleaner:

    SpecialError = Class.new StandardError

    s

  9. Thu22Jul

  10. A Tasty RSpec Morsel

    RSpec’s let method is not hugely known but it’s very useful for DRYing up one’s specs. It accepts a symbol and a lazily evaluated block that defines a method when the method name is called

    let(:foo) { puts 'METAPROGRAMMING FTW!' }

    Even less known is that due to way Ruby (< 1.9)  works under the covers, one can pass in block variables and have the method magically accept arguments when it’s called.

    I used this at work to stub out different API responses, and I came up with this little piece of sugar

    let(:api_stub) { |code,response| FakeWeb.register_uri :get, %r|#{API_ENDPOINT}|, :status => [code, response] }
    
    # Usage:
    api_stub '401', 'Unauthorized'
    

    Yum!

  11. Tue20Jul

  12. "If you’re still doing things the same way you did two years ago, or even last year, then you’re in danger of letting the industry pass you by."
  13. Sat17Jul

  14. Processing streaming JSON asynchronously is a piece of cake with YAJL and EventMachine

    At work we are planning a redesign of our architecture into a services oriented style. It makes a lot of sense for us and will enable us to scale the areas of the application that need it while avoiding us wasting extra resources on areas of the application that are doing just fine as they are. It’s some seriously sexy shit, trust me. That and working with insanely smart cats has me jumping out of bed every morning.

    One of the first things I needed to do was find away to consume a stream of data asynchronously. Since the data is a stream is delivered in arbitrary chunk sizes, not as discrete JSON objects I had a problem. Somehow I had to parse this.

    Turns out it isn’t a problem. Thanks to YAJL and EventMachine

    Check the Beautiful, simple, sweet, sweet code 

    P.S. If you run the code, observe the general asininity of Twitter’s user base… Fuck Twitter.

    Love

    S

  15. Sun11Jul

  16. Shoulda: with vs. without

    ActiveRecord spec without shoulda:

    describe Address do
      let(:address) { Factory.build :valid_address }
      %w(street_address locality region postal_code country).each do |attribute|
        it "is invalid without #{attribute}" do
          address.send "#{attribute}=", nil
          address.should_not be_valid
          address.errors.on(:"#{attribute}").should include "can't be blank"
          address.send "#{attribute}=", 'valid input'
         address.should be_valid
        end
      end
    end
    

    ActiveRecord spec with Shoulda:

    describe Address do
      it { should validate_presence_of :street_address }
      it { should validate_presence_of :locality }
      it { should validate_presence_of :region }
      it { should validate_presence_of :postal_code }
      it { should validate_presence_of :country_name }
    end
    

    Even using a healthy dash of metaprogramming to make the first example as brief as possible, it’s clear shoulda wins hands down for brevity, readability, and concision.

    s

  17. Fri09Jul

  18. keyboard + sg + boredom = …

  19. Mon05Jul

  20. i’m going to knock this blog on the head soon. having this persona as a cocky git is all well and good, but now i am making serious fucking cake participating in and owning startup companies, i want people to want me to win and evangelise projects i am involved with. being a dick is not conducive to this end. as my life goes on and more and more lucrative opportunities arise, public casual online activity is just becoming a liability! 

    all good things must come to end, so they say. whether this tumblr is a good thing is of course completely subjective ;)

    s

  21. wireless was sick. shout out to my boy bluey who supported jay-z on the main stage!

    wireless was sick. shout out to my boy bluey who supported jay-z on the main stage!

  22. Thu01Jul

  23. diego maradona

  24. Wed30Jun

  25. pro tip: join the gym at the end of the month when they&#8217;re desperate to hit targets
corollary: flirt with the bird signing you up for an even better deal.

    pro tip: join the gym at the end of the month when they’re desperate to hit targets

    corollary: flirt with the bird signing you up for an even better deal.

  26. lunch

    lunch