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
adiroiban /
Last active Aug 29, 2015
Take a dict and create buildbot configuration.
# Create buildbot configuration based on a plain dict.
from buildbot.buildslave import BuildSlave
from buildbot.config import BuilderConfig
from buildbot.changes.gitpoller import GitPoller
from buildbot.changes.filter import ChangeFilter
from buildbot.interfaces import IEmailLookup
from buildbot.process.factory import BuildFactory
from import Property, Interpolate
View gist:ae1dd671db5bfe72e956
diff --git a/python-modules/chevah-python-test/ b/python-modules/chevah-python-test/
index 58c2fe5..8de6e31 100644
--- a/python-modules/chevah-python-test/
+++ b/python-modules/chevah-python-test/
@@ -72,6 +72,14 @@ except:
print '"ctypes.utils - find_library" missing.'
exit_code = 1
+ import gmpy
adiroiban /
Created Jan 5, 2015
Ubuntu post install
echo 'deb trusty contrib' | \
sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get remove --purge rhythmbox-data rhythmbox
sudo apt-get install \
chromium-browser network-manager-openvpn-gnome\
htop vim-nox synaptic mc unrar\
pidgin indicator-cpufreq \
adiroiban / output
Last active Aug 29, 2015
Unhandled exceptions.OverflowError: getsockaddrarg: port must be 0-65535.
View output
$ ./build-ubuntu1404-x64/bin/python
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "/home/adi/chevah/server/build-ubuntu1404-x64/lib/python2.7/site-packages/twisted/internet/", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/adi/chevah/server/build-ubuntu1404-x64/lib/python2.7/site-packages/twisted/internet/", line 250, in _checkTimeout
File "/home/adi/chevah/server/build-ubuntu1404-x64/lib/python2.7/site-packages/twisted/internet/", line 368, in callback
from __future__ import print_function
import json
from StringIO import StringIO
from twisted.internet import defer, protocol, reactor, task
from twisted.web import server, static
from twisted.web.client import (
adiroiban /
Last active Aug 29, 2015
Stop server HTTP transport
Client which makes a simple POST request.
import urllib
import urllib2
params = urllib.urlencode(
{'action': 'delete-members', 'selected-members': 'README.rst'})
req = urllib2.Request(
adiroiban /
Last active Aug 29, 2015
HTTP 100 continue and informing a resource that headers have been received
class IChevahRequest(IRequest):
Extended request used in Chevah project.
maximumBodyLength = Attribute(
Set the maximum accepted body length.
Clients sending more data are disconnected.
from zope.interface import implements
from twisted.cred.portal import IRealm, Portal
from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse
from twisted.web.static import File
from twisted.web.resource import IResource
from twisted.web.guard import HTTPAuthSessionWrapper, DigestCredentialFactory
from twisted.web.server import Site
from twisted.internet import reactor

Keybase proof

I hereby claim:

  • I am adiroiban on github.
  • I am adiroiban ( on keybase.
  • I have a public key whose fingerprint is B8E7 4048 044E F459 4A15 60B8 F2AD A018 852B 2B03

To claim this, I am signing this object:

adiroiban /
Created Apr 8, 2015
Unicode os.stat
-> os.stat(path)
(Pdb) path
(Pdb) os.stat(path)
*** UnicodeEncodeError: 'ascii' codec can't encode character u'\u021b' in position 44: ordinal not in range(128)
(Pdb) os.stat(path.encode('utf-8'))
*** OSError: [Errno 2] No such file or directory: '/tmp/4b385cfb-f96c-4eca-81c9-70d1223353d6-cp\xc8\x9b/3741-cp\xc8\x9baaaaaaaaaaaaaaaaaaaaaaaa'
(Pdb) os.environ.get('LANG')
(Pdb) os.stat(path)
You can’t perform that action at this time.