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 / 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/
@arachsys
arachsys / README
Last active January 7, 2023 16:17
Script to convert IGC files to KML for Google Maps
This content has moved to https://github.com/arachsys/pg-tools/
@arachsys
arachsys / README
Last active January 7, 2023 16:12
Record raw 16-bit signed little-endian audio from a Motif XF
This content has moved to https://github.com/arachsys/motifxf/