Skip to content

Instantly share code, notes, and snippets.

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

Kyle Hotchkiss kylehotchkiss

👨‍💻
Javascript
View GitHub Profile
@kylehotchkiss
kylehotchkiss / gradscache.js
Created August 29, 2012 17:03
Sample Gradscache / Got those damn ucomps back in there (champ!) [Represents trajectory prediction for a flight between Fredericksburg, Virginia and Baltimore, MD.]
[ 'ugrdprs[8][0][85][366]': '10.6',
'vgrdprs[8][0][85][366]': '10.6',
'ugrdprs[8][1][85][366]': '11.1',
'vgrdprs[8][1][85][366]': '11.1',
'ugrdprs[8][2][85][366]': '11.7',
'vgrdprs[8][2][85][366]': '11.7',
'ugrdprs[8][3][85][366]': '13.0',
'vgrdprs[8][3][85][366]': '13.0',
'ugrdprs[8][4][85][366]': '13.793909',
'vgrdprs[8][4][85][366]': '2.006661',
@kylehotchkiss
kylehotchkiss / grads.js
Created August 27, 2012 16:47
This is a rather painful piece of code that gets wind data from NOAA's servers. Node.js/Async.js. You're welcome.
/**
*
* fnstraj | GrADS Functions
* Copyright 2011-2012 Hotchkissmade
* Released under the GPL
*
* grads.wind - return wind speed and direction.
*
*/
@kylehotchkiss
kylehotchkiss / launchpad.py
Created August 16, 2011 03:52
Got sick of seeing adobe's crap in my Launchpad. Also didn't like the ghetto air based options for fixing that. This currently straight up deletes the item from your Launchpad DB, but you can reset it back if you want. It's open source, so make it your ow
##
## Launchpad Editor
## Copyright 2011 Hotchkissmade
## Released under the GPL
##
import sqlite3, operator, sys, os
try:
path = os.path.expanduser("~") + "/Library/Application Support/Dock/"
@kylehotchkiss
kylehotchkiss / backup.py
Created August 15, 2011 06:07
Wordpress backup. Needs python, mysql, and bzip to work. Make it executable and place it in your cron for daily backups
#!/usr/bin/env python
##
## Backup for Wordpress
## By Hotchkissmade / Kyle Hotchkiss
##
import time, os
# ------------- #
# Configuration #
function getOffset() {
/* Get the offset for moving the nav */
var width = $(document).width();
var margin = (width - 720) / 2;
var offset = $(".place.display").offset();
var position = $(".places").css("marginLeft");
position = parseInt(position.substring(0, position.indexOf("p")));
console.log(position);
<?php
/**
*
* jQuery.whatchaDoin | iCal Proxy
* Copyright (c) 2010 Kyle Hotchkiss [Productions]
* ALL RIGHTS RESERVED
*
*/
if ( $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest' ) {