Skip to content

Instantly share code, notes, and snippets.

@jeffehobbs
jeffehobbs / michigan.json
Last active June 17, 2020 15:13
JSON array of cities and towns in Michigan
[
"Acme",
"Ada",
"Adams",
"Addison",
"Adrian",
"Aetna",
"Ahmeek",
"Akron",
"Alabaster",
@jeffehobbs
jeffehobbs / ohio.json
Created June 17, 2020 14:43
JSON array of cities and towns in Ohio
[
"Akron",
"Alliance",
"Amherst",
"Ashland",
"Ashtabula",
"Athens",
"Aurora",
"Avon",
"Avon Lake",
@jeffehobbs
jeffehobbs / alabama.json
Created June 17, 2020 14:36
JSON array of cities and towns in Alabama
[
"Abbeville",
"Adamsville",
"Addison",
"Akron",
"Alabaster",
"Albertville",
"Alexander",
"Aliceville",
"Allgood",
@jeffehobbs
jeffehobbs / massachusetts.json
Created June 17, 2020 14:17
JSON array of cities and towns in Massachusetts
[
"Abington",
"Acton",
"Acushnet",
"Adams",
"Agawam",
"Alford",
"Amesbury",
"Amherst",
"Andover",
@jeffehobbs
jeffehobbs / vibration_sensor_ESP32_HA_how_to.txt
Last active July 2, 2025 01:47
Vibration Sensor for ESPHome/Home Assistant
GOAL: Send a push notification after the (vibrations from the) dryer cycle has completely stopped.
USING:
* Inexpensive hardware (see below)
* ESPhome (http://esphome.io) for chip firmware
* Home Assistant (http://hass.io) for sensor state machine and push notification.
---
SHOPPING LIST:

Keybase proof

I hereby claim:

  • I am jeffehobbs on github.
  • I am jeffehobbs (https://keybase.io/jeffehobbs) on keybase.
  • I have a public key ASBm6ZogolqJnwXffjo0ZSL2PVn5QM8bcL3vIquzUbWrnwo

To claim this, I am signing this object:

@jeffehobbs
jeffehobbs / make_videos.sh
Created November 9, 2018 17:44
make timelapse videos of sites
#!/bin/bash
root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
today=$(date +%Y-%m-%d)
fps=1
SITES=("al.com" "cleveland.com" "lehighvalleylive.com" "masslive.com" "mlive.com" "newyorkupstate.com" "nj.com" "nola.com" "oregonlive.com" "pennlive.com" "silive.com" "syracuse.com")
for site in "${SITES[@]}"
do
:
@jeffehobbs
jeffehobbs / capture_sites.sh
Last active November 9, 2018 18:09
screenshot all sites in list
#!/bin/bash
root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
SITES=("al.com" "cleveland.com" "lehighvalleylive.com" "masslive.com" "mlive.com" "newyorkupstate.com" "nj.com" "nola.com" "oregonlive.com" "pennlive.com" "silive.com" "syracuse.com")
for site in "${SITES[@]}"
do
:
/usr/bin/python3 $root/screenshot.py --site $site
done
@jeffehobbs
jeffehobbs / screenshot.py
Last active November 9, 2018 16:29
Take numerically arranged screenshots with gated timeouts
#!/usr/bin/env python3
# screenshot.py // take screenshots of URLs
import asyncio, argparse, time, os, glob, signal
from time import strftime
from pyppeteer import launch
parser = argparse.ArgumentParser()
parser.add_argument('--site', help='site to screenshot')
args = parser.parse_args()
@jeffehobbs
jeffehobbs / os-check.py
Last active February 27, 2019 20:42
Checks for new versions of ChromeOS, sends an email if they exist. Python 2.7, requires Sparkpost API key and client library to be installed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# os-check.py // jeffhobbs@gmail.com
# check chromeOS site for specific updates
import csv, urllib2
from sparkpost import SparkPost
# customize the list of devices, email addresses, and add your own SparkPost API key