Skip to content

Instantly share code, notes, and snippets.

@nym
nym / gist:2502083
Created April 26, 2012 19:11
SublimeLinter JSHint
/*
SublimeLinter default settings
*/
{
/*
Sets the mode in which SublimeLinter runs:
true - Linting occurs in the background as you type (the default).
false - Linting only occurs when you initiate it.
"load-save" - Linting occurs only when a file is loaded and saved.
@nym
nym / .block
Last active September 13, 2018 18:32
mp sankey
license: mit
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Hello world!</h1>
<script src="script.js"></script>
@nym
nym / app.html
Created March 30, 2017 17:14
Aurelia Router Demo
<template>
<require from="components/navigation.html"></require>
<h1>Aurelia Router Demo</h1>
<navigation router.bind="router" class="primary-navigation"></navigation>
<div class="page-host">
<router-view></router-view>
</div>
</template>
@nym
nym / app.html
Created March 30, 2017 17:13 — forked from ScottWhittaker/app.html
Aurelia Router Demo
<template>
<require from="components/navigation.html"></require>
<h1>Aurelia Router Demo</h1>
<navigation router.bind="router" class="primary-navigation"></navigation>
<div class="page-host">
<router-view></router-view>
</div>
</template>
.DS_Store
*.log
tmp/
@nym
nym / gist:2967352
Created June 21, 2012 17:54
Is it loaded? Is it loaded? Yes it might be. Yes it might be.
var jsdom = require('jsdom');
var fs = require('fs');
var request = require("request");
var jsdom = require("jsdom");
jsdom.defaultDocumentFeatures = {
FetchExternalResources : ['script', 'img', 'css', 'frame', 'link'],
ProcessExternalResources : ['script', 'img', 'css', 'frame', 'link'],
@nym
nym / gist:2918959
Created June 12, 2012 17:40
Script tag not loading
var jsdom = require('jsdom');
jsdom.defaultDocumentFeatures = {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : '2.0',
QuerySelector : false
};
var htmlDoc = '<html lang="en-US">' +
@nym
nym / gist:2918776
Created June 12, 2012 17:13
JSDOM Sample
var jsdom = require('jsdom');
jsdom.defaultDocumentFeatures = {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : false,
QuerySelector : false
};
//var fs = require('fs');
//var jquery = fs.readFileSync("./jquery-1.6.2.min.js").toString();
@nym
nym / gist:2918775
Created June 12, 2012 17:13
JSDOM Sample
var jsdom = require('jsdom');
jsdom.defaultDocumentFeatures = {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : false,
QuerySelector : false
};
//var fs = require('fs');
//var jquery = fs.readFileSync("./jquery-1.6.2.min.js").toString();