Skip to content

Instantly share code, notes, and snippets.

View mattapperson's full-sized avatar
🏠
Working from home

Matt Apperson mattapperson

🏠
Working from home
View GitHub Profile
@mattapperson
mattapperson / update-vendor-branch.sh
Created June 16, 2012 10:17 — forked from donthorp/update-vendor-branch.sh
Auto-track svn vendor branches in git
#! /bin/sh
# This script expects to be in the parent directory of your github projects
#
# in /etc/cron.hourly create a script that invokes this script for each repo
#
# sudo -u USER /home/USER/PROJECTS-ROOT/update-vendor-branch.sh PROJECT-DIR-1
# sudo -u USER /home/USER/PROJECTS-ROOT/update-vendor-branch.sh PROJECT-DIR-2
echo "Updating vendor repository: $1"
function fancyStuff(){
var self = Ti.UI.createView({ ... });
var button = Ti.UI.createButton({ ... });
//Can I return more than one object somehow?
return {
view: self,
button: button
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Titanium Compiler plugin
# __PROJECT_ID__
#
import os, sys, subprocess, codecs, hashlib
try:
2012-02-15 10:22:44.534 Kiosk[53242:1b803] Warning: __45-[PSPDFCache cacheDocument:startAtPage:size:]_block_invoke_0/860 startPage:0 to high, resetting to 1.
2012-02-15 10:22:44.534 Kiosk[53242:1b803] Warning: -[PSPDFCache enqueueItem:]/647 Page is invalid: 1 (pageCount: 0)
2012-02-15 10:22:44.535 Kiosk[53242:1b803] Warning: -[PSPDFCache enqueueItem:]/647 Page is invalid: 0 (pageCount: 0)
def project_root(args):
current_dir = os.getcwd()
project_root = "/"
found_path = False
tries = 0
while found_path == False:
if os.path.exists("%s/Resources/" % current_dir):
// Slightly altered version of your code
var pullremotecredentials = function(usr,psw, callback) {
var user_xhr = Ti.Network.createHTTPClient();
var JSON_string = 'http://www.u2me.co/ios_json_api.php?method=validateuser&jsoncallback=?&username=' + usr + '&password=' + psw;
user_xhr.onload = function(e) {
try {
var userobj = JSON.parse(this.responseText);
//
//
// CHANGE THESE VALUES TO REFLECT THE VERSION (AND LOCATION IF DIFFERENT)
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 1.8.0.1
//
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
collection.remove({$exists:{phone:false}});
collection.commit();