Skip to content

Instantly share code, notes, and snippets.

View mattcg's full-sized avatar

Matthew Caruana Galizia mattcg

View GitHub Profile
@mattcg
mattcg / perftimingdump.js
Created March 25, 2012 23:55
window.performance PerformanceTiming data dump
window.onload = function() {
window.setTimeout(function() {
var p = window.performance, t, output, ns;
if (!p || !p.timing) {
output = '<p>Sorry, you browser doesn\'t support the Navigation Timing API.</p>';
} else {
t = p.timing;
ns = t.navigationStart;
@mattcg
mattcg / flashpolicy.xml
Created July 25, 2010 20:05
A simple Flash socket policy server for NodeJS.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<!-- Policy file for xmlsocket://socks.example.com -->
<cross-domain-policy>
<!-- This is a master socket policy file -->
<!-- No other socket policies on the host will be permitted -->
<site-control permitted-cross-domain-policies="master-only"/>