Skip to content

Instantly share code, notes, and snippets.

View hugoalmeidahh's full-sized avatar
👨‍💻

Hugo Almeida hugoalmeidahh

👨‍💻
View GitHub Profile
@hugoalmeidahh
hugoalmeidahh / workflow-gh-actions.yaml
Created December 27, 2023 13:50
exemplo básico de como configurar automatização de PR no workflow do GitHub Actions:
name: Automatizar PR da Develop para Main
on:
push:
branches:
- develop
jobs:
create-pr:
runs-on: ubuntu-latest
@hugoalmeidahh
hugoalmeidahh / bcrypt.js
Created December 16, 2023 01:00
bcrypt example
import * as bcrypt from 'bcrypt';
// Gerar um salt
const saltRounds = 10;
const salt = bcrypt.genSaltSync(saltRounds);
// Hash da senha
const password = 'minhaSenha';
const hash = bcrypt.hashSync(password, salt);
#colors
NORMAL='\033[0m'
RED='\033[00;31m'
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
BLUE='\033[00;34m'
PURPLE='\033[00;35m'
CYAN='\033[00;36m'
LIGHTGRAY='\033[00;37m'
LRED='\033[01;31m'
@hugoalmeidahh
hugoalmeidahh / settings.json
Created July 6, 2022 06:30
My VSCode Settings
{
"workbench.colorTheme": "Dracula Soft",
"workbench.iconTheme": "vscode-icons",
"workbench.startupEditor": "newUntitledFile",
"files.autoSave": "onFocusChange",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 18,
@hugoalmeidahh
hugoalmeidahh / emoticons.md
Created July 6, 2022 06:19
Icons Markdown

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hugoalmeidahh
hugoalmeidahh / Chrome.md
Created June 23, 2021 03:43 — forked from diego3g/Chrome.md
Ambiente DEV

Extensões

  • React Developer Tools
  • Dracula DevTools Theme
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);
version: '3'
services:
postgres:
image: postgres
environment:
- POSTGRES_USER: ${DB_USERNAME}
- POSTGRES_PASSWORD: ${DB_PASSWORD}
app:
build: .
var listElement = document.querySelector("#app ul");
var inputElement = document.querySelector("#app input");
var btnElement = document.querySelector("#app button");
var toDos = JSON.parse(localStorage.getItem("list_todos")) || [];
function renderTodos() {
listElement.innerHTML = "";
for (todo of toDos) {
import axios from 'axios';
import store from '~/store';
const api = axios.create({
baseURL: 'http://localhost:3333',
});
api.interceptors.request.use((config) => {
const { token } = store.getState().auth; // Aqui poderia ser localStoraget.getItem