Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Affiliate-Bookmarklet</title>
<meta charset="utf-8">
<script>
function generate() {
// Get content from textarea and split
var codes = document.getElementById('codes').value.split('\n').join('\',\'');
var js = "javascript:(function(n){var e=Math.round(Math.random()*(n.length-1)),t=n[e];window.location.href='https://www.amazon.de?tag='+t})(['"+codes+"'])"
@Korni22
Korni22 / heute-show.sh
Last active January 27, 2017 22:55
This script loads the latest episode of the heute-show (and youtube-dl skips if present)
#!/bin/bash
curl -fsSL http://www.zdf.de/rss/zdf/comedy/heute-show | pcregrep -o1 -i '<link>([^<]+heute-show-vom[^<]+)<\/link>' | xargs -n1 youtube-dl -c -o "%(title)s.%(ext)s"
@Korni22
Korni22 / neo-magazin-royale.sh
Last active January 27, 2017 23:35
This script loads the latest episode of the NEO MAGAZIN ROYALE
#!/bin/bash
curl -fsSL http://www.zdf.de/rss/podcast/video/zdf/comedy/neo-magazin-mit-jan-boehmermann | pcregrep -o1 -i '<link>([^<]+NEO-MAGAZIN-ROYALE-vom-[^<]+)<\/link>' | xargs -n1 youtube-dl -c -o "%(title)s.%(ext)s"
@Korni22
Korni22 / dl-nmr.sh
Last active January 28, 2017 12:54
#!/bin/bash
URL=http://www.zdf.de/rss/podcast/video/zdf/comedy/neo-magazin-mit-jan-boehmermann
REGEX='/<link>[^<]+neo-magazin-royale-mit-jan-boehmermann-vom[^<]+/'
OFFSET=6
curl -fsSL $URL \
| awk "match(\$0, $REGEX) { print substr(\$0, RSTART+$OFFSET, RLENGTH-$OFFSET); }" \
| xargs -n1 youtube-dl -c -o "%(title)s.%(ext)s"