- Configurar chave SSH
- Criar Droplet
- Realizar update e upgrade
- Crua usuário
adduser deployeusermod -aG sudo deploy - Cria pasta
.sshprodeploy cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keyschown -R deploy:deploy .ssh/chmod 700 .ssh
This file contains hidden or 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, { | |
| createContext, | |
| useState, | |
| useCallback, | |
| useContext, | |
| useEffect, | |
| } from 'react'; | |
| import AsyncStorage, { | |
| useAsyncStorage, |
This file contains hidden or 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
| # 50-character subject line | |
| # | |
| # 72-character wrapped longer description. This should answer: | |
| # | |
| # * Why was this change necessary? | |
| # * How does it address the problem? | |
| # * Are there any side effects? | |
| # |
This file contains hidden or 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', |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); |