- Configurar chave SSH
- Criar Droplet
- Realizar update e upgrade
- Crua usuário
adduser deploy
eusermod -aG sudo deploy
- Cria pasta
.ssh
prodeploy
cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keys
chown -R deploy:deploy .ssh/
chmod 700 .ssh
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
const { resolve } = require('path'); | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
jest: true, | |
}, | |
globals: { | |
Atomics: 'readonly', |
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 React, { useState, useRef } from 'react'; | |
import { | |
TouchableWithoutFeedback, | |
KeyboardAvoidingView, | |
Keyboard, | |
Platform, | |
ActivityIndicator, | |
Alert, | |
} from 'react-native'; |
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
server { | |
server_name testdeploy.rocketseat.com.br; | |
location / { | |
proxy_pass http://127.0.0.1:3333; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
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 React, { useState, useRef } from 'react'; | |
import { | |
TouchableWithoutFeedback, | |
KeyboardAvoidingView, | |
Keyboard, | |
Platform, | |
ActivityIndicator, | |
} from 'react-native'; | |
import { useSelector, useDispatch } from 'react-redux'; |
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
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
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 { useField } from '@rocketseat/unform'; | |
import isFunction from 'lodash/isFunction'; | |
import PropTypes from 'prop-types'; | |
import React, { useEffect, useRef, useMemo } from 'react'; | |
import InputMask from 'react-input-mask'; | |
function Input({ name, label, prepend, append, mask, ...rest }) { | |
const ref = useRef(null); | |
const { fieldName, registerField, defaultValue, error } = useField(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
" Must come first because it changes other options | |
set nocompatible | |
" [vim-plug] Load plugins | |
call plug#begin() | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
Plug 'junegunn/vim-easy-align' | |
Plug 'pangloss/vim-javascript' | |
Plug 'mxw/vim-jsx' | |
Plug 'tpope/vim-bundler' |
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
{ | |
"above": "The {{field}} should be above {{argument.0}}.", | |
"accepted": "The {{field}} should have been accepted", | |
"after": "The {{field}} should be a date after {{argument.0}}", | |
"after_offset_of": "The {{field}} should be after {{argument.0}} {{argument.1}} from today’s date", | |
"alpha": "The {{field}} should contain letters only", | |
"alpha_numeric": "The {{field}} should contain letters and numbers only", | |
"array": "The {{field}} should be an ARRAY.", | |
"before": "The {{field}} should be a date before {{argument.0}}.", | |
"before_offset_of": "The {{field}} should be before {{argument.0}} {{argument.1}} from today’s date", |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |