Skip to content

Instantly share code, notes, and snippets.

View ke4roh's full-sized avatar

Jim Scarborough ke4roh

View GitHub Profile
@ke4roh
ke4roh / scrapelists.py
Created June 29, 2017 14:28
Fetch Amy Siskind's Authoritarianism list
#!/usr/bin/env python3
import os
lists=list([x.strip().split(": ",1)[1] for x in
"""Week 1: https://goo.gl/KWlyOO Week 2: https://goo.gl/Pn7MFs
Week 3: https://goo.gl/CZwxsX Week 4: https://goo.gl/JhwuON
Week 5: https://goo.gl/TGM6x8 Week 6: https://goo.gl/uhyjxe
Week 7: https://goo.gl/bMdhTG Week 8: https://goo.gl/89MW8h
Week 9: https://goo.gl/ekv9wE Week 10: https://goo.gl/RETyH1
Week 11: https://goo.gl/6cs0tt Week 12: https://goo.gl/bRMx5o
@ke4roh
ke4roh / ccmonitor.sh
Created February 1, 2019 16:39
Monitor the charging station at the Raleigh City Center parking deck and report its status to Google Chat
#!/bin/bash
. ./.cccreds
function ccstatus {
curl -X POST \
http://periscope.raleighnc.gov/periscopeApi/sustainability.getEvFocusXml \
--data-binary '<str name="val" val="" />' \
-H 'Content-type: text/xml' \
--compressed \
@ke4roh
ke4roh / prune
Last active December 3, 2019 19:41
Prune merged branches from git local and remote
#!/bin/bash
# This will prune merged and deleted branches from your git repository.
# It assumes you're on a "master" branch tracking the origin you like.
#
# To run it, you need git (duh), perl, cut, grep and xargs. Pretty standard stuff.
git=/usr/bin/git
master=$(git branch | grep "^\*" | cut -f2 -d\ )
@ke4roh
ke4roh / exportAttachments
Created September 15, 2020 22:46
Export attachments from an iPhone backup
#!/bin/bash
# Construct a tree of folders to match the structure
# (below the root) given for iPhone text message
# attachments, using symbolic links to the actual files
# in the backup.
#
# The text message file is 3d0d7e5fb2ce288813306e4d4636395e047a3d28
# See also https://osxdaily.com/2010/07/08/read-iphone-sms-backup/
# https://commons.erau.edu/cgi/viewcontent.cgi?article=1099&context=jdfsl