This file contains 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 bash | |
# DEBUG | |
item="foo bar lorem ipsum" | |
item="foo bar t:2009-02-26 lorem ipsum" | |
item="foo bar t:2009-02-27 lorem ipsum" | |
item="foo bar t:2009-02-28 lorem ipsum" | |
# check for threshold | |
if [[ $item = *t:* ]]; then # check for threshold marker |
This file contains 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
/** | |
* Checks that the given expression throws an exception of the expected type, with an optional message. | |
* | |
* @example raises( function() { return foo.bar; }, "TypeError", "invalid property access raises TypeError exception" ); | |
* | |
* @param Function expression | |
* @param String expected exception type | |
* @param String message (optional) | |
*/ | |
function raises(expression, expected, message) { |
This file contains 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
/* | |
* make Bespin use the local file system for storage | |
* | |
* requires jquery.file.save and jquery.file.load: | |
* http://trac.tiddlywiki.org/browser/Trunk/core/jquery/plugins/ | |
*/ | |
(function() { | |
// provide jQuery functionality required by file-system code |
This file contains 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
//{{{ | |
config.macros.toggleReadOnly = { | |
label: "toggle", | |
tooltip: "toggle read-only mode", | |
handler: function(place, macroName, params, wikifier, paramString, tiddler) { | |
createTiddlyButton(place, this.label, this.tooltip, this.toggle); | |
}, | |
toggle: function() { |
This file contains 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.config import DEFAULT_CONFIG | |
def init(config): | |
print "invoking TiddlyDocs" | |
app_tiddlers = [ | |
"file:///home/fnd/Dev/TiddlyWiki/TiddlyWiki.org/association/serversides/cctiddly/Trunk/plugins/TiddlyDocs/files/split.recipe" | |
] | |
config["instance_tiddlers"] = config["instance_tiddlers"] + [("common", app_tiddlers)] |
This file contains 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>JavaScript-based game experiment</title> | |
<link rel="stylesheet" type="text/css" href="styles/main.css"> | |
</head> | |
<body> |
This file contains 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.web import util as web | |
def init(config): | |
# extend urls.map | |
config["selector"].add("/test/{url:any}", GET=get_request) | |
def get_request(environ, start_response): | |
content = str(environ) |
This file contains 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 -*- | |
""" | |
test case for the following error: | |
UnicodeEncodeError: | |
'ascii' codec can't encode character u'\xf6' in position 1: | |
ordinal not in range(128) | |
""" |
This file contains 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
* { | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
background-color: #000; | |
} | |
body { |
OlderNewer