Instantly share code, notes, and snippets.

View Button.js
import React from 'react';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
const Button = (props) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity style={buttonStyle} onPress={props.onPress}>
<Text style={textStyle}>
View countdown-redirect.html
<!-- Modify this according to your requirement -->
Redirecting to after <span id="countdown">10</span> seconds
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.


  • Sublime text 2 or 3 installed in your system within Applications folder


View HTML5 Skeleton template.html
<!DOCTYPE html>
<meta charset="utf-8">
<!--[if lt IE 9]>
<script src=""></script>