Skip to content

Instantly share code, notes, and snippets.


Markus Eliasson eliasson

Block or report user

Report or block eliasson

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
eliasson / Makefile
Created Aug 31, 2014
Example Makefile for small projects in golang
View Makefile
all: build silent-test
go build -o bin/foo main.go
eliasson /
Last active Aug 29, 2015
Add CSS class for form widget in Django Templates
from django import template
register = template.Library()
def addcss(field, css):
Adds the given class to the class attribute of the given field.
E.g. adds the class 'bar' to the foo widget:
eliasson / digest.clj
Created Oct 20, 2011
Clojure md5 digest
View digest.clj
(defn md5
"Generate a md5 checksum for the given string"
(let [hash-bytes
(doto ( "MD5")
(.update (.getBytes token)))]
(new java.math.BigInteger 1 (.digest hash-bytes)) ; Positive and the size of the number
16))) ; Use base16 i.e. hex
You can’t perform that action at this time.