Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Evans craftyjon

View GitHub Profile
@craftyjon
craftyjon / netdiff.py
Last active May 14, 2019
KiCad netlist comparator
View netdiff.py
#!/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:
View gist:28327039a6b93cb7ba6f0575a3626141
{
"port": 3021,
"outputs": [
{
"port": "/dev/ttyACM0",
"first-strand": 0,
"last-strand": 7
},
{
"port": "/dev/ttyACM1",
View gist:2aa9d05ee55ed2f0edaa
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)
View xmas.py
import serial
import time
import struct
import colorsys
import sys
import math
import random
def output(strand, data):
View alsa-info.sh
#!/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