Skip to content

Instantly share code, notes, and snippets.

View moriartiegist's full-sized avatar

moriartiegist

View GitHub Profile
@moriartiegist
moriartiegist / gist:2661619
Created May 11, 2012 18:42
PHP: responsive image
<?php
$_responsive = new Responsive;
echo $_responsive->get_cookie_code();
?>
<?=$_COOKIE['resolution'];?>
<?php
class Responsive
@moriartiegist
moriartiegist / gist:2002407
Created March 8, 2012 18:07
HTML: Boilerplate
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="de"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="de"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="de"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="de"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title></title>
@moriartiegist
moriartiegist / gist:1994418
Created March 7, 2012 17:07
jQuery: Plugin Boilerplate
// the semi-colon before function invocation is a safety net against concatenated
// scripts and/or other plugins which may not be closed properly.
;(function ( $, window, document, undefined ) {
// undefined is used here as the undefined global variable in ECMAScript 3 is
// mutable (ie. it can be changed by someone else). undefined isn't really being
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
// can no longer be modified.
// window and document are passed through as local variables rather than globals