- pre-commit
# pre-commit
curl -o ./.git/hooks/pre-commit \
"https://gist.githubusercontent.com/tiagofrancafernandes/4bbaa3a2dd4faf0c681db864bfff49cc/raw/6b3fb1694162857256813434df6774a0bf2498f5/pre-commit.sh" \| # Exportar | |
| TABLE_NAME="TABELA_ORIGEM"; PGPASSWORD="usuario2016" pg_dump \ | |
| -h HOST_ORIGIEM \ | |
| -p 5432 \ | |
| -U usuario \ | |
| --table="$TABLE_NAME" \ | |
| usuario > "db-banco-origem-$TABLE_NAME.sql" && notify-send "Finalizado!" | |
| #Importar | |
| DB_NAME="BANCO_DESTINO"; TABLE_NAME="partner_sales"; PGPASSWORD="senha" psql \ |
| <!doctype html> | |
| <html lang="en" class="h-100"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content=""> | |
| <meta name="author" content="MY APP"> | |
| <base href="https://getbootstrap.com/docs/5.1/examples/sticky-footer/"> | |
| <meta name="generator" content="MY APP"> |
| //-------------------------------------------------------------------------------- | |
| //START | |
| const template_success = ` | |
| <div style="background:#fff;"> | |
| access_token: <em>(ocultado)</em> Salvo nas variáveis de ambiente<br> | |
| token_type: {{token_type}}<br> | |
| expires_in: {{expires_in}}min<br> | |
| </div> | |
| `; | |
| const template_error = ` |
| <style> | |
| a[href^="#"][name]::before { | |
| color: red !important; | |
| content: "#"; | |
| visibility: hidden; | |
| } | |
| a[href^="#"][name]:hover::before { | |
| content: "#"; | |
| visibility: initial; |
Pegar o favicon de um site de forma dinâmica: https://www.google.com/s2/favicons?domain=slack.com https://www.google.com/s2/favicons?domain=facebook.com
| #Instalando e usando How To Install and Use PostgreSQL 14 on Ubuntu 20 | |
| echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
| -- | |
| #Instalando e usando How To Install and Use PostgreSQL on Ubuntu 18.04 | DigitalOcean | |
| https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04 | |
| -- Docker | |
| https://www.youtube.com/watch?v=A8dErdDMqb0 |
sudo apt install -y qrencode
echo "aaa" |qrencode -t ansiutf8https://api.qrserver.com/v1/create-qr-code/?size=500x500&data=Conteúdo do QRCode