Skip to content

Instantly share code, notes, and snippets.

View jhaynie's full-sized avatar
🤖
making agents and stuff

Jeff Haynie jhaynie

🤖
making agents and stuff
View GitHub Profile
/**
* this is a simple workaround for module level state changes (like login) when not using the button
* related to
*
* https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/314-need-to-support-facebook-module-level-state-changes-that-arent-tied-to-a-button
*/
if (typeof Titanium.Facebook._LIS == 'undefined')
{
Titanium.Facebook._LIS = [];
tableView.insertRowAfter(row,data,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.NONE});
var win = Ti.UI.createWindow({
backgroundColor:"#000"
});
var view = Ti.UI.createView({
backgroundImage:"nav-chroma-mask-bg.png",
width:360,
height:45,
top:0
});
var win = Ti.UI.createWindow({
backgroundColor:"#fafaf9"
});
var logo = Ti.UI.createView({
backgroundImage:"info_usat_logo.png",
width:157,
height:131,
top:30,
left:30
var tabGroup = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({
title:"Test"
});
var win2 = Ti.UI.createWindow({
title:"Blank"
});
Blog comment for http://blah.thingsinjars.com/post/291/phonegap---the-drupal-of-app-development/
Tried to post on blog but disqus not working on either Safari 5 or Chrome on Mac.
A few comments about Appcelerator.
1. We're completely open source and you can see all our active development every single commit on github.com/appcelerator. We have plenty of outside core open source contributors.
2. Yeah, to do what we're doing, it's complicated - much more than Phonegap - so it does mean with complexity it's hard to grok. however, the source is all there. Also, it's full extensible through our SDKs and we this SDK as the way we build Titanium itself.
3. For Desktop, we _only_ upload to our build servers as a convenience to cross-platform packaging. Nothing mysterious and all the scripts we run are included (and open source) so you can run them on your own. Plenty of our customers do this behind the firewall. When you're developing locally (say on a OSX machine), it's all local during dev. Only cross-platfo
/*****
To authorize on Twitter API through xAuth, you need HMAC-SHA1
I'm using the following lib for that:
http://jssha.sourceforge.net
Make sure you have sha.js included!
<script src="http://jssha.sourceforge.net/sha.js"></script>
Also, you need to email [email protected] to get xAuth access
I cannot do that for you - see http://dev.twitter.com/pages/xauth
- (void)takePicture:(NSTimer*)theTimer {
CGImageRef capture = UIGetScreenImage();
CGRect cropRect = [overlayView cropRect];
if (oneDMode) {
// let's just give the decoder a vertical band right above the red line
cropRect.origin.x = cropRect.origin.x + (cropRect.size.width / 2) - (ONE_D_BAND_HEIGHT + 1);
cropRect.size.width = ONE_D_BAND_HEIGHT;
// do a rotate
CGImageRef croppedImg = CGImageCreateWithImageInRect(capture, cropRect);
capture = [self CGImageRotated90:croppedImg];
@jhaynie
jhaynie / logger.py
Created July 28, 2010 05:26
iPhone SDK 4.0.1 hot fix for logging issues. Drop this into your /Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone directory
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Tail an application log file running in the iPhone Simulator
#
import os, sys, subprocess, time, signal, run, filetail
def find_file(folder, fname):
for root, dirs, files in os.walk(folder):
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="welcome">Hello</string>
<string name="format_test">My name is %s</string>
</resources>