Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Burke andyburke

  • Otto Financial
  • Los Angeles, CA
  • @andybrk
View GitHub Profile
@andyburke
andyburke / parameterizer_concept.js
Last active May 21, 2016
parameterizer concept
View parameterizer_concept.js
const boolean = require( 'boolean' );
...
// look at object-transmute as a helper for implementing this
parameterizer( [ {
inputs: [ 'limit', 'max' ],
output: 'limit',
default: 10,
min: 1,
max: 100,
View keybase.md

Keybase proof

I hereby claim:

  • I am andyburke on github.
  • I am andyburke (https://keybase.io/andyburke) on keybase.
  • I have a public key whose fingerprint is 6362 988B 9F0F D59E 4937 BA38 839B 028C D976 364D

To claim this, I am signing this object:

@andyburke
andyburke / auto_exclude.sh
Created Sep 17, 2015
Auto exclude folders from dropbox
View auto_exclude.sh
#!/bin/bash
# see: http://stackoverflow.com/questions/3685970/check-if-an-array-contains-a-value
elementIn () {
local e
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
return 1
}
if [ ! -f /data/dropbox/folder_list ]
View example docker update.sh
#!/bin/bash
echo "Updating server: ${HOSTNAME}"
echo ""
# pull latest image
docker pull float/auth:${CODE_BRANCH}
# get image id
NEW_IMAGE_ID=$(docker images | grep -E "^float\/auth.*?${CODE_BRANCH}" | awk -e '{print $3}')
View onename
Verifying that +andyburke is my blockchain ID. https://onename.com/andyburke
@andyburke
andyburke / gist:8cb602f75e9bb9bcab4e
Created Dec 30, 2014
selecting with data attributes
View gist:8cb602f75e9bb9bcab4e
<div class=”item-list” data-item-list></div>
$( ‘[data-item-list]’ ).html( itemsHTML );
View gist:d12b5c1268e48474492e
<div class=”item-list”></div>
$( '.item-list' ).html( itemsHTML );
View gist:5a7632d10f0c35f96487
<script type="text/javascript">
emit.on( ‘foo’, function( event ) {
console.log( ‘got a foo event from: + event.emitTarget );
} );
</script>
<a data-emit="foo">emit foo</a>
@andyburke
andyburke / elasticsearch
Created Oct 17, 2014
OSX Yosemite 10.10 elasticsearch service wrapper fixed for 64 bits
View elasticsearch
#! /bin/sh
# RESOLVE and SET $ES_HOME
SCRIPT="$0"
# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
# Drop everything prior to ->
@andyburke
andyburke / jquery.spin.js
Created Feb 27, 2012 — forked from its-florida/jquery.spin.js
jQuery Plugin for Spin.js
View jquery.spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
You can’t perform that action at this time.