Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
USAGE="Usage: `basename $0` <src_space_url> <src_space> <src_user> <src_pwd> <dest_space_url> <dest_space> <dest_user> <dest_pwd>"
if [ $# -ne 8 ]; then
echo $USAGE >&2
exit 1
fi
SRC_SPACE_URL=$1
@cdent
cdent / package.json
Last active December 16, 2015 15:59
demonstrate bug with jsdom and jsquery. 1382 value may need to be tweaked to tickle bug.
{
"name": "test",
"version": "0.0.1",
"dependencies": {
"jsdom": "*",
"jquery": "*"
}
}
"""
Basic way to load a recipe at /<name>.
Add 'friendlywiki' to system_plugins in tiddlywebconfig.py:
config = {
'system_plugins': ['tiddlywebwiki','friendlywiki'],
'secret': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'twanager_plugins': ['tiddlywebwiki'],
}
target_server:http://cdent-t10.tiddyspace.com
@cdent
cdent / gist:2149828
Created March 21, 2012 17:26
diff on TiddlyWiki5/js/WikiTextRules.js for space links
diff --git a/js/WikiTextRules.js b/js/WikiTextRules.js
index 4b16afd..987cced 100755
--- a/js/WikiTextRules.js
+++ b/js/WikiTextRules.js
@@ -46,6 +46,10 @@ textPrimitives.tiddlerAnyLinkRegExp = new RegExp("("+ textPrimitives.wikiLink +
textPrimitives.brackettedLink + ")|(?:" +
textPrimitives.urlPattern + ")","mg");
+textPrimitives.spaceName = "[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]";
+textPrimitives.spaceNameStrict = "[a-z][a-z0-9-]*";
a stub
from tiddlyweb import control
from tiddlywebplugins.utils import get_store
from tiddlyweb.store import Store, NoBagError,NoTiddlerError
from tiddlyweb.model.bag import Bag
from tiddlyweb.model.recipe import Recipe
from tiddlyweb.model.tiddler import Tiddler
def mytest(environ, start_response):
start_response('200 OK', [
('Content-Type', 'text/html; charset=utf-8')
@cdent
cdent / .gitignore
Created March 24, 2010 11:16 — forked from FND/.gitignore
*.pyc
"""
PUT a tiddler.
"""
import httplib2
def put(server, bag, tiddler, body):
http = httplib2.Http()
url = '%s/bags/%s/tiddlers/%s' % (server, bag, tiddler)
response, content = http.request(url,
from tiddlyweb.util import merge_config
from tiddlyweb.config import config as global_config
from tiddlywebconfig import config as custom_config
print "BEFORE: custom", custom_config["instance_tiddlers"]
print "BEFORE: global", global_config["instance_tiddlers"]
merge_config(global_config, custom_config)