Skip to content

Instantly share code, notes, and snippets.

View abeisgoat's full-sized avatar

Abe Haskins abeisgoat

View GitHub Profile
var spawn = require('child_process').spawn;
module.exports = {
deploy: function (email, password) {
var login = spawn.bind(spawn, 'firebase', ['login', '--email='+email, '--password='+password]),
push = spawn.bind(spawn, 'firebase', ['deploy']);
login().stdout.on('data', function(chunk) {
if (chunk.toString() == "Login Successful\n") {
push().stdout.on('data', function (chunk) {

Keybase proof

I hereby claim:

  • I am abeisgreat on github.
  • I am abeisgreat (https://keybase.io/abeisgreat) on keybase.
  • I have a public key whose fingerprint is 7B1A 67C3 9417 3F89 9009 8BA3 BDAC 4F61 5AE8 6362

To claim this, I am signing this object:

@abeisgoat
abeisgoat / client.js
Last active August 29, 2015 13:57
Anonymous Login in Firebase for NodeJS
// Get the SDK: https://cdn.firebase.com/js/client/1.0.6/firebase.js
// Get awesome JSONP lib: https://rawgithub.com/larryosborn/JSONP/master/dist/jsonp.min.js
firebaseName = "brilliant-fire-67";
ref = new Firebase("https://" + firebaseName + ".firebaseio.com/")
JSONP({
url: 'https://auth.firebase.com/auth/anonymous',
data: {transport: 'jsonp', firebase: firebaseName},
success: function(data) {
@abeisgoat
abeisgoat / CannonTest.js
Last active January 2, 2016 19:09
A hacked up idea for Cannon.js
var Cannon = function (url) {
this.url = url;
this.reloaderStrs = {};
this.projectileStr = "*";
this.rawData = [];
this.fetches = 0;
this.delayInt = 0;
var self = this;
@abeisgoat
abeisgoat / ImageUpload.js
Last active January 30, 2020 15:54
An example of image uploading using Firebase with AngularFire.
angular.module('app')
.controller('ImageUpload', ['$scope', '$log',
function ImageUpload($scope, $log) {
$scope.upload_image = function (image) {
if (!image.valid) return;
var imagesRef, safename, imageUpload;
image.isUploading = true;
imageUpload = {