Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<?php | |
/* A quick emulator for common curl function so code based on CURL works on AppEngine */ | |
if(!function_exists('curl_init')) | |
{ | |
// The curl option constants, when there is no curl they are not defined so we define them here | |
// Some options don't do anything, they just prefent crashes when they are here (see the setOpt method for the support of different options) | |
define('CURLOPT_RETURNTRANSFER', 'CURLOPT_RETURNTRANSFER'); | |
define('CURLOPT_SSL_VERIFYPEER', 'CURLOPT_SSL_VERIFYPEER'); |
{ | |
"current_page": 1, | |
"total_pages": 1, | |
"total_count": 3, | |
"per_page": 20000, | |
"forms": [ | |
{ | |
"name": "Building Survey", | |
"description": "updated", | |
"bounding_box": [ |
/* | |
Loop through an HTTP response object and only add new Alloy Models if needed. | |
Assumes `eventId` is the primary key defined in Events.js Model file. | |
Caution: this snippet is untested | |
*/ | |
var events = Alloy.createCollection('Events'); |
<!-- note the ONLY change to this is the additional module="tabIndicator" | |
attribute + properties to override indicator defaults //--> | |
<Alloy> | |
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%"> | |
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff"> | |
<Window title="Tab 1" barColor="black" navTextColor = "#fff"> | |
<Label onClick="openWin1">Tab 1</Label> | |
</Window> | |
</Tab> | |
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff"> |
"Window[platform=ios]": { | |
// Tell the windowManager this window is part of the NavGroup by default | |
navGroup: true, | |
backButtonTitle: '', // No back button title by default | |
statusBarStyle: Ti.UI.iPhone.StatusBar.LIGHT_CONTENT, | |
barColor: 'transparent', | |
translucent: true, | |
navTintColor: '#fff', | |
backgroundColor: '#ffffff99', // rgba for transparency | |
extendEdges: [ |
module.exports = function(_args) { | |
/* | |
This is a simple WebView running as a websocket client. Here are notes: | |
- To test, run a local socket server (ie, socket.io). Socket.io example chat app: http://socket.io/get-started/chat/ | |
- Pass the websocket URL into io.connect() method | |
- Event callbacks are registered on Ti.App.. app should fire 'app:ws:connected'. Observe console.log: "Websocket is connected" | |
- For securty purposes, use inline HTML (string below) to compile into bytecode, rather than filesystem / HTML resources. |
// next two from http://stackoverflow.com/a/5624139/292947 | |
function componentToHex(c) { | |
var hex = c.toString(16); | |
return hex.length == 1 ? "0" + hex : hex; | |
} | |
function rgbToHex(r, g, b) { | |
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); | |
} |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Drag this link to your bookmarks bar: [HN Highlight](javascript:void%20function(){function%20e(e,t,a){var%20n=%22.%22+e+'{%20padding-left:%2030px;background-image:%20url(%22http://www.fasttrackcalltaxi.co.in/ft_clickyourtaxi/App_Images/new_icon.gif%22);%20background-repeat:%20no-repeat;%20}',c=document.head||document.getElementsByTagName(%22head%22)[0],d=document.createElement(%22style%22);d.type=%22text/css%22,d.styleSheet%3Fd.styleSheet.cssText=n:d.appendChild(document.createTextNode(n)),c.appendChild(d);var%20o=[%22second%22,%22seconds%22,%22minute%22,%22minutes%22,%22hour%22,%22hours%22,%22day%22,%22days%22];o=o.slice(0,o.indexOf(a)+1);for(var%20r=document.querySelectorAll('a[href*=%22item%3Fid%22]'),i=0;i%3Cr.length;i++){var%20s=r.item(i);try{var%20l=parseInt(s.innerHTML.match(/^\d+/)),u=s.innerHTML.match(/^\d+%20(.+%3F)%20ago$/)[1]}catch(m){continue}-1!==o.indexOf(u)%26%26(a===u%26%26l%3Et||(s.parentNode
// backbone collections lack a search functionality. This adds it to all collections. | |
// fuse.js is the library that powers the fuzzy search and requires being downloaded and included into your app | |
// http://kiro.me/projects/fuse.html | |
_.extend(Backbone.Collection.prototype, { | |
searchableFields: null, | |
buildSearchIndex: function(options) { | |
options = (typeof options !== 'undefined') ? options : {}; |