Skip to content

Instantly share code, notes, and snippets.

@nfrade
nfrade / gist:4446653
Last active December 10, 2015 14:18 — forked from koderiet/gist:3704854
Basic HTML5 Template
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Template</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
@nfrade
nfrade / gist:4403231
Created December 28, 2012 23:49
Javascript: Avoid `console` errors in browsers that lack a console.
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function noop() {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
@nfrade
nfrade / jquery-load.js
Last active December 10, 2015 07:48
HTML: Insert jQuery Google CDN with local fallback
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write(unescape("%3Cscript src='/js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>