Skip to content

Instantly share code, notes, and snippets.


Kenneth Finnegan PhirePhly

View GitHub Profile
PhirePhly / ISA.txt
Created Mar 26, 2012
Intro to the ISA bus by Mark Sokos
View ISA.txt
IBM, IBM/XT, IBM PC, and IBM PC AT are registered trademarks of
International Business Machines Corporation.
This file is designed to give a basic overview of the bus found in
most IBM clone computers, often referred to as the XT or AT bus. The
AT version of the bus is upwardly compatible, which means that cards
PhirePhly / Makefile
Created Jun 12, 2012
A crazy simple SMTP server, for educational purposes only.
View Makefile
cc ccsmtp.c -o ccsmtpd -lpthread
#!/usr/bin/env python
import paho.mqtt.client as mqtt
import RPi.GPIO as GPIO
def on_connect(client, userdata, rc):
#print ("Connected with rc: " + str(rc))
def on_message(client, userdata, msg):
PhirePhly / init
Last active Dec 21, 2020
Init script to go in the root of a Debian install for booting entirely from the initrd file
View init
# Kenneth Finnegan, 2020
# Huge thanks to for most of this code
set -x
set -e
# Create the mount points for all of the virtual file systems which don't
# actually map to disks, but are views into the kernel
PhirePhly / memdjpeg.c
Created Jul 10, 2012
A bare-bones example of how to use jpeglib to decompress a jpg in memory.
View memdjpeg.c
// memdjpeg - A super simple example of how to decode a jpeg in memory
// Kenneth Finnegan, 2012
// After installing jpeglib, compile with:
// cc memdjpeg.c -ljpeg -o memdjpeg
// Run with:
// ./memdjpeg filename.jpg
PhirePhly /
Created Jan 15, 2012
A simple example of how to use cron and bash to generate prowl notifications
# Kenneth Finnegan, 2012
# Posts growl notifications to iOS device using prowl & curl
# To have run by cron at 8:30 daily, add the following to your crontab
# 30 8 * * * /mnt/storage/scripts/
PhirePhly /
Created May 31, 2012
Use a Dot Matrix Printer to print Tweets as they happen
# Kenneth Finnegan, 2012
# TwitterMatrixTicker
# Given a username and an ascii printer, checks for new mentions and
# prints them one at a time to the printer.
# Expected usage is either spun off into the background >/dev/null or
# on a detachable screen so you can monitor progress.
View prettypatterns.bas
5 DEF FNA(Z) = 30 * EXP(-Z*Z/100)
100 CLS
110 FOR X = -30 TO 30 STEP 1.5
120 L = 0
130 Y1 = 5 * INT(SQR(900-X*X)/5)
140 FOR Y = Y1 TO -Y1 STEP -5
150 Z = INT(25 + FNA(SQR(X*X+Y*Y))-.7*Y)
160 IF Z<=L THEN 190
170 L = Z
PhirePhly /
Last active Sep 20, 2019
Conf files for BIND catalog files example
#!/usr/bin/env python3
import hashlib
import sys
print (hashlib.sha1([1]).to_wire()).hexdigest())
View USI_I2C.c
// I2C library using USI hardware support
// Kenneth Finnegan, 2010
// Heavily based on Atmel application note AVR310
#include <util/delay.h>
#include <avr/io.h>
#include <inttypes.h>
//#define PARAM_VERIFY