Skip to content

Instantly share code, notes, and snippets.

View russkel's full-sized avatar
😴
likely tired

Russ russkel

😴
likely tired
View GitHub Profile
openapi: 3.0.1
info:
title: Shortcut API
description: Shortcut API
version: "3.0"
servers:
- url: https://api.app.shortcut.com/
security:
- api_token: []
paths:
@russkel
russkel / tmdb_csv.py
Created May 1, 2022 04:43
TMDB list to CSV for import on Letterboxd
import tmdbsimple as tmdb
import csv
tmdb.API_KEY = 'YOUR API KEY HERE'
list_id = ID OF THE LIST
movies = tmdb.Lists(list_id).info()['items']
movie_ids = [mov['id'] for mov in movies]
with open(f"tmdb_{list_id}.csv", "w") as f:
#
# IMPORTANT NOTE:
#
# THIS FILE IS MAYBE JUST ONE OF MANY CONFIGURATION FILES IN THIS DIRECTORY.
# SETTINGS MADE IN OTHER FILES CAN OVERRIDE VALUES THAT YOU CHANGE HERE. GO
# LOOK FOR OTHER CONFIGURATION FILES! CHECK THE MANUAL AND INSTALLATION NOTES
# (like README.Debian) FOR MORE DETAILS!
#
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
@russkel
russkel / aliases.sh
Last active April 19, 2019 00:55
Handy aliases
# obtains external IP address
alias whatismyip="curl -s ipecho.net/plain | xargs -0 echo"
# linux xorg copy/paste implementation - mirroring the macos commands
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
# pipe the destination machines clipboard to local clipboard
alias osxnetwork-paste='ssh OSX_MACHINENAME.local pbpaste | pbcopy'
from itertools import groupby
def break_into(it, count):
def keyfunc(elem):
keyfunc.counter += 1
return (keyfunc.counter-1)//count
keyfunc.counter = 0
return (g for k, g in groupby(it, keyfunc))