Skip to content

Instantly share code, notes, and snippets.

@kueller
kueller / linux_discord_launcher.sh
Last active July 18, 2024 00:34
Script to auto-update Discord on Linux when you have a manual install with a tarball. Change $BIN_DIR and $DOWNLOAD_DIR to fit your locations.
#!/bin/bash
# Setup:
# Change BIN_DIR to one folder *above* where your Discord is installed
# and set DOWNLOAD_DIR to whatever directory you want the temporary
# download to go to.
#
# Then simply launch this script instead of the Discord executable.
DISCORD_URL="https://discord.com/api/download?platform=linux&format=tar.gz"
@kueller
kueller / Bartender Drink Recipes.md
Last active June 11, 2024 07:41
All drink recipes from the Bartender anime, to whatever details were given in the show.

Episode 1 - The Bartender

Mizuwari

  • Whiskey
  • Water

Grasshopper (end/credits)

  • 20ml Crème de cacao
  • 20ml Crème de menthe
  • 20ml Fresh cream
METADATA_START = 0xd000
# Extracts the DTA as raw text from the CONfile specified in "filepath"
# Like everything else in this script, it's probably a terrible way of
# doing it but it functions well enough.
def read_metadata(filepath):
with open(filepath, "rb") as f:
f.seek(METADATA_START)
metadata = []
# Examples:
#
# Muse - Knights of Cydonia (Live at Wembley) :: kueller
# U2 - Even Better Than the Real Thing :: nsw1-6, TomGuy, and Fat Ha1p3rt
#
import sys
import time
with open(sys.argv[1], "r") as f:
#!/bin/bash
# User info
SCREENSHOT_DIR=/home/kueller/videos/screenshots/
COOKIES=/home/kueller/cookies.txt
TITLE="$(youtube-dl --cookies $COOKIES --get-title $1)"
TITLE="${TITLE//\//-}"
SERIES="$(echo "${TITLE% Episode*}")"
SERIES_DIR="$SCREENSHOT_DIR""$SERIES"/
import os
import textwrap
from bs4 import BeautifulSoup
# Writes a block of text to the file outf.
# Lines are formatted to be no longer than 75 characters.
# Special characters are reinterpreted to appear closer to how they
# appear in the browser.
# It is not perfect yet but it's the closest I've gotten so far.
def print_block(block, outf):