Skip to content

Instantly share code, notes, and snippets.

View fooledbyprimes's full-sized avatar

fooledby primes fooledbyprimes

View GitHub Profile
@juliangamble
juliangamble / gist:7e9692a2840227c950a8
Created September 28, 2014 04:28
References from Nada Amin's StrangeLoop Talk 'Programming Should Eat Itself'
Here is a reference to the part of the video where the slides are listed:
https://www.youtube.com/watch?v=SrKj4hYic5A&feature=youtu.be&t=28m
Here are the references:
SMITH - Reflection and Semantics in Lisp - 1983
http://www-public.it-sudparis.eu/~gibson/Teaching/CSC7322/ReadingMaterial/Smith84.pdf
WAND & FRIEDMAN - The Mystery of the Tower in Lisp - 1986
http://www.cs.indiana.edu/pub/techreports/TR196.pdf
@RiANOl
RiANOl / gist:1077760
Last active April 13, 2024 06:17
AES128 / AES256 CBC with PKCS7Padding in Ruby
require "openssl"
require "digest"
def aes128_cbc_encrypt(key, data, iv)
key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize)
iv = Digest::MD5.digest(iv) if(iv.kind_of?(String) && 16 != iv.bytesize)
aes = OpenSSL::Cipher.new('AES-128-CBC')
aes.encrypt
aes.key = key
aes.iv = iv