Skip to content

Instantly share code, notes, and snippets.

View v3ronez's full-sized avatar
💤

Henrique Veronez v3ronez

💤
View GitHub Profile
@v3ronez
v3ronez / userChrome.css
Last active October 14, 2025 01:36
setup the firefox address bar and tabs on bottom page
@-moz-document url(chrome://browser/content/browser.xhtml) {
/* tabs on bottom of window */
/* requires that you set
* toolkit.legacyUserProfileCustomizations.stylesheets = true
* in about:config
* figure out current firefox's profile folder in about:support
*/
#main-window body { flex-direction: column-reverse !important; }
#navigator-toolbox { flex-direction: column-reverse !important; }
#urlbar-searchmode-switcher { position: static !important; }
@v3ronez
v3ronez / htoprc
Created September 21, 2025 02:10
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.4.1
config_reader_min_version=3
fields=0 48 17 18 38 39 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
@v3ronez
v3ronez / backup_restore_psql.txt
Last active November 11, 2025 14:23
Create backup postgres and Restore
create backup
pg_dump -h localhost -p 5432 -U postgres -F c -b -v -f
"/usr/local/backup/10.70.0.61.backup" old_db
-F c is custom format (compressed, and able to do in parallel with -j N) -b is including blobs, -v is verbose, -f is the backup file name.
restore from backup
pg_restore -h localhost -p 5432 -U postgres -d old_db -v

Roadmap de estudos de SQL

Aviso: Muitas vezes detalhes de várias operações podem variar de banco para banco. Em questões onde fiquei em dúvida, este documento segue o funcionamento do PostgreSQL, pois é o banco que conheço melhor.

Pré-requisito: Álgebra Relacional básica

Antes de começar a escrever SQL, você precisa entender o modelo de como um banco de dados relacional funciona. Não precisa se aprofundar muito, mas você precisa entender como que dados e relacionamentos entre eles são representados. (Nota importante: Relacionamento e relação não são a

if (! is_string($uuid) || (preg_match(
'/\A[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\z/i',
$uuid
) !== 1)) {
return false;
}
return true;
@v3ronez
v3ronez / .tmux.conf
Last active March 31, 2025 03:05
tmux config
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set-option -sa terminal-overrides ",xterm*:Tc"
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
set -s escape-time 10
setw -g xterm-keys on

Como Pensar

Ler e entender um pouco desse artigo. https://wiki.c2.com/?FeynmanAlgorithm

  • Reconhecer como você pensa
  • Descrever métodos que você usa para pensar
  • Entender métodos diferentes de pensar
  • Fazer perguntas sobre tudo(incluindo sobre perguntas)

Perguntas

FROM golang:1.23.0-bookworm AS build
ARG upx_version=4.2.4
RUN apt-get update && apt-get install -y --no-install-recommends xz-utils && \
curl -Ls https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz -o - | tar xvJf - -C /tmp && \
cp /tmp/upx-${upx_version}-amd64_linux/upx /usr/local/bin/ && \
chmod +x /usr/local/bin/upx && \
apt-get remove -y xz-utils && \
rm -rf /var/lib/apt/lists/*
@v3ronez
v3ronez / compress_video
Created August 22, 2024 10:08 — forked from trvswgnr/compress_video
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@v3ronez
v3ronez / gist:1134b2dd2485047619d3ab5995fc1899
Last active April 13, 2023 17:17
nginx basic config php8.1
server {
listen 80;
index index.php index.html index;
root /var/www/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}