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
# Version: 0.0.022 | |
# Please note: This has only been tested on Sublime Text 3 Build 3065 | |
# Installation: | |
# 1. Click "Download Gist" | |
# 2. Put alloy.py in: ~/Library/Application Support/Sublime Text 3/Packages/User/ | |
# 3. Set your layout to Grid 4 - Go to view > layout > Grid: 4 | |
# 4. Add to the bliss of working with Alloy... |
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 onsuccess(data){ | |
var jdata=JSON.parse(data); | |
var data=[]; | |
jdata.forEach(function(item){ | |
var payload={ | |
tweet:item.text | |
}; | |
var row=Alloy.createController('tweet.row',payload).getView(); |
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 win = Ti.UI.createWindow({ | |
backgroundColor:'white' | |
}); | |
var v = Ti.UI.createScrollView(); | |
win.add(v); | |
var v1 = Ti.UI.createView({ | |
height:Ti.UI.SIZE, | |
backgroundColor:'red' |
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 win = Ti.UI.createWindow({ | |
backgroundColor:'white' | |
}); | |
win.open(); | |
var label = Ti.UI.createLabel({ | |
top: 20, | |
height: 200, | |
width: 200, | |
text: "Background the app" | |
}); |
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 GO = { | |
init: function(){ | |
// Delete the property data | |
Ti.API.debug('Removing properties'); | |
Ti.App.Properties.removeProperty("latitude"); | |
Ti.App.Properties.removeProperty("longitude"); | |
Ti.App.Properties.removeProperty("geoAccuracy"); | |
Ti.App.Properties.removeProperty("geoTimestamp"); | |
var propTimestamp = Ti.App.Properties.getString("geoTimestamp"); |
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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var win = Ti.UI.createWindow({ | |
title: "Window Title", | |
exitOnClose: true | |
}); | |
win.open(); | |
// CREATE MAP VIEW |
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
#!/bin/sh | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
pass=true | |
echo "\nValidating JavaScript:\n" |
NewerOlder