Skip to content

Instantly share code, notes, and snippets.

View andyburke's full-sized avatar

Andy Burke andyburke

  • Otto Financial
  • Los Angeles, CA
  • X @andybrk
View GitHub Profile
@andyburke
andyburke / flightsim.bat
Created February 15, 2023 01:29
this is the batch file I use to spin up my flightsim setup. near the top is some explanation. you should be able to change the list of desired programs fairly straightforwardly.
REM enabledelayedexpansion allows variable reuse in the loops below
setlocal enabledelayedexpansion
@echo off
REM loop over a list of programs defined in strings as:
REM
REM <program path>[|<cwd>[|<override command>]]
REM
REM program path - the path to program you want to run
@andyburke
andyburke / facebook-photo-post-javascript.js
Created December 19, 2011 20:37
How to post a photo to Facebook from client-side Javascript
// This bit is important. It detects/adds XMLHttpRequest.sendAsBinary. Without this
// you cannot send image data as part of a multipart/form-data encoded request from
// Javascript. This implementation depends on Uint8Array, so if the browser doesn't
// support either XMLHttpRequest.sendAsBinary or Uint8Array, then you will need to
// find yet another way to implement this. (This is left as an exercise for the reader,
// but if you do it, please let me know and I'll integrate it.)
// from: http://stackoverflow.com/a/5303242/945521
if ( XMLHttpRequest.prototype.sendAsBinary === undefined ) {
@andyburke
andyburke / parameterizer_concept.js
Last active May 21, 2016 02:05
parameterizer concept
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,

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 / jquery.spin.js
Created February 27, 2012 20:56 — forked from innotekservices/jquery.spin.js
jQuery Plugin for 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.
@andyburke
andyburke / auto_exclude.sh
Created September 17, 2015 20:24
Auto exclude folders from dropbox
#!/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 ]
Verifying that +andyburke is my blockchain ID. https://onename.com/andyburke
@andyburke
andyburke / gist:8cb602f75e9bb9bcab4e
Created December 30, 2014 21:36
selecting with data attributes
<div class=”item-list” data-item-list></div>
$( ‘[data-item-list]’ ).html( itemsHTML );
@andyburke
andyburke / gist:d12b5c1268e48474492e
Created December 30, 2014 21:35
old selector example
<div class=”item-list”></div>
$( '.item-list' ).html( itemsHTML );
<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>