Skip to content

Instantly share code, notes, and snippets.

@donthorp
donthorp / SimpleCursorLoader.java
Created June 22, 2012 20:42 — forked from casidiablo/SimpleCursorLoader.java
Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview
/*
* Copyright 2012 CodeSlap - Cristian Castiblanco
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* This sample lets you record and share video with Appcelerator Titanium on Android.
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html
*/
/**
* First, create our UI. We'll have two buttons: record, and share.
*/
var win = Titanium.UI.createWindow({
#!/bin/bash
# Add this to your ~/.bash_profile
for a in `ls $HOME/.bash_profile.d/*.sh`; do
source $a
done
@donthorp
donthorp / gist:373911
Created April 21, 2010 14:55 — forked from kwhinnery/gist:372692
Kevin's Module Pattern for JS
var myApplication = function(){
var name = 'Chris';
var age = '34';
var status = 'single';
function createMember(){
// [...]
}
function getMemberDetails(){
// [...]
}
@donthorp
donthorp / cloud.py
Created January 20, 2010 19:16 — forked from tschaub/cloud.py
#!/usr/bin/env python
#
# Copyright (c) 2010 The Open Planning Project
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
@donthorp
donthorp / dev-build
Created December 2, 2009 23:56 — forked from davglass/gist:247623
dev-build for titanium mobile
#!/bin/bash
#
# This file will help you build Titanium Mobile on Unix from source
#
# Follow the HOWTO's here:
# http://www.codestrong.com/timobile/howto/
#
# Once you have your dependencies working,
# Put this file in your path somewhere then cd into the titanium_mobile directory
# then exec: builti