Skip to content

Instantly share code, notes, and snippets.

View larswittenberg's full-sized avatar
🏠
Working from home

Lars Wittenberg larswittenberg

🏠
Working from home
View GitHub Profile
@larswittenberg
larswittenberg / .htaccess
Created June 27, 2012 09:26
MediaElement.js with autoplay
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
@larswittenberg
larswittenberg / style.css
Created June 27, 2012 09:28
Media Queries
/* iPads (landscape) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape)
{ }
/* iPads (portrait) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait)
{ }
@larswittenberg
larswittenberg / _info
Created June 27, 2012 09:32
base64 Picture
Converter:
http://www.dailycoding.com/Utils/Converter/ImageToBase64.aspx
XXX durch den base64 String ersetzen
@larswittenberg
larswittenberg / config.rb
Created June 27, 2012 09:34
SASS & COMPASS
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/pfad"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
@larswittenberg
larswittenberg / media-queries-debugger
Last active October 7, 2015 04:28
Media Queries Debugging
/* Simple Media Queries Debugging */
/* http://bueltge.de/test/media-query-debugger.php */
@media all {
body::before {font-weight: 900; display: block; text-align: center; position: absolute; padding: .6em; position: fixed; top: 0; left: 0; right: 0; z-index: 2000;}
}
@media all and (-webkit-min-device-pixel-ratio : 1.5),
all and (min-device-pixel-ratio : 1.5) { body::before { content: "iPhone 4 and high pixel ratio devices"; background: rgba(139, 69, 19, 0.8); } }
@media all and (min-width: 1800px) and (orientation: landscape) { body::before { content: "min-width: 1800px (landscape)"; background: rgba(165, 42, 42, 0.8); } }
@media all and (max-width: 1800px) and (orientation: landscape) { body::before { content: "max-width: 1800px (landscape)"; background: rgba(165, 42, 42, 0.8); } }
@larswittenberg
larswittenberg / gist:3105986
Created July 13, 2012 17:00
box-sizing: border-box
/* http://paulirish.com/2012/box-sizing-border-box-ftw/ */
/* apply a natural box layout model to all elements */
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@larswittenberg
larswittenberg / script.js
Created December 7, 2012 09:38
Flash Detection With One Line of Javascript
// Source: http://iamskwerl.com/tech/2012/11/flash-detection-with-one-line-of-javascript/
var hasFlash = navigator.mimeTypes && navigator.mimeTypes.length ? Array.prototype.slice.call(navigator.mimeTypes).some(function(a) { return "application/x-shockwave-flash" == a.type; }) : /MSIE/.test(navigator.userAgent) ? eval("try { new ActiveXObject('ShockwaveFlash.ShockwaveFlash') && !0 } catch(e) { !1 };") : !1;
@larswittenberg
larswittenberg / style.css
Created May 28, 2013 17:30
Firefox Button Height Fix
/*
http://davidwalsh.name/firefox-buttons
*/
input::-moz-focus-inner {
border: 0;
padding: 0;
margin-top:-2px;
margin-bottom: -2px;
}