Skip to content

Instantly share code, notes, and snippets.

View dominickpastore's full-sized avatar

Dominick C. Pastore dominickpastore

View GitHub Profile
@dominickpastore
dominickpastore / Makefile
Last active May 1, 2022 13:58
A Makefile for AVR programs with Unity tests
###############################################################################
# AVR Makefile with Unity Tests
#
# A standard Makefile for use with AVR projects.
# - No changes required except some basic configuration variables at the top
# - Support for unit tests using Unity <http://www.throwtheswitch.org/unity>
# (Assumes unit tests will run natively on the host machine)
#
# Basic instructions:
# 1. Create a directory for your project and place this Makefile in it.
@dominickpastore
dominickpastore / getnifs.py
Last active June 5, 2021 02:40 — forked from chadmiller/getnifs.py
Get network addresses for interfaces on Linux (and possibly macOS and BSDs)
#!/usr/bin/python3
# Based on https://gist.github.com/provegard/1536682, which was
# Based on getifaddrs.py from pydlnadms [http://code.google.com/p/pydlnadms/].
# Only tested on Linux!
from socket import AF_INET, AF_INET6, inet_ntop, if_nametoindex
from ctypes import (
Structure, Union, POINTER,
pointer, get_errno, cast,