Skip to content

Instantly share code, notes, and snippets.

View iskugor's full-sized avatar

Ivan Škugor iskugor

View GitHub Profile
@ordinz
ordinz / goog.js
Created March 29, 2011 17:02
Convert a remote Google KML file to Appcelerator MapView Routes
var url = "http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=217110902183005084784.00049d962454fabcabdc2&output=kml";
//Add routes from a remote KML file to one map
goog.maps.kml.addRoutesToMap(mySingleMap, url);
//Multiple Maps
goog.maps.kml.addRoutesToMap([myGoogleMap1, myGoogleMap2], url);
@jpurcell
jpurcell / pull-to-refresh(android).js
Created April 5, 2011 15:58
Tweetie-like pull to refresh and pull to load more. Note that it requries set heights for everything.
// This is the Android version of the Tweetie-like pull to refresh table:
// http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html
var win = Ti.UI.currentWindow;
var alertDialog = Titanium.UI.createAlertDialog({
title: 'System Message',
buttonNames: ['OK']
});
var scrollView = Ti.UI.createScrollView({
@elsassph
elsassph / titanium-build.json
Created January 5, 2012 13:38
Sublime Text 2 build file for Titanium
{
"cmd": "/usr/local/bin/titanium.sh run --platform=iphone",
"shell": true,
"selector": "source.js",
"working_dir": "${project_path:${folder}}"
}
@billdawson
billdawson / android_scons_speedups.md
Created January 11, 2012 21:41
Speeding up Titanium Build

Speeding up Titanium Mobile Build

(The command examples assume OS X).

Just about everything that happens when you enter scons is for Android. So anything you can do to speed up the Android part of our build will be useful.

  • Android NDK r7 can use ccache. We get huge improvements in build time with it. So install it (if you have HomeBrew, brew install ccache) then set a shell variable NDK_CCACHE to point to it. I.e., for me, having installed it with brew, it would be export NDK_CCACHE=/usr/local/bin/ccache.

  • NDK can also parallelize while compiling. Set a shell variable NUM_CPUS to (according to Opie) 2x the number of cores in your machine. A quick way to get the # cores on your machine in OS X is system_profiler | grep "Number Of Cores" in terminal. I have 2 cores, so my shell var setting is export NUM_CPUS=4.

@tzmartin
tzmartin / Titanium-Android.txt
Created March 24, 2012 04:39
Titanium Android Modules
Titanium Android Modules
--------------------------------------
- https://github.com/dbankier/TiKeyguard-Android
Appcelerator/Titanium module to unlock and power on an Android device.
- https://github.com/dbankier/TiSIPClient-Android
SIP/VoIP for Appcelerator's Titanium (Android)
- https://github.com/3ign0n/TiOpenStreetMap
@Integralist
Integralist / Git Workflow.md
Created March 27, 2012 08:57
Git Workflow using an organisation account with Private repositories

#Overview - setting up our git workflow This set-up works for our team as we don't mind pushing directly to a development branch, but this wouldn't work for other companies as the development branch could potentially get broken fairly quickly and with multiple developers working on this singular branch would be awkward to locate issues and fix - but for a small team this seems to work fine.

##Initial User Set-Up The first developer to work on the new project will go through this process:

  • <github>
    Create repository on GitHub company account

  • ``

@romannurik
romannurik / button_bar_layout.xml
Created April 10, 2012 04:24
How to make a proper button bar on ICS
<!--
A button bar is a set of buttons at the bottom of an activity.
An example is an AlertDialog with OK/Cancel buttons.
Note that something similar can be accomplished using a
split action bar and text-only action buttons, but this is an
alternate presentation that's often preferred.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
@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');
@skypanther
skypanther / AndroidManifest.xml
Created October 12, 2012 18:50
Android 4 theme and menu
<?xml version="1.0" ?><manifest android:versionCode="1" android:versionName="1" package="com.appcelerator.holotheme" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"/>
<uses-sdk android:targetSdkVersion="14"/>
<!-- TI_MANIFEST -->
<application android:debuggable="false" android:icon="@drawable/appicon" android:label="HoloTheme" android:name="HolothemeApplication" android:theme="@android:style/Theme.Holo.Light">
<!-- TI_APPLICATION -->
@iskugor
iskugor / gist:3990081
Created October 31, 2012 21:41 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt