This file contains 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
Traceback (most recent call last): | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 355, in _handle_read | |
if self._read_to_buffer() == 0: | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 422, in _read_to_buffer | |
chunk = self._read_from_socket() | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 403, in _read_from_socket | |
chunk = self.socket.recv(self.read_chunk_size) | |
File "/usr/lib/pypy/lib-python/modified-2.7/socket.py", line 188, in recv | |
return self._sock.recv(buffersize, flags=flags) | |
error: [Errno 104] Connection reset by peer |
This file contains 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
def _time_independent_equals(a, b): | |
if len(a) != len(b): | |
return False | |
result = 0 | |
if type(a[0]) is int: # python3 byte strings | |
for x, y in zip(a, b): | |
result |= x ^ y | |
else: # python2 | |
for x, y in zip(a, b): | |
result |= ord(x) ^ ord(y) |
This file contains 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
<?php | |
/* Python Version: https://gist.github.com/3738771 */ | |
function _time_independent_equals($a, $b){ | |
if (strlen($a) !== strlen($b)){ | |
return; | |
} | |
$result = 0; | |
for($i=0; $i<strlen($a); $i++){ |
This file contains 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 tornado.web import create_signed_value, decode_signed_value | |
secret = 'blah' | |
val = create_signed_value(secret, 'foo', 'bar') | |
print val | |
print decode_signed_value(secret, 'foo', val) |
This file contains 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
ERROR:root:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x000000002054c1a8> | |
Traceback (most recent call last): | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/ioloop.py", line 421, in _run_callback | |
callback() | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 305, in wrapper | |
callback(*args) | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) |
This file contains 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
#!/usr/bin/env python | |
""" | |
Check status of a 3ware RAID and alert using AMAZON SES | |
Requires tw_cli binary | |
http://www.cyberciti.biz/files/tw_cli.8.html | |
Author: Matthew Scragg <scragg@gmail.com> | |
""" |
This file contains 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
ERROR:root:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x0000000009ea86b0> | |
Traceback (most recent call last): | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/ioloop.py", line 421, in _run_callback | |
callback() | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 305, in wrapper | |
callback(*args) | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) |
This file contains 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
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
Intel Xeon E3-1230 V2 Ivy Bridge 3.3GHz (3.7GHz Turbo) 8MB L3 Cache LGA 1155 69W Quad-Core Server Processor BX80637E31230V2 2L218Y30A3539 | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Integrated IPMI 2.0 X9SCM-F Winbond KVM/LAN card |
This file contains 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
<?php | |
// Just a wrapper class for ZMQ PECL extension | |
class ZMQ_Socket { | |
private $_context; | |
private $_socket; | |
private $_connected = false; |
This file contains 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
def rotr(x, n=1, bits=8): | |
while True: | |
x = ((x & 1) << bits-1 | x >> 1) | |
n -= 1 | |
if not n: | |
break | |
return x |