Skip to content

Instantly share code, notes, and snippets.

View monperrus's full-sized avatar

Martin Monperrus monperrus

View GitHub Profile
@monperrus
monperrus / codex-openrouter-gist.md
Last active April 18, 2026 18:16
Running Codex on top of OpenRouter

Running Codex on top of OpenRouter

Codex CLI supports custom model providers, so you can point it at OpenRouter instead of the default OpenAI endpoint.

Wrapper script

#!/bin/bash
set -euo pipefail
@monperrus
monperrus / PR_DESCRIPTION.txt
Last active April 15, 2026 06:31
Proportion of Anonymous Edits on English Wikipedia — March 2026
## Result: Proportion of Anonymous Edits on English Wikipedia — March 2026
Using the [Wikimedia Analytics REST API](https://wikimedia.org/api/rest_v1/), edit counts for the last complete month (March 2026):
| Metric | Count |
|---|---|
| Total edits | 5,389,374 |
| Anonymous edits | 454,619 |
| **Proportion anonymous** | **8.44%** |
@monperrus
monperrus / note.md
Created April 15, 2026 05:38
list of allowed domains in claude.ai sandboxed agents (April 15 2026)

From the network configuration:

Allowed domains only:

  • api.anthropic.com
  • archive.ubuntu.com
  • crates.io
  • files.pythonhosted.org
  • github.com
  • index.crates.io
  • npmjs.com / npmjs.org / www.npmjs.com / www.npmjs.org
@monperrus
monperrus / enable-sponsorship-github.py
Last active March 21, 2026 06:45
Python script to enable GitHub sponsorships for all repositories in an organization using the GraphQL mutation API.
#! /usr/bin/env python3
"""Enable GitHub sponsorships for all repositories in an organization.
This script:
- Reads a GitHub personal access token from the local keyring
- Lists all repositories in the configured organization
- Skips archived repositories
- Enables the sponsorship button on each remaining repository via the GitHub API
Requirements:
#!/usr/bin/env python3
"""
JupyterLab Terminal Tmux Manager.
This script provides multiple ways to interact with JupyterLab terminals:
1. Tmux Orchestrator: Launches a tmux session where each window is connected to
an active JupyterHub terminal. Inside tmux, 'c' creates a new remote terminal.
2. One-shot Execution: Creates a temporary terminal to run a single command
(passed as an argument or piped) and prints the output.
3. Terminal Listing: Lists all active terminals and their last activity.
@monperrus
monperrus / maven_repo_finder.py
Created February 5, 2026 11:14
Script to identify all <repository> and <pluginRepository> in a Maven dependency tree.
#!/usr/bin/env python3
"""
Script to identify all <repository> and <pluginRepository> in a Maven dependency tree.
Usage:
python maven_repo_finder.py <pom.xml or directory>
Author: Martin Monperrus
"""
@monperrus
monperrus / doc.md
Last active January 17, 2026 05:54
Dark mode in Flatpak Evolution

There are three actions to get Flatpak Evolution in full dark mode.

1. UI

flatpak override --user --env=GTK_THEME=Adwaita:dark org.gnome.Evolution

2. Viewing HTML Messages in dark mode

@monperrus
monperrus / wechat.txt
Created January 8, 2026 17:49
WECHAT PRIVACY POLICY 2025-12-18
WeChat - The new way to connect
WECHAT PRIVACY POLICY
Last Updated: 2025-12-18
SUMMARY
Thank you for using WeChat! We respect your concerns about privacy and appreciate your trust and confidence in us.
@monperrus
monperrus / gist:beaa2732501c84384e960ad7d818bc9c
Last active December 17, 2025 12:01
slides "software supply chain security of web3"
---
author: Martin Monperrus
date: "KTH & mab.xyz"
paging: "%d/%d"
---
# Software Supply Chain Security of Web3
## **Martin Monperrus**
### Professor, IEEE Fellow
### KTH Royal Institute of Technology & mab.xyz
@monperrus
monperrus / trace.json
Created December 1, 2025 14:15
mab.xyz analysis for approve 0x02f9026d011d832c53c7842c26dc2383055
{
"status": "DANGEROUS",
"details": [
{
"address": "0x91480c26C598CD8231951Fc9beE6e48DE2Fb683F",
"first_time": true,
"verification": {
"address": "0x91480c26c598cd8231951fc9bee6e48de2fb683f",
"verification": "verified",
"verifiedAt": "N/A",