Skip to content

Instantly share code, notes, and snippets.

View csorlandi's full-sized avatar
🎯
Focusing

Claudio Orlandi csorlandi

🎯
Focusing
View GitHub Profile
@csorlandi
csorlandi / README-Template.md
Created November 27, 2017 12:21 — forked from PurpleBooth/README-Template.md
A template to make good README.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

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 February 13, 2018 21:11
Lista de Snippets para React Native para se adicionar no VS Code
{
"apisauce": {
"prefix": "api",
"body": [
"import { create } from 'apisauce';",
"",
"const api = create({",
" baseURL: '${1:http://localhost:3000}',",
" headers: {",
" Accept: 'application/vnd.github.v3+json',",
// Usando Yarn
yarn add react-native-camera
// Usando NPM
// npm install react-native-camera
<?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>
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
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'
}
}
...
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
...
import React, { Component } from 'react';
import { View } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
</View>
);
}
<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'}
/>