This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getTemplate = function() { | |
var dfd = $.Deferred(); | |
// Need to wait on the DOM to be ready to determine which template to use. | |
$(document).ready(function() { | |
var conditionalThing = $('#some-selector').is('.foobar'), | |
templateUrl; | |
if (conditionalThing) | |
templateUrl = 'template1.htm'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
09/27/12 9:39 AM | |
Dear David, | |
My name is Shamika and I'm a recruiter at Axelon Services Corporation. We have your resume on file and I thought you may be interested in an opportunity we currently have available for a Service Assurance Engineer with a major Telecommunications company located in ATLANTA, GA. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nom = require('nom'); | |
var categories = [ ]; | |
nom('http://github.com/joyent/node/wiki/modules', function(err, $) { | |
$('#wiki-body h1:eq(1)~h2~h3').each(function() { | |
categories.push({ | |
name: $(this).text(), | |
count: $(this).next().find('a').length | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
presentation({ | |
title: 'My Great Presentation', | |
slides: [{ | |
title: 'Learn About Borders', | |
bullets: [ | |
'Thing 1', | |
'Thing 2', | |
], | |
code: ['path/to/file.css', [2,4]] // path to file, lines to grab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="invoiceTemplate" type="x-jquery-tmpl"> | |
<table class="invoice"> | |
<thead> | |
<tr> | |
<th>Service/Item</th> | |
<th>Price</th> | |
<th>Qty</th> | |
</tr> | |
</thead> | |
<tbody> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @match http://stackoverflow.com/* | |
// ==/UserScript== | |
function exec(fn) { | |
var script = document.createElement('script'); | |
script.setAttribute("type", "application/javascript"); | |
script.textContent = '(' + fn + ')();'; | |
document.body.appendChild(script); | |
document.body.removeChild(script); |