Skip to content

Instantly share code, notes, and snippets.

@edwios
edwios / gist:19e569d487250d39f62fd295985eef1a
Created September 25, 2026 18:21 — forked from tommythorn/gist:129f5c93db491d5f4bff6d6202f429d4
claude-mtplx wrapper to streamline running Claude Code against mtplx
#!/usr/bin/env bash
# claude-mtplx — run the Claude Code CLI against a locally served MTPLX model.
#
# Starts the MTPLX server if it isn't already listening, then execs `claude`
# with the Anthropic-compatible endpoint pointed at it. Any arguments are
# passed straight through to claude, e.g.:
#
# claude-mtplx # interactive session
# claude-mtplx -p "explain this" # one-shot
# claude-mtplx --mtplx-stop # stop the server and exit
@edwios
edwios / NSPrivacyAccessedAPITypes.plist
Created August 17, 2026 14:24
NSPrivacyAccessedAPITypes
<?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>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPI</key>
@edwios
edwios / gnupg-2-1-options.skel
Created May 12, 2026 06:59
gnupg-2-1-options.skel
# These first three lines are not copied to the gpg.conf file in
# the users home directory.
# $Id$
# Options for GnuPG
# Copyright 1998, 1999, 2000, 2001, 2002, 2003,
# 2010 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
@edwios
edwios / Events & Delegates in Unity C#
Created March 13, 2023 07:54 — forked from dylanfries/Events & Delegates in Unity C#
Events and Delegates for Unity (C#)
Events & Delegates
------------------
Events and Delegates were something I struggled with when I was first learning how they worked. Once I figured it out it became one of the most useful and powerful techniques for games. Its especially useful for helping to decouple classes while allowing for messaging.
Delegates - Simply a container for a function that can be used as a variable.
Events - Allows you to specify a delegate that gets called when some event in your code is triggered.
Overview
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFt8ACUBEADGde8BPTcDRFv6vZ356aEiq6YKZhrQCgzlXdrdJh6lXENPKEmN
5PBz/xjubNoLff4zlusaSKso2L6xG0PkSqXanLYAQUIB8TfML01gaBtmO+tIkHZP
o+yvBbtS9679T+twHDCT+t4kkt9FqsHzOSNvSEsqYEZ9/76YRqL0ijAlUOkwawAA
rBu217MEsrCvvsC94V3F6+6hgu+glDSuFPjfBjFIeM5uDJF9al2nB/UFoxwu0l3a
8Jmq6X92X16u0bXyzTxF7nfzhg8Vncp6LPZJteJGrx2OKvLaG8zzqq8bi3IjfJ2l
MVXlK7H9+t+1z2qCvRcu96maI4qrXjAgjja9lSRaTX23ZuhCqtz7egIH+cJgcMQe
zdMAvGSr3lpkQAuFQkIvxqoSg/4qVyzivMQ2ckjJ0IcLrCIy/1SCrgOCgv8XECzz
AJ3pXYkBV+YVWyin/l9W/qMmfVK5SNfGyU0YXkRS+TWcEwaKfa3D7VqM4RcL7Cq/
@edwios
edwios / iOS Backup to Ext HD.md
Created April 4, 2022 09:35
iOS Backup to Ext HD

To summarise the above:

  1. Very important, go to System Preferences -> Security. Click on the Privacy tab and choose Full Disk Access. Click 🔒 at the lower left hand corner to unlock. Then √ the Terminal.app.
  2. In Finder, choose from the menu Go -> Go to folder, then paste the following line: ~/Library/Application Support/MobileSync
  3. You should then see a folder called Backup. Copy this folder to the external hard disk.
  4. Optional: Create a folder called Backup somewhere else on your external harddisk.
  5. Open Terminal app then type: sudo -s When asked, type your Mac login password.
@edwios
edwios / Server.py
Last active June 25, 2021 09:56 — forked from kristoferjoseph/Server.py
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@edwios
edwios / mbpbattmgr.sh
Created May 31, 2021 08:35
Script to optimise MBP battery life
#!/bin/bash
sleeptime=60
BatteryAlert(){
percentage=$(pmset -g batt | egrep "([0-9]+\%).*" -o | cut -f1 -d';' | sed 's/%//' | bc)
charging=`pmset -g batt | egrep "([0-9]+\%).*" -o | cut -f2 -d';' | tr -d ' \n'`
alertlevel=10
chargelevel=75
prefchargelevel=85
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
traffic light
sudo apt-get update
sudo apt-get install libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev -y
wget www.kernel.org/pub/linux/bluetooth/bluez-5.50.tar.xz
tar xvf bluez-5.50.tar.xz && cd bluez-5.50
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental
make -j4
sudo make install
sudo reboot
bluetoothctl -v