- 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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { compose } from 'recompose'; | |
import monthNames from '~/util/monthNames'; | |
import 'isomorphic-fetch'; | |
import withLayout from '~/hocs/withLayout'; | |
import withAnalytics from '~/hocs/withAnalytics'; | |
import { Content } from '~/styles/components'; |
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
async approved (data, product, response) { | |
let user = | |
(await User.findBy('email', data.email)) || | |
(await User.findBy('doc', data.doc)) | |
if (!user) { | |
user = await User.create({ | |
email: data.email, | |
doc: data.doc, | |
name: `${data.first_name} ${data.last_name}`.trim() |
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
'use strict' | |
const Database = use('Database') | |
const Model = use('Model') | |
const Env = use('Env') | |
class Course extends Model { | |
static get computed () { | |
return ['thumbnailUrl'] | |
} |
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 from 'react'; | |
import { compose, withState, withHandlers } from 'recompose'; | |
const Dropdown = ({ opened, toggleDropdown }) => ( | |
<div> | |
<button type="button" onClick={toggleDropdown}> | |
Abrir/fechar | |
</button> | |
<ul className={`dropdown ${opened ? 'dropdown-open' : ''}`}> | |
<li>ReactJS</li> |
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
function asyncFunction(params, callback, err) { | |
var response = // requisição assíncrona | |
if (response.status === true) { | |
callback(response.data); | |
} else { | |
err(response.data); | |
} | |
} | |
asyncFunction( |
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, { | |
createContext, | |
useState, | |
useCallback, | |
useContext, | |
useEffect, | |
} from 'react'; | |
import AsyncStorage, { | |
useAsyncStorage, |
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
.DayPicker { | |
background: #28262e; | |
border-radius: 10px; | |
} | |
.DayPicker-wrapper { | |
padding-bottom: 0; | |
} | |
.DayPicker, |
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
name: CI | |
on: | |
push: | |
branches: [master] | |
env: | |
BUCKET: reactdeploy.getomni.dev | |
jobs: |