Skip to content

Instantly share code, notes, and snippets.

Mark Nottingham mnot

Block or report user

Report or block mnot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mnot
mnot / http.rrtext
Last active Jan 30, 2019
Railroad diagrams of HTTP semantics
View http.rrtext
# Generated from the ABNF at <https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#collected.abnf>
# using <https://github.com/katef/kgt>
Accept:
,---------------------------------------------------------------------------------------------------------------------------.
| |
||--^--v----------------- "," ------------------>--v------------------------------------------------------------------------->-->--||
| | | |
| ,-------------------. | | ,-----------------------------------------------. |
| | | | | | | |
@mnot
mnot / example.py
Created Mar 22, 2017
This dies in a fire on 3.5.2, works on 3.6.
View example.py
#!/usr/bin/env python
from typing import Optional, Type
class Foo(object):
pass
class Bar(Foo):
pass
@mnot
mnot / req_hdrs.md
Last active Jul 7, 2019
Interesting request headers
View req_hdrs.md

Here Be Web Proxies

  • X-FCCKV2 - Fortinet antivirus
  • Via - various (includ McAffee Web Gateway)
  • X-Bluecoat-Via
  • X-Cool-Jobs-Contact - meraki
  • X-OSSProxy - marketscore spyware
  • X-Forwarded-For
View phkh2.md

In response to the Call for Proposals to HTTP/2, PHK published a draft with a number of suggested requirements.

This is a summary of those requirements, indicating those that have been met.

  • 3.3 Avoid header field encodings/transformations in intermediaries
  • 3.3 and 9 Envelope / content header field distinction
  • 3.3 Add session as "flow-label"
  • 3.3 Use prefix coding for length
  • 3.3 Indicate presence of body clearly
  • 4 Support legitimate cryptography
View gcs_encode.py
#!/usr/bin/python
from __future__ import division
from bitarray import bitarray
from hashlib import sha256
from math import log
import struct
def gcs_hash(w, (N,P)):
View gist:498099a46f0b71bcf9c1
Verifying that +mnot is my blockchain ID. https://onename.com/mnot
@mnot
mnot / snowden-ietf93.md
Last active Dec 21, 2018
Transcript of Edward Snowden's comments at IETF93.
View snowden-ietf93.md
@mnot
mnot / csp violations
Last active Jan 14, 2016
One day's worth of CSP violations injected by toolbars and various other *ware
View csp violations
129 times:
<safari-extension://com.evernote.safari.clipper-q79wdw8yh9>
96 times:
<safari-extension://com.ideashower.pocket.safari-et279a6r5n>
88 times:
<>
34 times:
View cgmailstats.rb
require 'nokogumbo'
require 'date'
require 'json'
start = Date.today - 105
results = {}
index = 'http://www.w3.org/community/groups/'
groups = Nokogiri::HTML5.get(index)
groups = groups.search('a.h3').map {|a| a['href'].sub(/^#/, '')}
View keybase.md

Keybase proof

I hereby claim:

  • I am mnot on github.
  • I am mnot (https://keybase.io/mnot) on keybase.
  • I have a public key whose fingerprint is 1F25 A21D 3C2A 7F22 4C25 389F 4A67 D3E9 3BDE FDDE

To claim this, I am signing this object:

You can’t perform that action at this time.