Skip to content

Instantly share code, notes, and snippets.

View nwithan8's full-sized avatar
💭
ABC - Always Be Coding

Nate Harris nwithan8

💭
ABC - Always Be Coding
View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Nathan Harris",
"label": "Full-Stack Software Engineer and Consultant | Professional Scrum Master",
"image": "https://raw.githubusercontent.com/nwithan8/nwithan8.github.io/master/images/headshot_transparent.png",
"email": "[email protected]",
"url": "https://nateharr.is",
"summary": "Excited to take head-on the fast-paced, high-stakes world of software development.\nRetired journalist.",
"location": {
@nwithan8
nwithan8 / i_dont_care_about_cookies_adp.txt
Created September 15, 2022 23:50
Backup of the I Don't Care About Cookies AdBlock Plus list now that Avast stole the company.
[Adblock Plus 2.0]
! Version: 343.202209151330
! Title: I don't care about cookies
! Expires: 3 days
! Licence: https://www.gnu.org/licenses/gpl-3.0.html
! Homepage: https://www.i-dont-care-about-cookies.eu/
! Last modified: 15 Sep 2022 11:30 UTC
!
!
! GLOBAL RULES
@nwithan8
nwithan8 / multi_commit.sh
Last active April 21, 2022 06:52
Add a single file to multiple local Git repositories and automatically open GitHub PRs
#!/bin/bash
# Copy a set of files to each repo in a dir, create a branch, and push to origin
# Requires GitHub CLI: `brew install gh` and must be logged in with `gh auth login`: https://cli.github.com/manual/
# Usage: multi_commit.sh BRANCH_NAME PATH_TO_LANDING_DIR_IN_REPO_1 PATH_TO_LANDING_DIR_IN_REPO_2 ... PATH_TO_FILE_TO_ADD
# You can edit these variables
MAIN_BRANCH="master"
@nwithan8
nwithan8 / create_reverse_proxy_dns.py
Last active January 8, 2021 02:13
Make an A record on Cloudflare and generate corresponding Apache2 reverse proxy site file
import CloudFlare
import argparse
CLOUDFLARE_API_KEY = "XXXXXXX"
parser = argparse.ArgumentParser(description="Make a reverse proxy file and CloudFlare DNS entry")
parser.add_argument('subdomain',
type=str,
help='new subdomain prefix')
parser.add_argument('domain',
@nwithan8
nwithan8 / bulk_replace_cloudflare_dns.py
Created January 8, 2021 02:10
Update all A records for a CloudFlare domain
import CloudFlare
import argparse
import ipify2
CLOUDFLARE_API_KEY = "XXXXXX"
parser = argparse.ArgumentParser(description="Update all CloudFlare DNS entries for a subdomain with a new IP address")
parser.add_argument('domain',
type=str,
help='Base domain')
@nwithan8
nwithan8 / stitch_ts.py
Last active January 5, 2021 02:13
Collect and stitch together a folder of TS files into a final TS file. Optionally remux to a different file format.
#!/usr/bin/python3
"""
Collect all TS file parts and combine them into one TS file.
Optionally remux the final TS file into a different format.
All audio channels are preserved during processing.
"""
import os
@nwithan8
nwithan8 / timeline_list.py
Last active November 18, 2020 19:42
See what someone else sees on their Twitter timeline by mirroring their timeline to a Twitter list
#!/usr/bin/python3
import tweepy
import argparse
# Fill out Twitter API credentials below
consumer_key = 'xxxx'
consumer_secret = 'xxxx'
access_token = 'xxxx'
access_secret = 'xxxx'
#!/usr/bin/env python
"""
Scrape tweets from multiple users timelines
Indicate usernames by -u <username1> <username2> <username3> ... or -f <text_file_of_usernames>
Indicate start and end dates with -s <start_date in YYYY-MM-DD> and -e <end_date in YYYY-MM-DD>
Indicate tweets from past X days with -a <past_X_days> (overrides start date)
Indicate past X number of tweets (between start and end dates if indicated) with -n <number>
"""
import tweepy # https://github.com/tweepy/tweepy
@nwithan8
nwithan8 / add_plex_section_to_radarr.py
Last active October 29, 2021 07:31
Add all items from a Plex Media Server library section to a Radarr instance.
"""
Add all items from a Plex Media Server library section to a Radarr instance.
Use this to mass import a Plex movie section into Radarr in the event of Radarr reset or database corruption.
Copyright 2020 - Nate Harris
"""
"""
Setup: ``pip install requests progress plexapi``
"""
@nwithan8
nwithan8 / playlist_to_channel.py
Last active September 2, 2020 22:57
Add all items from a Plex playlist to a dizqueTV channel
# RUN THIS FIRST:
# pip install plexapi dizqueTV
from typing import List, Union
from plexapi import myplex, server, media, library, playlist
from dizqueTV import API
# COMPLETE THESE SETTINGS
DIZQUETV_URL = "http://localhost:8000"
DIZQUETV_CHANNEL_NUMBER = 1