Skip to content

Instantly share code, notes, and snippets.

View colinoflynn's full-sized avatar

Colin O'Flynn colinoflynn

View GitHub Profile
@colinoflynn
colinoflynn / dblib_addparts.py
Created February 9, 2017 03:30
Add all resistor values from Digikey to Altium DB
# -*- coding: utf-8 -*-
import pypyodbc
#Example: Automatically populate library with real P/Ns from Digi-Key
#Open database file (NB: This worked with older .MDB file, haven't updated)
dbconn = pypyodbc.win_connect_mdb(r'newae_dblib\NewAElib_db.MDB')
cur = dbconn.cursor()
sudo apt-get install python2.7 python2.7-dev python2.7-libs python-numpy python-scipy python-pyside python-configobj python-setuptools python-pip python-tk
sudo pip install pyusb
sudo pip install pyqtgraph
sudo pip install matplotlib
git clone https://github.com/newaetech/chipwhisperer.git
cd chipwhisperer
git checkout develop
cd software
python setup.py develop --user
@colinoflynn
colinoflynn / simple-fault-example.ipynb
Last active March 19, 2019 04:49
Simple Fault Example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@colinoflynn
colinoflynn / ioprox_encode.py
Created September 7, 2021 14:27
ioprox Card Numbers to Proxmark Hex Data
# Encodes ioprox data to format used by proxmark, if using a version that doesn't allow you to specify
# the version/facility/cardnumber seperately.
id_str = "XSF(01)66:25342"
version = id_str.split('(')[1].split(')')[0]
facility = id_str.split('(')[1].split(')')[1].split(':')[0]
code = id_str.split(':')[1]
version = int(version, 16) #is this hex? Have only seen 1 or 2 here
@colinoflynn
colinoflynn / ice40_cram_program_ftdi.py
Created January 22, 2022 12:14
iCE40 CRAM (Configuration) Programming via FTDI (for IceBreaker, ice40 breakout boards, etc)
# Example of using PyFTDI to program CRAM on ICE40 FPGA. For example
# if you are using IceBreaker, you'd need to change jumpers to route
# SPI to the FPGA directly instead of the SPI flash.
import pyftdi
from pyftdi.spi import SpiController
import time
class ICE40_ftdi(object):