Skip to content

Instantly share code, notes, and snippets.

View PhirePhly's full-sized avatar

Kenneth Finnegan PhirePhly

View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 2. in line 1.
Designing Distributed Systems Brendan Burns http://amzn.to/2FUZr57
BASIC IBM
Computer Design Development: Principal Papers Earl Swartzlander Jr http://amzn.to/2D27VUX
Compiler Construction Indecipherable
Assembly Language Subroutines for MS-DOS Computers Leo Scanlon http://amzn.to/2FkbPL7
Principles of Compiler Design (Dragon Book) Aho, Ullman http://amzn.to/2FWnwsg
Linear System Theory: The State Space Approach Zadeh, Desoer http://amzn.to/2FW3HBq
The Anatomy of a Compiler Lee http://amzn.to/2G0mtru
Computer Dictionary and Handbook Sippl http://amzn.to/2Fj1iiW
His Life Work Knuth http://amzn.to/2FWTGE5
@PhirePhly
PhirePhly / create_raspbian_mirror.sh
Last active July 9, 2021 09:26
Mirroring script for Raspbian repos
#!/bin/bash
#
#
## Setting variables with explanations.
# Set root working directory for where you want to store your mirrors
MIRRORBASE=/home/kenneth/mirror
mkdir -p $MIRRORBASE
#
@PhirePhly
PhirePhly / dnsmasq.conf
Created August 2, 2017 02:41
Config files for Raspberry Pi BlackFlower Server
# /etc/dnsmasq.conf
# Specify what the local domain is
local=/eventlan.net/
domain=eventlan.net
# Hardcode the LAN domain to point at the CAD server
address=/eventlan.net/10.44.4.1
# Bind to the wlan0 interface specifically
@PhirePhly
PhirePhly / YTChanViewCounter.ino
Created June 25, 2017 20:25
YouTube API to MAX7219 display Widget
// YouTube Channel View Counter
// Kenneth Finnegan, 2017
//
// Given a WiFi SSID + password, and YouTube API key + channel ID, displays the
// current total views count on an attached MAX7219 eight digit display
#include <YoutubeApi.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
@PhirePhly
PhirePhly / gist:a5410b767cf4b1d8a690c95aaeedc791
Created December 11, 2016 18:45
Counts of APRX in May-July 2016
10 APRX
1 APRX08
1 APRX16
4 APRX18
1 APRX1C
1 APRX1D
2 APRX1E
3 APRX1L
3 APRX1M
5 APRX2
@PhirePhly
PhirePhly / aprx.conf.kd0yuj
Created November 6, 2016 00:44
KD0YUJ configs for diagnostics
mycall KD0YUJ #This is my call sign
myloc lat 3927.93N lon 09418.34W #Location of my digi-gate
<aprsis>
passcode ***** #passcode for APRS-IS
server rotate.aprs.net 14580 #APRS-IS Server and Port
filter r/39.46550/-94.30566/80.4672 #grab within 50 mile radius of station from APRS-IS
filter b/EAX* #grab WX bulletins-objects NWS Pleasant Hill office
</aprsis>
<logging>
pidfile /var/run/aprx.pid #default
@PhirePhly
PhirePhly / dayofweek.c
Created October 14, 2016 01:22
Calculate the local day of the week from Unix time and time zone offset
#include <stdio.h>
#include <time.h>
// Calculate the current day of the week as an integer
// now - Unix timestamp like that from time(NULL)
// tz_offset - Number of hours off from UTC; i.e. PST = -8
// Return value: Sunday=0, Monday=1, ... Saturday=6
int dayofweek(time_t now, int tz_offset) {
// Calculate number of seconds since midnight 1 Jan 1970 local time
time_t localtime = now + (tz_offset * 60 * 60);
#!/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))
client.subscribe("kwf/demo/led")
def on_message(client, userdata, msg):
import paho.mqtt.client as mqtt
import RPi.GPIO as GPIO
def on_connect(client, userdata, rc):
print ("Connected with rc: " + str(rc))
client.subscribe("kwf/demo/led")
def on_message(client, userdata, msg):
print ("Topic: "+ msg.topic+"\nMessage: "+str(msg.payload))
if "green" in msg.payload:
@PhirePhly
PhirePhly / beacon_and_remove.sh
Created August 22, 2015 03:44
Short exec file for APRX to wrap a beacon file to delete it upon beaconing
#!/bin/bash
BEACONFILE="./beaconfile.txt"
if [ -f $BEACONFILE ]; then
cat ./beaconfile.txt
rm ./beaconfile.txt
fi