Skip to content

Instantly share code, notes, and snippets.

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')
@zuriby
zuriby / debug.log
Created March 6, 2011 18:49
tail -n 250 /opt/itrust/crawlers/gsg-api/debug.log
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
#!/bin/bash
SNORT_PIDFILE=/var/run/snort.pid
snort_start(){
iptables -A FORWARD -i eth0 -o eth1 -j NFQUEUE
iptables -A
<?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>
<?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>
@zuriby
zuriby / ifconfig -a
Created March 23, 2011 10:49
laptop_a
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
@zuriby
zuriby / ifconfig -a
Created March 23, 2011 10:50
LAPTOP B
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
#!/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
@zuriby
zuriby / hash32.py
Created March 29, 2011 04:33
32bit hash function for python
hash32 = lambda value: hash(value) & 0xffffffff
www:
requirements:
- faye
- jade