Skip to content

Instantly share code, notes, and snippets.

View brentonhouse's full-sized avatar
🚀
Busy being awesome!

Brenton House brentonhouse

🚀
Busy being awesome!
View GitHub Profile
@brentonhouse
brentonhouse / index.js
Created August 27, 2019 20:51 — forked from hmridha/index.js
Shake a view using Appcelerator Titanium
/*
Hi, I have tested this issue in Ti SDK 3.3.0.RC. Its working good.
Testing Environment:
Titanium SDK: 3.3.0.RC, 3.2.3.GA
Titanium CLI: 3.3.0-rc
Android Version 4.4.3 KitKat
@brentonhouse
brentonhouse / cache.js
Created August 23, 2019 16:56 — forked from hansemannn/cache.js
Caching remote images in Titanium (asynchronously)
export default class Utils {
static loadCachedImageFromURL(url, cb) {
let filename;
try {
filename = url.substring(url.lastIndexOf('/') + 1);
} catch (err) {
cb(null);
}
@brentonhouse
brentonhouse / app-utils.js
Created August 23, 2019 16:55 — forked from hansemannn/app-utils.js
Using ES7+ async/await in Appcelerator Titanium
export function showOptions (args) {
const title = args.title;
const message = args.message;
const options = args.options;
const destructive = args.destructive !== undefined ? args.destructive : -1;
let cancel = -1;
return new Promise((resolve, reject) => {
if (OS_IOS) {
options.push('Cancel');
@brentonhouse
brentonhouse / README.md
Created August 16, 2019 03:03 — forked from lbrenman/README.md
Amplify MyPO Alexa Skill for Syncplicity POs

Axway Alexa Sync PO

An Amazon Echo Skill that runs on API Builder and MBaaS and enables users to discover new POs in the PO syncpoint. These files (POs) must be manually uploaded (for now)

Currently Supports:

  • Reading all or new files since last check
  • Sending URL to file to the user's mobile phone

NOTE that the skill compares file dates on Syncplicity with time that the Echo user checked for POs last

@brentonhouse
brentonhouse / app.js
Created August 16, 2019 03:03 — forked from lbrenman/app.js
Node.js example of accessing Axway/Appcelerator MBaaS (ArrowDB/ACS) - user and photo API
var fs = require('fs');
var ArrowDBAppKey_Dev = '<ACS DEV APP KEY>';
var ArrowDBAppKey_Prod = '<ACS PROD APP KEY>';
var ArrowDB = require('arrowdb'),
arrowDBApp = new ArrowDB(ArrowDBAppKey_Prod);
var loginParams = {
login: 'a',
password: '1234'
@brentonhouse
brentonhouse / keichainService.js
Created June 25, 2019 23:02 — forked from gjerlow/keichainService.js
Using ti.identity for keychain functionality in Titanium applications
const TiIdentity = require('ti.identity');
//Identifier of the application. The same as development team on provisioning profile
const appIdentifierPrefix = 'YOUR_IDENTIFIER';
//Create the Keychain Items
const keychainUn = TiIdentity.createKeychainItem({
identifier: Alloy.CFG.kc_user_identifier,
accessGroup: appIdentifierPrefix + '.' + Ti.App.id
});
@brentonhouse
brentonhouse / index.js
Created June 14, 2019 20:57 — forked from davidecassenti/index.js
Appcelerator Titanium | Alloy | Put 2 NavigationWindow inside TabGroup
function openMaster() {
var win = Ti.UI.createWindow({
title: "Master 2",
backgroundColor: 'red'
});
$.master_win.openWindow(win);
}
function openDetail() {
var win = Ti.UI.createWindow({
@brentonhouse
brentonhouse / _build.js
Created June 14, 2019 01:52 — forked from Sophrinix/_build.js
complete file 3.2.0.v20131205165947/iphone/cli/commands/_build.js lines 2774 to 2783 fix the issue of Settings.bundle failing to load.
/**
* iOS build command.
*
* @module cli/_build
*
* @copyright
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
*
* @license
* Licensed under the terms of the Apache Public License
@brentonhouse
brentonhouse / ti_splitwindow.js
Created May 30, 2019 15:46 — forked from adamtarmstrong/ti_splitwindow.js
Use SplitWindow w/ Titanium and toggle MasterView based on both orientation + if in SplitView/SplitOver Mode
//XML
<Alloy>
<SplitWindow id="splitWindow" backgroundColor="white" showMasterInPortrait="true" masterIsOverlayed="true" platform="ios">
<!--MASTER-->
<NavigationWindow platform="ios">
<Window title="Master" layout="vertical">
<LeftNavButtons>
<Label id="masterCollapseButton" class="navButton" text="<<" onClick="toggleMaster" />
</LeftNavButtons>
@brentonhouse
brentonhouse / Appc Verbose
Created March 29, 2019 15:18 — forked from ewieberappc/Appc Verbose
Re-run previous commands with Appc CLI debugging options
USAGE:
$ verbose - Run the previous command with 'DEBUG=*' and '-l trace'
$ verbose <number> - Run the command from <number> commands ago with 'DEBUG=*' and '-l trace'
$ verbose <string> - Run the last command containing <string> with 'DEBUG=*' and '-l trace'
INSTALLATION:
1. Download the executable file to a folder (recommended '~/bin')
2. Add the path to the folder to your PATH in your .bash_profile (export PATH=$PATH:~/bin)
3. Add an alias to your .bash_profile to run the command in the current shell: ( verbose(){ . .verbose $@; } )
4. Restart your terminal or run '. ~/.bash_profile'