Skip to content

Instantly share code, notes, and snippets.

@cdent
cdent / README.md
Created October 28, 2017 15:28 — forked from FND/README.md
complate-wsgi sandbox
$ python3 -m venv venv
$ . venv/bin/activate

$ pip install js2py gunicorn

$ gunicorn app:app

http://localhost:8000

@cdent
cdent / app.py
Last active April 16, 2018 19:50 — forked from FND/app.py
custom Python module importer
from hook import register_import_hook
print('calling to register')
register_import_hook()
print('registered')
def later():
import test_foo
@cdent
cdent / README.md
Last active August 29, 2015 14:22 — forked from FND/README.md

Getting Started

$ pip install falcon
$ python3 app.py

alternatively with Gunicorn (for HTTP/1.1):

$ pip install gunicorn

$ gunicorn app:app

#!/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
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
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)
@cdent
cdent / webmail.sh
Created December 17, 2009 21:05 — forked from FND/webmail.sh
#!/bin/sh
# replace with all the various variables and what not
cmd="wget -q -O - http://tiddlyweb.com |uuencode /dev/stdout|\
/usr/bin/mailx -s 'hello' fndo@gmx.net"
ssh -p 8022 heavy.peermore.com $cmd
@cdent
cdent / .gitignore
Created December 14, 2009 12:51 — forked from FND/.gitignore
*.pyc
@cdent
cdent / simplewiki
Created December 3, 2009 18:00 — forked from FND/simplewiki
#!/usr/bin/env python
"""
simplewiki instantiation
"""
import sys
from tiddlyweb.config import config