Skip to content

Instantly share code, notes, and snippets.

@hubgit
hubgit / google-drive-file-picker.js
Created October 16, 2012 00:12
Google Drive File Picker
// Note: the file must be shared with at least "anyone with the link can view" permissions.
var clientId = "YOUR CLIENT ID"; // from Google's API Console
google.load("picker", "1");
google.setOnLoadCallback(function() {
var picker = new google.picker.PickerBuilder()
.setAppId(clientId)
.addView(google.picker.ViewId.DOCUMENTS)
@virusman
virusman / example.js
Created September 25, 2012 10:31
Twitter Bootstrap Tabs + History.js - made as jQuery plugin
$(document).ready(function() {
//init tab history with default tab 'table'
$(window).tabHistory('table');
});
@egomez99
egomez99 / app.js
Created April 18, 2012 13:44
Geolocation commonJS Module
var win = Titanium.UI.createWindow({
title: 'Main',
exitOnClose: true,
fullscreen: false,
navBarHidden: false,
backgroundColor: 'gray'
});
win.addEventListener('open', function() {
var GeoModule = require('geolocation');
@billdawson
billdawson / record_and_share.js
Created February 22, 2011 21:32
Uses Titanium Mobile (Android) to make a voice recording and share it
var win = Ti.UI.createWindow({
title: 'Sound Recorder Test',
exitOnClose: true,
fullscreen: false,
backgroundColor: 'black'
});
// const value grabbed from
// http://developer.android.com/reference/android/provider/MediaStore.Audio.Media.html#RECORD_SOUND_ACTION
var RECORD_SOUND_ACTION = "android.provider.MediaStore.RECORD_SOUND";