Skip to content

Instantly share code, notes, and snippets.

@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"
@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 / 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"
<!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+"'])"

Keybase proof

I hereby claim:

  • I am korni22 on github.
  • I am korni22 (https://keybase.io/korni22) on keybase.
  • I have a public key ASBwMcDWX7ogNgnNQvuYEdzzfO8HHYDcJ9SsoJotM_r-Kgo

To claim this, I am signing this object:

@Korni22
Korni22 / catchall.sh
Created July 22, 2013 16:53
Catch all possible output by a command in a shell, by appending this after the command.
&> /dev/null
@Korni22
Korni22 / anykey.sh
Created July 22, 2013 16:52
Press any key to continue in linux shell
read –n1
@Korni22
Korni22 / osxupdate.sh
Created July 20, 2013 22:55
Updates everything a hacker's OS X might have.
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g; sudo gem update'