Skip to content

Instantly share code, notes, and snippets.

View gabrielmoreira's full-sized avatar

Gabriel Moreira gabrielmoreira

View GitHub Profile
@gabrielmoreira
gabrielmoreira / claude-code-via-omp-github-copilot.md
Created September 4, 2026 21:58
Run Claude Code through OMP and GitHub Copilot

Run Claude Code through OMP and GitHub Copilot

This setup routes a local Claude Code session through OMP's Anthropic-compatible gateway, then uses the GitHub Copilot credential already stored by OMP.

Claude Code
    |
    | POST /v1/messages
    v
OMP auth-gateway :4000 -----------------> GitHub Copilot -> selected model
@gabrielmoreira
gabrielmoreira / generate-synthetic-session.mjs
Last active September 3, 2026 10:42
oh-my-pi: memory/slowdown, new-session feature request, native startup crash — 2026-08-18/19
#!/usr/bin/env node
// Synthetic OMP session.jsonl generator — no private data, no real prompts/code.
//
// Produces a session.jsonl of a target size made of alternating small "user"
// messages and large "toolResult" messages (random ASCII text, standing in
// for bash/read/grep tool output — the shape identified in the memory report
// as the majority of bytes in real large sessions). Entry shapes match
// packages/coding-agent/src/session/session-entries.ts (SessionHeader,
// SessionMessageEntry) and packages/ai/src/types.ts (UserMessage,
// ToolResultMessage) in oh-my-pi @ 17.3.x — verified by reading the source,
@gabrielmoreira
gabrielmoreira / 00-copy-this-prompt.md
Last active May 26, 2026 14:51
AI for Software Development — full guide

Copy/paste prompt

Copy this prompt into an AI assistant if you want help reading the full guide.

Read this full guide first:
https://gist.github.com/gabrielmoreira/e5ec8f79c8b61a7a8a7063f3554abe9b

Act as my personalized reading guide. Use a minimalist progressive-reading style: useful answer first, short sections, simple language, one idea at a time, no huge summary, no jargon without explanation.
@gabrielmoreira
gabrielmoreira / 00-copy-this-prompt.md
Last active May 26, 2026 14:51
AI for Software Development — ADHD-friendly quick start

Copy/paste prompt

Copy this prompt into an AI assistant if you want help reading the full guide.

Read this full guide first:
https://gist.github.com/gabrielmoreira/e5ec8f79c8b61a7a8a7063f3554abe9b

Act as my personalized reading guide. Use a minimalist progressive-reading style: useful answer first, short sections, simple language, one idea at a time, no huge summary, no jargon without explanation.
@gabrielmoreira
gabrielmoreira / mise-windows-issues.md
Last active May 12, 2026 17:50
Mise on Windows - Consolidated Field Report

Mise on Windows — Consolidated Field Report

About this report. This is a consolidation written by Claude (Opus 4.7 xhigh) at the user's request, distilling sessions from multiple coding agents (Claude, Codex, others) over ~1 month of intermittent investigation. The user has not line-by-line verified every claim — retroactive verification of incremental work spread across many sessions is itself impractical — but the reproductions, source-code references, and minimal repro scripts shipped alongside this document all run today. Treat this as a useful field reference for mise on Windows, not a definitive specification.

The user's broader goal, of which this report is one piece: a single, unified shell + tool-manager setup across Mac, Linux, and Windows. Mac and Linux unify naturally. Windows is the awkward one. Going all-in on WSL would be the easy unification path, but it is not practical here — WSL consumes system resources that the user prefers to dedicate to other programs, and modern Wi

@gabrielmoreira
gabrielmoreira / README.md
Last active February 6, 2026 15:31
Userscript to prevent unintended ad link openings on x.com when using mouse back/forward buttons.

X.com block mouse back/forward ad clicks

This userscript fixes a very "unintended" behavior on x.com where pressing the Back or Forward buttons on a mouse over sponsored posts can open advertiser links in a new tab without an actual, intentional click.

The problem

Some sponsored posts on x.com (for example, ads showing From didit.me) attach click and mouseup handlers that do not properly check which mouse button triggered the event.

As a result, pressing the mouse Back button (button 3) while the pointer is over an ad image or video is treated as a valid click, causing x.com to call window.open() and open the advertiser link in a new tab.

@gabrielmoreira
gabrielmoreira / antergos_install.sh
Last active March 18, 2019 16:36
Antergos Installation Scripts - Install Antergos https://antergos.com/
sudo vim /etc/locale.gen
# uncoment en_US and pt_BR (both ISO e UTF)
sudo locale-gen
sudo vim /etc/locale.conf
# LANG=en_US.UTF-8
# LC_COLLATE=en_US.UTF8
sudo pacman --noconfirm -Syyyyu
sudo pacman -S zsh git vim tk terminator elementary-icon-theme chrome-gnome-shell albert fasd yaourt lynx python-pip muparser vlc docker meld gdm linux-headers
This file has been truncated, but you can view the full file.
[
{"Number":1,"Gender":"male","GivenName":"Leonardo","MiddleInitial":"P","Surname":"Souza","StreetAddress":"Rua Coromandel 1718","City":"Contagem","State":"MG","StateFull":"Minas Gerais","ZipCode":"32186-320","EmailAddress":"LeonardoPintoSouza@gustr.com","Username":"Otioure93","TelephoneNumber":"(31) 9326-4184","TelephoneCountryCode":55,"MothersMaiden":"Martins","Birthday":"2/19/1993","Age":23,"CCType":"Visa","CCNumber":4929974400186397,"CVV2":796,"CCExpires":"11/2021","NationalID":"173.730.067-28","Occupation":"Sales worker driver","Vehicle":"1998 Ford Ranger","Company":"Peaches","Latitude":-19.899046,"Longitude":-44.016137,"GUID":"96d9fbd0-91c9-4a18-a7eb-a21a5adc69eb"},
{"Number":2,"Gender":"male","GivenName":"Cauã","MiddleInitial":"P","Surname":"Castro","StreetAddress":"Bloco Vinte e Nove 1316","City":"Belém","State":"PA","StateFull":"Pará","ZipCode":"66090-780","EmailAddress":"CauaPintoCastro@superrito.com","Username":"Sataked82","TelephoneNumber":"(91) 4977-7042","TelephoneCountryCode":55,"MothersMaiden"
@gabrielmoreira
gabrielmoreira / manjaro-install.sh
Last active May 2, 2023 18:16
Manjaro Install script
# Prepare pacman
sudo mkdir -p /root/.gnupg
sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro && sudo pacman-key --refresh-keys
# Remove packages
sudo pacman -R empathy accerciser gnome-chess gnome-sudoku gnome-tetravex polari five-or-more four-in-a-row steam-native ipython hitori gnome-klotski steam quadrapassel gnome-nibbles aisleriot lightsoff gnome-mahjongg gnome-mines iagno gnome-robots tali swell-foop
# Upgrade all
sudo pacman -Syyu
This file has been truncated, but you can view the full file.
__SSTOKENSTRING = "@generated SignedSource<<dbe928e1275c495c1922c1bf063ffb70>>";
! function(e) {
function t(e) {
function t() {
var t = Array.prototype.map.call(arguments, function(e) {
if (null == e) return null === e ? "null" : "undefined";
if ("string" == typeof e) return '"' + e + '"';
try {
return JSON.stringify(e)
} catch (t) {