Skip to content

Instantly share code, notes, and snippets.

View boennemann's full-sized avatar

Stephan Bönnemann-Walenta boennemann

View GitHub Profile
@boennemann
boennemann / script.js
Created May 17, 2013 08:59
Preventing `:hover` styles on scroll improves performance http://www.html5rocks.com/en/tutorials/speed/unnecessary-paints/
// Used to track the enabling of hover effects
var enableTimer = 0;
/*
* Listen for a scroll and use that to remove
* the possibility of hover effects
*/
window.addEventListener('scroll', function() {
clearTimeout(enableTimer);
removeHoverClass();
@boennemann
boennemann / sitemap.xml
Created May 10, 2013 10:58
Example for an automatically generated sitemap with jekyll.
---
# Remember to set production_url in your _config.yml file!
layout: nil
title : Sitemap
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in site.pages %}
<url>
<loc>{{site.production_url}}{{ page.url }}</loc>
@boennemann
boennemann / Default (OSX).sublime-keymap.json
Created February 19, 2013 10:03
My Sublime Text 2 `Default (OSX).sublime-keymap`
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]
@boennemann
boennemann / Preferences.sublime-settings.json
Last active October 13, 2015 23:58
My Sublime Text 2 `Preferences.sublime-settings`
{
"auto_complete_triggers": [
{
"characters": "<",
"selector": "text.html"
},
{
"characters": "(=-",
"selector": "text.coffee"
}
@boennemann
boennemann / scale.less
Created November 2, 2012 16:12
Infinitly large WebApp Screenshots
@scale: 10;
/* Galaxy
@width: 360px;
@height: 640px;
*/
/* iPhone */
@width: 320px;
@height: 568px;
@boennemann
boennemann / hack.sh
Last active June 24, 2017 02:18 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2261461/hack.sh | sh
#
@boennemann
boennemann / .htaccess
Created March 22, 2012 10:59
Adapt WebApp Viewport & Icon settings of the "Add to Home Screen" option on iOS
AddType text/cache-manifest .appcache
@boennemann
boennemann / coloring.less
Created February 7, 2012 12:18
Environment aware coloring with lesscss
/* http://lesscss.org/ */
@color: #607794; // contrast -> white
@color: #6f86a4; // contrast -> black
@lightness: lightness(@color);
@contrast-color: color(~`(function(){if(parseInt('@{lightness}')>50){return '#000'}else{return '#fff'}})()`);