Skip to content

Instantly share code, notes, and snippets.

View Joris-van-der-Wel's full-sized avatar

Joris Joris-van-der-Wel

View GitHub Profile
@Joris-van-der-Wel
Joris-van-der-Wel / build.sh
Last active March 3, 2023 14:47
GNU Solfege on OS X
# Download and extract from https://www.gnu.org/software/solfege/ for example "solfege-3.22.2.tar.gz"
brew install librsvg texinfo pygtk timidity
export PATH=`brew --prefix`/opt/gettext/bin:$PATH
export PKG_CONFIG_PATH=`brew --prefix`/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
make
<!doctype html>
<meta charset="utf-8">
<title>Handling of inline event handlers without a browsing context</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
var fired;
test(function() {
@Joris-van-der-Wel
Joris-van-der-Wel / indent-chained-method?.js
Created February 11, 2016 22:07
Indent chained methods?
specify("explicit config.html, a string that is also a valid file", () => {
return readTestFixture("jsdom/files/env.html")
.then(body => {
return nodeResolverPromise(done => {
env({
html: body,
url: "http://example.com/",
done
});
})
@Joris-van-der-Wel
Joris-van-der-Wel / convert.js
Last active September 19, 2015 12:38
jsdom node-unit to mocha
#!/usr/bin/env node
"use strict";
const fs = require("fs");
const nodePath = require("path");
const childProcess = require("child_process");
const fileName = nodePath.resolve(process.argv[2]);
const async = process.argv[3] === "async";
@Joris-van-der-Wel
Joris-van-der-Wel / v8-profiler.js
Last active October 27, 2021 04:03
node.js profiling: generate .cpuprofile which can be opened in chrome dev tools (F12)
'use strict';
var profiler = require('v8-profiler');
profiler.startProfiling();
// ...
var cpuProfile = profiler.stopProfiling();
require('fs').writeFileSync(__dirname + '/foo.cpuprofile', JSON.stringify(cpuProfile));
var fs = require('fs');
var http = require('http');
var httpProxy = require('http-proxy');
var pidfile = process.argv[2];
if (!pidfile)
{
console.log('Missing pidfile (first argument)');
process.exit(1);
}