This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Kenneth Finnegan, 2012 | |
# kennethfinnegan.blogspot.com | |
# | |
# Slowly download all Bell Systems technical articles | |
# Best to spin this off in the background or on a screen | |
alias slowget='wget --limit-rate=25k ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kenneth Finnegan, 2021 | |
// | |
// Atmega328P on breadboard with 8MHz crystal. Use the mini pro 3.3V 8MHz board | |
// | |
// Pin 11 is the LED output | |
// Digital Pins 2-5 are DIP switch for time config on boot | |
// Reset button restarts the timer | |
// Using https://github.com/LowPowerLab/LowPower | |
#include <LowPower.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Kenneth Finnegan, 2020 | |
# https://blog.thelifeofkenneth.com/ | |
# Huge thanks to Gandi.net 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Kenneth Finnegan, 2012 | |
# kennethfinnegan.blogspot.com | |
# 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/morningreport.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Kenneth Finnegan, 2012 | |
# kennethfinnegan.blogspot.com | |
# | |
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 DEF FNA(Z) = 30 * EXP(-Z*Z/100) | |
100 CLS | |
105 PRINT:PRINT:PRINT | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dns.name | |
import hashlib | |
import sys | |
print (hashlib.sha1(dns.name.from_text(sys.argv[1]).to_wire()).hexdigest()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I2C library using USI hardware support | |
// Kenneth Finnegan, 2010 | |
// kennethfinnegan.blogspot.com | |
// Heavily based on Atmel application note AVR310 | |
#include <util/delay.h> | |
#include <avr/io.h> | |
#include <inttypes.h> | |
//#define PARAM_VERIFY |