Skip to content

Instantly share code, notes, and snippets.

View tobek's full-sized avatar

Toby Fox tobek

View GitHub Profile
@tobek
tobek / rip-dvd-chapters.sh
Created October 19, 2020 23:16
Rip and encode individual titles and chapters from DVD or ISO
#!/bin/bash
set -eo pipefail
shopt -s expand_aliases
alias ffmpeg='ffmpeg -hide_banner'
usage()
{
cat << EOF
@tobek
tobek / README.md
Last active April 3, 2024 15:55
Roam bookmarklet for rich link embeds, read later, and bookmark management

Setup:

  1. Create a browser bookmark (e.g. in bookmarks bar) where the URL is the text in bookmarklet below (open this "raw" link so it's not truncated). Yes it's huge, that's fine. You can name the bookmark "Roam Link" or whatever you like.
    • Alternately, go to this page for easier drag-and-drop bookmarklet setup (GitHub doesn't allow javascript links in gists, sorry)
  2. Go to or create a Roam page called roam/css, and create a CSS code block (``` for code block, then change the language selector dropdown to CSS) and paste the CSS below.

Usage:

  1. On the page you want to create a link embed of, hit the bookmarklet (optional: highlight some text first and it'll be included as a quote)
  2. Go to Roam and paste
@tobek
tobek / get-image-urls.js
Last active May 6, 2024 11:42
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/