This file contains hidden or 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
/** | |
* @class Utils.Weather | |
* @author Steven House <[email protected]> | |
* | |
* This retrieves weather information | |
*/ | |
// Include underscore awesomness | |
var _ = require('alloy/underscore')._; | |
var Alloy = require('alloy'); |
This file contains hidden or 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 _factor; | |
function crop(blob, options, height) { | |
if (typeof options !== 'object') { | |
options = { | |
width: options, | |
height: height | |
} | |
} |
This file contains hidden or 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
function websocketSetup() { | |
//@TODO check config.json for socket setting | |
uri = 'ws://localhost:8765'; | |
tiws = require('net.iamyellow.tiws').createWS(); | |
tiws.addEventListener('open', function () { | |
alert('opened') | |
_self.info('Websocket opened'); | |
socketConnected = true; |
This file contains hidden or 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
/** | |
* Salesforce module | |
*/ | |
if (typeof Alloy === 'undefined') { | |
var Alloy = require('alloy'); | |
} | |
if (typeof Backbone === 'undefined') { | |
var Backbone = require('alloy/backbone'); | |
} | |
if (typeof _ === 'undefined') { |
This file contains hidden or 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
/** | |
* TimeLogger | |
* Enhanced logger, with information about the current timestamp and the time passed before the previous event. | |
* | |
* @author Davide Cassenti <[email protected]> | |
* | |
*/ | |
(function() { | |
var loggers = []; |
This file contains hidden or 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(OS_ANDROID) | |
var gcm = require('net.iamyellow.gcmjs'); | |
/** | |
* @class PushNotifications | |
* @singleton | |
* | |
* Functions handling Push Notifications on both iOS and Android | |
*/ | |
var PN = { |
This file contains hidden or 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
/** | |
* ACS Cloud Push module, comes with Ti SDK | |
* @exports Cloud | |
* @type {object} | |
*/ | |
var Cloud = require('ti.cloud'), | |
CloudPush; | |
/** | |
* CommonJS Module of reusable config values and helper methods. | |
* @exports Config |
This file contains hidden or 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
settings: { | |
releaseNotes: grunt.option('notes') || 'CI build', | |
appName: 'Flashlight', | |
ppUuid: '0253600x-ac6d-35b6-b66d-dd25c4fd956f', | |
installrAppToken: '6xC0I8SdJA76kW3pqq7GFZLIyq6fBP4Z' | |
}, |
This file contains hidden or 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
[sudo] npm install -g gittio |
This file contains hidden or 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 photoDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, "photos"); | |
if(!photoDir.exists()) { | |
photoDir.createDirectory(); | |
} | |
function takePhoto(e) { | |
// https://github.com/appcelerator-modules/ti.imagefactory | |
var ImageFactory = require('ti.imagefactory'); | |
Ti.Media.showCamera({ |