Skip to content

Instantly share code, notes, and snippets.

@saggy
saggy / analytics.js
Created January 6, 2016 04:24 — forked from stephenfeather/analytics.js
commonJS version of Roger Chapman's Google Analytics Library for Appcelerator's Titanium Mobile SDK
/*
The MIT License
Copyright (c) 2010 Roger Chapman
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
@saggy
saggy / CountDown.cs
Created December 9, 2015 11:55 — forked from arlm/CountDown.cs
How to use CountDownTimer on Xamarin.Android
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
@saggy
saggy / app.js
Last active August 29, 2015 14:07 — forked from FokkeZB/app.js
var v = Ti.UI.createView();
var s = new require('spinner').Spinner(
v, // View to spin
30 // Degrees to spin per millisecond
); // Auto-starts
// Stop
s.stop();
@saggy
saggy / index.js
Last active August 29, 2015 14:06 — forked from adampax/index.js
//must have TiSocial module installed for iOS: https://github.com/viezel/TiSocial.Framework
//share() Android -- uses intent, iOS --- uses TiSocial share dialog
//tweet iOS Only -- uses TiSocial tweet dialog
function onClickShare(){
require('socialmod').share({
text: 'text to share',
title: 'Title',
url: 'http://example.com'
@saggy
saggy / index.js
Last active August 29, 2015 14:06 — forked from aaronksaunders/index.js
/**
* called when an item in the ListView is clicked; we will get the section
* index, and addition event information
*
* @param {Object} _event
*/
function loadMoreBtnClicked(_event) {
alert('not implemented yet');
}
@saggy
saggy / app.js
Created July 30, 2014 04:54 — forked from dawsontoth/app.js
/*
Learn the basics of Storekit with this example.
Before we can do anything in our app, we need to set up iTunesConnect! This process can be a little painful, but I will
guide you through it so you don't have to figure it out on your own.
Follow these steps:
1) Log in to your Apple Developer account at https://itunesconnect.apple.com/
2) Click "Manage Your Applications".
@saggy
saggy / app.js
Created July 28, 2014 02:02 — forked from mauropm/app.js
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var imgTableLoco = Ti.UI.createTableView({
width: 270,
height: 290,
top: 0,
backgroundColor: 'black'
});
@saggy
saggy / app.js
Created July 4, 2014 05:19 — forked from mauropm/app.js
var win = Titanium.UI.createWindow({
backgroundColor = '#fff';
});
Ti.include("version.js");
//Ti.Geolocation.preferredProvider = "gps";
if (isIPhone3_2_Plus())
// add all items to collection
Alloy.Collections.Fugitive.reset([{
"name" : "Jeff Haynie"
}, {
"name" : "Nolan Wright"
}, {
"name" : "Don Thorp"
}, {
"name" : "Marshall Culpepper"
}, {
// add all items to collection
Alloy.Collections.Fugitive.reset([{
"name" : "Jeff Haynie"
}, {
"name" : "Nolan Wright"
}, {
"name" : "Don Thorp"
}, {
"name" : "Marshall Culpepper"
}, {