Skip to content

Instantly share code, notes, and snippets.

View bob-sims's full-sized avatar

Bob Sims bob-sims

View GitHub Profile
@bob-sims
bob-sims / alloy.js
Last active December 28, 2015 11:28
Authenticate to Azure Mobile BaaS with Titanium Mobile's native Facebook module (Alloy framework)
// The contents of this file will be executed before any of
// your view controllers are ever executed, including the index.
// You have access to all functionality on the `Alloy` namespace.
//
// This is a great place to do any initialization for your app
// or create any global variables/functions that you'd like to
// make available throughout your app. You can easily make things
// accessible globally by attaching them to the `Alloy.Globals`
// object. For example:
//
@bob-sims
bob-sims / demo.js
Last active December 12, 2015 09:19
// demo to parse JSON feed
// response to https://twitter.com/Saucerdk/status/300691053743316992
// https://twitter.com/Saucerdk/status/300690859253448704
var xhr = Ti.Network.createHTTPClient();
xhr.open('GET','http://www.achorsens.dk/custom_api.php?format=json&type=spillere');
xhr.send();
xhr.onload = function(){
var response = JSON.parse(xhr.responseText);
@bob-sims
bob-sims / entypo-map.js
Last active March 21, 2016 17:49
Entypo icon font UTF map as JSON
// parsed from https://github.com/danielbruce/entypo/blob/master/config.yml
[
{
"name": "note",
"code": "0x266a",
"search": [
"music",
"note",
"song"
@bob-sims
bob-sims / index.xml
Last active December 10, 2015 08:28
Test case for Titanium Alloy error, cannot add View as child of TabGroup, although allowed through traditional Ti.UI API. Attempting to re-create Titans Community App UI.
<Alloy>
<TabGroup class="tabgroup" platform="ios">
<Tab id="streamTab">
<Window class="container">
<Label class="label" onClick="doClick">Hello, World</Label>
</Window>
</Tab>
<Tab id="groupsTab">
<Window class="container">
<Label class="label" onClick="doClick">Hello, World</Label>
@bob-sims
bob-sims / 00-readme.md
Last active December 10, 2015 08:18 — forked from zeuxisoo/app.js
Common-JS screenscraping in Titanium Mobile using htmlparser.js + soupselect.js

Common-JS screenscraping in Titanium Mobile using htmlparser.js + soupselect.js

Handy when YQL won't work due to robots.txt blocking.

Derived from prior art by @zeuxisoo: https://gist.github.com/1016047

@bob-sims
bob-sims / 00-readme.md
Last active October 12, 2015 22:08
Module to return node form as Services resource in Drupal 6.

Module to return Drupal node create Form as Services resource.

Drupal 6, Services 3.

Module: services_node_form

Thanks to direct and indirect help from @grzegorzbartman and @entendu.

@bob-sims
bob-sims / 00-readme.md
Created September 24, 2012 21:53
Staff Directory demo app for Appcelerator #TiMob training

#Overview

I created this simple Staff Directory App as a demonstration for a small internal staff training workshop. Finished product shown below, goal throughout class was to explain code walkthrough and learning resources in pieces, allowing students to create app as a practical exercise.

..

My goals:

  • Show utility of Titanium Mobile to rapidly create simple, x-platform, enterprisey apps (clever term via @thiswayup)
  • Demonstrate use of app template (Master/Detail) included as part of Ti Studio.
@bob-sims
bob-sims / norva_drupal.md
Created August 1, 2012 02:36
GistDeck Brief: Ti Mobile + Drupal Web Services

Building Cross-Platform Native Mobile Apps With Titanium Mobile and Drupal Web Services

Hampton Roads Drupal Users Group

About Me

About Me

@bob-sims
bob-sims / convertImages.sh
Created July 26, 2012 02:10
Automated Build of X-Platform Titanium Splash Screens and Icons
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
@bob-sims
bob-sims / 00-README.TXT
Last active October 1, 2015 09:47
Demo CommonJS module for Titanium Mobile interaction with Drupal Services 3.x REST + JSON interface
This is a simple CommonJS module to wrap Titanium Ti.Network.HttpClient calls to interact with Drupal Services.
NOTE: Code updated at @TiConf using callback functions.
Tested using:
Drupal 6.24
Services 3.1
Titanium Mobile SDK 1.8.2 (Android 2.2 SDK)