Skip to content

Instantly share code, notes, and snippets.

View gilbertoca's full-sized avatar

Gilberto Caetano de Andrade gilbertoca

View GitHub Profile
@rponte
rponte / using-uuid-as-pk.md
Last active March 31, 2024 18:09
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@adelmofilho
adelmofilho / docker-compose.jenkins-dind.yml
Created June 21, 2020 00:17
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
@dvsingh9
dvsingh9 / spring.boot.90mb.Dockerfile
Created May 3, 2020 17:35
Spring boot ultra slim (less than 90 mb) docker build script
# (1) use Alpine Linux for build stage
FROM alpine:3.11.3 as build
# (2) install build dependencies
RUN apk --no-cache add openjdk11
RUN apk --no-cache add maven
# build JDK with less modules
RUN /usr/lib/jvm/default-jvm/bin/jlink \
--compress=2 \
--module-path /usr/lib/jvm/default-jvm/jmods \
How to keep git log and less output on the screen
http://serebrov.github.io/html/2014-01-04-git-log-and-less-keep-output.html
Just for git commands:
git config --global --replace-all core.pager "less -iXFR"
For less globally (including git) - add to .bashrc / .zshrc / etc:
export LESS=-iXFR
The options we set for less are:
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@lichti
lichti / Warsaw-brwser.txt
Created June 26, 2017 13:28
warsaw-browser - Itau, CEF, BB e outros.
Imagem Docker para rodar um firefox com o warsaw configurado para acesso a bancos brasileiros.
É uma boa opção para acessar bancos através de GNU/Linux.
Have a nice day.
More Info:
https://hub.docker.com/r/lichti/warsaw-browser/
https://github.com/lichti/containers4docker/tree/master/warsaw-browser
@magnetikonline
magnetikonline / README.md
Last active February 4, 2024 07:45
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@mbodo
mbodo / Linux - Systemd cheatsheet.md
Last active March 15, 2024 18:25
Systemd cheatsheet

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

@eliotsykes
eliotsykes / git-aware-bash-prompt.md
Last active April 28, 2023 12:18
Git Aware Bash Prompt

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS