Skip to content

Instantly share code, notes, and snippets.

@hmadison
hmadison / keybase.md
Created January 11, 2019 19:36
keybase.md

Keybase proof

I hereby claim:

  • I am hmadison on github.
  • I am hmadison (https://keybase.io/hmadison) on keybase.
  • I have a public key ASAxeHFet44INKXp0mqnAIrVCcCJcNPdxcgkDMdT8alRXQo

To claim this, I am signing this object:

@hmadison
hmadison / Rakefile
Created January 23, 2017 13:48
Static Blog Generator
# frozen_string_literal: true
require 'time'
require 'erb'
require 'org-ruby'
require 'fileutils'
source_files = Rake::FileList.new('posts/*.org')
task default: [*source_files.pathmap('docs/%n.html'), :build_index, :copy_css]
@hmadison
hmadison / config.ru
Created December 1, 2015 14:18
Simple IP Geolocation Serive
require 'bundler/inline'
require 'json'
gemfile do
source 'https://rubygems.org'
gem 'sliver'
gem 'maxminddb'
gem 'rack'
gem 'byebug'
end
@hmadison
hmadison / map.rb
Created November 30, 2015 19:13
Sunny Mapper Example
require 'rom-mapper'
require 'pp'
data = [
{
departure_lat: 12,
departure_lon: 75,
destination_lat: 15,
destination_lon: 80
}
require 'bundler/setup'
require 'rom'
require 'rom-roda'
require 'rom-sql'
class AppCore < Roda
plugin :rom, default: {
setup: [:sql, 'sqlite::memory'],
plugins: [:auto_registration]
},
BEGIN { eval(%x[cat #{__FILE__} | rev]) } # ) } # } )]ver | }__ELIF__{# tac[x%(lave { NIGEB
class K #M eludom
include M #thgir fed
def left #" I" tnirp
puts "palindrome " # dne
end # thgir: noitcnuf_eludom
end # dne
K.new.left # thgir.M