This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Location: src/components/deep/module/foo/Foo.js | |
import React, { Component} from 'react'; | |
// We want to avoid importing modules relative to the current file | |
// import Bar from '../../../../bar/Bar.js'; | |
// Instead we want to have a clearer way of importing modules relative to `src/` | |
import Bar from 'components/bar/Bar.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set PATHs | |
ANDROID_CORDOVA=platforms/android | |
# Create Ant release signing properties | |
echo "storeFile=$KEYSTORE | |
storePassword=$STOREPASS | |
keyAlias=$ALIAS_NAME | |
keyPassword=$KEYPASS" > $ANDROID_CORDOVA/release-signing.properties | |
# Build in release mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies | |
npm install | |
bower install | |
# Bootstrap all source files with Browserify | |
grunt cordovaPrepare | |
# Create Ant release signing properties | |
echo "storeFile=$KEYSTORE | |
storePassword=$STOREPASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
define(['phaser'], function(Phaser) { | |
function Gesture(game) { | |
this.game = game; | |
this.swipeDispatched = false; | |
this.holdDispatched = false; | |
this.isTouching = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('myApp.filters') | |
.filter('offset', function() { | |
return function(input, start) { | |
start = parseInt(start, 10); | |
return input.slice(start); | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 | |
# |
NewerOlder