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 / feed_history.py
Created Dec 27, 2009
feed_history - demonstration implementation of incremental feed
View feed_history.py
#!/usr/bin/env python
"""
feed_history - demonstration implementation of incremental feeds.
See:
http://www.mnot.net/drafts/draft-nottingham-atompub-feed-history-07.txt
This is a SAMPLE ONLY. In particular, error handling is not robust, entry
combination is basic, and using pickle for persistence may cause problems
(e.g., unnecessary fetches when the class is changed).
@mnot
mnot / xop_parser.py
Created Dec 27, 2009
xop_parser.py - A demonstration XOP Parser for SAX
View xop_parser.py
#!/usr/bin/env python
"""
xop_parser.py - A demonstration XOP Parser for SAX
Based upon: http://www.w3.org/2000/xp/Group/3/06/Attachments/XOP.html
THIS SOFTWARE IS EXPERIMENTAL - INTERFACES MAY CHANGE AT ANY TIME.
CAVEATS / TODO:
- requires python 2.3 AFAIK
@mnot
mnot / redir_frag_test.py
Created Mar 13, 2010
Test for browser redirection handling WRT URI fragments, quick and dirty.
View redir_frag_test.py
#!/usr/bin/env python
"""
Test for browser redirection handling WRT URI fragments, quick and dirty.
Usage:
./redir_frag_test.py hostname port_number
"""
import nbhttp # http://github.com/mnot/nbhttp
@mnot
mnot / invalidate_cache.js
Created May 30, 2010
invalidate_cache.js
View invalidate_cache.js
/*
invalidate_cache.js -- HTML Includes (version 0.8)
Copyright (c) 2005-2006 Mark Nottingham <mnot@pobox.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mnot
mnot / http_autocomplete.js
Created May 30, 2010
http_autocomplete.js
View http_autocomplete.js
/*
http_autocomplete.js
Copyright (c) 2006 Mark Nottingham <mnot@pobox.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mnot
mnot / template_form.js
Created May 30, 2010
template_form.js - Templated form submission
View template_form.js
/*
template_form.js -- Templated Form Submission (version 0.1)
Copyright (c) 2006 Mark Nottingham <mnot@pobox.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mnot
mnot / json_form.js
Created May 30, 2010
json_form.js - JSON Form Submission
View json_form.js
/*
json_form.js -- JSON Form Submission (version 0.5)
Copyright (c) 2006 Mark Nottingham <mnot@pobox.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mnot
mnot / chatterbox.py
Created Sep 6, 2010
Chatterbox - System monitoring through social networking
View chatterbox.py
#!/usr/bin/env python
"""
Chatterbox - System monitoring through Social Networking.
Chatterbox uses Twitter, IM and eventually other "social" channels to
send you information about your systems, so that you can keep in touch
with how they're performing without lots of messages in your e-mail inbox
or on your pager.
View mod_loadshed.c
/**
* \file mod_loadshed.c
* \author Mark Nottingham, <mnot@mnot.net>
*
* mod_loadshed, when enabled, will refuse the request with a 503 if
* no additional Apache children are currently available. This should
* prevent requests from going to the listen queue.
*/
@mnot
mnot / test_http_conns.py
Created Sep 8, 2010
test_http_conns.py - Tests for how clients handle HTTP pconns and pipelining
View test_http_conns.py
#!/usr/bin/env python
"""
test_http_conns.py - Tests for how HTTP persistent connections are handled,
including pipelining.
This script will set up a server which summarises how a browser connecting
to it behaves. For example, FireFox with pipelining turned on will give:
--->8---
You can’t perform that action at this time.