Skip to content

Instantly share code, notes, and snippets.

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

Chris Love docluv

🏠
Working from home
View GitHub Profile
@docluv
docluv / gist:9958620
Last active August 29, 2015 13:58
This is a Visual Studio code snippet to generate an extensible JavaScript module based on the 'jQuery Pattern'
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Custom JavaScript Module</Title>
<Author>Chris Love</Author>
<Description>Creates the Base Code for a Stand Alone JavaScript Module</Description>
<Shortcut>module</Shortcut>
<SnippetTypes>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>SPA JavaScript View</Title>
<Author>Chris Love</Author>
<Description>Creates the Base Code for a SPA JavaScript View</Description>
<Shortcut>view</Shortcut>
<SnippetTypes>
@docluv
docluv / gist:2797a93eb6333346203a
Created May 15, 2014 12:25
MUSTACHE Template VS Code Snippet
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>MUSTACHE Template</Title>
<Author>Love2Dev</Author>
<Shortcut>musttemp</Shortcut>
<AlternativeShortcuts>
<Shortcut Value="musttemp">must:temp</Shortcut>
</AlternativeShortcuts>
<Description>Markup snippet for a MUSTACHE Template</Description>
<SnippetTypes>
@docluv
docluv / gist:51ad2e57fc8a50997ee1
Created May 15, 2014 13:20
Core Site Redirect using feature detection
<script>
var ef = "?_escaped_fragment_=";
if (!('querySelector' in document)
|| !('localStorage' in window)
|| !('addEventListener' in window)
|| !('matchMedia' in window)) {
if (window.location.href.indexOf("#!") > 0) {
/*
Migrated to: https://github.com/jdarling/Object.observe
Tested against Chromium build with Object.observe and acts EXACTLY the same,
though Chromium build is MUCH faster
Trying to stay as close to the spec as possible,
this is a work in progress, feel free to comment/update
http://wiki.ecmascript.org/doku.php?id=harmony:observe
<div id="heart" ></div>
<span class="logo-text" >Love2Dev</ span>
#heart {
position: relative ;
margin: 20px 0 0 0 ;
height: 60px ;
color: #fff ;
@media ( max-width:600px) {
.main-content {
top: 60px ;
}
.logo {
<script id="movie-list-template" type="text/x-handlebars-template">
{{each}}
<div>
<h1>{{title}}</h1>
<img src="{{poster}}" alt="{{title}}"/>
</div>
{{/each}}
</script>