Skip to content

Instantly share code, notes, and snippets.

View danielmatthew's full-sized avatar

Dan Matthew danielmatthew

View GitHub Profile
@danielmatthew
danielmatthew / linked-list
Created January 22, 2014 16:01
The essence of a linked list in JavaScript
// A single node
var node1 = {
data: null,
next: null
};
// Add data to node
node1.data = 12;
// Create another node
@danielmatthew
danielmatthew / gist:6351319
Created August 27, 2013 09:03
JavaScript snippet to add in appropriate meta tag after page has loaded
var meta;
if (document.createElement && (meta = document.createElement('meta'))) {
meta.name = 'format-detection';
meta.content = 'telephone=no';
document.getElementsByTagName('head')[0].appendChild(meta);
}
@danielmatthew
danielmatthew / index.html
Created August 13, 2012 12:24
New HTML5 site boilerplate
<!DOCTYPE>
<html>
<head>
<title></title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="stylesheets/screen.css">
@danielmatthew
danielmatthew / mobile-meta
Created July 9, 2012 14:09
Meta tags to make site mobile friendly
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
@danielmatthew
danielmatthew / smooth.css
Created July 6, 2012 09:51
Smooths transitions between media query breakpoints
transition: all .3s ease-out;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-o-transition: all .3s ease-out;