Skip to content

Instantly share code, notes, and snippets.

View ragnar-johannsson's full-sized avatar

Ragnar B. Jóhannsson ragnar-johannsson

  • Reykjavík, Iceland
View GitHub Profile
@ragnar-johannsson
ragnar-johannsson / keybase.md
Created September 20, 2014 20:10
Keybase proof

Keybase proof

I hereby claim:

  • I am ragnar-johannsson on github.
  • I am ragnarb (https://keybase.io/ragnarb) on keybase.
  • I have a public key whose fingerprint is 5558 9F4F B638 1866 77E1 0186 7BB4 D07D 20EA FAF2

To claim this, I am signing this object:

@ragnar-johannsson
ragnar-johannsson / localStorageWrapper.js
Last active August 29, 2015 13:59
Local Storage Wrapper
var localStorageWrapper = {
contains: function (key) {
return this.keys().indexOf(key) !== -1;
},
getItem: function (key) {
return localStorage.getItem(key);
},
keys: function () {
@ragnar-johannsson
ragnar-johannsson / changes.py
Last active August 29, 2015 13:57
Show changes between two similar directory trees
import hashlib
import os
import sys
def hashes(d):
full, relative = {}, {}
for root, _, files in os.walk(d):
for file in files:
file = os.path.join(root, file)