Skip to content

Instantly share code, notes, and snippets.

View boydlee's full-sized avatar

Boydlee Pollentine boydlee

View GitHub Profile
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#000'
map_stops.setLocation({
animate : true,
latitude:((parseFloat(maxLat) + parseFloat(minLat))/2 ) ,
longitude: ((parseFloat(maxLong) +parseFloat(minLong))/2 - (lgDiff - delta / 2)),
latitudeDelta:delta,
longitudeDelta:delta,
});
@boydlee
boydlee / gist:3122961
Created July 16, 2012 14:16
youtube video
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@boydlee
boydlee / gist:3169019
Created July 24, 2012 09:14
Titanium Europe Meetup Form
<form action="http://pollypolish.createsend.com/t/j/s/jjyhut/" method="post" id="subForm">
<div>
<p><label for="name" style="width: 150px; clear: both;">Name:</label><br /><input type="text" name="cm-name" id="name" style="border: 1px solid #959183; padding: 4px; width: 300px; margin-bottom: 10px;" /></p>
<p><label for="jjyhut-jjyhut" style="width: 150px; clear: both;">Email:</label><br /><input type="text" name="cm-jjyhut-jjyhut" id="jjyhut-jjyhut" style="border: 1px solid #959183; padding: 4px; width: 300px; margin-bottom: 10px;" /></p>
<p><label for="Titanium Proficiency">Titanium Proficiency:</label><br /><select name="cm-fo-pbdk">
<option value="259080">Beginner</option>
<option value="259081">Intermediate</option>
<option value="259082">Expert</option>
@boydlee
boydlee / PhotoSelector.js
Created August 20, 2012 12:38
CommonJS module to access photo gallery and camera and return resulting image
/*
PhotoSelector.js
Gets a photo from camera or gallery
Usage:
var ps = require('PhotoSelector');
var select = new ps.PhotoSelector();
//get a photo from the camera
select.fromCamera(false, true, function(success){}, function(failed){}, function(cancelled){});
@boydlee
boydlee / imgur.js
Created September 21, 2012 16:52
Imgur.com image upload commonjs module for Titanium
/*
* IMGUR.COM Anonymous image upload API
*/
Imgur = function(){
this.key = 'XXXXXXXXXX'; //get one free at imgur.com
this.httpEndpoint = 'http://api.imgur.com/2/';
};
/*
* Upload method, sample usage:
var win = Titanium.UI.createWindow();
var webview = Titanium.UI.createWebView({
url:'https://www.google.co.uk/',
touchEnabled:true,
enableZoomControls:false,
width:Titanium.Platform.displayCaps.platformWidth,
loading:true,
left:0,
top:0,
willHandleTouches:false
/*
*
Gibberish-AES
A lightweight Javascript Libray for OpenSSL compatible AES CBC encryption.
Author: Mark Percival
Email: [email protected]
Copyright: Mark Percival - http://mpercival.com 2008
With thanks to:

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/