The following instructions should work with React Native v0.32:
-
Install mobx libraries.
npm install mobx --save npm install mobx-react --save
gitr() { | |
local branch=`git branch | sed -n '/\* /s///p'` | |
local stashed=`git stash` | |
git fetch | |
git reset --hard origin/"$branch" | |
if [[ "$stashed" != "No local changes to save" ]]; then | |
git stash pop | |
fi | |
} |
import React, { Component, StyleSheet, View } from 'react-native'; | |
import Text from '../components/Text'; | |
import Icon from '../components/Icon'; | |
import Button from '../components/Button'; | |
import AdMobBanner from '../components/AdMobBanner'; | |
import Analytics from 'react-native-google-analytics-bridge'; | |
import { openUrl, wikiUrl, mapsUrl } from '../utils/urls'; | |
import { connect } from 'react-redux'; | |
import { nextLevel, getRegion } from '../actions'; | |
import { PRIMARY_DARKER } from '../utils/colors'; |
function sumf(n) { | |
let sum = 0; | |
for (let i = n; i > 0; i--) { | |
sum += i * (n - i + 1); | |
} | |
return sum; | |
} |
# Motion commands | |
h - move left | |
j - move down | |
k - move up | |
l - move right | |
w - move to next word | |
b - move to beginning of word | |
e - move to end of word |
{ | |
"parser": "babel-eslint", | |
"rules": { | |
// best practices | |
"curly": [2, "multi-line"], | |
"dot-notation": 2, | |
"dot-location": [2, "property"], | |
"eqeqeq": [2, "allow-null"], | |
"guard-for-in": 2, | |
"no-caller": 2, |
function add(...n) { | |
let t = n.reduce((a, b) => a + b); | |
let a = add.bind(0, t); | |
a.valueOf = () => t; | |
return a; | |
} |
{ | |
"name": "SampleWebpack", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"webpack": "./node_modules/.bin/webpack", | |
"bundle": "npm run webpack -- -p", | |
"start": "npm run webpack -- -d --watch" | |
}, |
export PS1="\[\e[1;34m\]\u@\h\[\e[0m\]:\[\e[1;36m\]\W\[\e[0m\]$ " | |
alias ll="ls -ahlFG" | |
alias rmd="rm -rf" | |
alias fsize="stat -f%z" | |
alias finder="open -a Finder ./" | |
mcd() { mkdir "$1" && cd "$1"; } | |
gitr() { |