Skip to content

Instantly share code, notes, and snippets.

View lopesivan's full-sized avatar
🚧
Working from home

Mr. Ivan lopesivan

🚧
Working from home
View GitHub Profile
@lopesivan
lopesivan / Makefile
Created November 29, 2025 14:19
Este Makefile automatiza o fluxo completo de trabalho com patches Git, permitindo clonar um repositório remoto, aplicar modificações customizadas, gerar patches formatados com checksums SHA256, e testá-los antes da distribuição. Ele oferece um sistema de help colorido e organizado por categorias, validações automáticas para evitar erros, e coman…
# Configuração do repositório
REPO = hw
REMOTE_REPO = https://github.com/lopesivan/$(REPO)
LOCAL_REPO = $(REPO)
REVISION = beta-1.0.1
BRANCH = main
# Cores para output
BOLD := $(shell tput bold)
RESET := $(shell tput sgr0)
#!/usr/bin/env bash
set -euo pipefail
# ==============================
# Configurações
# ==============================
WX_VERSION="3.2.4"
OS=android
WX_SRC_DIR="wxWidgets-${WX_VERSION}-${OS}"
WX_PREFIX_DIR="${HOME}/wx/${OS}-wx-${WX_VERSION}"

Script de Debug para Shell no Neovim

Descrição

Este script Lua para Neovim fornece uma funcionalidade para gerar automaticamente comandos echo de debug para variáveis shell em uma seleção visual. Ele é específico para arquivos shell (.sh) e é carregado como um plugin after/ftplugin.

Funcionalidades

  • Extrai nomes de variáveis de atribuições em shell script
  • Gera comandos echo formatados para debug
@lopesivan
lopesivan / c.lua
Created November 20, 2025 16:45
javadoc com treesitter para C
-- after/ftplugin/c.lua
vim.keymap.set("n", "<F2>", function()
require("config.ts_c").insert_doc_for_current_function()
end, { desc = "Inserir Javadoc na função C atual" })
@lopesivan
lopesivan / install-apk.sh
Created November 15, 2025 21:05
INSTALL APK
#!/usr/bin/env bash
#
# install-apk.sh - Install APK files via ADB
# Description: Robust APK installer with device detection, batch installation,
# and error handling
#
set -e # Exit on error
# ============================================================================
#!/usr/bin/env bash
#
# build-lua-5.1.5.sh - Build Lua from source with static and shared libraries
# Author: Ivan Lopes
# Description: Downloads, compiles and installs Lua 5.1.5 into ~/.luaenv/versions/
#
set -e # Exit on error
# ============================================================================
@lopesivan
lopesivan / filein.vim
Created November 13, 2025 02:22
correção:
" filein.vim - Navigate between files in the same directory
" Maintainer: Ivan Lopes
" Description: Provides mappings to jump to next/previous files alphabetically
" Similar to ]b and [b for buffers, but for filesystem navigation
" Prevent double loading and check compatibility
if exists("g:loaded_filein") || v:version < 700 || &cp
finish
endif
let g:loaded_filein = 1
@lopesivan
lopesivan / projectioist.sh
Created November 4, 2025 05:04
mkprojectionist
#!/usr/bin/env bash
set -euo pipefail
FILE=".projections.json"
need() {
if ! command -v "$1" >/dev/null 2>&1; then
echo "Falta o comando '$1'. Instale-o e tente novamente."
exit 1
fi
@lopesivan
lopesivan / DESCRIPTION.md
Created October 5, 2025 05:22
Criei um guia completo sobre como selecionar a versão do C++ no GCC! 🎯

Aqui estão as formas de selecionar a versão do C++ no GCC:

🔥 Resposta Rápida:

# C++11
g++ -std=c++11 main.cpp -o programa

# C++14
g++ -std=c++14 main.cpp -o programa
@lopesivan
lopesivan / DESCRIPTION.md
Created September 21, 2025 19:34
nvim-statusline-config

Aqui vai um resumo rápido dos dois arquivos:

  • lua/base/statusline.lua Esse arquivo apenas declara o plugin lualine.nvim (a barra de status do Neovim) e diz para carregar a configuração que está em lua/config/lualine.lua. É tipo um atalho: ele aponta para onde está a configuração real e garante que o plugin seja carregado sempre (não é lazy).

  • lua/config/lualine.lua