Skip to content

Instantly share code, notes, and snippets.

require "zlib"
require "stringio"
require "time" # for Time.httpdate
require 'rack/utils'
module Hardwired
class Deflater
DEFAULT_CONTENT_TYPES =
[
@mjtko
mjtko / respond_to_warner.rb
Created March 9, 2013 12:44
Generate a warning if `#respond_to?` or `#respond_to_missing?` might be doing something unexpected after upgrading to Ruby 2.0.0.
if RUBY_VERSION >= '2.0.0'
class Object
alias :_respond_to? :respond_to?
def respond_to?(symbol, include_all = nil)
_respond_to?(symbol, include_all || false).tap do |b|
if b == false && include_all.nil? && _respond_to?(symbol, true)
warn "WARNING! #{self.class.name} responds to #{symbol}, but it's protected or private (from: #{caller[2].inspect})"
end
end
end

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

#!/bin/bash -ex
FLIGHT_APPLIANCE_MENU_BRANCH=dev/vpn
FLIGHT_GUI_BRANCH=master
########Base Packages###########
yum -y install patch autoconf automake bison bzip2 gcc-c++ libffi-devel libtool \
patch readline-devel ruby sqlite-devel zlib-devel glibc-headers glibc-devel openssl-devel make unzip wget git
yum -y install epel-release
yum -y install openvpn easy-rsa bind-utils