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
// testharness.js | |
var t = async_test("Timeout times out"); | |
setTimeout(t.step_func(function () { | |
assert_true(true); | |
t.done(); | |
}), 100); | |
// Jasmine | |
describe("Timeout", function () { |
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 express = require('express') | |
; | |
var app = module.exports = express.createServer(); | |
app.configure(function(){ | |
app.use(express.bodyParser()); | |
app.use(app.router); | |
app.use(express["static"](__dirname + "/public")); | |
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); | |
}); |
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 phrasing = {}; | |
"a abbr area audio b bdi bdo br button canvas cite code command datalist del dfn em embed i iframe img input " + | |
"ins kbd keygen label map mark math meter noscript object output progress q ruby s samp script select small " + | |
"span strong sub sup svg textarea time u var video wbr" | |
.split(" ") | |
.forEach(function (el) { phrasing[el] = true; }) | |
; | |
function isNotPhrasing (el) { | |
if (!el) return true; | |
if (el.nodeType !== 1) return true; |
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 fs = require("fs") | |
, pth = require("path") | |
, _ = require("underscore") | |
, jsdom = require("jsdom") | |
, wrench = require("wrench") | |
, mkdirp = require("mkdirp").sync | |
// use hg for source, gh for target | |
, sourceDir = pth.join(__dirname, "../html") | |
, targetDir = pth.join(__dirname, "../html-testsuite") | |
, sourceTestDir = pth.join(sourceDir, "tests") |
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 fallbacks = {} | |
, networks = {} | |
, cacheName = "OldSchoolAppCache" | |
; | |
this.onmessage = function (e) { | |
var msg = e.data; | |
if (msg.type && msg.type === "manifest") { | |
var lines = msg.manifest.split(/\n+/) | |
, mode = "cache" |
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
<!DOCTYPE html> | |
<!-- | |
- controllerpath should default to /*, it's just the typical thing | |
- controllersync ensures the controller is always there | |
--> | |
<html controller="respimg.js" controllerpath="/*" controllersync> | |
<!-- ... --> | |
<img src='my-shiny-donkey.png#resp-me'> | |
</html> |
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 ideal = require("../ideal") | |
, dom = exports | |
; | |
dom.Phase = ideal.legacyEnum("NONE", "CAPTURING_PHASE", "AT_TARGET", "BUBBLING_PHASE"); | |
dom.Event = ideal.class | |
.importLegacyEnum(dom.Phase) | |
.constructor | |
.param(String, "type") |
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
## | |
## After making changes to this file, you MUST rebuild for any changes | |
## to take effect in your live Discourse instance: | |
## | |
## /var/docker/launcher rebuild app | |
## | |
## this is the all-in-one, standalone Discourse Docker container template | |
templates: | |
- "templates/cron.template.yml" |
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
<div id="box" contentEditable="minimal"></div> | |
<script> | |
var box = document.getElementById("box") | |
, compoRange = null | |
, compoText = null | |
; | |
function insertText (txt) { | |
var sel = window.getSelection(); | |
if (!sel) return; | |
var range = sel.getRangeAt(0); |
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
<button id=hide>Hide boxes</button> | |
<button id=show>Show boxes</button> | |
<script> | |
var $hide = $("#hide") | |
, $show = $("#show") | |
, $els = $("pre.foo") | |
; | |
function hide () { | |
$els.hide(); |
OlderNewer