Skip to content

Instantly share code, notes, and snippets.

import sqlite3
from urllib.parse import unquote
from urllib.parse import parse_qs
dbPath = "./com.plexapp.plugins.library.db"
conn = sqlite3.connect(dbPath)
c = conn.cursor()
c2 = conn.cursor()
doviTitles = c.execute('''SELECT metadata_items.title, media_items.id, media_streams.extra_data FROM media_items
unbind C-b
set -g prefix C-a
bind -r a send-prefix
bind C-a last-window
# https://gist.github.com/admackin/4507371
# fix ssh agent when tmux is detached
# See .ssh/rc for socket linking
set -g update-environment -r
set-environment -g SSH_AUTH_SOCK $HOME/.ssh/agent.sock
@grahams
grahams / spring2023.md
Last active March 2, 2023 18:16
2023 Red Sox Spring Training Broadcast Schedule
DATE OPPONENT TIME TV Radio
02/24 Huskies 01:05 PM NESN
02/25 @Braves 01:05 PM NESN WEEI
02/26 Rays 01:05 PM NESN WEEI 93.7
02/27 Twins 01:05 PM NESN WEEI
02/28 @Marlins 06:40 PM NESN+ WEEI
03/01 @Astros 01:05 PM WEEI 850
03/02 Phillies 12:05 PM ESPN WEEI 850
03/03 @Twins 01:05 PM WEEI 850
@grahams
grahams / vidsnarf
Last active December 13, 2022 19:42
#!/usr/bin/env bash
OUTPUTNAME=out.mkv
if [ $# -eq 2 ]; then
OUTPUTNAME=$2
fi
ffmpeg -i "$1" -c copy "$OUTPUTNAME"

2022 Red Sox Spring Training Broadcast Schedule

DATE OPPONENT TIME TV Radio
3/17 Minnesota 1:05PM NESN WEEI 850 AM
3/18 Tampa Bay 1:05PM NESN WEEI 850 AM
3/19 @Tampa Bay 1:05PM NESN WEEI 93.7 FM
3/20 Baltimore 1:05PM NESN WEEI 93.7 FM
3/21 Atlanta 1:05PM WEEI 93.7 FM
3/22 @Tampa Bay 1:05PM BSSUN WEEI 850 AM
@grahams
grahams / .screenrc
Created December 13, 2021 21:27 — forked from bcomnes/.screenrc
ssh agent forwarding in tmux and gnu screen
# Fix agent forwarding
# https://gist.github.com/martijnvermaat/8070533
# http://techblog.appnexus.com/2011/managing-ssh-sockets-in-gnu-screen/
# See .ssh/rc for socket linking
unsetenv SSH_AUTH_SOCK
setenv SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock.$HOSTNAME
@grahams
grahams / gist:6bb60e118a742a130be53c3a853e3039
Created May 19, 2021 22:47 — forked from gruber/gist:1063574
Walken in LA: Hot Dogs

By Christopher Walken

Do you enjoy eating hot dogs? I hope you won't be put off by my frankness when I tell you that I absolutely love them. In fact, I enjoy no food item more than a freshly-boiled hot dog. Now, I've done a lot of movies, and it's true that I've worked with quite a few celebrities who did not share this opinion. I'm sorry to say that these people have always angered me.

There are two types of people in this world: those who eat hot dogs whenever it is possible to do so, and those who opt to do other things with their free time.

import requests
import asyncio
from dataclasses import dataclass
from pathlib import Path
from os.path import expanduser
@dataclass
class Track:
title: str
#!/usr/bin/env python3
import sqlite3
# /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases
dbPath = "./com.plexapp.plugins.library.db"
conn = sqlite3.connect(dbPath)
c = conn.cursor()
c2 = conn.cursor()
@grahams
grahams / spring-2021.md
Last active February 27, 2021 21:24
2021 Red Sox Spring Training Broadcast Schedule
DATE OPPONENT TIME TV Radio
2/28 @Twins 1:05p WEEI 850 AM
3/01 Braves 1:05p NESN WEEI 850 AM
3/02 Tampa Bay 1:05p ESPN WEEI 850 AM
3/03 @Twins 1:05p WEEI 850 AM
3/04 @Orioles 1:05p WEEI 850 AM
3/05 Rays 1:05p WEEI 850 AM
3/06 Twins 1:05p NESN WEEI 850 AM
3/07 @Braves 1:05p NESN WEEI 850 AM