Skip to content

Instantly share code, notes, and snippets.

Avatar
😊
I may be slow to respond.

Tiago França tiagofrancafernandes

😊
I may be slow to respond.
View GitHub Profile
View truques.txt
-------------------------------------------
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
https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://slack.com&size=16
https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://slack.com&size=32
-------------------------------------------
View auto-dark-mode.css
/* #Habilitar darkmode em uma página */
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
}
View tests-and-store-request-value.js
//--------------------------------------------------------------------------------
//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 = `
View devdocker_snippets.sh
## Reiniciar todas as instancias do ambiente atual
for cid in $(docker-compose ps |grep _run_ |awk '{print $1}'); do docker stop $cid; done; docker-compose restart
@tiagofrancafernandes
tiagofrancafernandes / em-manutencao.html
Created Dec 23, 2021
Simple Pages | Páginas simples | HTML Basic
View em-manutencao.html
<!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">
View import-export.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
@tiagofrancafernandes
tiagofrancafernandes / README.md
Last active Sep 13, 2021
GIT Hooks - Break points, break words
View README.md

To save a file, runs:


  • pre-commit
# pre-commit
curl -o ./.git/hooks/pre-commit \
"https://gist.githubusercontent.com/tiagofrancafernandes/4bbaa3a2dd4faf0c681db864bfff49cc/raw/6b3fb1694162857256813434df6774a0bf2498f5/pre-commit.sh" \
@tiagofrancafernandes
tiagofrancafernandes / git-config.ini
Last active Oct 18, 2021
GIT Snippets - tips and more
View git-config.ini
# ~/.gitconfig
[user]
email = dev@tiagofranca.com
name = Tiago França
[core]
editor = code -w
fileMode = false
[alias]
c = checkout
b = branch