Skip to content

Instantly share code, notes, and snippets.

@mschmulen
mschmulen / animate annotation
Created January 3, 2011 21:44
animate an annotation on a mapview
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
title: "Window Title",
exitOnClose: true
});
win.open();
// CREATE MAP VIEW
@dawsontoth
dawsontoth / RecordingVideo.js
Created February 17, 2011 19:43
How to record video, then share or save it. Using Appcelerator Titanium!
/**
* This sample lets you record and share video with Appcelerator Titanium on Android.
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html
*/
/**
* First, create our UI. We'll have two buttons: record, and share.
*/
var win = Titanium.UI.createWindow({
@stereoket
stereoket / gpstest.js
Created June 4, 2011 21:45
GPS Lookup demo
var GO = {
init: function(){
// Delete the property data
Ti.API.debug('Removing properties');
Ti.App.Properties.removeProperty("latitude");
Ti.App.Properties.removeProperty("longitude");
Ti.App.Properties.removeProperty("geoAccuracy");
Ti.App.Properties.removeProperty("geoTimestamp");
var propTimestamp = Ti.App.Properties.getString("geoTimestamp");
@jonalter
jonalter / app.js
Created August 31, 2011 22:03
Ti.App.iOS.scheduleLocalNotification example
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
win.open();
var label = Ti.UI.createLabel({
top: 20,
height: 200,
width: 200,
text: "Background the app"
});
@skypanther
skypanther / app.js
Created September 1, 2011 21:48
Draw gridlines in a Titanium window
// implement like this:
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
// draw the gridlines first so your other elements stack on top of them
// without requiring you to set the z-index property of each
var grid = require('gridlines');
grid.drawgrid(10,window);
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var v = Ti.UI.createScrollView();
win.add(v);
var v1 = Ti.UI.createView({
height:Ti.UI.SIZE,
backgroundColor:'red'
@tzmartin
tzmartin / video.thumbnail.js
Created July 10, 2012 17:46
Create Thumbnail Image From Video File, Titanium Mobile
/**
Create Thumbnail of Video File
This snippet captures a thumbnail JPG image, based on a frame @ 2 second time-lapse.
Titanium Mobile
*/
var movie = Titanium.Media.createVideoPlayer({
contentURL:FILENAME,
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@ricardoalcocer
ricardoalcocer / index.js
Last active December 16, 2015 16:29
Quick and dirty Appcelerator Alloy + FireFoxOS hack. This sample App works EXACTLY the same on iOS, Android and FirefoxOS.
function onsuccess(data){
var jdata=JSON.parse(data);
var data=[];
jdata.forEach(function(item){
var payload={
tweet:item.text
};
var row=Alloy.createController('tweet.row',payload).getView();
@jasonkneen
jasonkneen / 1readme.md
Last active May 28, 2021 16:48
Quick example of registering a URLScheme in a Titanium app using the TiApp.xml without info.plist file. Just add the following into your TiApp.xml (I put it under the </iphone> tag. Works on Android and iOS.

Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js