Skip to content

Instantly share code, notes, and snippets.

Stuart P. Bentley stuartpb

View GitHub Profile
@stuartpb
stuartpb / README.md
Created Jun 16, 2015
A script I used to estimate how widespread HTTPS was based on domainprofiles
View README.md

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 Feb 25, 2015
The page used to quickly spin up some comments in the AngelHack latertime demo
View populate.html
<!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 = [
View gistachio-is-cool.txt
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
View gistachio-is-cool.txt
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
View example.txt
This is a demo text document loaded from a Gist by gistachio. If you can read it, that means it's working.
View ucs2bytes.js
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 Sep 17, 2014
Stash until jsperf figures out its spam detection
View jsperfcase.md

Preparation HTML

<svg>
<g id="main"></g>
<g id="cache" hidden></g>
</svg>
<script>
var docFragment = document.createDocumentFragment();
var mainElement = document.getElementById('main');
View hilbbits.c
#include <stdio.h>
int main(void) {
int i, x, y, e, o;
for (i=0; i < 64; i++){
//d2xy(8,i,&x,&y);
e =((i & 0x20) >> 3)
|((i & 0x08) >> 2)
|((i & 0x02) >> 1);
o =((i & 0x10) >> 2)
View gist:819bdef4ba211ce22d2e
[root@sandbox ~]# xxd wtf/script.jade
0000000: ed41 0000 0010 0000 79e2 e053 79e2 e053 .A......y..Sy..S
0000010: 0d7e da53 0000 0000 0000 0300 0800 0000 .~.S............
0000020: 0000 0800 0700 0000 0af3 0100 0400 0000 ................
0000030: 0000 0000 0000 0000 0100 0000 bf22 1000 ............."..
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 f2c0 7735 0000 0000 0000 0000 ......w5........
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 1c00 0000 bc90 bd9f 0000 0000 68f5 b3e1 ............h...
You can’t perform that action at this time.