Skip to content

Instantly share code, notes, and snippets.

View cortfritz's full-sized avatar
💭
what order: curiosity, empathy, clarity, energy, resolve?

Cort Fritz cortfritz

💭
what order: curiosity, empathy, clarity, energy, resolve?
View GitHub Profile
@cortfritz
cortfritz / keybase.md
Created October 5, 2017 18:31
keybase.md

Keybase proof

I hereby claim:

  • I am cortfritz on github.
  • I am cortfritz (https://keybase.io/cortfritz) on keybase.
  • I have a public key ASAc-Ud4oZuQOm5Ki_MJ1LDdMeI9xbn9g_5Mv2bwYg3Ldgo

To claim this, I am signing this object:

@cortfritz
cortfritz / gist:8921761
Created February 10, 2014 18:47
sailsjs blueprint is strangely sensitive to query parameters set in a policy
/**
* queryLimited
*
* @module :: queryLimited
* @description :: policy ensures the existence of query variables limit and skip and keeps them in reasonable bounds
* @docs :: http://sailsjs.org/#!documentation/policies
*
*/
module.exports = function queryLimited(req, res, next) {
var defaultLimit = 10
@cortfritz
cortfritz / Explore JSON in Bootstrap and Jade
Created July 26, 2012 19:44
Recursively display contents of JSON object using bootstrap and jade
mixin prettyDate(uglyDate)
daysAgo = ((((new Date() - uglyDate) / 1000) / 60) / 60) / 24
hours = uglyDate.getHours()
minutes = uglyDate.getMinutes()
ampm = hours >= 12 ? 'pm' : 'am'
hours = hours % 12
hours = hours ? hours : 12
minutes = minutes < 10 ? '0'+minutes : minutes
strTime = hours + ':' + minutes + ' ' + ampm