Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Take Picture</title>
</head>
<body>
<video autoplay></video>
<canvas></canvas>
<button>Click</button>
<select></select>
@bengillies
bengillies / fooTid.diff
Created May 15, 2012 13:59
TiddlyWeb PATCH Strawman
@@ -1,1 +1,1 @@ title
+foobar
-foo
@@ -1,1 +1,0 @@ myNewField
+This is my new field
@@ -3,1 +3,1 @@ text
+The third text line has changed
-The old third line
@@ -1,2 +1,1 @@ tags
+foo
@bengillies
bengillies / demo.html
Created March 16, 2012 00:52
event-base - A simple Class Helper and a simple Event Helper.
<!DOCTYPE html>
<html>
<head>
<title>EventBase Demo</title>
</head>
<body>
<div class="foo">
<a href="">I'm a link</a>
<button>I'm a button</button>
</div>
@bengillies
bengillies / Makefile
Created November 5, 2011 01:09
extract.js - extract objects from an argument list
.PHONY: test
test:
qunit test/index.html
@bengillies
bengillies / tsupload
Created July 15, 2011 17:37
Upload files to TiddlySpace via cmd line
#!/usr/bin/env python
#
# Upload a (set of) named file(s) to TiddlySpace
#
# expects a ~/.tiddlyspace-cookie file
#
# For Example:
#
# $ tsupload bengillies tsupload -t cli -t upload -t tiddlyspace -t script -t python -B '{{{' -A '}}}'
#
@bengillies
bengillies / wikipeg.js
Created May 23, 2011 14:56
PEG based wikitext parser
wikitext = (function(){
/* Generated by PEG.js 0.6.1 (http://pegjs.majda.cz/). */
var result = {
/*
* Parses the input with a generated parser. If the parsing is successfull,
* returns a value explicitly or implicitly specified by the grammar from
* which the parser was generated (see |PEG.buildParser|). If the parsing is
* unsuccessful, throws |PEG.parser.SyntaxError| describing the error.
*/
twinstance foo
cd foo
twanager server &
open http://0.0.0.0:8080/recipes/default/tiddlers/unicode∑ç≈µ˚¬
"""
This is a handler for running tiddlyweb
under apache using either mod_wsgi or mod_python.
mod_wsgi is a better choice.
##################################################
For mod_wsgi
Your apache must be configured to use mod_wsgi.
modifier: None
created:
modified: 20100127161718
type: None
tags: systemConfig
/***
|Name|BookmarkletPlugin|
|Version|0.1|
|Author|Ben Gillies|
"""
test to ensure that extra template variables in the recipe
are picked up in control._recipe_template
"""
from tiddlyweb.control import _recipe_template
def test_get_template_from_recipe_template():
environ = {
'tiddlyweb.recipe_template': {
'foo': 'bar'