Instantly share code, notes, and snippets.
🛠️
QQ
Principal Software Engineer at@RedHatOfficial. #Python #Rust. Working on:@ansible@python@dynaconf@codeshow Marmite
- Viana do Castelo, Portugal
- 11:13
(UTC) - https://bruno.rocha.social
- in/rochacbruno
- https://go.rocha.social/@bruno
- https://blog.rochacbruno.com
- https://Youtube.com/@CodeShowBR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| importos | |
| importsys | |
| os.environ.setdefault('DJANGO_SETTINGS_MODULE','platform_service_example.settings') | |
| importdjango | |
| django.setup() | |
| frompdoc.__main__importcli | |
| sys.exit(cli()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| { | |
| "$schema":"https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", | |
| "logo": { | |
| "type":"auto", | |
| "height":10, | |
| "width":15, | |
| "padding": { | |
| "top":5, | |
| "left":3 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| importsubprocess | |
| importgi | |
| importsignal | |
| gi.require_version('Gtk','3.0') | |
| fromgi.repositoryimportGtk,AppIndicator3 | |
| APP_ID="gpu.screen.recorder" | |
| RECORD_CMD= ["bash","-c","gpu-screen-recorder","-o","/tmp/output.mp4"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| [Default] | |
| save_dir=$HOME/Pictures/Screenshots | |
| save_filename_format=swappy-%Y%m%d-%H%M%S.png | |
| show_panel=true | |
| paint_mode=arrow | |
| early_exit=true |
rochacbruno /niri-scratchpad
CreatedOctober 16, 2025 12:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| ############################################################################################## | |
| # _ _ _ _ _ # | |
| # (_) (_) | | | | | | # | |
| # _ __ _ _ __ _ ___ ___ _ __ __ _ | |_ ___ | |__ _ __ __ _ __| | # | |
| #| '_ \ | || '__|| | ______ / __| / __|| '__| / _` || __| / __|| '_ \ | '_ \ / _` | / _` | # | |
| #| | | || || | | ||______|\__ \| (__ | | | (_| || |_ | (__ | | | || |_) || (_| || (_| | # | |
| #|_| |_||_||_| |_| |___/ \___||_| \__,_| \__| \___||_| |_|| .__/ \__,_| \__,_| # | |
| # | | # |
rochacbruno /README.md
Last activeSeptember 24, 2025 16:43
Static Blog Generator in less than 100 lines of Pythonrochacbruno /Default copy.json
CreatedSeptember 16, 2025 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "input_combination": [ | |
| { | |
| "type":1, | |
| "code":58, | |
| "origin_hash":"99614f2eb2dff6628bd5eff9210e538f" | |
| } | |
| ], | |
| "target_uinput":"keyboard", |
rochacbruno /pycon.md
CreatedSeptember 7, 2025 21:23
Format python console REPL blocks on github markdown code fencesrochacbruno /.vimrc
Last activeSeptember 10, 2025 09:23
Minimal Possible VIM COnfig for Python with AutoComplete, Help, Syntax Check This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| let mapleader=''|setnurnuhidbs=2ts=4sw=4etaisinocpwmnutw=79cc=80stal=2cot=menuone,longest,previewph=10rulerstatusline=%f%m%r%h%w%=%y\%l,%c\%p%% | |
| letg:p=executable('uv')?'uv run python3':'python3'|letg:d=g:p.' -m pydoc'|letg:c=g:p.' -m py_compile' | |
| filetypepluginindenton|syon|nn<leader>b :ls<cr>:b<space>|nn<leader><Tab><C-^> | |
| auFileTypepythonsetlofu=python3complete#Completecot=menuone,longest,previewinc=^\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> | |
| auBufWritePost*.pysilent!exe'!'.g:c.' %' | |
| auCompleteDone*pc |
NewerOlder