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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!--- REPLACE com.example.gcm WITH YOUR APP BUNDLE ID --> | |
<manifest package="com.example.gcm" ...> | |
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> |
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
// The contents of this file will be executed before any of | |
// your view controllers are ever executed, including the index. | |
// You have access to all functionality on the `Alloy` namespace. | |
// | |
// This is a great place to do any initialization for your app | |
// or create any global variables/functions that you'd like to | |
// make available throughout your app. You can easily make things | |
// accessible globally by attaching them to the `Alloy.Globals` | |
// object. For example: | |
// |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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 A = require("alloy/animation"); | |
var _args = arguments[0] || {}; | |
var panelView = null; | |
_args.controller = _args.controller || null; | |
_args.parent = _args.parent || null; | |
/** | |
* PANEL ANIMATIONS | |
*/ |
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 ACS = require('acs').ACS; | |
var logger = require('acs').logger; | |
var EventEmitter = require('events').EventEmitter; | |
var https = require('http'); | |
var sessionID = null; | |
var stocks, results=[]; | |
function getStockQuotes(req, res) { | |
var evt_count=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
/* | |
WildText CommonJS module for Appcelerator Titanium | |
Create dynamic gradient filled text in your iOS Applications using this simple module. | |
@params : text - String. The text for your label | |
font - Font. Specify the font attributes for the label (defaults to standard size, weight and family), | |
backgroundGradient - BackgroundGradient. Specify your backgroundGradient object (defaults to White to Black linear gradient), | |
Top - Integer. Top property for your label, | |
Left - Integer. Left Property for your Label, |
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
// Setup Geoloaction Background Tasks for the app | |
Ti.Geolocation.purpose = "This app would like to use your location."; | |
Ti.App.iOS.registerBackgroundService({url: "geoBackgroundTask.js"}); | |
/** | |
* Note: If you are programming in a standard project for Titanium, | |
* this snippet would probably go in your app.js file | |
* / |
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
function uploadPhoto( _source, _callback) { | |
var onSuccess = function(e){ | |
if(e.media){ | |
Cloud.Photos.create({ | |
photo: e.media | |
}, function (e) { | |
if (e.success) { | |
var photo = e.photos[0]; | |
alert('Success:\\n' + |