Skip to content

Instantly share code, notes, and snippets.

@crohrer
crohrer / gist:f171291819845aa546b6
Created July 24, 2014 08:00
Fix for Chrome Font Bug
/* inspired by https://codestag.com/fix-google-chrome-web-fonts-issue/ */
* {
-webkit-animation-duration: 0.1s;
-webkit-animation-name: fontfix;
-webkit-animation-iteration-count: 30;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 0.1s;
}
@crohrer
crohrer / hack.sh
Created March 31, 2012 18:48 — forked from nisbet/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/2108403/hack.sh | sh
#
var cacheVersion = 'v1';
// Store core files in a cache (including a page to display when offline)
function updateStaticCache() {
return caches.open(cacheVersion)
.then(function (cache) {
return cache.addAll([
'/offline',
'https://mycdn.com/style.css',
'https://mycdn.com/script.js',
@crohrer
crohrer / screenshotLocation.sh
Last active April 18, 2016 11:32
Configure Mac OSX Screenshot Location via Commandline
defaults write com.apple.screencapture location ~/Desktop/Screenshots && killall SystemUIServer
@crohrer
crohrer / responsive_post_thumbnail.php
Last active June 13, 2016 21:17
responsive thumbnails for wordpress
/*
* crohrer_responsive_post_thumbnail
*
* @author: Christoph Rohrer
*
*/
function crohrer_responsive_post_thumbnail( $post_id, $sizesAttribute = '100vw', $thumbnailSizes = array(), $alt = '', $class = '' )
{
$postThumbnailId = get_post_thumbnail_id( $post_id );
if(empty($thumbnailSizes)){