Skip to content

Instantly share code, notes, and snippets.

Klaus Fleerkötter kaeff

Block or report user

Report or block kaeff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kaeff / delete-readability.js
Created Aug 30, 2018
Delete Readability entries from Kindle
View delete-readability.js
// Snippets to be copy/pasted in the JS console on Amazon's "my content and devices" page
// Do this once
NodeList.prototype.forEach = Array.prototype.forEach;
// Paste this to select the entries. Then click "delete" and confirm
document.querySelectorAll("*[title='Readability.']").forEach((el) => el.closest(".contentTableListRow_myx").querySelector("i.listViewIconPosition_myx").click())
View -
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<style type="text/css">
ReadMsgBody {
width: 100%;
kaeff /
Created Mar 2, 2017
Utility to find apps which are missing from `brew list` although installed
brew cask list | sed 's/ +/\n/g' | sort > apps-cask.txt
ls -l /Applications | cut -c 55- | grep -v '\->' | sed 's/ /-/g' | sed 's/\.app//g' | awk '{print tolower($0)}' | sort > apps.txt
comm -23 apps.txt apps-cask.txt > apps-not-installed-by-brew.txt
ls /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks | sed 's/\.rb//' > all-casks.txt
comm -12 apps-not-installed-by-brew.txt all-casks.txt > apps-missing-from-brew.txt
cat apps-missing-from-brew.txt
kaeff /
Created Nov 18, 2016
Download an lesson using youtube-dl
# Usage:
let n=1
for link in $(curl -s $1 | pup '.series-lessons-list a attr{href}'); do
filename=$(echo $link | sed "s/https:\/\/\/lessons\///g" | sed "s/\?.*$//g")
filename_numbered=$(echo "$n $filename" | awk '{ printf "%02i-%s.mp4\n", $1, $2 }')
youtube-dl -o "$filename_numbered" "$link"
let n++
kaeff / wazokazi.log
Created Oct 15, 2015
when I open christophs "re: accounts created" mail
View wazokazi.log
2015-10-15 10:13:35 [twisted] CRITICAL Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/twisted/internet/", line 1274, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/twisted/internet/", line 1128, in _inlineCallbacks
result = g.send(result)
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/pixelated_user_agent-0.1-py2.7.egg/pixelated/adapter/mailstore/", line 348, in _leap_message_to_leap_mail
body = yield self._raw_message_body(message)
View invite_code.rb
class InviteCode < CouchRest::Model::Base
use_database :invite_codes
design do
view :by__id
View ball_invaders.rb
require 'gosu'
# The game skeleton we built on 16.6. - A ball moving right to left and back, slowly invading the bottom of the screen...
class GameWindow < Gosu::Window
def initialize
super(640, 480)
self.caption = "Gosu Tutorial Game (Interval: #{self.update_interval})"
@ball ='media/ball.png')
kaeff /
Created May 4, 2015
A script listing the commit ranges applied during `git pull --rebase`, one line per pull in descending order
#!/usr/bin/env bash
git reflog | grep -A 1 "pull --rebase: checkout" | ruby -e 'puts STDIN.each_slice(3).map {|a| a.take(2) {|l| l.split(" ").first}.join("..") }'
kaeff / global_assert.js
Last active Aug 29, 2015
Global Assert
View global_assert.js
global.assert = require('assert');
You can’t perform that action at this time.