Skip to content

Instantly share code, notes, and snippets.

Avatar

Pedro Belo pedro

  • San Francisco, CA
  • @ped
View GitHub Profile
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
View notes-apicraft-testing.md

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
View notes-apicraft-batch-apis.md

Batch APIs

  • Common requirements

    • Are they atomic?
    • What kind of operations are supported?
  • Existing approaches

View notes-apicraft-describing-apis.md

Describing APIs

  • Idea is to have a DSL/structured file that will describe your API

  • Question: is there a repo where people share their Blueprint schemas so we can see them?

    • Not right now. There are definitely plans to make it really open
    • Some people are already sharing their blueprints on GH
  • There are no other ways to collaborate on API design

View notes-apicraft-one-api-to-rule-them-all.md

One API to rule them all

An API can be split between:

  • Public
  • Private

Or maybe between consumers:

  • iOS/Android
View notes-apicraft-hateoas-design-session.md

Hypermedia API design session

Proposed/ran by Andreas Schmidt, Nokia

Based off his design around the Nokia Places API

Notes

  • Picked JSON, no support for XML
  • Added ?accept=application/json to the URL in the browser for a raw response
@pedro
pedro / Gemfile
Last active Dec 18, 2015
Testing ActiveRecord performance
View Gemfile
source "https://rubygems.org"
gem "pg"
gem "sqlite3"
unless version = ENV["AR"]
abort("specify ActiveRecord version with AR. eg: AR=2 bundle install")
else
gem "activerecord", "~> #{version}", require: "active_record"
end
View faraday-skip-ssl-verification-hack.rb
module Faraday
class Adapter
class NetHttp
def ssl_verify_mode(ssl)
OpenSSL::SSL::VERIFY_NONE
end
end
end
end
View retry_upto.rb
# Ruby's `retry` with steroids:
#
# - retry up to 5 times without waiting between them and retrying after any exception
#
# retry_upto(5) do ... end
#
# - retry up to 5 times, waiting 2 seconds between retries and retrying after any exception
#
# retry_upto(5, :wait => 2) do ... end
#
View gist:1124103
Hi Pedro,
Just a friendly reminder (since it's your first check due) that your rent payment was due on August 1st, and today is the last day to pay and not to get a late fee.
Thanks
You can’t perform that action at this time.