Skip to content

Instantly share code, notes, and snippets.

View peterc's full-sized avatar
🏠
Working from home

Peter Cooper peterc

🏠
Working from home
View GitHub Profile
We're going to create a preset patch using this guide.
Technical Specification for OP-XY Patch JSON File Format
1. Introduction
1.1 Purpose
The purpose of this document is to provide a comprehensive technical specification for the JSON file format used to store and exchange patch data on the OP-XY device. This specification aims to standardize the structure and content of patch files, ensuring compatibility and consistency across different patches, whether they are synth presets, drum kits, or sample-based instruments. By adhering to this format, developers, sound designers, and users can create, modify, and share patches efficiently and reliably.
1.2 Overview
@dhh
dhh / linux-setup.sh
Last active January 1, 2025 14:01
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@yunruse
yunruse / yt.py
Last active June 14, 2024 04:20
very basic YouTube-to-RSS extractor
#!/usr/bin/env python3
# pip install scrapetube
# for basic operation, use `python -m http.server --cgi`
# and access /cgi-bin/yt.py?c={CHANNEL_ID}
# Note that due to scrapetube limits, dates are fetched as eg "3 days ago"
# so the further in the past a video is, the less precise the date will be.
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active January 7, 2025 18:44
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
#!/usr/bin/env python3
# Conway's Game of Chess
# Copyright (C) 2023 Eric Lesiuta
import argparse
import atexit
import curses
import hashlib
import os
import pickle
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active December 5, 2024 17:40
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@gto76
gto76 / python-cheathseet-by-gpt.md
Last active July 24, 2023 12:53
Comprehensive Python Cheatsheet up to Datetime, generated by ChatGPT after it was provided with the Dictionary section and grilled about the formatting for some time.

Comprehensive Python Cheatsheet

This version of the Comprehensive Python Cheatsheet was generated by ChatGPT after it was provided with the Dictionary section of the original and grilled about the formatting of the generated String and Set sections with approximately 10 queries. The rest were generated using the '<title>?' query.

List

<list> = []                                   # Creates an empty list.
<list> = [<el>, ...]                          # Creates a list with elements.
<el> = <list>[<index>]                        # Accesses the element at index. Raises IndexError if out of bounds.
<list>[<index>] = <el>                        # Assigns element at index. Raises IndexError if out of bounds.
@linkdd
linkdd / node.dockerfile
Last active August 19, 2022 20:07
Javascript SPA with NginX dockerfile
# Tooling configuration files
FROM scratch AS context
ADD package.json \
yarn.lock \
.eslintrc.js \
.eslintignore \
/workspace/
# Source code
@sneakers-the-rat
sneakers-the-rat / clean_pdf.sh
Last active June 24, 2024 18:18
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,