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
[
{
"input_combination": [
{
"type": 1,
"code": 58,
"origin_hash": "99614f2eb2dff6628bd5eff9210e538f"
}
],
"target_uinput": "keyboard",
@rochacbruno
rochacbruno / pycon.md
Created September 7, 2025 21:23
Format python console REPL blocks on github markdown code fences
>>> from pprint import pprint as pp
>>> from rich import inspect
>>> import datetime
>>> a = 1
```pycon
>>> from pprint import pprint as pp
@rochacbruno
rochacbruno / .vimrc
Last active September 10, 2025 09:23
Minimal Possible VIM COnfig for Python with AutoComplete, Help, Syntax Check
let mapleader=' '|set nu rnu hid bs=2 ts=4 sw=4 et ai si nocp wmnu tw=79 cc=80 stal=2 cot=menuone,longest,preview ph=10 ruler statusline=%f%m%r%h%w%=%y\ %l,%c\ %p%%
let g:p=executable('uv')?'uv run python3':'python3'|let g:d=g:p.' -m pydoc'|let g:c=g:p.' -m py_compile'
filetype plugin indent on|sy on|nn <leader>b :ls<cr>:b<space>|nn <leader><Tab> <C-^>
au FileType python setl ofu=python3complete#Complete cot=menuone,longest,preview inc=^\s*\(from\|import\) def=^\s*\(def\|class\)|exe 'setl kp='.escape(g:d,' ')|nn <buffer> <leader>k :exe 'vert term ++close '.g:d.' '.expand('<cword>')<CR>|nn <buffer> <leader>r :w<CR>:exe '!'.g:p.' %'<CR>
au BufWritePost *.py silent! exe '!'.g:c.' %'
au CompleteDone * pc
@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