Skip to content

Instantly share code, notes, and snippets.

@dramamine
dramamine / kexp.py
Last active August 21, 2023 19:31
KEXP show scraper
import requests
import os
from datetime import datetime, timedelta
destination_path = "shows"
# ids from https://api.kexp.org/v2/shows/
programs = [
3, # expansions
5, # midnight in a perfect world
@dramamine
dramamine / create_effect.sh
Last active May 28, 2020 00:33
Create new effect for FFGL by copying the example
# run using Git Bash, or equivalent
# run from your local copy of the ffgl repo
# first parameter is the effect filename to use. CamelCase, no spaces
create_effect () {
cp build/windows/AddSubtract.vcxproj build/windows/$1.vcxproj
sed -i "/ProjectGuid/d" build/windows/$1.vcxproj
sed -i "s/AddSubtract/$1/g" build/windows/$1.vcxproj
cp -r source/plugins/AddSubtract source/plugins/$1
cd source/plugins/$1
import aioserial
import asyncio
# find port name by printing them all out
import serial.tools.list_ports
print([comport.device for comport in serial.tools.list_ports.comports()])
# callback for values. try setting this to a useful function
listener = None
/******************************************************************************
rgb-plus-buttons.ino
Byron Jacquot @ SparkFun Electronics
1/6/2015
Example to drive the RGB LEDs and scan the buttons of the RGB button pad.
Exercise 3 in a series of 3.
https://learn.sparkfun.com/tutorials/button-pad-hookup-guide/exercise-3-rgb-leds-and-buttons