Skip to content

Instantly share code, notes, and snippets.

View matthewkremer's full-sized avatar

Matthew Kremer matthewkremer

View GitHub Profile
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var ng1_1 = require('./ng1');
var DEVICE_READY_TIMEOUT = 2000;
var actionsheet_1 = require('./plugins/actionsheet');
exports.ActionSheet = actionsheet_1.ActionSheet;
var admob_1 = require('./plugins/admob');
@matthewkremer
matthewkremer / firebase-simple-login-debug.js
Created March 21, 2014 19:23
Firebase Simple Login without Cookies
var COMPILED = false;
var goog = goog || {};
goog.global = this;
goog.global.CLOSURE_DEFINES;
goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
var parts = name.split(".");
var cur = opt_objectToExportTo || goog.global;
if (!(parts[0] in cur) && cur.execScript) {
cur.execScript("var " + parts[0]);
}
$scope.inProjectRefInitial = false;
$scope.inProjectRef = firebaseRef('/usersInProject/'+$scope.projectid).push();
$scope.usersCurrentFile = {};
$scope.inProjectRef.on('value', function(snap){
if (snap.val()==null && $scope.inProjectRefInitial==false){
$scope.inProjectRefInitial = true;
$scope.inProjectRef.onDisconnect().remove();
$scope.inProjectRef.child('name').set($scope.auth.user.information.firstName);
$scope.inProjectRef.child('email').set($scope.auth.user.email);
@matthewkremer
matthewkremer / cancelEvent.js
Created August 10, 2012 14:12
Cross Browser Cancel Event Propagation
function cancelEvent(e){
if(e !== null){
e = e || window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
}
@matthewkremer
matthewkremer / getTarget.js
Created August 10, 2012 14:07
Cross Browser Get Event Target
function getTarget(e){
e = e || window.event;
var target = e.target || e.srcElement;
return target;
}
@matthewkremer
matthewkremer / new_config
Created August 9, 2012 14:44
"can't adapt type decimal" Error
<VirtualHost *:443>
ServerName mysite1.com
WSGIDaemonProcess mysite1
WSGIScriptAlias / /var/www/mysite1.wsgi process-group=mysite1 application-group=%{GLOBAL}
</VirtualHost>
<VirtualHost *:443>
ServerName site2.com
WSGIDaemonProcess mysite2
WSGIScriptAlias / /var/www/mysite2.wsgi process-group=mysite2 application-group=%{GLOBAL}
</VirtualHost>
@matthewkremer
matthewkremer / hex_to_rgb.py
Created August 8, 2012 14:45
Python Hex Code to RGB Value
def hex_to_rgb(hex):
hex = hex.lstrip('#')
hlen = len(hex)
return tuple(int(hex[i:i+hlen/3], 16) for i in range(0, hlen, hlen/3))