Skip to content

Instantly share code, notes, and snippets.


Jeff Hobbs jeffehobbs

View GitHub Profile
jeffehobbs / quit_all.scpt
Last active Jul 18, 2022
AppleScript to quit all open Applications on MacOS
View quit_all.scpt
tell application "System Events" to set the visible of every process to true
set allow_list to {"Finder"}
tell application "Finder"
set process_list to the name of every process whose visible is true
end tell
repeat with i from 1 to (number of items in process_list)
set this_process to item i of the process_list
jeffehobbs /
Last active Jun 30, 2022 make cool lookin' twitter-sharable video from .wav file
# |
# Process an .wav audio file, make an .mp4 waveform video suitable for TWTR
# usage: audiofile.wav
import subprocess, random, argparse, os
# get input
parser = argparse.ArgumentParser(description='Process an .wav audio file, make an .mp4 waveform video.')
parser.add_argument('file', type=str, help='filename')
args = parser.parse_args()
jeffehobbs /
Created Jun 24, 2022
# minimally viable recaptcha v3 lambda
from flask import Flask, Response, request, jsonify
from flask_cors import CORS
import requests
SECRET_KEY = 'your_recaptcha_v3_server_side_token'
app = Flask(__name__)
jeffehobbs /
Created Jun 12, 2022
convert mkvs to mp4s via container swap
for i in *.mkv; do
ffmpeg -i "$i" -codec copy "${i%.*}.mp4"
jeffehobbs / zsh
Created Jun 4, 2022
FFMPEG convert all .aif files in directory to .wav
View zsh
mkdir wav; for i in *.aif; do ffmpeg -i "$i" "./wav/${i%.*}.wav"; done
jeffehobbs /
Last active Jun 9, 2022
# |
import requests, json, boto3, random, os, videogrep, configparser
from collections import Counter
from yt_dlp import YoutubeDL
from tweepy import OAuthHandler
from tweepy import API
STOPWORDS = ["i", "we're", "you're", "that's", "it's", "us", "i'm", "me", "my", "myself", "we", "our", "ours", "ourselves", "you", "your", "yours", "yourself", "yourselves", "he", "him", "his", "himself", "she", "her", "hers", "herself", "it", "its", "itself", "they", "them", "their", "theirs", "themselves", "what", "which", "who", "whom", "this", "that", "these", "those", "am", "is", "are", "was", "were", "be", "been", "being", "have", "has", "had", "having", "do", "does", "did", "doing", "a", "an", "the", "and", "but", "if", "or", "because", "as", "until", "while", "of", "at", "by", "for", "with", "about", "against", "between", "into", "through", "during", "before", "after", "above", "below", "to", "from", "up", "down", "in", "out", "on", "off", "over", "under", "again", "further", "then"
jeffehobbs /
Created Mar 22, 2022
loop of fast and slow random audio
import time
import random
import array
import math
import audiocore
import board
import digitalio
import audiobusio
audio = audiobusio.I2SOut(board.GP10, board.GP11, board.GP9)
jeffehobbs /
Last active Apr 4, 2022
simple python script that generates a set of smoothly looping tones
import math, wave, array
filenames = []
for filename in range(32):
x = filename % 8
y = filename / 8
filenames.append(str(math.trunc(y)) + str(x))
# use range to generate tones (lowest Hz, highest Hz, steps in Hz between)
for frequency in range(20, 460, 20):
jeffehobbs / gaz.js
Created Oct 23, 2021
get past Newspapers of New England paywall
View gaz.js
// get past Newspapers of New England paywall
var background = document.getElementById("ta_background");
var modal = document.getElementById("ta_paywall");
jeffehobbs /
Last active Oct 13, 2021
script to download YouTube videos, shift them to s3, and make a simple podcast feed
# //
# 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