Skip to content

Instantly share code, notes, and snippets.

Christoph Rohrer crohrer

Block or report user

Report or block crohrer

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
@crohrer
crohrer / screenshotLocation.sh
Last active Apr 18, 2016
Configure Mac OSX Screenshot Location via Commandline
View screenshotLocation.sh
defaults write com.apple.screencapture location ~/Desktop/Screenshots && killall SystemUIServer
View serviceworker.js
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 / responsive_post_thumbnail.php
Last active Jun 13, 2016
responsive thumbnails for wordpress
View responsive_post_thumbnail.php
/*
* 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)){
View gist:f171291819845aa546b6
/* 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 Mar 31, 2012 — forked from nisbet/hack.sh
OSX For Hackers
View hack.sh
#!/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
#
You can’t perform that action at this time.