Skip to content

Instantly share code, notes, and snippets.

View rhutchison's full-sized avatar

Ryan Hutchison rhutchison

View GitHub Profile
(function() {
'use strict';
angular
.module('core')
.controller('ModalController', ModalController);
ModalController.$inject = ['$modalInstance', 'model', 'attrs'];
function ModalController($modalInstance, model, attrs) {
@rhutchison
rhutchison / 40install_node.sh
Created February 26, 2014 03:00
Elastic Beanstalk configuration/deployment scripts
#!/bin/bash
#source env variables including node version
. /opt/elasticbeanstalk/env.vars
function error_exit
{
eventHelper.py --msg "$1" --severity ERROR
exit $2
}
@rhutchison
rhutchison / .mysql_access
Created February 21, 2013 00:34
script I find useful for backing up mysql databases.
MYSQL_USER="root"
MYSQL_PASS=""
@rhutchison
rhutchison / jquery.xdomain.js
Created March 26, 2012 16:32 — forked from mathieucarbou/jquery.xdomain.js
jQuery CORS Plugin - transparently add CORS support for IE8+ in jQuery using XDomainRequest. Support cookies.
PROJECT MOVED TO https://github.com/Ovea/cors
/**
* https://gist.github.com/1114981
*
* By default, support transferring session cookie with XDomainRequest for IE. The cookie value is by default 'jsessionid'
*
* You can change the session cookie value like this, before including this script:
*
* window.SESSION_COOKIE_NAME = 'PHP_SESSION';
@rhutchison
rhutchison / gist:1906579
Created February 25, 2012 05:09 — forked from paulirish/gist:366184
html5 geolocation with fallback.
// geo-location shim
// currentely only serves lat/long
// depends on jQuery
;(function(geolocation){
if (geolocation) return;
var cache;