Skip to content

Instantly share code, notes, and snippets.

View ronal2do's full-sized avatar

Ronaldo Lima ronal2do

View GitHub Profile
@ronal2do
ronal2do / findauthors.sh
Created November 7, 2016 12:45 — forked from stefanfoulis/findauthors.sh
How to sync svn to git
#!/usr/bin/env bash
# Run this script inside a SVN checkout of the project
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = NAME <USER@DOMAIN>";
@ronal2do
ronal2do / Appfile
Created March 15, 2017 14:44 — forked from mmazzarolo/Appfile
Simple Fastlane setup for React-Native (Android - iOS)
# iOS
app_identifier "com.myapp.app" # The bundle identifier of your app
apple_id "me@gmail.com" # Your Apple email address
team_id "1234ABCD" # Developer Portal Team ID
# Android
json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one
package_name "com.myapp.app" # Your Android app package
@ronal2do
ronal2do / learning.md
Last active May 4, 2017 01:15 — forked from sibelius/learning.md
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

@ronal2do
ronal2do / NetInfo.js
Created August 20, 2017 20:13 — forked from sibelius/NetInfo.js
Tiny component that shows an alert bar when there is no internet connection
import React, { Component } from 'react';
import {
View,
Text,
TouchableHighlight,
NetInfo,
} from 'react-native';
export default class ConnectionInfo extends Component {
state = {
@ronal2do
ronal2do / CircleAnimation.js
Created October 11, 2017 03:55 — forked from mmazzarolo/CircleAnimation.js
Super simple circle animation overlay for React-Native
/* @flow */
import React, { Component } from 'react'
import { View } from 'react-native-animatable'
import metrics from 'src/config/metrics'
type Props = {
isVisible: boolean,
backgroundColor: string,
animationTiming?: boolean
}
import paramsToProps from 'paramsToProps.js'
const MainNavigator = StackNavigator({
firstScreen: { screen: paramsToProps(FirstScreenComponent) },
secondScreen: { screen: paramsToProps(SecondScreenComponent) },
});
import paramsToProps from 'paramsToProps.js'
const MainNavigator = StackNavigator({
firstScreen: { screen: paramsToProps(FirstScreenComponent) },
secondScreen: { screen: paramsToProps(SecondScreenComponent) },
});
@ronal2do
ronal2do / MongoDB_macOS_Sierra.md
Created August 22, 2018 19:58 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ronal2do
ronal2do / react-native-double-tap.js
Created September 5, 2018 18:45 — forked from brunotavares/react-native-double-tap.js
Double tap gesture recognition for React Native.
const DOUBLE_PRESS_DELAY = 300;
// ...
/**
* Double Press recognition
* @param {Event} e
*/
handleImagePress(e) {
const now = new Date().getTime();
@ronal2do
ronal2do / resolvePromise.js
Created September 9, 2018 08:23 — forked from mjackson/resolvePromise.js
An easy way to do async APIs in JavaScript that support both promises *and* callbacks!
// Here is a function that I use all the time when creating public
// async APIs in JavaScript:
const resolvePromise = (promise, callback) => {
if (callback)
promise.then(value => callback(null, value), callback)
return promise
}
// Sometimes I like to use callbacks, but other times a promise is