Skip to content

Instantly share code, notes, and snippets.

View kalkun's full-sized avatar

Jesper Henrichsen kalkun

  • Pluto Technologies
  • 00:30 (UTC +02:00)
View GitHub Profile
"""
The MIT License (MIT)
Copyright (c) 2016 Jesper Henrichsen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Keybase proof

I hereby claim:

  • I am kalkun on github.
  • I am kalk (https://keybase.io/kalk) on keybase.
  • I have a public key whose fingerprint is 4DA9 3F5B 0A61 6A58 4688 CACD 3FFF 3AB6 C150 7F52

To claim this, I am signing this object:

@kalkun
kalkun / youtube space handler
Last active August 29, 2015 14:17
Set highest possible quaility and let space control pause and play.
// ==UserScript==
// @name Youtube space handler
// @version 1.1
// @description Also sets highest possible quality for the video
// @author Jesper Henrichsen
// @match https://www.youtube.com/*
// ==/UserScript==
window.onkeydown = function(event){
var bodyIsFocus = document.activeElement == document.getElementsByTagName('body')[0] || document.getElementsByTagName('video')[0];
if (event.keyCode === 32 && bodyIsFocus) {
<!DOCTYPE html>
<!-- #include "inc_header.html" title="Example" header="Sample Title" -->
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<h1>Sample Title</h1>
@kalkun
kalkun / install getwallpapers
Last active August 29, 2015 13:56
Install script for getwallpaper
#!/bin/bash
# user variable should be passed when invoking script
# this way the crontab can be installed for the appropiate user
# while having permission to move getwallpaper to executable path
user=$1
# make directories
#mkdir ~/tmp
if [ ! -d ~/Pictures/RWallpapers ]; then
mkdir ~/Pictures/RWallpapers
fi
@kalkun
kalkun / getwallpaper [MAC]
Last active January 3, 2016 00:59
getwallpapers modified to work on mac
#!/bin/bash
# MAC OSX >= 10.9.x (Maverick or newer)
#
# Syntax:
#
# getwallpaper [subreddit [new/rising/hour/day/week/month/year/all]]
#
# By default getwallpaper will fetch images that are hot from r/wallpapers
# If the first option is used but not the second then
# an image from r/[subreddit] sorted after hot, will be fetched.
@kalkun
kalkun / getwallpaper
Last active January 2, 2016 23:39
A desktop wallpaper selector for gnome-3 gsettings. It selects the most upvoted image from http://reddit.com/r/wallpapers with precedence to direct links to images rather than album links.
#!/bin/bash
# Syntax:
#
# getwallpaper [subreddit] [new/rising/hour/day/month/year/all]
#
# By default getwallpaper will fetch images that are hot from r/wallpapers
# If the first option is used but not the second then
# an image from r/[subreddit] sorted after hot, will be fetched.
#