Skip to content

Instantly share code, notes, and snippets.

View arachsys's full-sized avatar
💭
Please contact me by email, not via unsolicited GitHub pull requests.

Chris Webb arachsys

💭
Please contact me by email, not via unsolicited GitHub pull requests.
View GitHub Profile
@arachsys
arachsys / wgtunnel.md
Last active November 8, 2025 22:02
Quick wireguard tunnel instructions

Quick wireguard tunnel setup

This is a simple point-to-point tunnel between two hosts with no address restrictions on traffic routed through it. Fixed link-local addresses of fe80::1 and fe80::2 are assigned to the endpoints, suitable for running RFC 5549 link-local BGP.

Generate the secret and public keys

@arachsys
arachsys / neighbour.c
Last active October 31, 2025 11:56
Monitor neighbour status
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <net/if.h>
#include <sys/socket.h>
@arachsys
arachsys / reverse-chatgpt
Last active January 5, 2025 19:42
Reverse ChatGPT
#!/bin/bash
set -o pipefail
shopt -s extglob
export LANG=C.UTF-8
export API=${API:-https://api.openai.com/v1/chat/completions}
export KEY=${KEY:-$(< ~/.config/secrets/openai)}
export MODEL=${MODEL:-gpt-4o}
@arachsys
arachsys / roleplay.kak
Last active January 5, 2025 19:42
Roleplay characters in Kakoune with OpenAI gpt-4o
declare-option str roleplay_api "https://api.openai.com/v1/chat/completions"
declare-option str roleplay_key "openai"
declare-option str roleplay_model "gpt-4o"
declare-option str roleplay_prompt %{
You are an imaginative storyteller collaborating with the user to create
an engaging story. The user sets the scene and writes their character's
dialogue, thoughts, and actions in first person. Your role is to write
the dialogue, thoughts, and actions of other characters, keeping them
consistent with their established motivations, limitations, personality,
@arachsys
arachsys / ptywrap.c
Last active November 23, 2024 13:36
Wrap command stdout and/or stderr in a pty
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pty.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
@arachsys
arachsys / README
Last active April 23, 2024 19:02
Obtaining a shell on Yamaha Montage
This content has moved to https://arachsys.github.io/montage/
@arachsys
arachsys / README
Last active January 7, 2023 16:06
Fixing CFX PopStudioGrand on Yamaha Montage
This content has moved to https://arachsys.github.io/montage/
@arachsys
arachsys / README
Last active April 23, 2024 19:05
Motif XF/XS arpeggio and waveform mapping from 5pinDIN on motifator.com
This content has moved to https://github.com/arachsys/motifxf/
@arachsys
arachsys / README
Last active January 7, 2023 16:19
Filter out OpenAir airspace above specified flight level
This content has moved to https://github.com/arachsys/pg-tools/
@arachsys
arachsys / README
Last active January 7, 2023 16:10
Yamaha YSFC file format
This content has moved to https://github.com/arachsys/motifxf/