Não use UUID
como PK nas tabelas do seu banco de dados.
Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
# npm using https for git | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
git config --global url."https://".insteadOf git:// | |
# npm using git for https | |
git config --global url."git@github.com:".insteadOf https://github.com/ | |
git config --global url."git://".insteadOf https:// |
// JavaScript Document | |
// adiciona mascara para rg | |
// Cada estado têm regras e quantidades diferentes de números no registro. Por isso, | |
// não há uma maneira confiável de fazer a validação do mesmo. | |
function MascaraRg(v0,errChar='?'){ | |
const v = v0.toUpperCase().replace(/[^\dX]/g,''); | |
return (v.length==8 || v.length==9)? | |
v.replace(/^(\d{1,2})(\d{3})(\d{3})([\dX])$/,'$1.$2.$3-$4'): | |
(errChar+v0) |
Gist for https://www.youtube.com/watch?v=38di3_iVDIA
kopia repository create s3 --bucket=<<bucketId>>
kopia repository validate-provider
kopia repository status
kopia snapshot create /var/lib/jenkins
kopia snapshot list
kopia diff <a> <b>