Skip to content

Instantly share code, notes, and snippets.

View kylehotchkiss's full-sized avatar
👨‍💻
Javascript

Kyle Hotchkiss kylehotchkiss

👨‍💻
Javascript
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ar social = function() {
jQuery("a[href*='twitter.com/intent']").unbind();
var socialpopup = function( url, title, width, height ) {
var top = ( screen.height / 2 ) - ( height / 2 );
var left = ( screen.width / 2 ) - ( width / 2 );
window.open( url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left );
};
@kylehotchkiss
kylehotchkiss / PlaceTaylor.json
Created February 24, 2015 01:49
Place Taylor
{"lyrics": [
"He said the way my blue eyes shined\nPut those Georgia stars to shame that night\nI said: That's a lie.\nJust a boy in a Chevy truck\nThat had a tendency of gettin' stuck\nOn backroads at night\nAnd I was right there beside him all summer long\nAnd then the time we woke up to find that summer gone",
"But when you think Tim McGraw\nI hope you think my favorite song\nThe one we dan=ced to all night long\nThe moon like a spotlight on the lake\nWhen you think happiness\nI hope you think that little black dress\nThink of my head on your chest\nAnd my old faded blue jeans\nWhen you think Tim McGraw\nI hope you think of me\n ",
"September saw a month of tears\nAnd thankin' God that you weren't here\nTo see me like that\nBut in a box beneath my bed\nIs a letter that you never read\nFrom three summers back\nIt's hard not to find it all a little bitter sweet\nAnd lookin' back on all of that, it's nice to believe\n ",
"When you think Tim McGraw\nI hope you think my favorite song\nThe one we
var request = require("request");
var first = 10001;
var last = 99999;
var current = first;
var zips = {};
var convertZip = (function convertZip() {
if ( current < last ) {
@kylehotchkiss
kylehotchkiss / monster.js
Created December 30, 2014 22:40
monster commit
//
// Description
// Show a Monster Commit image
//
module.exports = function( robot ) {
robot.hear(/monster commit/i, function( msg ) {
msg.reply( "http://files.kylehotchkiss.com.s3.amazonaws.com/monster-commit.jpg" );
});
};
@kylehotchkiss
kylehotchkiss / deleteCloudapp
Last active August 29, 2015 14:06
delete all cloudapp entries
var all = (function all() {
jQuery("[type=checkbox]:not(:checked)").click();
jQuery("[name=commit]").click();
setTimeout(function() { window.location = jQuery("#pagination").find("a").last().attr("href"); all() }, 1000);
})();
@kylehotchkiss
kylehotchkiss / chase.js
Last active August 29, 2015 14:05
Get total of Chase rewards for next statement, because chase doens't tell you.
var transactions = [];
var i = 0;
jQuery(".summary a.expander").each(function( i ) {
transactions.push( this );
});
var getTransactions = (function getTransactions() {
if ( i < transactions.length ) {

Keybase proof

I hereby claim:

  • I am kylehotchkiss on github.
  • I am kylehotchkiss (https://keybase.io/kylehotchkiss) on keybase.
  • I have a public key whose fingerprint is 0E64 19C9 F67E 7C4D 264D 4CC8 3DE4 9D15 999F F849

To claim this, I am signing this object:

@kylehotchkiss
kylehotchkiss / gruntfile-stuff.js
Created April 27, 2014 04:41
CDNify for Grunt/Wordpress - Failsafe code for conditionally using versioned CDN'd assets with wordpress, fails back to local files.
md5: {
compile: {
files: {
'<%= config.tmp %>/styles/': '<%= config.wordpress %>/**/*.css',
'<%= config.tmp %>/scripts/': '<%= config.wordpress %>/**/*.js'
},
options: {
keepBasename: true,
keepExtension: true,
after: function ( changes ) {
@kylehotchkiss
kylehotchkiss / likecounter.js
Created November 19, 2013 04:11
A crude Instagram hashtag like calculator. Theoretically can grab up to 100,000 pics of likes (an hour), given Instagram's API throttling. It's not 100% reflective of all images in a hashtag, Instagram doesn't return full data sets. But it can report averages and project a total, if that's useful to ya. Get your own access key and try it out.
var request = require("request");
var moment = require("moment");
var access_token = '';
var getTotalLikes = function( hashtag, callback ) {
var realCount;
var totalLikes = 0;
var totalImages = 0;