Skip to content

Instantly share code, notes, and snippets.

View craftyjon's full-sized avatar

Jon Evans craftyjon

View GitHub Profile
#!/bin/bash
SCRIPT_VERSION=0.4.60
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
#################################################################################
#Copyright (C) 2007 Free Software Foundation.
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
@craftyjon
craftyjon / xmas.py
Created December 8, 2012 19:46
xmas
import serial
import time
import struct
import colorsys
import sys
import math
import random
def output(strand, data):
@craftyjon
craftyjon / gist:2aa9d05ee55ed2f0edaa
Last active August 29, 2015 14:23
linear to log test
import math
import numpy as np
import matplotlib.pyplot as plt
a = np.arange(0, 1024)
lin_fft = 1.0 + np.sin(a)
frequencies = (a / 1024.0) * 22050
#plt.plot(frequencies, lin_fft)
{
"port": 3021,
"outputs": [
{
"port": "/dev/ttyACM0",
"first-strand": 0,
"last-strand": 7
},
{
"port": "/dev/ttyACM1",
@craftyjon
craftyjon / netdiff.py
Last active May 14, 2019 03:56
KiCad netlist comparator
#!/usr/bin/env python3
# Copyright (c) 2019 Jon Evans <jon@craftyjon.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: