Skip to content

Instantly share code, notes, and snippets.

Orpheus Lummis orpheuslummis

Block or report user

Report or block orpheuslummis

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 index.md

Sets =~ Arrays

A set is basically an array of unique items.

(A,B)

Ordered set.

[1, 2] != [2, 1]
View lithp.rb
class Lisp
def initialize
@env = {
:label => lambda { |(name,val), _| @env[name] = val },
:quote => lambda { |sexpr, _| sexpr[0] },
:car => lambda { |(list), _| list[0] },
:cdr => lambda { |(list), _| list.drop 1 },
:cons => lambda { |(e,cell), _| [e] + cell },
:eq => lambda { |(l,r), _| l == r },
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) },
@panicsteve
panicsteve / gist:1641705
Created Jan 19, 2012
Form letter template for acquired startups
View gist:1641705
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@antirez
antirez / README
Created Oct 2, 2011
antirez hashing function #1
View README
Description of AHF1 algorithm:
Initialize the four bytes H[0], H[1], H[2], H[3] to respectively 8D CA 2E 35
Initialize IDX to 0
For each byte B in the string to hash:
TARGET = (B XOR H[IDX]) MOD 4
H[TARGET] = H[TARGET] XOR B
@dchest
dchest / meet.c
Created Jul 3, 2011
Example of meet-in-the-middle attack (in C)
View meet.c
/* Written by Dmitry Chestnykh. Public domain. */
#include <err.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <openssl/blowfish.h>
#include <openssl/lhash.h>
/* Encryption and decryption */
You can’t perform that action at this time.