Skip to content

Instantly share code, notes, and snippets.

View arbal's full-sized avatar
👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);

Arbal arbal

👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);
  • Los Angeles, CA
  • 12:19 (UTC -07:00)
View GitHub Profile
@arbal
arbal / opencv-cuda.md
Created July 23, 2025 18:21 — forked from Birch-san/opencv-cuda.md
Building OpenCV with CUDA acceleration

For CUDA 12, see Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10 for how to install Nvidia driver 530, gcc 12 and CUDA 12.1.1 libraries.
If you want CUDA 11.8, then you can use latest Nvidia driver from Production branch, 525, with gcc 11.

Activate your conda environment, if you haven't done so already.

CUDA 11:
Make sure gcc 11 is the default gcc for your OS, or select gcc 11 explicitly.
CUDA 12:
Make sure gcc 12 is the default gcc for your OS, or select gcc 12 explicitly.
Check CUDA_DIR below points to the CUDA installation you wish to use.

@arbal
arbal / gemini-cli.js
Created July 17, 2025 18:42 — forked from musistudio/gemini-cli.js
GeminiCLITransformer
const os = require("os");
const path = require("path");
const fs = require("fs/promises");
const OAUTH_FILE = path.join(os.homedir(), ".gemini", "oauth_creds.json");
class GeminiCLITransformer {
name = "gemini-cli";
constructor(options) {
@arbal
arbal / amucfg.py
Created July 4, 2025 01:48 — forked from wsuff/amucfg.py
amucfg.py: Automating AI Model Metadata for Aider with OpenRouter
import requests
import json
import os
import time
import yaml
import argparse
import re
from datetime import datetime
OPENROUTER_API_BASE = "https://openrouter.ai/api/v1"
@arbal
arbal / .env.example
Created June 30, 2025 00:28 — forked from matthewhand/.env.example
LiteLLM Load Balancing with free endpoints (nested configs)
SAMBANOVA_API_KEY=
GEMINI_API_KEY=
HUGGINGFACE_API_KEY=
HYPERBOLIC_API_KEY=
OPENAI_API_KEY=
GROQ_API_KEY=
XAI_API_KEY=
OPENROUTER_API_KEY=
COHERE_API_KEY=
TOGETHERAI_API_KEY=
@arbal
arbal / icloud_ubiquity_fix.sh
Created May 13, 2025 18:04 — forked from luckman212/icloud_ubiquity_fix.sh
Fix for stuck iCloud Ubiquity containers reported as Client Truth Client Truth Unclean Items
#!/usr/bin/env bash
CLIENT_DB="$HOME/Library/Application Support/CloudDocs/session/db/client.db"
[[ -e $CLIENT_DB ]] || { echo "db not found"; exit 1; }
mapfile -t ITEM_IDS < <(sqlite3 "$CLIENT_DB" <<-EOS
SELECT throttle_id
FROM client_sync_up
EOS
)
@arbal
arbal / move-conda-envs.sh
Created April 8, 2025 17:46 — forked from NucciTheBoss/move-conda-envs.sh
Move conda environments to a new location on your Linux system.
#!/usr/bin/env bash
echo "Begin environment relocation."
NEW_ENV_DIR=$1
BASE_ENV=$(conda info --base)
#########################################
#
# Install jq locally
#
@arbal
arbal / Dockerfile cheat sheet
Created April 1, 2025 23:34 — forked from githubfoam/Dockerfile cheat sheet
Dockerfile cheat sheet
#=====================================================================
To Apply the Cron Job in Docker:
1️⃣ Edit the cron file:
echo "10 * * * * root ansible-playbook -i /ansible/inventory-switches.ini /ansible/switch-version.yml >> /var/log/ansible-cron.log 2>&1" > /etc/cron.d/ansible-cron
2️⃣ Set permissions and reload cron:
chmod 0644 /etc/cron.d/ansible-cron
Enable systemd-networkd debugging
mkdir -p /etc/systemd/system/systemd-networkd.service.d/
Create Drop-In /etc/systemd/system/systemd-networkd.service.d/10-debug.conf with following content:
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
And restart systemd-networkd service:
systemctl daemon-reload
@arbal
arbal / get-docker-stats.sh
Created March 24, 2025 05:54 — forked from Makeshift/get-docker-stats.sh
Docker stats in CSV with separated values in bytes
#!/bin/bash
function cleanLine() {
local line key field
line="$1"
key="$2"
field="$3"
echo "$line" | jq -r "$key" | tr -d 'BbIi' | awk "{print toupper(\$$field)}" | numfmt --from=auto
}
@arbal
arbal / compose.yml
Created March 10, 2025 01:47 — forked from Nerahikada/compose.yml
run mitmproxy with tailscale (docker compose)
services:
tailscale:
image: tailscale/tailscale:latest
environment:
- TS_HOSTNAME=mitmproxy
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
volumes:
- ./tailscale:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun