Skip to content

Instantly share code, notes, and snippets.

View andrewssobral's full-sized avatar
🔴
I may be very slow to respond.

Andrews Cordolino Sobral andrewssobral

🔴
I may be very slow to respond.
View GitHub Profile
@andrewssobral
andrewssobral / settings.json
Created October 21, 2025 19:38 — forked from rekram1-node/settings.json
OpenCode agent server (zed)
{
"agent_servers": {
"OpenCode": {
"command": "opencode",
"args": ["acp"]
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewssobral
andrewssobral / claude_code_hooks_for_uv.md
Created July 26, 2025 20:59 — forked from glennmatlin/claude_code_hooks_for_uv.md
Claude Code hooks for working with `uv`

Claude Code Hooks for working with uv

by Glenn Matlin / glennmatlin on all socials

Installation

  1. Download and copy all files in this gist to ~/.claude/
  2. Move the .py files to ~/.claude/hooks
  3. Restart Claude Code.
import os
from google import genai
from google.genai import types
client = genai.Client(api_key=os.getenv("GEMINI_API_KEY","xxx"))
# Repalce with the youtube url you want to analyze
youtube_url = "https://www.youtube.com/watch?v=RDOMKIw1aF4"
# Prompt to analyze and summarize the Youtube Video

Code Bash command prefix detection

This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.

Command prefix extraction examples

Examples:

  • cat foo.txt => cat
  • cd src => cd
@andrewssobral
andrewssobral / micro_events.py
Created March 9, 2025 17:06 — forked from tarruda/micro_events.py
Micro event loop library to teach the basic concepts of python coroutines and how event loop libraries might be implemented
"""
A micro event loop library implementation from scratch.
This library provides a minimal but feature-complete asynchronous event loop
implementation for educational purposes. It demonstrates the core concepts of
asynchronous programming including:
- Task scheduling and management
- I/O multiplexing with non-blocking sockets
- Timeouts and sleep functionality
@andrewssobral
andrewssobral / Makefile
Created February 13, 2025 02:26 — forked from rafaelrc7/Makefile
Generic Makefile for c/cxx/asm
######################### Preamble ###########################################
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.SECONDEXPANSION:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += -j$(shell nproc)
@andrewssobral
andrewssobral / 30s-terminal-tools.md
Created December 3, 2024 22:21 — forked from wilderlopes/30s-terminal-tools.md
List of terminal-based developer tools that deliver value in 30 seconds

Setting Up MCP Servers on Windows

A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.

Prerequisites

  1. Install Node.js (v18.x or later)
    • Download from: https://nodejs.org/
    • Verify installation by opening PowerShell and running:
      node --version

npm --version

@andrewssobral
andrewssobral / claude-autoclicker.sh
Created December 1, 2024 23:23 — forked from supersational/claude-autoclicker.sh
Claude Autoclick "Allow Tool"
while true; do
osascript -e '
tell application "System Events"
if exists process "Claude" then
tell process "Claude"
if exists button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude" then
click button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude"
log "clicked allow button"
end if
end tell