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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
''' | |
I just came across pychecker ( http://pychecker.sourceforge.net/ ) and realized that putting it | |
at the bottom of each module can do only good, can't it? | |
''' | |
def foo(): | |
pass |
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
eth0 Link encap:Ethernet HWaddr 00:01:6c:ea:6c:f4 | |
inet addr:70.0.0.2 Bcast:70.0.0.255 Mask:255.255.255.0 | |
inet6 addr: fe80::201:6cff:feea:6cf4/64 Scope:Link | |
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
RX packets:1750504 errors:0 dropped:0 overruns:0 frame:0 | |
TX packets:8778 errors:0 dropped:0 overruns:0 carrier:0 | |
collisions:0 txqueuelen:1000 | |
RX bytes:125190786 (125.1 MB) TX bytes:584350 (584.3 KB) | |
Interrupt:16 |
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
root@karmic:/home/tzury# ifconfig -a | |
eth0 Link encap:Ethernet HWaddr 00:1a:6b:ce:19:b5 | |
inet addr:70.0.0.1 Bcast:70.0.0.255 Mask:255.255.255.0 | |
inet6 addr: fe80::21a:6bff:fece:19b5/64 Scope:Link | |
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
RX packets:12671448 errors:0 dropped:0 overruns:0 frame:0 | |
TX packets:4670 errors:0 dropped:0 overruns:0 carrier:0 | |
collisions:0 txqueuelen:100 | |
RX bytes:823003284 (823.0 MB) TX bytes:277197 (277.1 KB) | |
Memory:fe000000-fe020000 |
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
<?xml version="1.0"?> | |
<afikoman xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///etc/afikoman-config.xsd"> | |
<negotiator> | |
<crypto> | |
<ca> | |
<cert>/opt/afikoman/crypto/N00.P000/CA.pem</cert> | |
<crl>/opt/afikoman/crypto/N00.P000/crl.pem</crl> | |
</ca> | |
<box> | |
<cert>/opt/afikoman/crypto/N00.P000/1003.pem</cert> |
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
<?xml version="1.0"?> | |
<afikoman xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///etc/afikoman-config.xsd"> | |
<negotiator> | |
<crypto> | |
<ca> | |
<cert>/opt/afikoman/crypto/N00.P000/CA.pem</cert> | |
<crl>/opt/afikoman/crypto/N00.P000/crl.pem</crl> | |
</ca> | |
<box> | |
<cert>/opt/afikoman/crypto/N00.P000/1002.pem</cert> |
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
#!/bin/bash | |
SNORT_PIDFILE=/var/run/snort.pid | |
snort_start(){ | |
iptables -A FORWARD -i eth0 -o eth1 -j NFQUEUE | |
iptables -A |
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
2011-03-06 14:09:54,913-DEBUG-Got []as candidates to add, but all of them already existed | |
2011-03-06 14:09:54,914-INFO-creating entities: [('http://zeze0556.appspot.com/iA2', 0L), ('http://zeze0556.appspot.com/iA2/followers', 0L), ('http://zeze0556.appspot.com/iA2/following', 0L), ('http://zeze0556.appspot.com/iA2/lists/memberships', 0L)] | |
2011-03-06 14:09:55,120-INFO-got a new entity id: 23612 | |
2011-03-06 14:09:55,120-DEBUG-adding a new entity: id:23612, provider: 0, name: http://zeze0556.appspot.com/iA2 | |
2011-03-06 14:09:55,121-DEBUG-adding alias for existing entity: id:23612, provider: 0, new alias: http://zeze0556.appspot.com/iA2/followers | |
2011-03-06 14:09:55,122-DEBUG-adding alias for existing entity: id:23612, provider: 0, new alias: http://zeze0556.appspot.com/iA2/following | |
2011-03-06 14:09:55,123-DEBUG-adding alias for existing entity: id:23612, provider: 0, new alias: http://zeze0556.appspot.com/iA2/lists/memberships | |
2011-03-06 14:09:55,123-DEBUG-created entities: names:[('http://zeze0556.appspot.com/iA |
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
root@precision:/home/tzury/Desktop# python i18n.py | |
Te AMO | |
ERROR:root:i18n.html code: | |
1 def _execute(): | |
2 _buffer = [] | |
3 _tmp = _("I love you") | |
4 if isinstance(_tmp, str): _buffer.append(_tmp) | |
5 elif isinstance(_tmp, unicode): _buffer.append(_tmp.encode('utf-8')) | |
6 else: _buffer.append(str(_tmp)) | |
7 _buffer.append('\n') |
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
class SyscallThread(Thread): | |
def __init__(self, commandline): | |
Thread.__init__(self) | |
self.cursor = 0 | |
self.lines = {self.cursor:[]} | |
self.keep_running=False | |
self.commandline=commandline | |
def run(self): | |
print 'starting thread:', self |
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
tzury@precision:~/devel/tornadolog$ cat /dev/urandom | hexdump > /tmp/largefile.log | |
^C | |
tzury@precision:~/devel/tornadolog$ ls -lh /tmp/largefile.log | |
-rw-r--r-- 1 tzury tzury 131M 2011-02-27 09:50 /tmp/largefile.log | |
tzury@precision:~/devel/tornadolog$ | |
tzury@precision:~/devel/tornadolog$ ./tornadolog.py | |
[I 110227 09:50:37 tornadolog:64] TornadoLog started. Point your browser to http://localhost:7777/tail | |
[I 110227 09:50:49 tornadolog:14] Info | |
[I 110227 09:50:49 web:756] 200 GET / (127.0.0.1) 0.78ms | |
[I 110227 09:50:56 tornadolog:14] Info |