Skip to content

Instantly share code, notes, and snippets.

View jonmadison's full-sized avatar

jon madison jonmadison

View GitHub Profile
@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 ""
@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 / gist:ef380d678292d86ed973
Last active August 29, 2015 14:14
American Stir-Fry

This dish is something i made up after seeing a pack of asparagus/onion/mushrooms for sauteeing at trader joes and didn't want to spend that much on it.

Serves 6

##Ingredients

  • 20 stalks of Asparagus
  • 1 medium purple onion
  • 1 package crimini mushrooms
@jonmadison
jonmadison / gist:a01f73073837303a9ef2
Last active August 29, 2015 14:15
Ramen Sunday 2/15

Tonight's Ramen was yummy, very slightly on the salty side as far as ramen goes. Diluting broth with more water will help. Or less fish sauce (see below).

ramen sunday 2-15

##Ingredients

  • Slices from pork loin
  • 1 Stalk bok choy
  • 1 Handful pea vines
  • 1 Bunch cilantro
  • 1 Ear of corn
@jonmadison
jonmadison / gist:c3c53e965346ee866d6d
Last active August 29, 2015 14:19 — forked from erichexter/gist:3717010
Windows Powershell command to use Authenticating Proxy for command line apps for local user
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted;$a=new-object net.webclient;$a.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials

This Ramen was pretty much perfect. Miso Soup base, plenty o' veggies.

ramen sunday 4-27

##Ingredients

  • 1/2 - 1 Onion
  • Sukiayi (thinly sliced) Pork
  • Pack of Fried Tofu (2 slices)
  • 1 Stalk bok choy
  • 1 Handful pea vines
@jonmadison
jonmadison / passport.js
Created August 28, 2015 21:20
0 to API - config/passport.js
var mongoose = require('mongoose')
, LocalStrategy = require('passport-local').Strategy
, BearerStrategy = require('passport-http-bearer').Strategy
, User = mongoose.model('User')
, util = require('../util');
module.exports = function (passport, config, logger) {
passport.serializeUser(function(user, done) {
done(null, user.id);
});

jon madison is a senior software engineer on the Mobile app team at Nordstrom. Prior to joining the mobile team, he spent three years as one of the first members of the Nordstrom Innovation Lab, creating many failed and a few successful experiments, learning about the importance of failure, learning how to pitch to success, measuring and iterating product/market fit using tools such as business model canvas, design thinking and UX tools, and taking several improv workshops.

jon enjoys writing code for hours on end (iOS and server-side JavaScript -- node.js when he's lucky), helping others find the joy of creating via text, and rambling about technical and philosophical topics for hours on end.

//
// ViewController.m
// SketchToFramer
//
// Created by Madison, Jon on 10/9/17.
// Copyright © 2017 Madison, Jon. All rights reserved.
//
#import "ViewController.h"
@jonmadison
jonmadison / jonsmoothie.md
Last active January 7, 2018 16:22
Jon's Smoothie #1

This smoothie is cool in that, if you don't add the water/ice, you can use this as a base for a breakfast bowl ("acaí-style" breakfast bowl). Just top with fruits/nuts/cocoanut/chia/gowild. Otherwise, you can drink it!

ingredients

(organic preferred for all)