This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
var iterations = 1000; | |
var bytes = 32; | |
exports.createSalt = function() { | |
return new Buffer(crypto.randomBytes(bytes)).toString('base64'); | |
} | |
exports.hash = function hash(text, salt, callback) { | |
crypto.pbkdf2(text, salt, iterations, bytes, function(err, derivedKey){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from boto.ses.connection import SESConnection | |
import os | |
import sys | |
import subprocess | |
import socket | |
TMPFILE = '/var/run/postgresql/last-wal-archive-error-file.tmp' | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.depesz.com/2011/12/02/the-secret-ingredient-in-the-webscale-sauce/ | |
http://www.craigkerstiens.com/2012/11/30/sharding-your-database/ | |
https://github.com/markokr/pghashlib | |
http://www.niwi.be/2013/03/06/table-partitioning-with-postgresql/ | |
https://blog.engineyard.com/2013/scaling-postgresql-performance-table-partitioning | |
http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram | |
http://instagram-engineering.tumblr.com/post/40781627982/handling-growth-with-postgres-5-tips-from-instagram | |
http://media.postgresql.org/sfpug/instagram_sfpug.pdf |