Skip to content

Instantly share code, notes, and snippets.

View nuno's full-sized avatar

Nuno Costa nuno

View GitHub Profile
@nuno
nuno / gist:48254
Created January 17, 2009 03:53
index action
We couldn’t find that file to show.
@nuno
nuno / alloy.js
Created September 9, 2013 15:58 — forked from FokkeZB/alloy.js
// For iOS7 only, set the window's top to 20 so they start under the status bar.
Alloy.Globals.windowTop = (OS_IOS && parseInt(Ti.Platform.version[0], 10) >= 7) ? 20 : 0;
// Optionally set the backgroundColor or backgroundImage to show behind the statusbar.
// Please note that the backgroundImage will cover the full screen, but only top 20px is visible.
// Ti.UI.backgroundColor = '#555';
// Ti.UI.backgroundImage = 'statusBar_bg.png';
@nuno
nuno / alloy.js
Last active December 23, 2015 01:39 — forked from FokkeZB/alloy.js
UIStatusBarStyleLightContent
// For iOS7 only, set the window's top to 20 so they start under the status bar.
Alloy.Globals.windowTop = (OS_IOS && parseInt(Ti.Platform.version[0], 10) >= 7) ? 20 : 0;
@nuno
nuno / app.js
Created September 15, 2013 17:05 — forked from skypanther/app.js
var Utils = {
/* modified version of https://gist.github.com/1243697
* adds detection of file extension rather than hard-coding .jpg as in the original
*/
_getExtension: function(fn) {
// from http://stackoverflow.com/a/680982/292947
var re = /(?:\.([^.]+))?$/;
var tmpext = re.exec(fn)[1];
return (tmpext) ? tmpext : '';
},
@nuno
nuno / config.json
Last active December 23, 2015 03:48
config.json
"sourcemap": false,
"adapters": []
@nuno
nuno / win2.tss
Last active December 23, 2015 03:49
iOS 7 test fonts
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000",
fontSize: 20,
textAlign: 'center'
},
"#Label0": {
font: {
@nuno
nuno / app.tss
Created September 16, 2013 19:50 — forked from FokkeZB/app.tss
The iOS7 bordered button (like found in AppStore) for iOS6
".btn": {
borderSize: 1,
borderColor: '#1881f9',
borderRadius: 3,
color: '#1881f9',
height: 26,
style: Ti.UI.iPhone.SystemButtonStyle.PLAIN,
font: {
fontSize: 15,
fontFamily: 'HelveticaNeue'
@nuno
nuno / app.tss
Created September 16, 2013 19:53 — forked from tonylukasavage/app.tss
TSS reset for Alloy/Titanium
'Label[platform=android]': {
color: '#000' // all platforms except Android default to black
}
'Window': {
backgroundColor: '#fff' // white background instead of default transparent
}
'Window[platform=android]': {
modal: false // make android windows all heavyweight
@nuno
nuno / app.tss
Last active December 23, 2015 08:29
My version of start development "app.tss" style file. AKA reset for Alloy styles.
"Window": {
backgroundColor: "#fff"
},
"Window[platform=android]":{
modal: false, // make android windows all heavyweight
backgroundColor:"#fff",
},
"Label[platform=android]": {
color: "#000" // all platforms except Android default to black
},
@nuno
nuno / examples.js
Created September 19, 2013 01:56 — forked from rborn/examples.js
/**
* Javascript example patterns
*/
/**
* Singleton Object
* Should be used for global, static objects. You should not place memory
* intensive items in here unless they are meant to be used throughout the application
* at anytime. If the item is meant to be reused or instantiated multiple times
* a singleton should not be used.