Skip to content

Instantly share code, notes, and snippets.

View stuartpb's full-sized avatar

Stuart P. Bentley stuartpb

View GitHub Profile
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
@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 = [
@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 / 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 / lasi.rst
Created January 25, 2011 13:07 — forked from leafstorm/lasi.rst

Lua Application/Server Interface version 0.3.0

Authors

Matthew "LeafStorm" Frazier <leafstormrush@gmail.com>, Stuart P. Bentley <stuart@testtrack4.com>

Date

January 26, 2011

Status

Early draft

This document specifies an interface between Web servers and Web applications written in the Lua programming language, to promote interoperability between Web servers and the development of an ecosystem of reusable components for Lua on the Web.

@stuartpb
stuartpb / arbase.lua
Created February 2, 2011 02:45
Function for using arbitrary digit systems to convert numbers to strings
local function base (digit_list)
local b = #digit_list
if b == 0 then
return function(number) return "" end
elseif b == 1 then
local mark = digit_list[1]
return function(number)
return string.rep(mark, number)
end
else
--The values used to represent trees, fires, and empty space.
local TREE = 'T'
local BURNING = '#'
local EMPTY = ' '
--Returns a table with gettors and settors for 2D coordinates.
--This implementation uses a single underlying 1-dimensional
--array table. It could also be changed to use a 2-dimensional
--table of row/column tables, or a table with serialized coordinates.
local function array2d(w,h)
@stuartpb
stuartpb / phone.txt
Created April 9, 2011 04:50
The layout of my phone's voice message system.
To listen to your messages, press 1.
To send a message, press 2.
To change your personal options, press 4.
> Personal options.
To turn message waiting indicator on or off, press 1.
- Message waiting indicator on.
To turn message waiting indicator off, press 2.
> Message waiting indicator now off.
: Personal options.
To exit, press *.
--table of Windows Time Display Notation specifiers
--(http://support.microsoft.com/kb/307938) to the equivalent
--format specifiers for the Visual C++ Runtime Library's
--version of strftime (http://msdn.microsoft.com/en-us/library/fe06s4ak.aspx).
local wtdn2sftf = {
--'t' does only the first character of %p:
--no strftime equivalent
tt = 'p',
H = '#H',
@stuartpb
stuartpb / gist:961903
Created May 9, 2011 01:47
11 Lines of Lua About 88 Lines About 44 Women
lines=[[
Deborah was a Catholic girl
she held out till the bitter end
Carla was a different type
she's the one who put it in
Mary was a black girl
I was afraid of a girl like that
Suzen painted pictures
sitting down like a Buddha sat