Skip to content

Instantly share code, notes, and snippets.

View devdrops's full-sized avatar
🔥
Paz Entre Nós, Guerra Aos Senhores

Davi Marcondes Moreira devdrops

🔥
Paz Entre Nós, Guerra Aos Senhores
View GitHub Profile
@devdrops
devdrops / example.md
Last active March 25, 2024 15:09
Mysqldump from Docker container

Mysqldump from Docker container

docker exec -i mysql_container mysqldump -uroot -proot --databases database_name --skip-comments > /path/to/my/dump.sql

OBS

  • This will generate a dump.sql file in your host machine. Awesome, eh?
  • Avoid using --compact on your dump. This will make MySQL check your constraints which will cause troubles when reading your file (damm you MySQL). And don't use --force to fix this scenario: recreate your dump without --compact ¯_(ツ)_/¯
@devdrops
devdrops / tip.md
Created August 11, 2016 13:22
Restart PHP-FPM on Mac

Restart PHP-FPM on Mac

as found on StackOverflow

And this command to restart my php-fpm:

brew services restart php56
@devdrops
devdrops / text.md
Created October 9, 2020 19:11
TF Diff - Checando diferenças nos arquivos terraform

TF Diff - Checando diferenças nos arquivos terraform

Trabalha com Terraform?

Costuma reforçar o uso de terraform fmt nos Pull Requests do seu time?

Cansou de validar se os arquivos do Pull Request seguem corretamenta a sintaxe?

@devdrops
devdrops / notes.md
Created June 28, 2023 19:31
Anotações sobre Go

Go: Anotações

Diferença entre length e capacity

Length está para quantidade de elementos, enquanto que Capacity é o limite de elementos que se pode ter.

Exemplo:

// A variável 's' é um slice de valores inteiros, com 3 elementos e capacidade de 6 elementos.
@devdrops
devdrops / instructions.md
Created October 5, 2016 21:54
Git hook to include the branch name on each commit

Git hook to include the branch name on each commit

Tired to forget to write every goddam time the branch name on the commit messsage? This got you covered:

  1. Add the prepare-commit-msg file to your .git/hooks/ folder;
  2. Then, chmod +x prepare-commit-msg;
  3. PROFIT!
@devdrops
devdrops / .gitconfig
Created April 26, 2018 02:40 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@devdrops
devdrops / default.yml
Last active February 17, 2022 22:06
Tmuxinator padrão
# /path/to/tmuxinator/default.yml
name: session_name
root: /path/to/project/dir
on_project_start: git fetch --all
startup_window: VIM
windows:
- VIM: vim .
- ENV:
@devdrops
devdrops / readme.md
Last active November 10, 2021 16:56
tmuxinator sample

tmuxinator

  • Config sample (en_US)
  • Exemplo de configuração (pt_BR)
@devdrops
devdrops / test.md
Created November 21, 2019 17:46
Test

aaaa

name: pings-ni-mim
root: ~/uaifai
windows:
- PINGS:
layout: main-vertical
panes:
- ping 192.168.0.1 >> ./router.txt
- ping google.com >> ./google.txt