Skip to content

Instantly share code, notes, and snippets.

@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
on run argv
-- get the raw bytes of the artwork into a var
tell application "Music"
if player state is playing then
set currentName to (name of current track)
set currentArtist to (artist of current track)
set currentAlbum to (album of current track)
set currentLength to (time of current track)
set currentId to (persistent ID of current track)
set fileName to "/dev/null"
@grahams
grahams / gpg-as-ssh.md
Last active September 8, 2022 18:56
macOS - use gpg-agent as ssh agent
  1. Install GPG Suite

  2. Ensure the following lines are in .gnupg/gpg-agent.conf:

use-standard-socket
enable-ssh-support
  1. Add these to your shell init:
@grahams
grahams / spring-2020.md
Last active February 24, 2020 19:25
2020 Red Sox Spring Training Broadcast Schedule
DATE OPPONENT TIME TV Radio
2/21 Northeastern 1:05pm NESN
2/22 Rays 1:05pm NESN WEEI 93.7FM
2/23 @Orioles 1:05pm NESN WEEI 93.7FM
2/24 @Rays 1:05pm
2/24 @Twins 1:05pm WEEI 850AM
2/25 Orioles 1:05pm WEEI 850AM
2/26 @Pirates 1:05pm WEEI 850AM
2/27 Phillies 1:05pm WEEI 850AM
https://github.com/SnowboundSoftware/virtualviewer-client/tree/master/js/3rdparty
* COPYRIGHT:
*
* This software module was originally developed by Raphaël Grosbois and
* Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
* Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
* Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
* Centre France S.A) in the course of development of the JPEG2000
* standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
* software module is an implementation of a part of the JPEG 2000
* Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio