Skip to content

Instantly share code, notes, and snippets.

@jeffehobbs
jeffehobbs / gaz.js
Created October 23, 2021 20:29
get past Newspapers of New England paywall
// get past Newspapers of New England paywall
var background = document.getElementById("ta_background");
background.remove();
var modal = document.getElementById("ta_paywall");
modal.remove();
@jeffehobbs
jeffehobbs / ytpod.py
Last active October 13, 2021 12:50
script to download YouTube videos, shift them to s3, and make a simple podcast feed
# ytpod.py // jeffehobbs@gmail.com
# version 1.1.0
#
# goal: create XML feed + links to m4a versions of YT videos in specific playlist
#
# steps/done:
# 1. parse YT playlist(s), get id + metadata of each video
# 2. download m4a file for each video, save to s3
# 3. create XML file representing overview of feed, save to s3
@jeffehobbs
jeffehobbs / RPi4_parts_list_Oct2021.txt
Created October 11, 2021 21:41
PARTS LIST FOR KICKASS HOME ASSISTANT BUILD
PARTS LIST FOR KICKASS HOME ASSISTANT BUILD
---
Raspberry Pi 4 (4GB) ($75)
https://www.canakit.com/raspberry-pi-4-8gb.html?cid=usd&src=raspberrypi
---
RPi 4 Power Supply ($12.50)
@jeffehobbs
jeffehobbs / bulk_screenshot.py
Created May 16, 2021 16:48
Create screenshots with subtitles (requires pysubparser + ffmpeg)
# bulk screenshotter // May 2021 // jeffehobbs@gmail.com
import os, subprocess
from pysubparser import parser
videos_dir = 'Videos/'
screenshot_dir = 'Screenshots/'
season = 'Season 1/'
video_file_extension = '.mp4'
subtitle_file_extension = '.eng.srt'
@jeffehobbs
jeffehobbs / scrobblelist.py
Created February 1, 2021 01:00
lambda that simplifies the last.fm API payload for easy import into home assistant
import requests, json
from datetime import datetime, timedelta
from flask import Flask, request, jsonify
# pip install requests, flask, zappa
# modify 'USER' and 'API_KEY' to fit
USER = 'YOUR_USER_NAME'
API_KEY = 'YOUR_API_KEY'
@jeffehobbs
jeffehobbs / meetgrinderMA.py
Created June 27, 2020 22:33
MeetgrinderMA Twitter Bot
# meetgrinderMA.py | jeffehobbs@gmail.com | June 2020
# detect meetings, tweet 'em out
import json, requests, feedparser, tweepy, time
from bs4 import BeautifulSoup
# globals
FEED = 'https://www.northamptonma.gov/RSSFeed.aspx?ModID=65&CID=City-Council-95'
DOMAIN = 'https://northamptonma.gov'
@jeffehobbs
jeffehobbs / new_york.json
Last active June 17, 2020 15:32
JSON array of cities and towns in New York
[
"Adams",
"Addison",
"Afton",
"Alabama",
"Albany",
"Albion",
"Alden",
"Alexander",
"Alexandria",
@jeffehobbs
jeffehobbs / oregon.json
Created June 17, 2020 15:26
JSON array of cities and towns in Oregon
[
"Adair Village",
"Adams",
"Adrian",
"Albany",
"Amity",
"Antelope",
"Arlington",
"Ashland",
"Astoria",
@jeffehobbs
jeffehobbs / pennsylvania.json
Last active December 2, 2021 17:22
JSON array of cities and towns in Pennsylvania
[
"Aliquippa",
"Allentown",
"Altoona",
"Arnold",
"Beaver Falls",
"Bethlehem",
"Bloomsburg",
"Bradford",
"Butler",
@jeffehobbs
jeffehobbs / new_jersey.json
Created June 17, 2020 15:19
JSON array of cities and towns in New Jersey
[
"Aberdeen",
"Absecon",
"Alexandria",
"Allamuchy",
"Allendale",
"Allenhurst",
"Allentown",
"Alloway",
"Alpha",