Skip to content

Instantly share code, notes, and snippets.

Frederik mozfreddyb

Block or report user

Report or block mozfreddyb

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
@mozfreddyb
mozfreddyb / make-ni-uri.py
Created Sep 29, 2014
Computes the sha256 digest of the given file names and prints them in a ni URL.
View make-ni-uri.py
#!/usr/bin/env python
from sys import argv
import hashlib
from base64 import urlsafe_b64encode
from mimetypes import guess_type
from os.path import basename
def get_mimetype(filename):
mt = guess_type(filename)[0]
You can’t perform that action at this time.