Skip to content

Instantly share code, notes, and snippets.

View snowman-repos's full-sized avatar

James snowman-repos

View GitHub Profile
@snowman-repos
snowman-repos / gist:3809878
Created October 1, 2012 06:40
HTML: Starter Template
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<!--
*********************************************
This website was designed & created by
%NAME%
@snowman-repos
snowman-repos / html-starter-template.sublime-snippet
Created October 1, 2012 06:52
HTML: starter template (sublime)
<snippet>
<content><![CDATA[
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<!--
*********************************************
@snowman-repos
snowman-repos / js-best-practices.md
Created October 1, 2012 07:18 — forked from davidcalhoun/js-best-practices.md
JavaScript best practices

JavaScript Best Practices

Code conventions

Closing/opening brackets

Although this isn't a problem in other languages, because of semicolon insertion, there could be problems if you don't place the bracket on the opening line:

// no:
function()
{
@snowman-repos
snowman-repos / gist:3813365
Created October 1, 2012 18:00
HTML: Base 64 Encode 1x1px gif
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
@snowman-repos
snowman-repos / gist:3813377
Created October 1, 2012 18:02
HTML: Rich Snippet
<div id="hcard-Darryl-James-Snow" class="vcard">
<a class="url fn n" href="http://dazsnow.com">
<span class="given-name">Darryl</span>
<span class="additional-name">James</span>
<span class="family-name">Snow</span>
</a>
<div class="org">Profero</div>
<a class="email" href="mailto:[email protected]">[email protected]</a>
<div class="adr">
<div class="street-address">DongDaQiao 8 Hao</div>
@snowman-repos
snowman-repos / gist:3813405
Created October 1, 2012 18:09
HTML: Button with Line Breaks
<input type="button" value="Really&#x00A;Tall&#x00A; Button">
@snowman-repos
snowman-repos / gist:3813425
Created October 1, 2012 18:13
HTML: Empty Table
<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@snowman-repos
snowman-repos / gist:3813443
Created October 1, 2012 18:15
HTML: Send Data to iFrame
<form action="iframe.php" target="my-iframe" method="post">
<label for="text">Some text:</label>
<input type="text" name="text" id="text">
<input type="submit" value="post">
</form>
<iframe name="my-iframe" src="iframe.php"></iframe>
@snowman-repos
snowman-repos / gist:3813447
Created October 1, 2012 18:16
HTML: Proper Tags for Displaying Content Edits
I <del>hate</del> <ins>LOVE</ins> my new iPod nano.
@snowman-repos
snowman-repos / gist:3813459
Created October 1, 2012 18:17
HTML: Universal IE6/7 Stylesheet
<!--[if lte IE 7]>
<link rel="stylesheet" media="screen, projection" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" />
<![endif]-->