Skip to content

Instantly share code, notes, and snippets.

View diegomais's full-sized avatar
💭
The only way to go fast, is to go well.

Diego Mais diegomais

💭
The only way to go fast, is to go well.
View GitHub Profile
@diegomais
diegomais / settings.json
Created March 23, 2020 00:44
Visual Studio Code Preferences
{
"breadcrumbs.enabled": true,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.formatOnSave": true,
"editor.parameterHints.enabled": true,
"editor.renderLineHighlight": "gutter",
"editor.rulers": [80,120],
"editor.tabSize": 2,
@diegomais
diegomais / en-validation.json
Last active May 17, 2020 21:26
Adonis custom validation messages
{
"above": "The {{field}} should be above {{argument.0}}.",
"accepted": "The {{field}} should have been accepted",
"after": "The {{field}} should be a date after {{argument.0}}",
"after_offset_of":
"The {{field}} should be after {{argument.0}} {{argument.1}} from today’s date",
"alpha": "The {{field}} should contain letters only",
"alpha_numeric": "The {{field}} should contain letters and numbers only",
"array": "The {{field}} should be an ARRAY.",
"before": "The {{field}} should be a date before {{argument.0}}.",
@diegomais
diegomais / pt-validation.json
Created May 17, 2020 21:27
Adonis custom validation messages
{
"above": "{{field}} deve ser acima de {{argument.0}}.",
"accepted": "{{field}} deve ter sido aceito",
"after": "{{field}} deve ser uma data após {{argument.0}}",
"after_offset_of": "{{field}} deve ser mais recente que {{argument.0}} {{argument.1}} a partir da data atual",
"alpha": "{{field}} deve conter apenas letras",
"alpha_numeric": "{{field}} deve conter apenas letras e números",
"array": "{{field}} deve ser um ARRAY.",
"before": "{{field}} deve ser uma data anterior a {{argument.0}}.",
"before_offset_of": "{{field}} deve ser aterior a {{argument.0}} {{argument.1}} a partir da data de hoje",

Commit lint configuration :emoji:

Instale as seguintes dependências:

yarn add -D husky @commitlint/{config-conventional,cli}

Feito isso, adicione ao package.json o seguinte comando:

"husky": {

AdonisJS

Instalando CLI do Adonis

Cole no terminal o seguinte comando para instalar a interface de linha de comando do Adonis:

npm install -g @adonisjs/cli

Criar um novo projeto

version: 2.1
orbs:
node: circleci/node@1.1.6
jobs:
build-and-test:
executor:
name: node/default
steps:
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to NVM
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# Path to your oh-my-zsh installation.
export ZSH="/Users/diego/.oh-my-zsh"
[
{ value: 'AC', label: 'Acre' },
{ value: 'AL', label: 'Alagoas' },
{ value: 'AP', label: 'Amapá' },
{ value: 'AM', label: 'Amazonas' },
{ value: 'BA', label: 'Bahia' },
{ value: 'CE', label: 'Ceará' },
{ value: 'DF', label: 'Distrito Federal' },
{ value: 'ES', label: 'Espírito Santo' },
{ value: 'GO', label: 'Goiás' },
@diegomais
diegomais / gitmoji-list.md
Created August 1, 2020 19:54
An emoji guide for commit messages. 😜
emoji code description
🎨 :art: Improve structure / format of the code.
⚡️ :zap: Improve performance.
🔥 :fire: Remove code or files.
🐛 :bug: Fix a bug.
🚑 :ambulance: Critical hotfix.
:sparkles: Introduce new features.
📝 :pencil: Write docs.
🚀 :rocket: Deploy stuff.
@diegomais
diegomais / prettier.config.js
Created August 28, 2020 18:20
Prettier with Standard Style Guide
module.exports = {
semi: false,
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'none',
endOfLine: 'auto'
};