Skip to content

Instantly share code, notes, and snippets.

@automatthew
automatthew / Embedder.java
Created November 19, 2009 18:06
Improved interface for JRuby Embed
import org.jruby.embed.PathType;
import org.jruby.embed.ScriptingContainer;
public class Embedder {
public ScriptingContainer container;
public String file;
public Embedder(String filename) {
file = filename;
container = new ScriptingContainer();
@automatthew
automatthew / pdfdata.rb
Created February 12, 2010 11:45
script for editing pdf metadata using pdftk
#!/usr/bin/env ruby
require 'tempfile'
require 'fileutils'
FileUtils.mkdir_p "processed"
def metadata(filename)
command = "pdftk #{filename.dump} dump_data"
puts command
@automatthew
automatthew / README.md
Created October 2, 2020 19:09
UATV podcast addon

Enhances streams on unauthorized.tv by adding buttons to jump 30s forward/backward and change playback rate. On android devices, the playback controls on the notification screen also receive jump buttons.

On your desktop browser, install a userscript manager like Tampermonkey and add the script below. Each stream will be augmented with extra buttons.

On android, create a bookmark and copy-paste the snippet below into the URL field. Click on this bookmark whenever you're listening to a podcast to upgrade the page. (You can usually invoke the bookmarklet from the URL bar by typing in its name)

javascript:(function()%7B(function()%7B'use%20strict'%3Bconst%20%24%3Ddocument.querySelector.bind(document)%3Bconst%20gui%3Ddocument.createElement('div')%3Bgui.innerHTML%3D%60%0A%3Cdiv%20class%3D%22tm-controls%22%3E%0A%20%20%3Cbutton%20class%3D%22tm-controls__back%22%3E%3Ci%20class%3D%22fa%20fa-backward%22%3E%3C%2Fi%3E%3C%2Fbutton%3E%0A%20%20%3Cbutton%20class%3D%22tm-controls__rate%22%3E1x%3C%2Fbutton%3E%0A%20%20%3