This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
__author__ = 'Frank Smit <[email protected]>' | |
__version__ = '0.1.0' | |
import functools | |
import psycopg2 | |
from tornado.ioloop import IOLoop, PeriodicCallback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: $('input.pwstrnth').pwstrnth(); | |
// Password strength checker plugin | |
;(function ($, window, undefined) { | |
var pluginName = 'pwstrnth', | |
document = window.document, | |
indicators = [' ', ':\'(', ':(', ':|', ':)', ':D'], | |
regexes = [/.{8,}/, /[a-z]+/, /[0-9]+/, /[A-Z]+/, /[\/?<>,.\[\]{}()*&^%$#@!;:|]/]; | |
function Plugin(element) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A simple anti-XSRF class. | |
*/ | |
class xsrf | |
{ | |
static private $_token = false; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
randwp | |
~~~~~~ | |
Fetches random wallpapers from the wallbase.net toplist and sets it as the | |
background. | |
This script needs Python 3.*. Windows people need to install the `pywin32`_ | |
and Mac OS X people need to install `py-appscript`_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
evenniaclient | |
~~~~~~~~~~~~~ | |
A simple client for the Evennia MUX server. | |
Website: http://evennia.com/ | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Url: http://61924.nl/posts/00038-whoosh | |
Example: | |
>>> from searchengine import * | |
>>> search = SearchEngine('./index') | |
>>> search.create_index() | |
>>> search.add_document('http://example.org/somedocument', | |
'The document title', 'The content of the document') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Indents and wraps text, but doesn't touch docblocks.""" | |
import re | |
import hashlib | |
import textwrap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* --- | |
A really simple Atom/XML parser with caching. | |
Usage: | |
try |