Skip to content

Instantly share code, notes, and snippets.

Pedro Belo pedro

Block or report user

Report or block pedro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pedro /
Last active Aug 29, 2015
Nike's journey to microservices

Nike's journey to microservices

  • 2011: running activity/service "barely running in production"

    • reliability issues
    • little tests
    • features deployed in months
  • 2012: their own backend

    • "deep vertical" stack
    • 9 teams on the same codebase supporting 14 products
View wtfnamespaces.rb
module Base
class Foo
module Base
class A
def self.test
puts Foo.object_id # this works

Keybase proof

I hereby claim:

  • I am pedro on github.
  • I am ped ( on keybase.
  • I have a public key whose fingerprint is B3CB A84E 05B4 03FC 2506 BD8F ACF9 8F42 BA4D 4E90

To claim this, I am signing this object:


Given a stupid table:

# SELECT * FROM sample;
 id | foo | bar 
 10 | a   | a
 11 | a   | b
 12 | a   | b
 13 | a   | c
View test_stats_on_pulls.rb
require "rubygems"
require "octokit"
# get an access token at
token = ENV["TOKEN"] || abort("missing TOKEN")
repo = ENV["REPO"] || abort("missing REPO. eg: pedro/devdigest")
client = access_token: token
stats =
pedro / rank-pulls.rb
Last active Dec 27, 2015
Quick hacky script to rank closed pull requests on a repo in hopes to answers "what happened last year?". Requires gems octokit and peach.
View rank-pulls.rb
require "rubygems"
require "octokit"
require "peach"
# warning! this will make a crapton of requests under your account.
# you might want to review/tweak the values below, or disable
# auto_paginate to test things first.
# get an access token at
token = ENV["TOKEN"] || abort("missing TOKEN")

Pedro's Amazing Guide To Rooftop Bars

Drinking with a perspective

Very few people respect the art of rooftop drinking these days.

Notably, rooftop bar customers often believe that wearing a suit or a fancy dress conveys respect.

Niclekback wears suits

View tufte-workshop.txt
"there are only two industries calling their customers users"
maps of cancer in the us - multivariables/prob 1k data points but not clutter
fix the clutter. Clutter is in the presentation, not in the data.
tables - espn has 500 numbers
have we suddenly got dumber because we got to work?
look at financial tables, weather tables, sports..
7 elements on a page? paper: the magic number 7

API testing and validation

  • Difference?
    • Validation: API receives a message and decides if it's valid or not
    • Testing: different use cases
      • TDD as you build the API
      • Test if the API is running (lifecycle/ci)
      • Debugging
    • API performance testing
You can’t perform that action at this time.