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 { getPersistenceProps } from './persistence'; | |
const routes = { | |
home: 'Home', | |
login: 'Login', | |
signup: 'SingUp', | |
}; | |
const allowedPersistentRoutes = [ | |
routes.home, |
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
/** | |
* React-Native cross-platform elevations. | |
* Based on https://ethercreative.github.io/react-native-shadow-generator/ | |
* | |
* Usage: | |
* 1. Import "elevations" from this file | |
* import { elevations } from "config/elevations"; | |
* 2. Use it. Assuming you need an elevation of 2 (based on the Android | |
* elevation standard), doing the following will cast the same shadow | |
* on both platforms: |
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
# Uncomment the next line to define a global platform for your project | |
platform :ios, '9.0' | |
target 'Example' do | |
# Comment the next line if you don't want to use dynamic frameworks | |
# use_frameworks! | |
pod 'React', :path => '../node_modules/react-native', :subspecs => [ | |
'Core', | |
'CxxBridge', |
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
platform :ios, '10.0' | |
require_relative '../node_modules/react-native-unimodules/cocoapods.rb' | |
# don't just copy and paste this, notice that the target names should align with what is already in your Podfile | |
target 'YourAppNameHere' do | |
pod 'React', :path => '../node_modules/react-native', :subspecs => [ | |
'Core', | |
'CxxBridge', | |
'DevSupport', |
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
// Users collection | |
const usersRef = firebase.firestore().collection('users'); | |
// User signup with email and password | |
firebase.auth().createUserWithEmailAndPassword(email, password) | |
.then(async (credential) => { | |
const user = { | |
uid: credential.uid, | |
// Custom data | |
name, |
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 adb_connect { | |
# PORT used to connect. Default: 5555 | |
PORT=${1:-5555} | |
# IP address from current device connected | |
IP_ADDRESS=`adb shell ip route | awk '{print $9}'` | |
echo "ADB connect to $IP_ADDRESS on port $PORT" | |
# Change connection from usb to tcpip using $PORT |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="bullet-train" |
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
// inspiration: https://dribbble.com/shots/4370657-Share-Your-Feedback | |
import React, { Component, Fragment } from "react"; | |
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native"; | |
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; | |
const { width: windowWidth } = Dimensions.get('window'); | |
const Icon = (props) => <FontAwesome5 {...props} /> |
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
# Delete branch | |
# Usage: git delete branch-name | |
git config --global alias.delete 'branch -D' | |
# Update branch with prune refs | |
# Usage: git update master | |
git config --global alias.update '!git fetch origin -p && git merge $(git rev-parse --abbrev-ref @{u})' | |
# Last commit details | |
# Usage: git last |
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
'.editor:not(.mini)': | |
'ctrl-y': 'nuclide-metro:start' | |
'ctrl-u': 'nuclide-metro:stop' | |
'ctrl-i': 'nuclide-metro:restart' | |
'ctrl-o': 'nuclide-metro:reload-app' |
NewerOlder