Skip to content

Instantly share code, notes, and snippets.

Frederik Braun mozfreddyb

View GitHub Profile
View cpow-valence
time time in CPOWs name
2154860μs 0μs Firefox Developer Tools Adapters
117456μs 0μs [System Principal], file:///home/freddy/.mozilla/firefox/4bvglb2b.nightly-chrome-debugger/extensions/fxdevtools-adapters@mozilla.org/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4322)
517796μs 0μs [System Principal], resource://gre/modules/commonjs/sdk/addon/runner.js (from: resource://gre/modules/commonjs/toolkit/loader.js:241)
19288μs 0μs [System Principal], resource://gre/modules/commonjs/sdk/self.js (from: resource://gre/modules/commonjs/toolkit/loader.js:241)
4401μs 0μs [System Principal], resource://gre/modules/commonjs/sdk/preferences/service.js (from: resource://gre/modules/commonjs/toolkit/loader.js:241)
12029μs 0μs [System Principal], resource://gre/modules/commonjs/sdk/net/url.js (from: resource://gre/modules/commonjs/toolkit/loader.js:241)
2035μs 0μs [System Principal], resource://gre/modules/commonjs/sdk/core/promise.js (from: resource://gre/modules/commonjs/toolkit/loader.js:241)
@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.