Skip to content

Instantly share code, notes, and snippets.

View snipem's full-sized avatar

Matthias Küch snipem

  • Kassel, Germany
View GitHub Profile
@snipem
snipem / deezer_delete_playlists.sh
Created June 1, 2016 18:54
Lists all your Deezer playlists, put's them to a file for you to edit, deletes all the playlists listed in that file
access_token="ENTER_YOUR_DEEZER_ACCESS_CODE_HERE"
nr_to_fetch="1000"
#curl https://api.deezer.com/user/me?access_token=$access_token
curl "http://api.deezer.com/user/me/playlists?access_token=$access_token&limit=$nr_to_fetch&index=0" | jq '.data[] | "\(.title),\(.nb_tracks),\(.id)"' > all_playlists.txt
# NOW Edit all_playlists.txt and copy it to all_playlists_edited.txt
cat all_playlists_edited.txt | awk -F, '{print $3}'| sed "s/\"//g" |
while read line ; do
@snipem
snipem / olympia.sh
Last active August 13, 2016 18:44
Alle Olympia Streams des ZDF nebeneinander auf dem Desktop. MPV Player wird benötigt.
killall mpv
common="--cache-default=153600 --cache-secs 10 --no-resume-playback --mute"
#Unten
mpv $common --geometry=0%:0% --autofit=33% "http://zdf0304-lh.akamaihd.net/i/de03_v1@392855/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
mpv $common --geometry=50%:0% --autofit=33% "http://zdf0304-lh.akamaihd.net/i/de04_v1@392856/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
mpv $common --geometry=100%:0% --autofit=33% "http://zdf0506-lh.akamaihd.net/i/de05_v1@392857/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
#Mitte
mpv $common --geometry=0%:50% --autofit=33% "http://zdf0506-lh.akamaihd.net/i/de06_v1@392858/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
mpv $common --geometry=50%:50% --autofit=33% "http://zdf0708-lh.akamaihd.net/i/de07_v1@392868/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
mpv $common --geometry=100%:50% --autofit=33% "http://zdf0708-lh.akamaihd.net/i/de08_v1@392869/index_3056_av-b.m3u8?sd=10&dw=0&rebase=on" > /dev/null&
@snipem
snipem / 0001-Added-VIM-keybindings.patch
Created October 31, 2016 17:51
VIM navigation key bindings for Civilization 5
From 36e239f83d6858f9f0c13c89fa83d8b2de2d9756 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Ku=CC=88ch?= <halde@matthias-kuech.de>
Date: Mon, 31 Oct 2016 18:46:26 +0100
Subject: [PATCH] Added VIM keybindings to Civilization 5
---
UI/InGame/WorldView/WorldView.lua | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/UI/InGame/WorldView/WorldView.lua b/UI/InGame/WorldView/WorldView.lua
@snipem
snipem / justwatchletterboxd.js
Last active November 12, 2017 11:43
Userscript Letterboxd.com JustWatch Integration
// ==UserScript==
// @name Letterboxd.com to JustWatch
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @namespace https://gist.githubusercontent.com/snipem/f6b063e404ec43d90e7f4175b6ad9ee9/raw/justwatchletterboxd.js
// @description Adds Just Watch links and offers to a letterboxd site. Helps on countries not supported by gowatchit. This script is heavily inspired from the work http://userscripts.org/users/luckyluciano did.
// @include *letterboxd.com/*
// @version 1.0
// @grant GM_log
// @grant GM_xmlhttpRequest
@snipem
snipem / arte.sh
Last active November 14, 2017 18:18
Searches arte.tv for content in Arte Mediathek. Returns url to the video to be used in youtube-dl
#!/bin/bash
# run: arte.sh "mit offenen karten"
query=$(echo "$@" | jq -s -R -r @uri)
curl -s "https://www.arte.tv/guide/api/api/search/de/$query/1/" |
jq -r .teasers[].url | uniq
tell application "Terminal"
activate
set allWindows to number of windows
global found
set found to false
repeat with i from 1 to allWindows
set allTabs to number of tabs of window i
repeat with j from 1 to allTabs
if processes of tab j of window i contains "nvim" then
@snipem
snipem / termui_list_do_not_render.go
Last active March 1, 2019 11:30
termui_list_do_not_render.go
// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
// +build ignore
package main
import (
"log"
@snipem
snipem / README.md
Created November 13, 2020 19:13
Shadow PC fix for wrong display size on MacOS clients
  1. Download and install dc from http://12noon.com/?page_id=80
  2. Create a shortcut on desktop
  3. Add -width=max -height=max -refresh=max -depth=max to Target: in preferences
  4. Open Autostart folder with CMD-R and enter Shell:common startup
  5. Copy shortcut to Autostart
@snipem
snipem / Olympia2020.m3u8
Last active July 22, 2021 12:56
ARD Olympia 2020 Streams
# Funktionieren
https://ndrspezial-lh.akamaihd.net/i/spezial_1@430235/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_2@430236/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_3@430237/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_4@430238/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_5@430239/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_6@430240/index_3712_av-b.m3u8
# Nicht geprüft, Zahl vor und nach dem @ hochzählen
https://ndrspezial-lh.akamaihd.net/i/spezial_7@430241/index_3712_av-b.m3u8
https://ndrspezial-lh.akamaihd.net/i/spezial_8@430242/index_3712_av-b.m3u8
@snipem
snipem / granturismo_mirror.py
Created March 29, 2022 16:08
Tool for mirroring scapes in Gran Turismo 7 scape editor
#run: python3 granturismo_mirror.py
import os
import time
from appscript import app, k
from pynput.keyboard import Key, Controller
keyboard = Controller()
A = "i"