Skip to content

Instantly share code, notes, and snippets.

View lukemeyer's full-sized avatar

Luke Meyer lukemeyer

  • Young & Laramore
  • Indianapolis, Indiana
View GitHub Profile
function animateNumber(element, endValue, endTime){
var now = new Date().getTime(),
timeLeft = endTime - now;
if ( timeLeft > 0 ){
//element must be a jQuery object
var isInput = element.is('input'),
currentValue = isInput ? parseInt(element.val().replace(',','')) : parseInt(element.html().replace(',','')),
newValue = currentValue,
done = false,

Keybase proof

I hereby claim:

  • I am lukemeyer on github.
  • I am lukeme (https://keybase.io/lukeme) on keybase.
  • I have a public key ASCQ2MGgIuMy2pC6B6NReerb8WKHz1v6JC_JQsU2aHjKrgo

To claim this, I am signing this object:

@lukemeyer
lukemeyer / gist:3713450
Created September 13, 2012 10:29
Calculate average Color in a bitmap
public static Color getAverageColor(Bitmap bmp)
{
//Used for tally
int r = 0;
int g = 0;
int b = 0;
int total = 0;