Skip to content

Instantly share code, notes, and snippets.

View jonmadison's full-sized avatar

jon madison jonmadison

View GitHub Profile
@jonmadison
jonmadison / pho.markdown
Last active July 7, 2018 17:42 — forked from vypham/pho-recipe
How to make Pho - Vi's way

Pho Recipe

For the broth preparation

  • 5-8 beef bones
  • 1 stewing chicken
  • 1-2 teaspoon of salt (to taste)
  • 1 oz of sugar rocks
@jonmadison
jonmadison / encryptdecrypt.js
Last active December 31, 2015 05:39
node.js AES256 encryption/decryption using require('crypto')
function encrypt(message,key) {
if(!message) return ""
var cipher = crypto.createCipher('aes-256-cbc',key);
var result = cipher.update(message,'utf8','hex');
result += cipher.final('hex');
return result;
}
function decrypt(message,key) {
if(!message) return ""