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
var injector = angular.element('[data-ng-app="myAppName"]').injector(); | |
var dependency = injector.get('myDependencyName'); | |
dependency.doSomething(); |
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 NewPane(sub, socketuri, dontcache) { | |
var type = sub.charAt(0), | |
uri = '/search?q=', | |
cached = localStorage.getItem('tapas'), | |
socket, title, el; | |
cached = (cached && cached.split(',')) || []; | |
cached.push(sub); | |
if (!dontcache) { | |
localStorage.setItem('tapas', cached.join(',')); | |
} |
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 Tiddler | |
# @ is shorthand for this.title = title | |
constructor: (@title, @bag) -> | |
# Other properties attached to prototype | |
text: "" | |
tags: [] | |
# toString() function returns properties | |
# Fat arrow ensures 'this' inside the function is always bound to the instance |
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
import logging | |
from datetime import datetime | |
from tiddlywebplugins.tiddlyspace.config import config | |
from tiddlyweb.store import Store | |
from tiddlyweb.model.tiddler import Tiddler | |
now = datetime.utcnow() | |
# Make sure this is writable by the user running this | |
filename = 'archive-%s-%s-%s.log' % (now.year, now.month, now.day) |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ajax Include Spike</title> | |
</head> | |
<body> | |
<div data-tiddlers="fragment"> | |
<div data-tiddler="Fragment2">tiddler two loaded here</div> | |
<div data-tiddler="Fragment3">tiddler three loaded here</div> |
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
import ldap | |
ldap_host = '<host>' | |
ldap_port = '389' | |
base_dn = '<ou=something,ou=com>' | |
username = '<username>' | |
password = '<password>' | |
filename = '<file_with_list_of_user_ids>' |
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
/* For IE7 & 8 */ | |
.transparent-black { | |
/* IE7 needs an element to be positioned in order to apply a transparent background, this is a work-around */ | |
zoom: 1; | |
background-color: #000; | |
filter: alpha(opacity=70); | |
/* Fill the parent container */ | |
position: absolute; | |
top: 0; | |
left: 0; |
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
#!/bin/sh | |
if [ $# -lt 3 ]; then | |
echo "Usage: `basename $0` space_url port tiddler_title" | |
exit 1 | |
fi | |
SPACE_URL=$1 | |
PORT=$2 | |
TIDDLER=$3 |
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
# A basic configuration. | |
# `pydoc tiddlyweb.config` for details on configuration items. | |
config = { | |
'system_plugins': ['tiddlywebplugins.tiddlyspace'], | |
'secret': '19ea4f518345d7f89c99a679b5957ebb6efc4b2a', | |
'twanager_plugins': ['tiddlywebplugins.tiddlyspace'], | |
'server_host': { | |
'scheme': 'http', | |
'host': 'tiddlyspace.org', |
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
#!/bin/sh | |
# This script writes a domain name to the Nginx aliases file | |
# and adds the corresponding tiddler to the MAPSPACE bag. | |
# Run ./byod.sh without any arguments for usage. | |
DOMAIN=$1 | |
TARGET_SPACE=$2 | |
WWW_DOMAIN=$3 |