Skip to content

Instantly share code, notes, and snippets.

View megamen32's full-sized avatar
🏖️
Counting down until AI fires you

Bezrabotnyi megamen32

🏖️
Counting down until AI fires you
View GitHub Profile
echo "=== VPN ==="
scutil --nc list
echo "=== SYSTEM EXTENSIONS ==="
systemextensionsctl list
echo "=== MDM ==="
profiles status -type enrollment
echo "=== SECURITY PROCESSES ==="
scutil --proxy
networksetup -listallnetworkservices
networksetup -getwebproxy "Wi-Fi"
networksetup -getsecurewebproxy "Wi-Fi"
networksetup -getautoproxyurl "Wi-Fi"
route -n get default
@megamen32
megamen32 / document.wflow
Last active July 8, 2026 09:25
Quick Action workflow for Automator(Mac) to share a gist from files in finder
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMApplicationBuild</key>
<string>534</string>
<key>AMApplicationVersion</key>
<string>2.10</string>
<key>AMDocumentVersion</key>
<string>2</string>
@megamen32
megamen32 / custom-catalog.json
Last active July 8, 2026 09:19
Codex Custom Catalog: MiniMax and Z.AI(GLM) Models (place ~/.codex/model-catalogs/custom-catalog.json)
{
"models": [
{
"slug": "MiniMax/M3",
"display_name": "MiniMax-M3",
"description": "MiniMax",
"default_reasoning_level": "high",
"supported_reasoning_levels": [
{ "effort": "none", "description": "Think-Off" },
{ "effort": "high", "description": "Deep" }
@megamen32
megamen32 / chromeconsole.js
Last active June 22, 2026 22:13
bypass permisions on code-server(vscode) for codex
(() => {
const NEEDLE = "Yes, and don't ask again for commands that start with";
const clickButton = () => {
const buttons = [...document.querySelectorAll('button[role="radio"], button')];
const btn = buttons.find(b => {
const label = b.getAttribute("aria-label") || "";
const text = b.innerText || "";
return (
@megamen32
megamen32 / chatgpt-plugin-autoaprove.js
Created May 14, 2026 09:47
extension for chrome to click aprrove in custom chatgpts
// make-extension.js — запустите через: node make-extension.js
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const EXT_DIR = 'auto-confirm-extension';
if (!fs.existsSync(EXT_DIR)) fs.mkdirSync(EXT_DIR);
const files = {
'manifest.json': `{
@megamen32
megamen32 / notify
Last active May 9, 2026 22:51
mini app for notify to telegram when app ends
#!/usr/bin/env bash
#put to /usr/local/bin/notify
set -u
SECRETS_FILE="$HOME/.config/secrets/notifier.env"
STATE_DIR="$HOME/.local/state/notify"
mkdir -p "$STATE_DIR"
if [ -f "$SECRETS_FILE" ]; then
set -a
@megamen32
megamen32 / codex-auth
Last active August 6, 2026 09:18
Change profiles of codex (vscode extension or app) easily
#!/usr/bin/env bash
set -euo pipefail
# инстукция https://habr.com/ru/articles/1020450/
CODEX_DIR="${CODEX_HOME:-$HOME/.codex}"
AUTH_FILE="$CODEX_DIR/auth.json"
OPENCODE_AUTH_FILE="${OPENCODE_AUTH_FILE:-$HOME/.local/share/opencode/auth.json}"
PROFILES_DIR="${CODEX_AUTH_PROFILES_DIR:-$HOME/.codex-auth-profiles}"
CURRENT_FILE="$PROFILES_DIR/.current_profile"
PROXY_FILE="$PROFILES_DIR/.default_proxy"
CACHE_TIME_FILE="$PROFILES_DIR/.cache_time"
# --- all: run command or script on local + many hosts (bash-only) ------------
all() {
# ---- defaults / env ----
local parallel=${ALL_PARALLEL:-1} # 1=parallel remotes
local run_local=${ALL_LOCAL:-1} # 1=run local too
local local_parallel=${ALL_LOCAL_PARALLEL:-1} # 1=local concurrent with remotes
local timeout=${ALL_TIMEOUT:-8}
local pty=${ALL_PTY:-0}
local sudo_n=${ALL_SUDO_N:-1}
local prefix=${ALL_PREFIX:-1} # kept for backward compatibility
@megamen32
megamen32 / .bashrc
Last active February 27, 2026 16:36
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac