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
import 'zone.js/dist/zone-node'; | |
import 'reflect-metadata'; | |
import { enableProdMode } from '@angular/core'; | |
import { ngExpressEngine } from '@nguniversal/express-engine'; | |
import * as express from 'express'; | |
import { join } from 'path'; | |
import { readFileSync } from 'fs'; | |
const domino = require('domino'); | |
// Faster server renders w/ Prod mode (dev mode never needed) | |
enableProdMode(); |
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 2004-present Facebook. All Rights Reserved. | |
* | |
* @providesModule KeyboardAvoidingScrollView | |
* @flow | |
* @format | |
*/ | |
'use strict'; |
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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ionic App</title> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta name="msapplication-tap-highlight" content="no"> |
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 React = require('react-native'); | |
var { | |
Text, | |
View, | |
StyleSheet | |
} = React; | |
var styles = StyleSheet.create({ | |
photo: { |
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.image = function(url, callback, directory) { | |
if (directory === undefined) { | |
var directory = 'cachedImages'; | |
} | |
var filename = Ti.Utils.md5HexDigest(url); | |
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, directory, filename); | |
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 init() { | |
Titanium.App.addEventListener('keyboardframechanged', $.typingArea.animateKeyboard); | |
} | |
function scrollToBottom() { | |
$.listView.scrollToItem(0, $.section.items.length - 1, { | |
animated : true | |
}); | |
} |
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:'#eeeeee' | |
}); | |
var isAndroid = Ti.Platform.osname == "android"; | |
var starSelectedImage = '/images/ic_star_black.png'; | |
var starOriginalImage = '/images/ic_star_border_black.png'; | |
//icons from Google Material Design (search for the "star" icon): https://design.google.com/icons/ | |
var starWidth = 28; | |
var coverView = Ti.UI.createView(); |
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
/* | |
Define our various sizes. | |
*/ | |
var AndroidSizes = { | |
'android/images/res-ldpi/splash.9.png': 240, | |
'android/images/res-mdpi/splash.9.png': 360, | |
'android/images/res-hdpi/splash.9.png': 480, | |
'android/images/res-xhdpi/splash.9.png': 720, | |
'android/images/res-xxhdpi/splash.9.png': 960, | |
'android/images/res-xxxhdpi/splash.9.png': 1440 |
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 trick is to copy the DeviceSupport folder from the beta to the stable version. | |
cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5261u\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ | |
// Then restart Xcode. You might need to do that for every beta of iOS 10/Xcode 8. |
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
// just a quick n dirty test. See result: http://monosnap.com/file/wT6dJZ4zOrHzjiXi1mhfnIocEZiAWW | |
var headerView = Ti.UI.createView({ | |
backgroundColor:'#fff', | |
height:80, | |
layout:'horizontal' | |
}); | |
headerView.add(Ti.UI.createButton({title:'$100',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'})); | |
headerView.add(Ti.UI.createButton({title:'$500',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'})); |
NewerOlder