Skip to content

Instantly share code, notes, and snippets.

View bob-sims's full-sized avatar

Bob Sims bob-sims

View GitHub Profile
@aaronksaunders
aaronksaunders / app.js
Created September 18, 2012 21:07
Integrating ACS with NODE JS - This works, BUT I want to migrate it to using the new Node.ACS platform
// SEE QUESTION IN QA FORUM
// http://developer.appcelerator.com/question/142378/integrating-nodeacs-with-expressjs-not-working
// @aaronksaunders
//
/**
* Module dependencies.
*/
var express = require('express');
@aaronksaunders
aaronksaunders / app.js
Created September 14, 2012 12:12
handling links in a webview
## jQuery [plain_text]
Make sure you make a reference to the jQuery library in the header of your HTML. Also remember that you must load the HTML into the WebView from a local file.
## This event definition goes in you app.js [javascript]
Ti.App.addEventListener('openBrowser',function(e){
Ti.Platform.openURL(e.URL);
});
## This JQuery goes in the HTML file [javascript]
@raulriera
raulriera / DialogWindow.js
Created September 9, 2012 11:08
CustomAlertDialog commonJS module for Titanium Appcelerator. Similar to the "Tweetbot" (but will need more makeup of course) where the information is displayed below the title bar instead of an intrusive popup
DialogWindow = function(message, type){
// Default params
var message = message || "How about you add some message to this? :)";
var type = type || "error";
var window = Titanium.UI.createWindow({
width: 320,
height: 44,
top: 44,
@pec1985
pec1985 / app.js
Created September 4, 2012 20:41
UI module with callbacks - Titanium Appcelerator
var UI = require('ui');
var btn = UI.Button({
title: 'Hello World',
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
onClick: function(){
alert('Button Clicked');
}
});
@raulriera
raulriera / LoadingTableViewRow.js
Created August 20, 2012 13:31
Loading indicador for tableviews in Titanium Appcelerator
LoadingTableViewRow = function(message) {
var row = Titanium.UI.createTableViewRow({
height: 70,
touchEnabled: false
});
var indicator = Titanium.UI.createActivityIndicator({
width:"auto",
height: 30,
color: "665b5b",
@mauropm
mauropm / app.js
Created August 7, 2012 04:50
Facebook 'alike' menu in Appcelerator
/*
* Facebook 'alike' menu in Titanium Appcelerator
* Mauro Parra-Miranda <[email protected]>
* License: Free to use, no support at all.
* USAGE: Create a new mobile project in Ti Studio, paste this file into app.js
*/
var win = Ti.UI.createWindow({
backgroundColor : 'white',
});
@19h
19h / TiYoutube.js
Last active November 11, 2015 16:24
Titanium Mobile SDK iPhone / Android: Extract Youtube Video URL / URI from video-id / identification / name and play mp4 file. (Workaround for the recent change of security in Youtube)
Titanium.App.addEventListener("playvideo", function (e) {
var win11 = Titanium.UI.createWindow({
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT],
title: "Video",
zIndex: 222222
});
var activeMovie = Titanium.Media.createVideoPlayer({
fullscreen: !0,
autoplay: !0,
@rborn
rborn / google-weather-api-conditions.xml
Created July 14, 2012 18:19 — forked from bzerangue/google-weather-api-conditions.xml
Google Weather API Conditions List
<?xml version="1.0" encoding="UTF-8"?>
<!--Google Weather API Conditions. Compiled by Dennis Delimarsky, http://dennisdel.com/content/conditions.xml-->
<!--Tweaked by Brian Zerangue, February 1, 2011-->
<conditions>
<type handle="partly-sunny">Partly Sunny</type>
<type handle="scattered-thunderstorms">Scattered Thunderstorms</type>
<type handle="showers">Showers</type>
<type handle="scattered-showers">Scattered Showers</type>
<type handle="rain-and-snow">Rain and Snow</type>
<type handle="overcast">Overcast</type>
@yomybaby
yomybaby / example.js
Created June 15, 2012 05:57 — forked from salbito/gist:1165174
Backbone.sync for Titanium HttpClient and Titanium ACS API
// http://cloud.appcelerator.com/docs/api/v1/acls/create
var Backbone = require('/lib/backbone'),
_ = require('/lib/underscore');
var ReviewModel = Backbone.Model.extend({
modelNameForACS : 'Reviews' //just add Model Name of ACS
});
var ReviewCollection = Backbone.Collection.extend({
@stephenfeather
stephenfeather / tracer.js
Created June 1, 2012 23:41 — forked from jeffbonnes/tracer.js
A tracer object to Titanium Mobile to show elapsed time and memory usage
/**
* Courtesy of Jeff Bonnes
* http://www.titaniumdevelopment.com.au/blog/2011/09/12/debugging-ipad-performance-and-memory-usage/
*/
/**
* Modified to a commonJS format by Stephen Feather
* Usage:
* var Tracer = require('/lib/tracer');