Skip to content

Instantly share code, notes, and snippets.

@slotrans
slotrans / history_stuff.sql
Created August 6, 2021 23:50
Building blocks for generic history-keeping in Postgres.
/*
Replace "your_schema" with whatever schema is appropriate in your environment.
It is possible to use "public"... but you shouldn't!
*/
/*
Function to stamp a "modified" timestamp. Adjust the name to suit your environment,
but that name is hard-coded so it is assumed that you only use _one_ such name.

the terrible idea: php youtube-dl downloader with html5 autoplayer

what

a PHP script that wraps around youtube-dl which allows you to enter in a youtube ID. The script then downloads the entire video at the highest resolution and uses javascript to write an HTML5 video element to the page which in turn autoplays the video you just downloaded.

this is a terrible idea and most likely against youtube's TOS - don't use it! Further, after I wrote this I found alltube (github or alltubedownload.net), which is almost identical to this project, but WAY more fancy. Use that instead!

why