Skip to content

Instantly share code, notes, and snippets.

View aaccurso's full-sized avatar
🦾
🦿

Alan Accurso aaccurso

🦾
🦿
View GitHub Profile
@aaccurso
aaccurso / fb-verify.js
Last active August 29, 2015 13:58 — forked from danro/fb-verify.js
// modules
var inspect = require('eyes').inspector(),
b64url = require('b64url'),
crypto = require('crypto');
// app id & secret pairs -- https://developers.facebook.com/apps
var _config = {
// example
'123123123123123': 'b730a55f791275471f39ea702aee993b'
};
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1') {
define('WP_ENV', 'local');
} elseif ($_SERVER['HTTP_HOST']=='develop.project.com') {
define('WP_ENV', 'develop');
} elseif ($_SERVER['HTTP_HOST']=='master.project.com') {
define('WP_ENV', 'develop');
} else {
define('WP_ENV', 'production');
}
'use strict';
angular.module('myApp.filters')
.filter('offset', function() {
return function(input, start) {
start = parseInt(start, 10);
return input.slice(start);
};
});
@aaccurso
aaccurso / install_plugins.js
Created August 19, 2014 01:37
before_prepare hook for cordova
#!/usr/bin/env node
var pluginlist = [
'org.apache.cordova.console',
'org.apache.cordova.device',
'org.apache.cordova.network-information',
'org.apache.cordova.file-transfer',
'org.apache.cordova.statusbar',
'org.apache.cordova.vibration',
'org.apache.cordova.dialogs',
@aaccurso
aaccurso / gesture.js
Last active August 29, 2015 14:08 — forked from eguneys/gesture.js
'use strict';
define(['phaser'], function(Phaser) {
function Gesture(game) {
this.game = game;
this.swipeDispatched = false;
this.holdDispatched = false;
this.isTouching = false;
@aaccurso
aaccurso / saveAvatarPicture
Created January 13, 2015 14:03
Usage of canvas2ImagePlugin
var saveAvatarPicture = function() {
var avatar = document.createElement('canvas'),
anchor;
avatar.width = 470;
avatar.height = this.game.height;
avatar.getContext('2d').drawImage(this.game.canvas,
180, 0,
avatar.width, avatar.height,
0, 0,
# Check arguments
PROJECT_NAME=${1:-}
if [ -z $PROJECT_NAME ]; then echo "No project name provided!"; exit 1; fi
APPLICATION_APK=${2:-}
if [ ! -f $APPLICATION_APK ]; then echo "File does not exists or no file apk provided!"; exit 1; fi
# Configure gdrive CLI with permission file
GDRIVE="gdrive -c /home/${USER}/.gdrive"
# Install dependencies
npm install
bower install
# Bootstrap all source files with Browserify
grunt cordovaPrepare
# Create Ant release signing properties
echo "storeFile=$KEYSTORE
storePassword=$STOREPASS