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
| [submodule "wireit"] | |
| path = wireit | |
| url = git://github.com/neyric/wireit.git | |
| [submodule "scripts/chrjs"] | |
| path = scripts/chrjs | |
| url = git://github.com/tiddlyweb/chrjs.git |
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 | |
| """ | |
| SAC | |
| SAC ain't Cook (and he doesn't like it either) | |
| Creates a TiddlyWiki document from a TiddlyWeb bag or recipe. | |
| Usage: |
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
| """ | |
| random data generator | |
| uses a virtual store implementation | |
| TODO: | |
| * documentation | |
| * rename? | |
| """ |
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
| from tiddlyweb.model.bag import Bag | |
| from tiddlyweb.model.recipe import Recipe | |
| from tiddlyweb.store import Store | |
| from tiddlyweb import control | |
| from tiddlyweb.config import config | |
| # set up environment | |
| env = { | |
| "tiddlyweb.config": config |
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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>jQuery idioms</title> | |
| </head> | |
| <body> | |
| <h1>jQuery idioms</h1> |
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
| from tiddlyweb.model.tiddler import Tiddler | |
| from tiddlyweb.model.bag import Bag | |
| from tiddlyweb.store import StoreMethodNotImplemented | |
| from tiddlyweb.stores import StorageInterface | |
| #import MySQLdb as sql -- XXX: temporarily disabled | |
| def init(config): | |
| # register store |
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
| class Base(object): | |
| def __init__(self): | |
| pass | |
| def foo(self): | |
| print "base foo" | |
| def bar(self): | |
| print "base bar" |
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 sh | |
| # loosely based on multi-rbackup.sh by Brice Burgess | |
| # | |
| # settings | |
| # | |
| # source directories (space-separated list) -- N.B.: Exclude trailing slash! | |
| SOURCES="/tmp/btest /tmp/btst" |
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 | |
| # exploring ways to dynamically make a class inherit from a class unknown at | |
| # the time of declaration | |
| # | |
| # Usage: | |
| # $ for type in "" CustomDispatch WrapDispatch MetaDispatch FuncDispatch; do ./dyna.py $type; echo "=========="; done | |
| import sys |
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
| (function($) { | |
| var _ajax = $.ajax; | |
| $.ajax = function(options) { | |
| if(options && $.inArray(options.type, ["PUT", "DELETE"]) != -1) { | |
| var method = options.type; | |
| var setup = options.beforeSend; | |
| options.type = "POST"; | |
| options.beforeSend = function(xhr) { | |
| xhr.setRequestHeader("X-HTTP-Method", method); |