Skip to content

Instantly share code, notes, and snippets.

View adiroiban's full-sized avatar
🇺🇦
Slava Ukraini!

Adi Roiban adiroiban

🇺🇦
Slava Ukraini!
  • VGR, La Gomera
  • 07:38 (UTC +01:00)
View GitHub Profile
@adiroiban
adiroiban / file.py
Created December 15, 2015 11:30
obfuscation
# Backslash-escape errorCode. Python 3.5 can do this natively
# ("backslashescape") but Python 2.7 and Python 3.4 can't.
if _PY3:
errorCodeForMessage = "".join(
"\\x%2x" % c if c >= 0x80 else chr(c)
for c in errorCode)
else:
errorCodeForMessage = "".join(
"\\x%2x" % ord(c) if ord(c) >= 0x80 else c
for c in errorCode)
@adiroiban
adiroiban / tsf-nov-2-2015.rst
Created December 1, 2015 09:39
November 2015 week 3 and 4 - TSF Sponsored Development

November 2015 week 3 and 4 - TSF Sponsored Development

This is my report for the work done in the last 2 weeks of November as part of the 2015 Twisted Maintainer Fellowship program.

We continue to have a small waiting line for the review queue. In general the initial review response time was below 24 hours, and delayed mainly due to time zones.

Important changes made in these weeks:

@adiroiban
adiroiban / plan.txt
Created November 29, 2015 15:46
Craig Rodrigues Git Migration Plan for Twisted
OK.
So based on what you have listed, I would say that most of the work will be
working with Git post commit hooks.
I would say the plan should be something like this.
A.1 https://github.com/twisted/twisted will be the "repository of truth"
for Twisted.
-> Twisted releases will be done from GitHub
@adiroiban
adiroiban / test.py
Last active November 21, 2015 12:28
LoopingCall changes
class ChevahLoopingCall(object):
"""
Wrapper for looping call to keep a reference to current loop deferred.
"""
def __init__(self, callback):
self._context = LoopingCall(self._loopedCall)
self._callback = callback
self._ongoingDeferred = None
@adiroiban
adiroiban / tsf-nov-1-2015.rst
Last active November 16, 2015 08:22
November 2015 - week 1 and 2 - TSF Sponsored Development

November 2015 week 1 and 2 - TSF Sponsored Development

This is my report for the work done in the first 2 weeks of November as part of the 2015 Twisted Maintainer Fellowship program.

Imoprtant changes made in these 2 weeks:

  • NPN and ALPL support for the TLS transport.
  • Conch SSH client with diffie-hellman-group-exchange-sha256 support and support for latest release of OpenSSH server.
  • Prepare twisted.web for HTTP/2 supoprt.
@adiroiban
adiroiban / cms.h
Last active November 12, 2015 19:42
SUSE 11 OpenSSL 0.9.8j-fips 07 Jan 2009
/* crypto/cms/cms.h */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:

Computer Science Courses that Don't Exist, But Should

CSCI 2100: Unlearning Object-Oriented Programming

Discover how to create and use variables that aren't inside of an object hierarchy. Learn about "functions," which are like methods but more generally useful. Prerequisite: Any course that used the term "abstract base class."

@adiroiban
adiroiban / gist:ae6b6d738173a30f77b1
Created November 7, 2015 10:50
Twisted py2.7 errors
===============================================================================
[FAIL]
Traceback (most recent call last):
File "/home/adi/chevah/twisted/twisted/internet/test/test_unix.py", line 449, in test_avoidLeakingFileDescriptors
expectedEvent, pformat(events,)))
twisted.trial.unittest.FailTest: Expected event ({'protocolName': 'ConnectableProtocol', 'format': '%(protocolName)s (on %(hostAddress)r) does not provide IFileDescriptorReceiver; closing file descriptor received (from %(peerAddress)r).', 'hostAddress': UNIXAddress(None), 'peerAddress': UNIXAddress('./tmpAMIQ3S.sock')}) not found in logged events ([{'format': '%(log_legacy)s',
'isError': 0,
'log_format': u'{log_text}',
'log_legacy': <twisted.logger._stdlib.StringifiableFromEvent object at 0x7fb94404eb50>,
'log_level': <LogLevel=info>,
@adiroiban
adiroiban / yubi-and-nitrokey.rst
Last active April 15, 2017 22:58
yubikey neo-n usage on Ubuntu 14.04
@adiroiban
adiroiban / Glyph's IRC feedback
Last active November 29, 2015 16:04
Twisted SVN to Git migration - Work Plan
11 Nov
(23:40:19) glyph: adiroiban: hey, so, regarding the git migration. You sent a proposal to the TSF but then you mentioned hawkowl had another proposal. I said to discuss amongst yourselves and submit a single proposal so I can organize an approval vote. Then you asked if there was any news :)
(23:40:40) glyph: adiroiban: The news is "please submit a final proposal for approval when you are done deciding which it is" :)
(23:40:48) adiroiban: ok
(23:41:08) glyph: adiroiban: I can guarantee the PLC is going to do exactly _zero_ work in helping you figure out what to do; it is hard enough for me to get them all to answer their email for a vote :)
(23:41:31) glyph: keturn: maybe you should feel a little bad about that, but since you are the _second_ most responsive member (and the _only_ one actually here) maybe don't feel too bad
(23:42:04) adiroiban: glyph: ok. no problem
(23:42:17) adiroiban: will get in touch with Amber
(23:42:43) adiroiban: I am not aware of receiving an email in which I am asked to