Skip to content

Instantly share code, notes, and snippets.

View abythell's full-sized avatar

Andrew Bythell abythell

View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Andrew Bythell",
"label": "Electrical Engineer (P. Eng.)",
"summary": "I'm an analytical troubleshooter and solve problems using a wide range of skills and tools, from listening to logic, soldering irons to solar panels, and computer chips to code. I like connecting systems together using APIs and building hardware that bridges the real world and the Internet. Being an Engineer, I value efficiency, clear and direct communication, well-written documentation, and good beer.",
"email": "abythell@ieee.org",
@abythell
abythell / pro-mini-isp.patch
Last active May 23, 2023 21:04
Arduino Pro Mini Bootloader Patch. Fixes EEWE compiler errors and adjusts the Makefile to use an STK500 programmer on /dev/ttyS0
diff --git a/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c
index 2b9fefa..046de0c 100755
--- a/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c
+++ b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c
@@ -580,7 +580,7 @@ int main(void)
/* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
cli(); //Disable interrupts, just to be sure
-#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
+#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega328P__)
@abythell
abythell / thingspeak-install.sh
Last active May 22, 2023 18:40
Bash script to install a Thingspeak server on Ubuntu Server 12.04. Raspbian (2014-01-07-wheezy-raspbian). and possibly Debian-based distros.
#!/bin/bash
# Automatic install of Thingspeak server on Ubuntu 12.04 / Raspbmc / Debian (?)
# Updated to use ruby 2.1.4
## Install required packages
sudo apt-get update
sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev
## Install ruby
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz
@abythell
abythell / rpi-rxtx-java.sh
Last active December 22, 2021 14:34
Sample script to run Java applications on Raspbian with RXTX
#!/bin/sh
#
# Configure Java for RXTX on embedded platforms like Raspberry Pi (Raspbian) and Beaglebone (Debian)
#
if [ -e "/dev/ttyAMA0" ] || [ -e "/dev/ttyO0" ]
then
for port in `find /dev -name 'tty*'`
do
@abythell
abythell / Password.java
Last active July 2, 2020 14:03
Using Unbound LDAP and JCIFS, create SMB/NTLM and LDAP password hashes from plaintext, then update LDAP.
/*
* Change passwords stored in LDAP
* Copyright Andrew Bythell, abythell@ieee.org
*/
package com.angryelectron.ldap;
import com.unboundid.ldap.sdk.*;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@abythell
abythell / configure.xml
Last active November 7, 2016 23:49
Ant script to download and configure the Netbeans platform, which enables Netbeans platform applications to be built without the IDE
<!--
Netbeans Platform Download-and-Config
Copyright 2013, 2016, Andrew Bythell <abythell@ieee.org>
http://angryelectron.com/
This Ant script is used to download and configure the Netbeans platform,
allowing Netbeans platform applications to be built without the IDE.
-->
<project name="configure-platform" default="configure" basedir=".">
@abythell
abythell / udisks-glue
Last active October 19, 2016 18:12
Debian/Ubuntu LSB init script for udisks-glue (automount removable media). To use/install, make the script executable, copy to /etc/init.d/udisks-glue, then run "update-rc.d udisks-glue defaults"
#!/bin/bash
### BEGIN INIT INFO
# Provides: udisks-glue
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: udisks-glue automounter
# Description: Automounts removable media
@abythell
abythell / ubuntu-dom0-xen.sh
Last active June 2, 2016 13:33
Bash script to automatically install and configure Xen 4.1 on Ubuntu Server 12.04 LTS
#!/bin/bash
# Setup and configure Xen DomU
# Run as root/sudo on a fresh Ubuntu Server 12.04 LTS install. Reboot when complete.
# Update
apt-get update
apt-get upgrade
# Install Xen hypervisor
apt-get install xen-hypervisor-amd64
@abythell
abythell / ubuntu-domU.sh
Last active March 9, 2016 13:08
Bash script to install Ubuntu 12.04 as a Xen paravitualized domU guest on a Xen host with LVM.
#!/bin/bash
# Script to download, configure, and install Ubuntu as a Xen domU
# Uses existing LVM Volume Group. Must be run as root/sudo.
# Based on instructions at https://help.ubuntu.com/community/Xen
# User Configurable Settings
NAME=ubuntu # name of Domain to create
VG=/dev/domU # existing volume group in which to create a logical volume
LV=$NAME # name of the new logical volume to create
LV_SIZE=5G # size of the new logical volume
@abythell
abythell / thingspeak-install2.sh
Last active February 17, 2016 19:10
Bash script to install Thingspeak server on Ubuntu 12.04LTS using rvm.
#!/bin/bash
# Install Thingspeak server on Ubuntu 12.04 LTS with rvm.
# Andrew Bythell <abythell@ieee.org>
# Install required packages
sudo apt-get -y upgrade
sudo apt-get -y install build-essential mysql-server mysql-client libmysqlclient-dev
sudo apt-get -y install libxml2-dev libxslt-dev git-core curl rubygems
## Install rvm