Skip to content

Instantly share code, notes, and snippets.

View aallan's full-sized avatar

Alasdair Allan aallan

View GitHub Profile
@aallan
aallan / mac-vendor.txt
Last active May 24, 2024 10:36
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@aallan
aallan / counter.pl
Last active February 24, 2021 17:33
Script uses an ARP scan to counter the number of devices on the network and saves this information to an SQLite3 database.
#!/usr/bin/env perl
#+
# Name:
# counter.pl
# Language:
# Perl
/*
Controlling large 7-segment displays via serial
By: Nathan Seidle, SparkFun Electronics
Modified: Alasdair Allan, Babilim Light Industries
Original: February 25th, 2015
Modifications: February 3rd, 2017
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
@aallan
aallan / counter_serial.pl
Last active October 26, 2017 10:27
Script uses an ARP scan to counter the number of devices on the network and saves this information to an SQLite3 database. Outputs the current number of devices to /dev/ttyUSB0.
#!/usr/bin/env perl
#+
# Name:
# counter.pl
# Language:
# Perl
@aallan
aallan / noddle.r
Created March 14, 2017 14:15
Retrieve credit score from noddle.co.uk
library(rvest)
library(httr)
set_config(config(ssl_verifypeer = 0L))
url <- "https://www.noddle.co.uk/"
session <- html_session(url)
session <- jump_to(session, "https://www.noddle.co.uk/account/sign-in")
#session %>% html_node("form") %>% html_form()
#!/bin/python
# Script for shutting down the Raspberry Pi by pressing a button.
# by Inderpreet Singh (30 May 2017)
# http://hackaday.com/2017/05/30/diy-google-aiy/
import RPi.GPIO as GPIO
import time
import os
# Use the Broadcom SOC Pin numbers
@aallan
aallan / retro_phone.py
Last active June 4, 2020 16:59
A Python script managing a Google Voice Assistant living inside a rotary dial phone. Full write up at https://medium.com/@aallan/a-retro-rotary-phone-powered-by-aiy-projects-and-the-raspberry-pi-e516b3ff1528.
#!/usr/bin/env python3
#
# Full write up at https://medium.com/@aallan/a-retro-rotary-phone-powered-by-aiy-projects-and-the-raspberry-pi-e516b3ff1528.
import logging
import sys
import threading
import RPi.GPIO as GPIO
import pygame
@aallan
aallan / mirror_voiceassist.py
Last active October 31, 2017 01:32
Magic Mirror weather implementation using Google Voice Assistant
#!/usr/bin/env python3
import threading
import logging
import subprocess
import sys
import requests
import time
import aiy.assistant.auth_helpers
@aallan
aallan / mirror_cloudapi.py
Created October 29, 2017 00:14
Magic Mirror weather implementation using Google Cloud Speech API
#!/usr/bin/env python3
import threading
import requests
import time
import aiy.audio
import aiy.cloudspeech
import aiy.voicehat
@aallan
aallan / mirror_cloudapi.py
Created October 29, 2017 00:14
Magic Mirror weather implementation using Google Cloud Speech API
#!/usr/bin/env python3
import threading
import requests
import time
import aiy.audio
import aiy.cloudspeech
import aiy.voicehat