Skip to content

Instantly share code, notes, and snippets.

💯
🤠 coder

Kurt Milam kurtmilam

💯
🤠 coder
Block or report user

Report or block kurtmilam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kurtmilam
kurtmilam / Webfaction-CouchDB-config.log
Created Jul 8, 2014
config.log for CouchDB 1.6.0 installation on Webfaction
View Webfaction-CouchDB-config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Apache CouchDB configure 1.6.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/USER --with-js-lib=/home/USER/lib --with-js-include=/home/USER/include/js --with-erlang=/home/USER/lib/erlang/usr/include
## --------- ##
## Platform. ##
@kurtmilam
kurtmilam / gist:012b95c9def2723049f9
Created Nov 3, 2014
Handlebars Helpers & Nodejs Trouble
View gist:012b95c9def2723049f9
Handlebars.registerHelper("testHelper", function(options) {
console.log('testHelper')
return 'testHelper'
})
var template = "{{testHelper}}"
var ret = Handlebars.parse(template).statements
if (typeof ret[0] == 'undefined' || typeof ret[0].type == 'undefined' || ret[0].type != 'content') {
console.log('tags', ret, 'template', template)
@kurtmilam
kurtmilam / lazy_memoize_javascript_object_property_underscore_mixin.js
Last active Dec 16, 2015
Underscore.js mixin: lazily memoize an object property
View lazy_memoize_javascript_object_property_underscore_mixin.js
/* Copyright (C) 2012-2013 Kurt Milam - http://xioup.com | Source: https://gist.github.com/5442982
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO
@kurtmilam
kurtmilam / extract_ruby_json_inner_values_underscore_javascript.js
Last active Dec 21, 2015
Extract inner values from Ruby JSON (javascript/underscore)
View extract_ruby_json_inner_values_underscore_javascript.js
/* Copyright (C) 2012-2013 Kurt Milam - http://xioup.com | Source: https://gist.github.com/6316082
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO
@kurtmilam
kurtmilam / gravity_forms_custom_webhooks.php
Last active Dec 21, 2015
Create custom webhooks for Gravity Forms submissions
View gravity_forms_custom_webhooks.php
/* Copyright (C) 2012-2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/6316124
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO
View PackageVersionNumbers
When you're ready to publish to bower, NPM, etc., do the following:
1. Figure out what the new NPM version number will be (semver major.minor.patch)
2. Update the version numbers to the (soon to be) new NPM version number in bower.json, component.json, etc. (but not in package.json)
3. Commit the repo with a message like "Updated version number in bower and component.json"
4. Run the NPM version command:
> npm version major|minor|patch|[new version number] -m "Updating NPM version"
//This step updates the version number in package.json. If you did steps 1-3 correctly, the version number in package, bower and component.json should be the same
5. Run the NPM publish command:
> npm publish
@kurtmilam
kurtmilam / deep_compact_javascript_objects_underscore_lodash_mixin
Last active Apr 16, 2016
Underscore.js / Lodash Mixin to deep compact an object
View deep_compact_javascript_objects_underscore_lodash_mixin
/*The MIT License (MIT)
Copyright (c) 2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/kurtmilam/886b705fb0eb03001c77
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN AC
@kurtmilam
kurtmilam / aoc2016-1.js
Last active Dec 11, 2016
Advent of Code 2016, Puzzle #1: Using Ramda, doubly linked cyclical list and lenses
View aoc2016-1.js
// Paste into the Ramda REPL at http://ramdajs.com/repl/
// NESW - doubly linked list, cyclical
const compass = [[1, 1], [[0, 1], [[1, -1], [[0, -1]]]]]
compass[1][1][1][1] = compass
compass[1][2] = compass
compass[1][1][2] = compass[1]
compass[1][1][1][2] = compass[1][1]
compass[2] = compass[1][1][1]
@kurtmilam
kurtmilam / partial.lenses-get-set-object-in-list-by-uuid.js
Last active Apr 26, 2017
partial.lenses - get/set object in list by uuid
View partial.lenses-get-set-object-in-list-by-uuid.js
// REPL: https://calmm-js.github.io/partial.lenses/playground.html
// setup
const list = [ { uuid: 1, v: 1 }, { uuid: 2, v: 2 } ]
// lenses
const byPropNameL = R.curry( propName => R.compose( L.find, R.propEq( propName ) ) )
const byUuidL = byPropNameL( 'uuid' )
// getters & setters
const getByUuid = R.curry( ( uuid, o ) => L.get( byUuidL( uuid ), o ) )
@kurtmilam
kurtmilam / partial.lenses-query-array-by-sub-array-object-property
Last active Apr 26, 2017
partial.lenses: query array by sub array object property
View partial.lenses-query-array-by-sub-array-object-property
// REPL: https://calmm-js.github.io/partial.lenses/playground.html
// discussion: https://gitter.im/calmm-js/chat?at=58ecf9c6bdf4acc1124c504f
const list =
{
tasks: [ { id: 2
, state: 'todo'
, users: [ { id: 1 } ]
}
, { id: 2
, state: 'todo'
You can’t perform that action at this time.