Skip to content

Instantly share code, notes, and snippets.

View ang3lkar's full-sized avatar

Angelos Karagkiozidis ang3lkar

View GitHub Profile
@ang3lkar
ang3lkar / hash_to_checksum
Created July 17, 2014 09:11
Hash to checksum
# Thanks to tenderlove on Peepcode play by play
require 'digest/md5'
def fetch username
records = JSON.parse get username
records.each do |hash|
checksum = Digest::MD5.hexdigest Marshal.dump(hash)
hash['checksum'] = checksum
end
@ang3lkar
ang3lkar / gist:9971571
Last active August 29, 2015 13:58
Various snippets
# RUN MULTIPLE SERVERS LOCALLY
rails s
rails s -p 3001 -P tmp/pids/server2.pid
# RUN A SPECIFIC METHOD IN A MINITEST CLASS
ruby -Ilib:test test/models/widget_test.rb -n test_refresh
# PRETTY LOOP PRINT
Encoding.list.each{|enc|
begin