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
find . -type f | grep -v node_modules | grep -v modules | grep -v .git | grep -v .json | grep .js | xargs -I{} perl -pi -e 'print "/*\n * Copyright (c) 2011-2014 YY Digital Pty Ltd. All Rights Reserved.\n * Please see the LICENSE file included with this distribution for details.\n */\n\n" if $. == 1' {} |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
installr_settings: { | |
releaseNotes: grunt.file.read("./CHANGELOG.txt") | |
}, | |
titanium: { | |
build_ios: { // build for ios first |
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
function compile(TypeScript, logger, sourcefilename){ | |
var _this = this; | |
var ByteOrderMark = {}; | |
ByteOrderMark[ByteOrderMark["None"] = 0] = "None"; | |
ByteOrderMark[ByteOrderMark["Utf8"] = 1] = "Utf8"; | |
ByteOrderMark[ByteOrderMark["Utf16BigEndian"] = 2] = "Utf16BigEndian"; | |
ByteOrderMark[ByteOrderMark["Utf16LittleEndian"] = 3] = "Utf16LittleEndian"; | |
var FileInformation = (function () { |
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
// use this as a normal Ti.UI.Label | |
function VerticalLabel(_params){ | |
// store the text in this variable | |
var text = _params.text || ''; | |
// create an array of letters | |
var array = text.split(''); | |
// get the length of the array (letters) | |
var len = array.length; | |
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
/** | |
* @preserve | |
* Titanium Cloud Module | |
* | |
* This module is used across three distinct platforms (iOS, Android, and Mobile Web), each with their own architectural | |
* demands upon it. | |
* | |
* Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. | |
* and licensed under the Apache Public License (version 2) | |
*/ |
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 Dashboard = require('dashboard'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor:'lightgray' | |
}); | |
var view = new Dashboard.View(); | |
var data = []; | |
for(var i = 0; i < 20; 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
/** | |
* Test #1 | |
* Adding 10,000 Ti.UI.TableViewRows to a Ti.UI.TableView | |
* The rows have the Ti.UI.iPhone.TableViewCellSelectionStyle.BLUE constant in them | |
* | |
* Total time in my Mac: 1228ms | |
*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#ccc' |
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
/** | |
* To be used this way | |
*/ | |
var Log = require('log'); | |
Log.Info('This is an info log'); | |
Log.Error('This is an error log'); | |
Log.Debug('This is a debug log'); |
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 gist is only for Android. | |
If you would like launch native apps | |
on iPhone, iPad, you can find information about it in Appcelerator Docs: | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html | |
More info about iOS URL Schemes: http://handleopenurl.com/ |
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
// ==UserScript== | |
// @name Ingress Player Locations | |
// @description Shows player locations on the Ingress Intel Map | |
// @version 1.2 | |
// @match http://www.ingress.com/intel | |
// @run-at document-start | |
// ==/UserScript== | |
function override() { |
OlderNewer