This file contains hidden or 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
# Create user and credentials | |
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password'; | |
# Hability privilegies user | |
GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost'; | |
# Reload privilegies | |
FLUSH PRIVILEGES; | |
# Login new user terminal |
This file contains hidden or 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
curl -fsSL get.docker.com -o get-docker.sh | |
bash get-docker.sh | |
sudo usermod -aG docker YOUR_USER_NAME | |
docker --version |
This file contains hidden or 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
# Command create project | |
sudo docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle my_awesome_app | |
# Create Dockerfile in project | |
FROM ruby:2.5.3 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
RUN apt-get update && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/* |
This file contains hidden or 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
## Guide docker compose install | |
https://docs.docker.com/compose/install/ | |
## Command initial | |
docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle my_app --database=postgresql | |
## Create Dockerfile | |
FROM ruby:2.5.3 | |
# Instala as nossas dependencias | |
RUN apt-get update && apt-get install -qq -y --no-install-recommends \ |
This file contains hidden or 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
default: &default | |
adapter: mysql2 | |
encoding: utf8 | |
pool: 5 | |
socket: /tmp/mysql.sock | |
development: | |
<<: *default | |
database: db_dev | |
username: root |
This file contains hidden or 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
pt-BR: | |
devise: | |
failure: | |
not_approved: 'O seu cadastro está em análise pelo Desenvolvimento da Casa Civil, caso tenha alguma dúvida, entrar em contato pelo chat :)' | |
bi: 'Nenhum módulo liberado para o seu usuário, qualquer dúvida entre em contato pelo nosso CHAT :)' | |
unauthenticated: 'Para continuar, faça login ou registre-se. Dúvidas? use o nosso chat :)' | |
unconfirmed: 'Antes de continuar, confirme a sua conta.' | |
locked: 'A sua conta está bloqueada.' | |
invalid: 'E-mail ou senha inválidos.' | |
invalid_token: 'O token de autenticação não é válido.' |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/noronha/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains hidden or 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
kill -9 $(lsof -i tcp:3000 -t) |
This file contains hidden or 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
Setting up a new Git Repo | |
======================== | |
##Create a new repository on the command line | |
touch README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin git@github.com:alexpchin/<reponame>.git |
This file contains hidden or 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
# Rails 6 | |
# execute command webpack jquery | |
yarn add jquery | |
# application.js | |
require("jquery") | |
# environment.js | |
const webpack = require('webpack') | |
environment.plugins.prepend('Provide', |
OlderNewer