Skip to content

Instantly share code, notes, and snippets.

View hathawad's full-sized avatar

Doug Hathaway hathawad

View GitHub Profile
@hathawad
hathawad / gist:6296051
Last active June 22, 2016 06:41
Use a .pfx file to RSA Encrypt via VB.net
Imports System
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text
Imports System.Security.Cryptography.X509Certificates
Class Module1
@hathawad
hathawad / gist:5959245
Last active December 19, 2015 12:59
Paperclip Override for Jruby 1.7.4 Windows Issue
#place this overide in a rails initailizer as a workaround
module Paperclip
class ContentTypeDetector
def type_from_file_command
type = SENSIBLE_DEFAULT
type.split(/[:;\s]+/)[0]
end
end
end
@hathawad
hathawad / faye.ru
Created November 1, 2011 20:42
rackup for faye
require 'faye'
faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45)
run faye_server