Skip to content

Instantly share code, notes, and snippets.

🚀
Launching a rocket

Diego Fernandes diego3g

🚀
Launching a rocket
View GitHub Profile
View calendar.css
.DayPicker {
background: #28262e;
border-radius: 10px;
}
.DayPicker-wrapper {
padding-bottom: 0;
}
.DayPicker,
View help.js
const { transactions, balance } = response.data;
const newTransactions = transactions.map(transaction => {
return {
...transaction,
formattedValue: formatValue(transaction.value),
// outros campos aqui
}
});
View auth.tsx
import React, {
createContext,
useState,
useCallback,
useContext,
useEffect,
} from 'react';
import AsyncStorage, {
useAsyncStorage,
View .gitmessage
# 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?
#
View .hyper.js
// 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',
View .eslintrc.js
const { resolve } = require('path');
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
globals: {
Atomics: 'readonly',
View index.js
import React, { useState, useRef } from 'react';
import {
TouchableWithoutFeedback,
KeyboardAvoidingView,
Keyboard,
Platform,
ActivityIndicator,
Alert,
} from 'react-native';
@diego3g
diego3g / README.md
Created Dec 3, 2019
Criação de servidor Node.js
View README.md

Configuração do servidor

  1. Configurar chave SSH
  2. Criar Droplet
  3. Realizar update e upgrade
  4. Crua usuário adduser deploy e usermod -aG sudo deploy
  5. Cria pasta .ssh pro deploy
  6. cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keys
  7. chown -R deploy:deploy .ssh/
  8. chmod 700 .ssh
View nodedeploy-server
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;
View index.js
import React, { useState, useRef } from 'react';
import {
TouchableWithoutFeedback,
KeyboardAvoidingView,
Keyboard,
Platform,
ActivityIndicator,
} from 'react-native';
import { useSelector, useDispatch } from 'react-redux';
You can’t perform that action at this time.