Skip to content

Instantly share code, notes, and snippets.

@ryanfitz
Last active September 4, 2015 17:29
Show Gist options
  • Save ryanfitz/d18f30757dcdb7819e94 to your computer and use it in GitHub Desktop.
Save ryanfitz/d18f30757dcdb7819e94 to your computer and use it in GitHub Desktop.
// npm install --save string-hash
var stringHash = require('string-hash');
var d = new Date();
var dateStr = d.getFullYear() + '-' + d.getMonth() + '-' + d.getDay()
var hashKey = dateStr + ':' + stringHash(account.id) %100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment