I hereby claim:
- I am chrislloyd on github.
- I am chrislloyd (https://keybase.io/chrislloyd) on keybase.
- I have a public key whose fingerprint is F429 4503 004C A9DF 1206 6DEE 53CE DF0A 6BDC 0B31
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'openssl' | |
class Webhooks::MailgunController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :verify_webhook | |
def create | |
Librato.increment('webhook.mailgun.total') | |
case params['event'] |
“If something has a title, don’t use <h1>, use <div class="title”>” —wait, why? http://chrislloyd.com.au/post/54040765948/the-chris-lloyd-css-guide …
Headings in HTML are like maintaining a numbered list of items in markdown:
/var/folders/nh/0vfgdp052_ngntv1_546c4tm0000gn/T/ruby-build.20130224115639.8902 ~ | |
x openssl-1.0.1e/ACKNOWLEDGMENTS | |
x openssl-1.0.1e/apps/ | |
x openssl-1.0.1e/apps/app_rand.c | |
x openssl-1.0.1e/apps/apps.c | |
x openssl-1.0.1e/apps/apps.h | |
x openssl-1.0.1e/apps/asn1pars.c | |
x openssl-1.0.1e/apps/ca.c | |
x openssl-1.0.1e/apps/ca-cert.srl | |
x openssl-1.0.1e/apps/CA.com |
{ disableIndentCorrections = :true; } |
#!/usr/bin/env ruby | |
require 'rest-client' | |
require 'nokogiri' | |
addresses = (1..10).inject([]) do |addresses, page| | |
$stderr.puts "fetching page #{page}" | |
html = RestClient.get 'http://mcserverlist.net/lists/top', params: {page: page} | |
doc = Nokogiri::HTML(html) | |
addresses += doc.css('.ip-and-port').map {|node| node.text.strip } |
create_table :users, id: false do |t| | |
t.uuid :id, primary: true, null: false | |
# ... | |
end |
#!/usr/bin/env ruby | |
require 'active_support/core_ext' | |
abort("usage: #{__FILE__} day|week|month") unless %w(day week month).include?(ARGV[0]) | |
$stdin.readlines.map {|l| | |
timestamp, amount = l.strip.split(',', 2) | |
[Time.at(timestamp.to_i), amount.to_i] | |
}.group_by {|(time, _)| | |
case ARGV[0] |