Skip to content

Instantly share code, notes, and snippets.

View lpolon's full-sized avatar
🏠
Working from home

Leonardo lpolon

🏠
Working from home
  • Rio de Janeiro
View GitHub Profile
@lpolon
lpolon / setup-git-vscode.sh
Last active April 16, 2026 17:48
Configure git + shell to use VS Code as the editor (user.email, core.editor, diff/merge tool, EDITOR/VISUAL)
#!/usr/bin/env bash
# setup-git-vscode.sh — Configure git + shell to use VS Code as the editor.
#
# What it does:
# - Appends EDITOR/VISUAL exports to ~/.zshrc (idempotent, marker-guarded)
# - Sets git global: user.name, user.email, core.editor, diff/merge tool = VS Code
#
# Nothing else is touched. No workflow opinions (pull.rebase, default branch, etc.).
#
# Run it directly from the gist:
@lpolon
lpolon / vscode-to-iterm2.py
Last active April 16, 2026 17:25
Generate iTerm2 Dynamic Profile from VS Code theme settings (font, colors, light/dark)
#!/usr/bin/env python3
"""
vscode-to-iterm2.py — Generate an iTerm2 Dynamic Profile from your VS Code themes.
Reads VS Code settings.json to discover:
- Font family & size
- Preferred dark and light color themes
Then locates the theme extension files, extracts terminal colors,
writes an iTerm2 Dynamic Profile that follows macOS appearance switching,
and sets it as the default iTerm2 profile.