Skip to content

Instantly share code, notes, and snippets.

@nedos
nedos / read_saleae.py
Last active April 6, 2018 15:44
This script parses a saleae csv export to generate a verilog simulation file (in picoseconds)
#!/usr/bin/python
import sys
import csv
def print_usage():
print "Usage: {} <csv_file>".format(sys.argv[0])
if len(sys.argv) != 2:
print "Not enough arguments"
print_usage()
@pwuertz
pwuertz / kicad_picknplace_assistant.py
Last active August 13, 2025 18:26
KiCad PCB pick and place assistant
Moved to:
https://github.com/pwuertz/kicad_picknplace_assistant
@dschep
dschep / raspbian-python3.6.rst
Last active October 7, 2025 10:31 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@EntranceJew
EntranceJew / Get-TweetVid.ps1
Created May 17, 2017 20:33
take a twitter m3u8 link and download it properly
# take a twitter m3u8 link and download it properly
function Get-TweetVid {
param( [string]$Uri, [string]$OutDir )
$out_file = (Split-Path $Uri -Leaf).Replace(".m3u8", ".mp4")
$out_path = Join-Path $OutDir $out_file
if( -Not (Test-Path $out_path) ){
mkdir -Path $out_path
}
ffmpeg -i $Uri -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $out_path
}
@AdaRoseCannon
AdaRoseCannon / HTMLElementPlus.js
Last active March 3, 2023 11:33
HTML Element Plus for Web Components
'use strict';
class HTMLElementPlus extends HTMLElement {
static defaultAttributeValue() {
/* the name of the attribute is parsed in as a parameter */
return;
}
static parseAttributeValue(name, value) {
@hexagon5un
hexagon5un / gcodesender.py
Created April 15, 2019 14:54
gcodesender.py with "improved" defaults
#!/usr/bin/python
"""\
Simple g-code streaming script
https://github.com/bborncr/gcodesender.py/blob/master/gcodesender.py
"""
import serial
import time
import argparse
@bd2357
bd2357 / CeedlingWinNotes.txt
Last active May 14, 2024 18:14
Ceedling on Windows notes
Using Ceedling on Windows is a bit more involved than using it in a Linux
environment. It requires Ruby which is not often installed on windows machines,
and while Ceedling can be configures to run with most C compilers, out of the
box it tries to use GCC which is also not generally available on windows.
Now if you are running Windows 10 professional, you can install the bash shell
and things get easier but lets say you are stuck with Windows Home or Windows 7
and you want to do some quick and dirty test driven C coding with simple Mocks,
what is the best way to proceed?
Well it turns out that installing Ruby via the RubyInstaller for Windows
// Copyright (C) 2019, Dan Ravensloft
// SPDX-License-Identifier: GPL-3.0-or-later
library(74series) {
// 7400 quad 2-input NAND gate
cell(7400_4xNAND2) {
area: 3;
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(Y) { direction: output; function: "(A*B)'"; }
}
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
import sys,os,fileinput
def main(argv):
for line in fileinput.input():
bytes = line.lstrip(".byte ").rstrip('\n').split(',')
print(".byte ", end="")