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
egj@alcibiades:~$ echo "PasteScript==1.7.5 | |
> WebOb==1.0 | |
> python-dateutil | |
> http://launchpad.net/bzr/2.3/2.3.4/+download/bzr-2.3.4.tar.gz | |
> -e svn+https://svn.socialplanning.org/svn/fassembler/tags/0.4#egg=fassembler-0.4 | |
> -e [email protected]:deliverance/Deliverance#egg=Deliverance-dev" > /tmp/req1.txt | |
egj@alcibiades:~$ echo "WebOb==1.2 | |
> python-dateutil==2.1 | |
> Paste==1.7.5.1 |
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
from trac.core import * | |
from trac.perm import IPermissionPolicy | |
class MultiRepoPermissionSystem(Component): | |
implements(IPermissionPolicy) | |
# Helper methods | |
def parent_repository(self, resource): | |
while True: |
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
[[PageOutline]] | |
= Installing and Integrating Trac and Gitolite = | |
This blog post details how I install Trac and Gitolite using: | |
* Trac 1.0 | |
* Gitolite v3 | |
* Ubuntu 12.04 LTS | |
* Python 2.7.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
jQuery(document).ajaxSend(function(event, xhr, settings) { | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? | |
if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
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
With 100K tickets and eight custom fields, in the current system: | |
{{{ | |
2013-02-04 11:27:23,508 Trac[web_ui] INFO: needed 2.1167910099 seconds for searching terms '[u'nardine']' | |
2013-02-04 11:27:28,881 Trac[web_ui] INFO: needed 2.04926395416 seconds for searching terms '[u'nardine', u'reminiscency']' | |
2013-02-04 11:27:34,073 Trac[web_ui] INFO: needed 2.05887007713 seconds for searching terms '[u'nardine', u'reminiscency', u'Niagaran']' | |
2013-02-04 11:27:37,980 Trac[web_ui] INFO: needed 2.05345582962 seconds for searching terms '[u'nardine', u'reminiscency', u'Niagaran', u'pyramidize']' | |
2013-02-04 11:27:41,786 Trac[web_ui] INFO: needed 2.06689596176 seconds for searching terms '[u'nardine', u'reminiscency', u'Niagaran', u'pyramidize', u'monasterially']' | |
}}} |
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
from trac.env import Environment | |
from trac.db import DatabaseManager | |
from trac import db_default | |
env = Environment("/path/to/my/env") | |
DatabaseManager(env).init_db() | |
with env.db_transaction as db: | |
for table, cols, vals in db_default.get_data(db): | |
db.executemany("INSERT INTO %s (%s) VALUES (%s)" % (table, ','.join(cols), ','.join(['%s' for c in cols])), vals) |
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
${chrome.logging.debug("This is a log message in a genshi template")} |
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
diff --git a/opencore/nui/wiki/bzrbackend.py b/opencore/nui/wiki/bzrbackend.py | |
index 7d2cad3..6234395 100644 | |
--- a/opencore/nui/wiki/bzrbackend.py | |
+++ b/opencore/nui/wiki/bzrbackend.py | |
@@ -5,6 +5,8 @@ import logging | |
from opencore.interfaces.catalog import ILastModifiedAuthorId | |
from opencore.utils import get_config | |
import os | |
+import pickle | |
+import cPickle |
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 os | |
import trac.web.main | |
from trac.env import open_environment, Environment | |
from trac.util import translation | |
import gc | |
import threading | |
def application(environ, start_response): | |
req = trac.web.main.RequestWithSession(environ, start_response) | |
run_once = environ['wsgi.run_once'] |
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
### pip install pycrypto | |
import base64 | |
from Crypto.Cipher import AES | |
from Crypto import Random | |
import datetime | |
import hashlib | |
import hmac | |
import json | |
import os |