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
import downloader | |
import re | |
import sys | |
from PyQt4 import QtGui, QtCore | |
def getIcon(number): | |
image = QtGui.QPixmap(16, 16) | |
font = QtGui.QFont('terminal', 5) | |
font.setStretch(150) |
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
text = "abcdefgh" | |
split = 2 | |
print "Original: %s" % text | |
def encode(text, split): | |
textout = "" | |
for x in xrange(0, split): | |
textout += text[x::split] |
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
import mechanize | |
import os, sys | |
KILOBYTE = 1024 | |
MEGABYTE = KILOBYTE * KILOBYTE | |
BUFFER = MEGABYTE / 2 | |
NOISY = False | |
def noisyPrint(text, rn=True): |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAts8DWbPM6w83b5XZo5wy5VnsBHuBKnSSacsU+01Ua10CwLJVGafdQXotlsKZJN3p+g1nraXS08zofLyKhuTLtsZk0I/7airiwL8XkY9ltlKFxSPotjSdnyv8sJiA5rQJKSnzrd2PXNX6Z3tVqP/y7VfU25yVnV5Goum1K9liVHh+KKu80NXjxj9W8ftLaaf85wJnoOP8EZofSKVWWnM7CBy8KeSKTttVUXb7r53cJs4i/HMd2++6DQi8J2J08VRf/Yl43fjrAp+I8fjXvMo+PwijtGLjdvAPFTXfevEN5UL6XcM/2FW/rlVA6lWb63+pc/3M+ETIppvIOqwWtSAfoQ== [email protected] |
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
import cherrypy | |
from cherrypy import _cpserver | |
from cherrypy import _cpwsgi_server | |
secure_server = _cpwsgi_server.CPWSGIServer() | |
secure_server.bind_addr = ('0.0.0.0', 443) | |
secure_server.ssl_certificate = 'my_cert.crt' | |
secure_server.ssl_private_key = 'my_cert.key' | |
adapter = _cpserver.ServerAdapter(cherrypy.engine, secure_server, secure_server.bind_addr) | |
adapter.subscribe() |
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
>>> import cherrypy ; print cherrypy ; print cherrypy.dispatch | |
<module 'cherrypy' from 'C:\Python27\lib\site-packages\cherrypy\__init__.pyc'> | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
AttributeError: 'module' object has no attribute 'dispatch' | |
>>> |
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
conf = { | |
"/": { | |
"request.dispatch": cherrypy.dispatch.VirtualHost(**{ | |
"x.co.cc": "/", | |
"y.x.co.cc": "/mc", | |
"static.x.co.cc": "/static" | |
}), | |
"tools.staticdir.root": r"/root/site/static", | |
}, | |
"/static": { |
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
>>> pprint.pprint(server.api.call("getPlayers")) | |
[{u'health': 20, | |
u'inVehicle': False, | |
u'inventory': {u'armor': {u'boots': {u'amount': 0, | |
u'durability': -1, | |
u'type': 0}, | |
u'chestplate': {u'amount': 0, | |
u'durability': -1, | |
u'type': 0}, | |
u'helmet': {u'amount': 0, |
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
print "__init__" |
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
groups: | |
Admins: | |
permissions: | |
- '*' | |
inheritance: | |
default: false | |
Moderators: | |
permissions: | |
- worldguard.region.removeowner.* | |
- worldedit.clipboard.* |