Skip to content

Instantly share code, notes, and snippets.

View lucianomlima's full-sized avatar
👨‍💻

Luciano Lima lucianomlima

👨‍💻
View GitHub Profile
@lucianomlima
lucianomlima / Root.js
Created December 16, 2019 21:47
RN react-navigation persistence route filter
import { getPersistenceProps } from './persistence';
const routes = {
home: 'Home',
login: 'Login',
signup: 'SingUp',
};
const allowedPersistentRoutes = [
routes.home,
@lucianomlima
lucianomlima / elevations.ts
Created November 20, 2019 06:12 — forked from mmazzarolo/elevations.ts
React-Native cross platform elevation definitions
/**
* 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:
@lucianomlima
lucianomlima / Podfile
Created September 25, 2019 04:15
React Native 0.59.10 Podfile
# 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',
@lucianomlima
lucianomlima / Podfile
Created September 24, 2019 18:04 — forked from sjchmiela/Podfile
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',
@lucianomlima
lucianomlima / user-signup.js
Created June 28, 2019 06:00
Save user custom data after signup with firebase
// 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,
@lucianomlima
lucianomlima / adb_connect.sh
Created June 5, 2019 17:57
Connect to Android devices with ADB through wi-fi
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
@lucianomlima
lucianomlima / .zshrc
Created December 6, 2018 20:23
ZShell Config
# 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"
@lucianomlima
lucianomlima / index.js
Created September 25, 2018 22:29 — forked from AlexBrasileiro/index.js
ShareYourFeedback
// 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} />
@lucianomlima
lucianomlima / git.alias.sh
Last active February 29, 2020 14:24
Usefull git alias
# 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
@lucianomlima
lucianomlima / keymap.cson
Created April 12, 2018 20:31
Keymaps for Atom editor
'.editor:not(.mini)':
'ctrl-y': 'nuclide-metro:start'
'ctrl-u': 'nuclide-metro:stop'
'ctrl-i': 'nuclide-metro:restart'
'ctrl-o': 'nuclide-metro:reload-app'