This file contains hidden or 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
| DialogWindow = function(message, type){ | |
| // Default params | |
| var message = message || "How about you add some message to this? :)"; | |
| var type = type || "error"; | |
| var window = Titanium.UI.createWindow({ | |
| width: 320, | |
| height: 44, | |
| top: 44, |
This file contains hidden or 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
| /* ---------------------------------------------------------- */ | |
| /* */ | |
| /* A media query that captures: */ | |
| /* */ | |
| /* - Retina iOS devices */ | |
| /* - Retina Macs running Safari */ | |
| /* - High DPI Windows PCs running IE 8 and above */ | |
| /* - Low DPI Windows PCs running IE, zoomed in */ | |
| /* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
| /* - Android hdpi devices and above */ |
This file contains hidden or 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
| /* | |
| Author: James Shrager (@jshrager) | |
| Intended use: Appcelerator Titanium | |
| Usage: http://www.LearningTitanium.com (@learningTi) | |
| */ | |
| var client_id = "YOUR_CLIENT_ID"; | |
| var client_secret = "YOUR_CLIENT_SECRET"; | |
| var redirectUri = 'http://YOUR_URL/foursquareCallback.php'; | |
| var ui = require('ui/ui'); |
This file contains hidden or 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
| <?php | |
| /* | |
| Plugin Name: Remote Login | |
| Description: Log into the site with creds that work on remote site (as defined in plugin). The remote site must have XML-RPC enabled. | |
| Author: Kailey Lampert | |
| Author URI: http://kaileylampert.com/ | |
| THIS IS NOT COMPLETE - DO NOT USE IN PRODUCTION | |
| The remote site (defined below in $server) is the "master" site. |
This file contains hidden or 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
| //CREATE WINDOW | |
| var win = Ti.UI.createWindow({ | |
| title: 'Upload', | |
| backgroundColor: '#FFF', | |
| fullscreen: true, | |
| navBarHidden: true | |
| }); | |
| //PHOTO VIEW CONTAINER |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or 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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
| "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <link href="bootstrap/css/bootstrap.css" rel="stylesheet"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>New Appcelerator Cloud Services Project</title> | |
| <script type="text/javascript"> | |
| function onBodyLoad() { |
This file contains hidden or 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 file located in /Library/Application Support/Titanium/mobilesdk/osx/{version_number} | |
| // add the following methods to GeolocationModule.mm | |
| - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region | |
| { | |
| NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:NUMBOOL(YES),@"success",[NSDictionary dictionaryWithObjectsAndKeys:NUMDOUBLE(region.center.latitude),@"lat",NUMDOUBLE(region.center.longitude),@"lng",NUMDOUBLE(region.radius),@"radius",region.identifier,@"identifier",nil],@"region",nil]; | |
| if ([self _hasListeners:@"enteredRegion"]) | |
| { | |
| [self fireEvent:@"enteredRegion" withObject:event]; |
This file contains hidden or 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
| function privateDocumentsDirectory(){ | |
| Ti.API.info('We need to open a file object to get our directory info'); | |
| var testFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory); | |
| Ti.API.info('Now we remove the Documents folder reference'); | |
| var privateDir = testFile.nativePath.replace('Documents/',''); | |
| Ti.API.info('This is our base App Directory =' + privateDir); | |
| Ti.API.info('Now we add the Private Documents Directory'); | |
| privateDir+='Library/Private%20Documents/'; | |
| Ti.API.info('Our new path is ' + privateDir); |