Skip to content

Instantly share code, notes, and snippets.

@glenpike
glenpike / midi_ym2149.py
Last active April 13, 2022 22:03
Pico + YM2149 sound chip + MIDI in
# Raspberry Pi Pico + YM2149 Soundchip + MIDI
# http://www.ym2149.com/ym2149.pdf
# Pins
# Pico -> YM2149 (DIL)
# GP5 -> CLOCK (22)
# GP6 -> BC1 (29)
# GP7 -> BDIR (27)
# GP8 to GP15 -> DA0 to DA7 (37 to 30)
# VBUS to RESET (23)
@glenpike
glenpike / en.yml
Created February 10, 2022 14:11
test yaml
---
en:
look-after-yourself-1:
title: Look after yourself
description: Learn to look after yourself, while learning how to use Scratch and work your way towards being an independent programmer.
app-inventor-for-social-enterprise:
title: App Inventor for social innovation
description: Learn to make apps for Android devices by doing projects that can help people in your community.
coderdojo-html_css:
title: CoderDojo HTML & CSS
@glenpike
glenpike / Building Bespokesynth
Last active September 15, 2021 16:22
Building Bespokesynth on RPi 400
# Clone repo
git clone https://github.com/awwbees/BespokeSynth.git
cd BespokeSynth/Builds/LinuxMakefile
make CXX=g++ -j4
# May need extra dependencies installing on the RPi
# The linux Makefile generated by Juce doesn't necessarily work out of the box
# ...there seems to be misconfigured paths for including the OpenGL stuff - get errors like 'GL_RGB was not declared in this scope' when it tries to build the HelpDisplay stuff
@glenpike
glenpike / ym2149_test.py
Last active December 1, 2023 02:34
# Raspberry Pi Pico + YM2149 Soundchip test example
# Raspberry Pi Pico + YM2149 Soundchip test example
# Based on https://github.com/FlorentFlament/ym2149-test
# http://www.ym2149.com/ym2149.pdf
# Pins
# Pico -> YM2149 (DIL)
# GP5 -> CLOCK (22)
# GP6 -> BC1 (29)
# GP7 -> BDIR (27)
# GP8 to GP15 -> DA0 to DA7 (37 to 30)
@glenpike
glenpike / gist:0b0d7619b73b1b5d937ae5bc09ec19b2
Created January 8, 2018 18:37
Express route to transcode an audio file.
//FIXME - investigate settings, etc.
function transcode(file) {
var spawn = require('child_process').spawn
var decode = spawn('flac', [
'--decode',
'--stdout',
file
])
@glenpike
glenpike / index.js
Created April 30, 2017 21:16
Serve Swagger Doc's with Koa
/* Serve a swagger doc with Koa */
const Koa = require('koa');
const koaSwagger = require('koa2-swagger-ui');
//const yaml = require('yamljs');
//const spec = yaml.load('./music-api.yml');
const app = new Koa();
app.use(koaSwagger({
routePrefix: '/swagger', // host at /swagger instead of default /docs
@glenpike
glenpike / Dockerfile
Last active February 4, 2018 17:21
Quick and dirty Couchbase Server startup in a Docker container with docker-compose
FROM couchbase:community-4.5.0
EXPOSE 8091 8092 8093 9100 9101 9102 9103 9104 9105 9998 9999 11207 11209 11210 11211 11214 11215 18091 18092 18093 4369 21100-21300
ENV ADMIN_LOGIN=root
ENV ADMIN_PASSWORD=foobar
ENV CLUSTER_RAM_QUOTA=512
ENV CLUSTER_INDEX_RAM_QUOTA=256
@glenpike
glenpike / npm shell commands
Last active February 1, 2017 15:27
List all global npm packages when you want to install them with a new nvm version
#list top level packages, extract the package name, remove the .nvm line, remove the version number, reduce to single line
npm ls -g --depth=0 | cut -d ' ' -f2 | grep -v '.nvm' | sed -e 's/@.*//' | tr '\n' ' '
@glenpike
glenpike / flare.json
Last active November 1, 2016 14:14 — forked from GerHobbelt/.gitignore
d3.js: using tree layout for graphs which have nodes with multiple 'parents'
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},