Skip to content

Instantly share code, notes, and snippets.

J. Whiteman jwhiteman

Block or report user

Report or block jwhiteman

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
prio / server.ex
Created Jan 6, 2014
Elixir gen_server example
View server.ex
defmodule Tcprpc.Server do
use GenServer.Behaviour
defrecord State, port: nil, lsock: nil, request_count: 0
def start_link(port) do
:gen_server.start_link({ :local, :tcprcp }, __MODULE__, port, [])
def start_link() do
tstevens / SHA1.rb
Created Apr 18, 2011
Implementation of SHA-1 Hash in pure ruby
View SHA1.rb
class Integer
def lotate(n=1)
self << n | self >> (32 - n)
# FIPS 180-2 -- relevant section #'s below
# Pulls parts from Wiki pseudocode and
class SHA1
You can’t perform that action at this time.