Skip to content

Instantly share code, notes, and snippets.

@inflammable
inflammable / base58.js
Created June 14, 2012 09:50
Base58 (and other) Encoding and Decoding in Javascript
/*
* base58.js
* - encodes integers to and decodes from a base58 (or your own) base58 alphabet
* - based on Flickr's url shortening
*
* usage:
* base58.encode(integer);
* base58.decode(string);
*
* (c) 2012 inflammable/raromachine
@inflammable
inflammable / gdepth-extract.js
Last active February 27, 2021 01:15
GDepth:Data PNG Depth Map extractor
// A very crude tool to extract GDepth:Data chunks from the XMP data in images
// that use the Lens Blur feature in Google's Android Camera App
// Usage: node gdepth-extract.js <image name.jpg>
// Outputs <image name.png>
// Requires Buffer Tools for buffer.indexOf(): npm install buffertools
require('buffertools').extend();
var fs = require('fs'),
image = (process.argv)[2],