Skip to content

Instantly share code, notes, and snippets.

View rodrigo-x's full-sized avatar
👻

Rodrigo_ rodrigo-x

👻
View GitHub Profile
@rodrigo-x
rodrigo-x / fail2ban.sh
Created March 5, 2024 07:09
ssh and fail2ban in debian 12 bookworm
#!/usr/bin/env bash
check_root_privileges() {
if [ "$EUID" -ne 0 ]; then
echo "Este script precisa ser executado com privilégios de superusuário (root)."
exit 1
fi
}
update_package_list() {
@rodrigo-x
rodrigo-x / gtk.css
Created March 2, 2024 20:10
gtk.css
/*
###################################
## Customgtk-3.0 css definitions ##
###################################
*/
/* notify buttons */
#showdesktop-button image {
-gtk-icon-transform: scale(1);
}
@rodrigo-x
rodrigo-x / gtk.css
Created February 27, 2024 23:33
gtk.css do xfce4 debian 12 bookworm
/*.xfce4-panel {
border-bottom-left-radius: 13px;
border-bottom-right-radius: 13px;
border-top-left-radius: 13px;
border-top-right-radius: 13px;
}*/
#whiskermenu-button image {
-gtk-icon-transform: scale(1);
}
#showdesktop-button image {
@rodrigo-x
rodrigo-x / docker_run.sh
Created February 17, 2024 16:25
pi hole docker_run
#!/usr/bin/env bash
function validar_variaveis() {
if [[ -z "$PIHOLE_BASE" ]]; then
echo "Erro: Variável PIHOLE_BASE não definida."
exit 1
fi
}
function criar_diretorio() {
const elements = {
loading: document.querySelector("#loading"),
postsContainer: document.querySelector("#posts-container"),
postPage: document.querySelector("#post"),
postContainer: document.querySelector("#post-container"),
commentsContainer: document.querySelector("#comments-container"),
commentForm: document.querySelector("#comment-form"),
emailInput: document.querySelector("#email"),
bodyInput: document.querySelector("#body"),
};
@rodrigo-x
rodrigo-x / taboada.py
Last active February 1, 2024 21:58
refactoring da taboada descritiva...
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pyttsx3
def inicializar_engine():
"""Inicializa a engine de texto para fala."""
return pyttsx3.init()
def gerar_tabuada(numero, num_linhas):
#!/usr/bin/env bash
# Autor: Nery
# Data: 8/12/2023
# Descrição: Remove todas as senhas do Seahorse
XDG_CONFIG_HOME="$HOME/.config"
function list_keyring_dirs() {
local keyrings_dir="$XDG_CONFIG_HOME/seahorse/keyrings"
@rodrigo-x
rodrigo-x / coverflow.sh
Created October 31, 2023 05:08
coverflow
#!/usr/bin/env bash
REPO_URL="https://github.com/dmo60/CoverflowAltTab.git"
EXTENSION_DIR="$HOME/CoverflowAltTab"
execute_command() {
local command="$1"
local message="$2"
echo "$message"
if ! $command; then
@rodrigo-x
rodrigo-x / broadcom_solid.sh
Created October 25, 2023 07:58
Refactoring..
#!/usr/bin/env bash
# breaking the code with SOLID
function download_and_verify() {
local url="$1"
local filename="$2"
wget -q "$url" -O "$filename"
@rodrigo-x
rodrigo-x / broadcom.sh
Created October 25, 2023 07:43
Installing broadcom..
#!/usr/bin/env bash
download_and_verify() {
local url="$1"
local filename="$2"
wget -q "$url" -O "$filename"
if [ -s "$filename" ]; then
echo "Download de $filename bem-sucedido."