Skip to content

Instantly share code, notes, and snippets.

Working from home

Adi Roiban adiroiban

Working from home
Block or report user

Report or block adiroiban

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
class IPublicAvatar(IPublicObject):
name = PublicAttribute()
peer = PublicAttribute()
class PublicAvatarAdapter(object):
def __init__(self, context):
self.context = context
service_avatar = ServiceAvatar()
View bla.diff
diff --git a/docs/_extensions/ b/docs/_extensions/
index 656d350..7b939fb 100644
--- a/docs/_extensions/
+++ b/docs/_extensions/
@@ -23,15 +23,21 @@ def make_api_link(name, rawtext, text, lineno, inliner,
full_name = full_name.strip()
label = label.strip('>').strip()
- full_name = label = text
+ full_name = text
adiroiban /
Last active Aug 29, 2015
render_POST , render_GET will look at self.segments (which are relative paths) and use them for construct the final path.
# WARNING: This code does not work / had bugs ... is is just an idea.
def getChild(self, name, request):
Return the resource for the request.
It will accumulate segments until we are at the end of the URL and
only then will do the filesystem check and return the final resource.
View gist:9125421
/home/adi/chevah/pydoctor/trunk ----------------------------------------- @pp
$ nosetests pydoctor
ERROR: Failure: ImportError (No module named py)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/", line 390, in loadTestsFromName
addr.filename, addr.module)
View gist:9246608
$ host -a
Trying ""
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7848
;; flags: qr rd ra; QUERY: 1, ANSWER: 12, AUTHORITY: 0, ADDITIONAL: 9
;; ANSWER SECTION: 86400 IN SOA 9 86400 7200 3600000 86400
adiroiban / gist:9723953
Last active Aug 29, 2015
Twisted development wiki changes
View gist:9723953
Some changes might be bold, but I tried to reduce noise level by reducing the amount of links that are referenced in this page.
Update links for removed Lore file.
Add info about changing wiki pages.
Move all info about working with ticket into ticket managemetn
Removed SVN commands and reference the VcsWorklow page as the place where VCS details are contained.
In this way we don't need to spread specific command all over the wiki.
View gist:cd1dc0ca199dc378ec16
def __init__()
self._login_recorder = LoginRecorder()
def handleEventAction(self, event):
Perform associate actions for `event`.
if self.configuration.server.reporter:
import sys
import time
import logging
from watchdog.observers import Observer
from import LoggingEventHandler
class ObserverThread(Observer):
Patched watched.Observer.
adiroiban /
Last active Aug 29, 2015
Spawn with timeout and with the same behaviour across operating systems
Execute external processes.
import os
from twisted.internet import reactor, error, defer
from twisted.internet.protocol import ProcessProtocol
adiroiban /
Created Nov 17, 2014
Twisted SSH Server with primes
#!/usr/bin/env python
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.cred import portal, checkers
from twisted.conch import error, avatar
from twisted.conch.checkers import SSHPublicKeyDatabase
from twisted.conch.ssh import factory, userauth, connection, keys, session
from twisted.internet import reactor, protocol, defer
You can’t perform that action at this time.