Skip to content

Instantly share code, notes, and snippets.

Jan-Philipp Kempf jpkempf

Block or report user

Report or block jpkempf

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
jpkempf / .gitconfig
Last active Mar 23, 2018
git alias to see what the f*** happened on your current branch
View .gitconfig
# other config stuff here
# your other aliases here...
# neat way to quickly get an idea of what happened on a branch. you can change master to anything you like, of course.
wtf = "!git whatchanged master...HEAD && git diff master...HEAD"
# remaining config here
View jsbin.quhuqafise.js
const originalObj = {
foo: {
a: 1
bar: {
b: 2
baz: {
c: 3
jpkempf / js30-day-10.js
Created Mar 15, 2017
#JavaScript30 day 10
View js30-day-10.js
/* - setup - */
const checkboxes = Array.from(document.querySelectorAll('input'));
const body = document.querySelector('body');
let previousCheckbox = undefined;
let isShiftPressed = false;
addEventListeners(['keydown', 'keyup'], body, setShiftState);
addEventListeners('input', checkboxes, handleInputEvent);
jpkempf / responsive-images
Last active Aug 29, 2015
Articles about Responsive Images (March 2015)
View responsive-images
Need to get up to speed with responsive images? Want to learn a bit
about the history of the spec along the way? Here's the most helpful
articles I was able to find during my research.
Older article, but gives a nice overview of alternatives that's still kind of valid today:
The de-facto polyfill you'll want to use today:
jpkempf / skull-o-nator.js
Last active Mar 11, 2016
Turns every image on a page into an image of a skull. It used to be kittens, but alas, has stopped working.
View skull-o-nator.js
javascript:(function(){var i=document.querySelectorAll('img'),j;for(j=0;j<i.length;j++){i[j].src='//'+i[j].naturalWidth+'/'+i[j].naturalHeight;}})();
jpkempf / NestedObjectIteration.js
Created Nov 3, 2014
Nested Object Iteration and Property Deletion
View NestedObjectIteration.js
var obj = {
innerObj: {
one: 1,
two: 2
for (var inner in obj){
if (!obj.hasOwnProperty(inner)) continue;
for (var key in obj[inner]){
jpkempf /
Last active Jan 28, 2016
FlowPlayer 5: Better fullscreen behaviour in Internet Explorer
/* Since Internet Explorer offers no native fullscreen functionality yet,
FlowPlayer 5 attempts to just stretch the video container to the full size
of the browser window and place it above all other elements on the page.
This often fails on more complex web pages, for reasons such as other elements
with a higher z-index. As a result, the fullscreen mode is rather unusable in IE
on such pages.
At the time of this writing, the guys at FlowPlayer themselves did not have a proper
answer to this problem. The best I could find on their support forums was something along
You can’t perform that action at this time.