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 LatLon(lat, lon, rad) { | |
if (typeof(rad) == 'undefined') rad = 6371; // earth's mean radius in km | |
// only accept numbers or valid numeric strings | |
this._lat = typeof(lat)=='number' ? lat : typeof(lat)=='string' && lat.trim()!='' ? +lat : NaN; | |
this._lon = typeof(lon)=='number' ? lon : typeof(lon)=='string' && lon.trim()!='' ? +lon : NaN; | |
this._radius = typeof(rad)=='number' ? rad : typeof(rad)=='string' && trim(lon)!='' ? +rad : NaN; | |
} |
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
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
#!/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
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
/sdks/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf -a yourlib.so | grep TEXTREL |
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
-(NSString*)TEXT_STYLE_TITLE1 | |
{ | |
if ([TiUtils isIOS9OrGreater]) { | |
return UIFontTextStyleTitle1; | |
} else { | |
return UIFontTextStyleBody; | |
} | |
} | |
-(NSString*)TEXT_STYLE_TITLE2 |
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
// Copyright 2016 Stephen Feather | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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
/* | |
Requires Underscore | |
Basic Usage: | |
var Timing = require('Timing'); | |
Timing.start('myLabel'); | |
Timing.stop('myLabel'); | |
Timing.getTime('myLabel'); |