Skip to content

Instantly share code, notes, and snippets.

Troels Knak-Nielsen troelskn

Block or report user

Report or block troelskn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View resque_cheatsheet.markdown


# check out what's coming next in the queue
#    Resque.peek(archive_queue)
dirtyhenry / poc-openssl-aes.rb
Last active Jun 5, 2018
Encryption interoperability demo between Ruby and OpenSSL
View poc-openssl-aes.rb
require 'openssl'
require 'base64'
# Read the dummy file
data ="test.txt")
# Create an encrypter
cipher =, :CBC)
key = cipher.random_key
View net-http-debug.rb
require 'net/http'
Net::HTTP.module_eval do
alias_method '__initialize__', 'initialize'
def initialize(*args,&block)
__initialize__(*args, &block)
sunlightlabs / levenshtein.rb
Created Aug 19, 2009
Ruby C implementation of Levenshtein
View levenshtein.rb
# C implementation of Levenshtein text distance algorithm, uses RubyInline to call from within Ruby
# Wildly faster than the Text gem's Text::Levenshtein
# Example:
# l =
# l.distance 'hello', ' hello'
# => 1
# Taken from
You can’t perform that action at this time.