Skip to content

Instantly share code, notes, and snippets.

@stereoket
stereoket / 1readme.md
Created May 10, 2017 15:45 — forked from jasonkneen/1readme.md
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

@stereoket
stereoket / InstagramMgr.js
Created May 7, 2017 20:05 — forked from aaronksaunders/InstagramMgr.js
Titanium Appcelerator Instagram Code ... This code is almost two years old and I havent tested it in a while
/**
*
* this code was inspired by the work done by David Riccitelli
*
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@stereoket
stereoket / alloy.py
Last active August 29, 2015 14:07 — forked from joshjensen/alloy.py
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/
# Set your layout to Grid 4 - Go to view > layout > Grid: 4
# Based on this Gist from Fokke - https://gist.github.com/FokkeZB/6218345
# Alloy lay-out for Sublime Text http://withtitanium.com/2013/08/titanium-alloy-optimized-sublime-text-2-layout/
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/
import sublime, sublime_plugin, inspect
from os.path import splitext
@stereoket
stereoket / UnitTestingJS
Created July 7, 2012 21:40 — forked from jackfranklin/UnitTestingPresentation
Brief intro to unit testing JavaScript presentation
#Unit Testing your JavaScript
##About Me
* University of Bath Computer Science student
* Placement at [Kainos](http://www.kainos.com)
* [JavaScript Playground](http://www.javascriptplayground.com)
* @Jack_Franklin
## Why Test at all?
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {
@stereoket
stereoket / InfiniteScrollingTableView.js
Created April 10, 2012 22:52 — forked from dawsontoth/InfiniteScrollingTableView.js
Infinite loading table view for iOS and Android.
/**
* We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Create our UI elements.
*/
var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 });
@stereoket
stereoket / push_notifications.js
Created March 27, 2012 00:30 — forked from yagitoshiro/push_notifications.js
apple push notification sample (Titanium Mobile)
//////////////////////push_notifications.js///////////////////////
var apns = function(){
var pref = require('preferences').preferences;
Titanium.Network.registerForPushNotifications({
types: [
Titanium.Network.NOTIFICATION_TYPE_BADGE,
Titanium.Network.NOTIFICATION_TYPE_ALERT
],
success:function(e)
@stereoket
stereoket / app.js
Created March 26, 2012 17:39 — forked from aaronksaunders/app.js
Cocoafish + Appcelerator iOS Module Example Code - Login with Twitter, Create Account From Twitter
//
// blog.clearlyinnovative.com
// Aaron K. Saunders
// Clearly Innovative Inc
//
// @see https://github.com/aaronksaunders/Appcelerator-Cocoafish-Native-Module
//
var cocoafishMgr = require('com.ci.cocoafish');
Ti.API.info("module is => " + cocoafishMgr);