Skip to content

Instantly share code, notes, and snippets.

View boriskaiser's full-sized avatar

Boris Kaiser boriskaiser

View GitHub Profile

Keybase proof

I hereby claim:

  • I am boriskaiser on github.
  • I am boriskaiser (https://keybase.io/boriskaiser) on keybase.
  • I have a public key whose fingerprint is F100 35C4 9E4A 8138 51BD 510C 5E8F 1EC4 9D66 E043

To claim this, I am signing this object:

@boriskaiser
boriskaiser / html-inspector-snippet.js
Last active December 9, 2022 20:19
HTMLInspector Snippet for Google Chrome
function _loadScript(url, callback) {
// Adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// Then bind the event to the callback function.
script.onload = callback;
if( 'devicePixelRatio' in window && window.devicePixelRatio == 2 ){
$('html').addClass('highresdisplay');
}
});
@boriskaiser
boriskaiser / keyword-arguments.css
Created December 5, 2012 09:27
Special handling of keyword arguments
#please-wait {
background: url(/images/logo.png);
position: absolute;
top: 3em;
right: 0;
bottom: 3em;
left: 0;
}
<a class='ab-image' href='{$link}' title='{$title}'>
{if isset($sArticle.image.src)}
{if $sTemplate == 'listing-1col'}
<span style='background-image: url({$sArticle.image.src.2})'></span>
{else}
<span style='background-image: url({$sArticle.image.src.3})'></span>
{/if}
{else}
<span class='ab-no-image'>
<b>{s name='NoPicture' namespace='frontend/index/index'}Leider kein Bild verf&uuml;gbar{/s}</b>
@boriskaiser
boriskaiser / gist:4078611
Created November 15, 2012 13:17
mixin for border-radius (without compass )
@mixin border-radius($radius...) {
// defining prefixes so we can use them in mixins below
$prefixes: ("-webkit", "-moz", "-ms", "-o", "");
@each $prefix in $prefixes {
#{$prefix}-border-radius: $radius;
}
border-radius: $radius;
}
@boriskaiser
boriskaiser / index.html
Created October 30, 2012 08:40
A CodePen by Marcello Africano. Slidebar - A slippery, sliding, slick navigation bar.
<ul>
<li><a href="#"> &#10047; </a></li><!--
--><li><a href="#"> Lorem </a></li><!--
--><li><a href="#"> Ipsum </a></li><!--
--><li><a href="#"> Consectetur adipisicing </a></li><!--
--><li><a href="#"> Sit amet </a></li>
</ul>
@boriskaiser
boriskaiser / gist:3908158
Created October 17, 2012 21:02
Easy retina-ready images using SCSS + Compass
@mixin background-2x($background, $file: 'png'){
$image: #{$background+"."+$file};
$image2x: #{$background+"2x."+$file};
background: image-url($image) no-repeat;
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx){
var retina = window.devicePixelRatio > 1 ? true : false;