Skip to content

Instantly share code, notes, and snippets.


Brendan Loudermilk bloudermilk

View GitHub Profile
View directional-knife.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View open-ping-tree.yml
# TODO: Generic 500 response here and in Rails
openapi: '3.0.2'
title: Open Lead Specification
version: 'v1.0'
description: >
## Overview
This spec implements a two-phase auction system commonly known as "ping
tree" or "ping post". The purpose of the system is to enable sellers of
bloudermilk / weighted_list.rb
Created Jun 8, 2018
Simple Ruby algorithm to generate a weighted list
View weighted_list.rb
# To run tests:
# $ ruby weighted_round_robin.rb
# PASS [[0, "a"]] makes []
# PASS [[1, "a"]] makes ["a"]
# PASS [[1, "a"], [2, "b"]] makes ["b", "a", "b"]
# ...
# To debug (prints index as ID):
View google_places_search.rb
require "csv"
require "net/http"
require "json"
require "pry"
class String
def super_strip
gsub(/(^\W+|\W+$)/, "")

Keybase proof

I hereby claim:

  • I am bloudermilk on github.
  • I am bloudermilk ( on keybase.
  • I have a public key whose fingerprint is B54D E33B 3320 0EA7 A7AA 6852 AB19 6B5D 5009 CE58

To claim this, I am signing this object:

bloudermilk / gravatar.rb
Created Feb 26, 2016
Test whether or not a user has Gravatar
View gravatar.rb
require "net/http"
class GravatarGenerator
LAST_MODIFIED_TEST_STRING = "Wed, 11 Jan 1984 08:00:00 GMT"
def self.test(email)
url = URI(URL_FORMAT % generate(email))
Net::HTTP.start(, url.port) do |http|
bloudermilk /
Last active Mar 21, 2018
Pack List for my Vancouver to San Francisco Pacific Coast tour

To Do

  • Buy missing items
  • Test pack


  • Phone
  • Wallet
  • Keys
bloudermilk / yield.rb
Last active Aug 29, 2015
Example of yield in ruby
View yield.rb
def my_fancy_method
# Call the block with 1
yield 1
# Call the block with "cat"
yield "cat"
# Call the block with nothing (i.e. nil)
View sums
def input_get
input = gets.chomp
sum[i] = input.to_i
def sum
sum = []
i = 0
puts input_get
View bloudermilk.json
"description":"Watches you browse, takes screenshots, tells you when they change."