Skip to content

Instantly share code, notes, and snippets.

View rochacbruno's full-sized avatar
🛠️
Working on Galaxy_ng and Dynaconf

Bruno Cesar Rocha rochacbruno

🛠️
Working on Galaxy_ng and Dynaconf
View GitHub Profile
@rochacbruno
rochacbruno / amazing_vimtips.md
Last active September 4, 2025 19:56
Useful vim tips
@rochacbruno
rochacbruno / fuzzyfind.vim
Created September 4, 2025 11:34
Simple Fuzzy Finder for Vim9
vim9script
# simple fuzzy find finder
# place into ~/.vim/plugin/fuzzyfind.vim
set wildmode=noselect:lastused,full
set wildmenu wildoptions=pum,fuzzy pumheight=12
cnoremap <Up> <C-U><Up>
cnoremap <Down> <C-U><Down>
@rochacbruno
rochacbruno / generate_log.py
Created September 2, 2025 17:52
Generate Random Huge 2GB Sample Log for Nginx
#!/usr/bin/env python3
import asyncio
import random
import datetime
import time
import os
from concurrent.futures import ThreadPoolExecutor
# Configuration
BATCH_SIZE = 10000
@rochacbruno
rochacbruno / .vimrc
Last active August 28, 2025 00:51
VIM 9 Config - NOTE: This is not a Neovim config, this is VIM 9+ config with plugins
" -----------------------------
" rochaCbruno Vim 9.1 config
" -----------------------------
" --- Leader keys ---
let mapleader = ","
let maplocalleader = ","
source ~/.vim/functions.vim
source ~/.vim/commands.vim
source ~/.vim/plugins.vim
@rochacbruno
rochacbruno / markdown.json
Created August 13, 2025 15:51
VSCode, Codium, Cursor snippets for presenterm commands.
{
"Presenterm Intro Slide": {
"prefix": "ptitle",
"body": [
"---",
"title: \"${1:Your Title}\"",
"sub_title: \"${2:Your Subtitle (optional)}\"",
"author: ${3:Your Name}",
"---"
],
:root {
--almost-white: #fdf6e3;
--almost-black: #586e75;
--link-fg: #2aa198;
--fg: #586e75;
--status-info-bg: #eee8d5;
--status-focus-info-bg: #eee8d5;
--single-border: 0.2rem solid #cb4b16;
--boxshadow-border: none;
--double-border: none;
@rochacbruno
rochacbruno / README.md
Created July 1, 2025 16:22
Simple Deployer with Gradio
uv run --with gradio gui.py
@rochacbruno
rochacbruno / update_gotosocial.sh
Created May 4, 2025 17:53
Update GoToSocial Binary and Web Assets on a Debian System using systemd
#!/usr/bin/env bash
set -euo pipefail
cd /var/www
export TODAY="$(date -I)"
export GTS_VERSION="0.19.0"
# Stop the service
echo "Stopping gotosocial service..."
systemctl stop gotosocial
from dataclasses import dataclass
@dataclass
class Potato:
value: str
class EnglishPotato(Potato): ...
@rochacbruno
rochacbruno / comp_multi.rs
Created January 13, 2025 15:01 — forked from kepler-5/comp_multi.rs
Python comprehension proc macro that handles multiple nested for-if-clauses, flattening nested structure
// Python comprehension proc macro that handles multiple nested for-if-clauses, flattening nested structure.
// Example:
//
// let vec_of_vecs = vec![vec![1, 2, 3], vec![4, 5, 6]];
//
// let result = comp![x for vec in vec_of_vecs for x in vec].collect::<Vec<_>>();
// assert_eq!(result, [1, 2, 3, 4, 5, 6]);
//
use proc_macro2::TokenStream as TokenStream2;