Skip to content

Instantly share code, notes, and snippets.

Working from home

Dan Kubb dkubb

Working from home
  • Betterment
  • Mission, BC, Canada
  • Twitter @dkubb
View GitHub Profile
View gist:704840f30253b0e02d9e81b9a4d4b1ce
### Keybase proof
I hereby claim:
* I am dkubb on github.
* I am dkubb ( on keybase.
* I have a public key ASABdYDarQ43GiNGY274zzSheBhF9a6SCfzdVInw3nb_ogo
To claim this, I am signing this object:
dkubb / money.rb
Last active January 13, 2017 01:39
A modern ruby Money class
View money.rb
require 'bigdecimal'
require 'bigdecimal/util'
require 'rubygems'
require 'adamantium'
require 'concord'
class Money
include Adamantium,, Comparable
View enumerable_extensions.rb
module EnumerableExtensions
# An exception raised when an invalid number of entries is returned
class InvalidCountError < StandardError
# Initialize an exception to report an invalid enumerable count
# @param expectation [String]
# @param entries [Array]
View rubyfmt
#!/usr/bin/env ruby
require 'filemagic'
require 'pathname'
require 'parser/current'
require 'unparser'
RUBY_TYPE = 'ruby script'.freeze
# TODO: handle stdin
dkubb / .gitignore
Last active August 29, 2015 14:25
Create Statically Linked Haskell Binaries
View .gitignore
dkubb / gist:e2763e1bd1047ab0bcd6
Last active August 29, 2015 14:22
Slack Conversation about Ruby5 comments
View gist:e2763e1bd1047ab0bcd6
dkubb [12:34 PM]
I feel solnic’s pain in trying to swim against the current
dkubb [12:44 PM]
Dan Kubb@dkubb
.@rubyfive @_solnic_ has done great things for ruby, and your dismissive tone to his valid criticism only hurts the community.
Today at 12:44 PM
mbj [12:47 PM]
dkubb / sitemap.rb
Created June 27, 2014 23:19
Create a sitemap for supplied hostname and list of urls
View sitemap.rb
require 'rubygems'
require 'mechanize'
require 'addressable/uri'
ROOT_URL = Addressable::URI.parse(ARGV.fetch(0)).freeze
# Disable SSL certificate verification
dkubb / Brewfile
Last active August 29, 2015 14:01
My Brewfile
View Brewfile
# Upgrade, Update, Check Homebrew
# Install taps
tap caskroom/cask
tap sceaga/tap
# Install bash
dkubb / ssl.nginxconf
Last active April 11, 2019 03:56
Nginx SSL configuration (PFS, HSTS, SPDY, BREACH mitigation, FIPS compliant)
View ssl.nginxconf
ssl_certificate cert.pem;
ssl_certificate_key cert.key.pem;
ssl_dhparam cert.dh.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers FIPS@STRENGTH:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;