Skip to content

Instantly share code, notes, and snippets.

/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
styles = StyleSheet.create({
box: { position: 'absolute', top:0, left: 0, right:0, bottom:0},
shadow: { backgroundColor: 'black', opacity: 0.1 },
transparent: { backgroundColor: 'transparent' }
});
<View style={{flex: 1}} >
<View style={[styles.box, styles.shadow]} />
<View style={[styles.box, styles.transparent]} >
// put buttons here
@boourns
boourns / gist:5924818
Created July 4, 2013 04:00
example of iterating over shop vendors
Example of iterating over list of vendors:
<ul>
{% for product_vendor in shop.vendors %}
<li class="{{ product_vendor }}">{{ product_vendor | link_to_vendor }}</li>
{% endfor %}
</ul>
Example of converting list to JSON:
@boourns
boourns / rebase.sh
Created September 21, 2016 15:30
Rebase your branch with this 1 simple trick
# add to your .bash_profile
function rebase(){
curbranch=`git rev-parse --abbrev-ref HEAD`
git checkout master
git pull origin master
git checkout $curbranch
git rebase master
}