Skip to content

Instantly share code, notes, and snippets.

View stuartpb's full-sized avatar

Stuart P. Bentley stuartpb

View GitHub Profile
@stuartpb
stuartpb / README.md
Last active January 13, 2016 06:56 — forked from mbostock/.block
Natural Earth
@stuartpb
stuartpb / snowden-ietf93.md
Last active August 29, 2015 14:27 — forked from mnot/snowden-ietf93.md
Transcript of Edward Snowden's comments at IETF93.
@stuartpb
stuartpb / README.md
Created June 16, 2015 06:35
A script I used to estimate how widespread HTTPS was based on domainprofiles

This was a script I wrote in early 2014 for my original draft pitch for Hutpass, a startup that would provide HTTPS as a service (the same way CloudFlare would go on to do in October 2014).

It uses a compiled JSON file of all the profiles in https://github.com/opensets/domainprofiles, checking them for an "https" field.

I ended up throwing out the figure this returned in favor of using BuiltWith's figures (which were much more stark) a few days later, but it's still an interesting analysis.

@stuartpb
stuartpb / populate.html
Created February 25, 2015 08:51
The page used to quickly spin up some comments in the AngelHack latertime demo
<!DOCTYPE html>
<html>
<head>
<title>laterti.me test data spammer</title>
</head>
<body>
<script src='/primus/primus.js'></script>
<script src='/stream.js'></script>
<script>
var messages = [
tttt tttt iiii
ttt:::t ttt:::t i::::i
t:::::t t:::::t iiii
t:::::t t:::::t
ttttttt:::::ttttttt eeeeeeeeeeee ssssssssss ttttttt:::::ttttttt iiiiiiinnnn nnnnnnnn ggggggggg ggggg
t:::::::::::::::::t ee::::::::::::ee ss::::::::::s t:::::::::::::::::t i:::::in:::nn::::::::nn g:::::::::ggg::::g
t:::::::::::::::::t e::::::eeeee:::::eess:::::::::::::s t:::::::::::::::::t i::::in::::::::::::::nn g:::::::::::::::::g
tttttt:::::::tttttt e::::::e e:::::es::::::ssss:::::stttttt:::::::tttttt i::::inn:::::::::::::::ng::::::ggggg::::::gg
tttt tttt iiii
ttt:::t ttt:::t i::::i
t:::::t t:::::t iiii
t:::::t t:::::t
ttttttt:::::ttttttt eeeeeeeeeeee ssssssssss ttttttt:::::ttttttt iiiiiiinnnn nnnnnnnn ggggggggg ggggg
t:::::::::::::::::t ee::::::::::::ee ss::::::::::s t:::::::::::::::::t i:::::in:::nn::::::::nn g:::::::::ggg::::g
t:::::::::::::::::t e::::::eeeee:::::eess:::::::::::::s t:::::::::::::::::t i::::in::::::::::::::nn g:::::::::::::::::g
tttttt:::::::tttttt e::::::e e:::::es::::::ssss:::::stttttt:::::::tttttt i::::inn:::::::::::::::ng::::::ggggg::::::gg
This is a demo text document loaded from a Gist by gistachio. If you can read it, that means it's working.
function ucs2Bytes(s) {
var l = s.length;
var a = new Array(l*2);
for (var i = 0; i < l; ++i) {
a[i] = s.charCodeAt(i) && 0xFF;
a[i+1] = s.charCodeAt(i) >> 8;
}
return a;
}
@stuartpb
stuartpb / jsperfcase.md
Created September 17, 2014 23:41
Stash until jsperf figures out its spam detection

Preparation HTML

<svg>
<g id="main"></g>
<g id="cache" hidden></g>
</svg>
<script>
var docFragment = document.createDocumentFragment();
var mainElement = document.getElementById('main');