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
/*jslint vars: true, plusplus: true, sloppy: true, nomen: true, maxerr: 1000 */ | |
function Sequencer(){ | |
var self = {}; | |
var song, songTitle, currentNote, totalNotes, noteBatch, notes, timeouts = []; | |
if(Ti.App.Properties.hasProperty('noteBatch')){ | |
noteBatch = Ti.App.Properties.getInt('noteBatch'); | |
}else{ |
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
Code to detect a Gimbal beacon (without reading encrypted identifiers): | |
BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this); | |
BeaconManager.getBeaconParsers().add(new BeaconParser(). | |
setBeaconLayout("m:0-3=ad7700c6")); | |
beaconManager.bind(this); |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'twitter' | |
require 'json' | |
require 'faraday' | |
# things you must configure | |
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder | |
TWITTER_USER = "your_twitter_username" |
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
/** | |
* The following snippet will ask the user to rate your app the second time they launch it. | |
* It lets the user rate it now, "Remind Me Later" or never rate the app. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
win.addEventListener('open', checkReminderToRate); | |
win.add(Ti.UI.createLabel({ text: 'This is a simple app that will remind you to rate it.' })); | |
win.open(); | |
function checkReminderToRate() { |
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) { | |
require('time-grunt')(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
CHANGELOG: '', | |
// add tiapp.xml changes to the repo | |
gitadd: { | |
versionBump: { | |
options: { |
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
/** | |
* Courtesy of Jeff Bonnes | |
* http://www.titaniumdevelopment.com.au/blog/2011/09/12/debugging-ipad-performance-and-memory-usage/ | |
*/ | |
/** | |
* Modified to a commonJS format by Stephen Feather | |
* Usage: | |
* var Tracer = require('/lib/tracer'); |
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
ulimit -n 65536 65536 | |
export ANDROID_SDK=/sdks/android-sdk-macosx | |
export ANDROID_HOME=/sdks/android-sdk-macosx | |
export ANDROID_PLATFORM="$ANDROID_SDK/platforms/android-23" | |
export GOOGLE_APIS="$ANDROID_SDK/add-ons/addon-google_apis-google-23" | |
export ANDROID_NDK=/sdks/android-ndk-r9b | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export PATH=$PATH:$MONGO_PATH/bin:/sdks/android-sdk-macosx/tools:/sdks/android-sdk-macosx/platform-tools:$JAVA_HOME/bin:/Applications/Genymotion\ Shell.app/Contents/MacOS/:/Applications/Genymotion.app/Contents/MacOS/ |
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
/*jslint vars: true, sloppy: true, nomen: true, maxerr: 1000 */ | |
function ImageProcessor(imagePath){ | |
//if (Ti.App.Properties.getInt('CompressImages') === 1){ | |
var ImageFactory = require('ti.imagefactory'); | |
Ti.API.info('Compressing and Resizing Image'); | |
var tempFile = Ti.Filesystem.getFile(imagePath); | |
var imageBlob = tempFile.read(); |
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() { |
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
exports.trim = function(s) { | |
//alert('hi'); | |
var l = 0; | |
var r = s.length - 1; | |
while (l < s.length && s[l] == ' ') { | |
l++; | |
} | |
while (r > l && s[r] == ' ') { | |
r -= 1; | |
} |
OlderNewer