Skip to content

Instantly share code, notes, and snippets.

Claudio Orlandi csorlandi

Block or report user

Report or block csorlandi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@csorlandi
csorlandi / README-Template.md
Created Nov 27, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@csorlandi
csorlandi / VS Code Snippets
Created Feb 13, 2018
Lista de Snippets para React Native para se adicionar no VS Code
View VS Code Snippets
{
"apisauce": {
"prefix": "api",
"body": [
"import { create } from 'apisauce';",
"",
"const api = create({",
" baseURL: '${1:http://localhost:3000}',",
" headers: {",
" Accept: 'application/vnd.github.v3+json',",
View installing react-native-camera
// Usando Yarn
yarn add react-native-camera
// Usando NPM
// npm install react-native-camera
View info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
</dict>
View gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
View build.gradle
buildscript {
repositories {
...
google() // Linha Adicionada
}
dependencies {
// Versão modificada de 2.2.3 para 3.1.0
classpath 'com.android.tools.build:gradle:3.1.0'
}
}
View build.gradle
...
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
...
View initial-app.js
import React, { Component } from 'react';
import { View } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
</View>
);
}
View rn-camera.js
<RNCamera
ref={camera => { this.camera = camera }}
style = {styles.preview}
type={RNCamera.Constants.Type.back}
autoFocus={RNCamera.Constants.AutoFocus.on}
flashMode={RNCamera.Constants.FlashMode.off}
permissionDialogTitle={'Permission to use camera'}
permissionDialogMessage={'We need your permission to use your camera phone'}
/>
You can’t perform that action at this time.