This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source for the Accidental Tech Podcast (ATP) T-Shirt: | |
// http://www.marco.org/2014/04/29/atp-shirts | |
// | |
// By Troy Gaul, June 2, 2014. | |
// | |
// Based on Obj-C veresion by Marco Arment, April 28, 2014. MIT license. | |
// https://gist.github.com/marcoarment/2542cd28cb5df0aa97d8 | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Striated Pardalote | |
Elegant Crested Tinamou | |
Little Tinamou | |
Slaty-breasted Tinamou | |
Thicket Tinamou | |
Great Tinamou | |
Chilean Tinamou | |
Cinereous Tinamou | |
Brown Tinamou | |
Greater Rhea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Titanium.UI.createWindow({ | |
}); | |
var memPool = Titanium.UI.createWindow({}); | |
memPool.open(); | |
memPool.hide(); | |
var memView = Titanium.UI.createView({ | |
size : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil]; | |
self.window.rootViewController = self.viewController; | |
// ADD THIS LINE: | |
[self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pipe Ars Technica's live Apple event coverage into a Campfire room. | |
# http://arstechnica.com/apple/news/2010/01/tablet-live-event-liveblog.ars | |
# | |
# Usage: | |
# $ gem install -r hpricot tinder | |
# $ ruby -rubygems ars_live.rb -ssl mysubdomain myroomid myapikey | |
require "hpricot" | |
require "open-uri" | |
require "tinder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////push_notifications.js/////////////////////// | |
var apns = function(){ | |
var pref = require('preferences').preferences; | |
Titanium.Network.registerForPushNotifications({ | |
types: [ | |
Titanium.Network.NOTIFICATION_TYPE_BADGE, | |
Titanium.Network.NOTIFICATION_TYPE_ALERT | |
], | |
success:function(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i2a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/']; | |
exports.base64_encode = function(s) { | |
var length = s.length; | |
var groupCount = Math.floor(length / 3); | |
var remaining = length - 3 * groupCount; | |
var result = ""; | |
var idx = 0; | |
for (var i = 0; i < groupCount; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation UITextView (RSExtras) | |
static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
/*[s length] is assumed to be 0 or 1. s may be nil. | |
Totally not a strict check.*/ | |
if (s == nil || [s length] < 1) | |
return NO; |
OlderNewer