Skip to content

Instantly share code, notes, and snippets.

@dawsontoth
dawsontoth / t.sh
Created March 4, 2011 19:37
Bash script to quickly simulate / emulate / deploy Appcelerator Titanium Mobile apps
##
# This script helps you run Titanium Mobile apps from the command line.
#
# You will want to customize the variables on lines 25-37, per your own environment.
# Most important is to customize "appRootDirectory".
#
# It can be used a couple of different ways:
# 1) To start the Android emulator:
# ./t a
# 2) To start a simulator, emulator, or deploy to device, use the following:
/**
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left,
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view.
*/
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;
@wmerrifield
wmerrifield / build+archive.sh
Created November 8, 2010 17:53
A shell script to perform the equivalent of Xcode's "Build & Archive" command.
#!/bin/sh
#
# Copyright (c) 2010 Warren Merrifield
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: