Skip to content

Instantly share code, notes, and snippets.

View diegoaraujo85's full-sized avatar
🍻
</>

Diego Oliveira de Araujo diegoaraujo85

🍻
</>
View GitHub Profile
@diegoaraujo85
diegoaraujo85 / docker-compose.yml
Created October 4, 2025 15:39
MySQL docker compose, to install and create a MySQL server using docker
services:
mysql:
image: mysql:8.0
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: minha_base
MYSQL_USER: usuario
MYSQL_PASSWORD: senha
@diegoaraujo85
diegoaraujo85 / minimal.code-profile
Created March 5, 2024 03:00
minimal profile for vscode
{"name":"minimal","settings":"{\"settings\":\"{\\n \\\"workbench.startupEditor\\\": \\\"newUntitledFile\\\",\\n \\\"editor.fontSize\\\": 14,\\n \\\"editor.lineHeight\\\": 1.8,\\n \\\"javascript.suggest.autoImports\\\": true,\\n \\\"javascript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\n \\\"editor.rulers\\\": [80, 120],\\n \\\"extensions.ignoreRecommendations\\\": true,\\n \\\"typescript.tsserver.log\\\": \\\"off\\\",\\n \\\"files.associations\\\": {\\n \\\".env.*\\\": \\\"dotenv\\\",\\n \\\".prettierrc\\\": \\\"json\\\",\\n \\\"*.css\\\": \\\"css\\\"\\n },\\n \\\"symbols.files.associations\\\": {\\n \\\"*.module.ts\\\": \\\"nest\\\",\\n \\\"*.guard.ts\\\": \\\"typescript\\\",\\n \\\"*.spec.ts\\\": \\\"ts-test\\\",\\n \\\"*.e2e-spec.ts\\\": \\\"ts-test\\\",\\n \\\"vitest.config.e2e.ts\\\": \\\"vite\\\",\\n \\\".env.example\\\": \\\"gear\\\"\\n },\\n \\\"tailwindCSS.experimental.classRegex\\\": [\\n [\\\"tv\\\\\
@diegoaraujo85
diegoaraujo85 / .p10k.zsh
Created February 18, 2023 20:11
powerlevel theme config
# Generated by Powerlevel10k configuration wizard on 2022-10-04 at 21:41 -03.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 21094.
# Wizard options: powerline, rainbow, unicode, 24h time, angled separators, sharp heads,
# flat tails, 2 lines, dotted, full frame, dark-ornaments, sparse, fluent,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
@diegoaraujo85
diegoaraujo85 / .zshrc
Last active February 18, 2023 20:01
ZSH settings
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@diegoaraujo85
diegoaraujo85 / api.ts
Last active April 16, 2022 18:38
Fila de requisições no Axios
import axios, {AxiosError} from 'axios';
import {destroyCookie, parseCookies, setCookie} from 'nookies';
import { signOut } from '../contexts/AuthContext';
let cookies = parseCookies();
let isRefreshing = false;
let failedRequestsQueue = [];
export const api = axios.create({
baseURL: 'http://localhost:3333',
@diegoaraujo85
diegoaraujo85 / SignIn.tsx
Created May 14, 2021 13:20
Unmount Component Error
import React, { useCallback, useRef, useState } from 'react';
import { FiLock, FiUser } from 'react-icons/fi';
import { useHistory } from 'react-router-dom';
interface SignInFormData {
doc: string;
password: string;
}
const SignIn: React.FC = () => {
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "c:\users\diego\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\diego\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Diego\AppData\Local\Programs\Python\Python37\Scripts\streamlit.exe\__main__.py", line 4, in <module>
@diegoaraujo85
diegoaraujo85 / index.tsx
Created September 22, 2020 14:54
Select Component
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { IconBaseProps } from 'react-icons';
import { FiAlertCircle } from 'react-icons/fi';
import ReactSelect, {
OptionTypeBase,
Props as SelectProps
} from 'react-select';
import { useField } from '@unform/core';
@diegoaraujo85
diegoaraujo85 / Controle de usuários
Last active August 28, 2020 19:10
Controle de usuários
Controle de usuários