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 / teardown-workspace.sh
Created April 26, 2026 08:32
teardown-workspace.sh
#!/bin/bash
echo "Tearing down workspace ..."
if [ -f /tmp/workspace-activated ]; then
rm /tmp/workspace-activated
dirs=(CLionProjects
IdeaProjects
PhpstormProjects
PycharmProjects
RiderProjects
@lopesivan
lopesivan / workspace-setup.sh
Created April 26, 2026 08:30
workspace-setup.sh
#!/bin/bash
echo "Setting up workspace ..."
dirs=(
ibus-table
tracker3
gtk-3.0
ibus
JNA
@lopesivan
lopesivan / workspace-setup.service
Created April 26, 2026 08:30
workspace-setup.service
# /etc/systemd/system/workspace-setup.service
[Unit]
Description=Workspace Setup Script
After=local-fs.target
[Service]
ExecStart=/opt/scripts/workspace-setup.sh
#ExecStartPost=/bin/systemctl start another-service.service # Opcional, se precisar iniciar outro serviço após o script
Restart=on-failure
@lopesivan
lopesivan / fstab
Created April 26, 2026 08:29
Montar a memória como pasta
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/e2fed0c4-c618-4d5c-ba20-09d3ec40f2c6 / ext4 defaults 0 1
/swap.img none swap sw 0 0
@lopesivan
lopesivan / tmpl-cmake
Created April 26, 2026 05:33
cmake templates
#!/usr/bin/env bash
REPO_URL="https://github.com/lopesivan/cmake-templates.git"
REPO_NAME="cmake-templates"
# Lista de branches com emojis descritivos
BRANCHES=(
"main" "-> 🌐 Branch principal"
"cpp-with-tests" "🖥️ Projeto C++ moderno com CMake,via Google Test."
)
@lopesivan
lopesivan / tmpl-autotools
Created April 26, 2026 05:33
autotools templates
#!/usr/bin/env bash
REPO_URL="https://github.com/lopesivan/autotools-templates.git"
REPO_NAME="autotools-templates"
# Lista de branches com emojis descritivos
BRANCHES=(
# ── C ANSI ────────────────────────────────────────────────────────────────
"cansi" "💻 C ANSI básico"
"cansi-mono" "🎯 C ANSI arquivo único"
@lopesivan
lopesivan / android-ndk-manager.sh
Created April 25, 2026 15:55
Android NDK Manager
#!/usr/bin/env bash
#
# anm - Android NDK Manager
#
set -euo pipefail
readonly SDK="${ANDROID_SDK_ROOT:-$HOME/Android/Sdk}"
readonly NDK_DIR="$SDK/ndk"
readonly DEFAULT_BASE_URL="http://192.168.2.43:8899/ndk"
@lopesivan
lopesivan / android-platform-manager.sh
Created April 25, 2026 13:41
Android Platform Manager
#!/usr/bin/env bash
#
# android-platform-manager.sh - Manage Android SDK platform configurations
# Description: Switch between platform configurations using symlinks
# Supports profiles, multiple platforms, and interactive mode
#
set -e
# ============================================================================
@lopesivan
lopesivan / history_manager.py
Created April 17, 2026 15:00
Gerenciador de Histórico do Bash com SQLite Armazena comandos únicos sem limite de 1000 linhas
#!/usr/bin/env python3
"""
Gerenciador de Histórico do Bash com SQLite
Armazena comandos únicos sem limite de 1000 linhas
"""
from __future__ import annotations
import argparse
import re
@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)