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
from socbot.pluginbase import Base | |
from twisted.application import internet | |
from twisted.web import resource, server | |
class Plugin(Base): | |
class Simple(resource.Resource): | |
isLeaf = True | |
def render_GET(self, request): | |
line = "<html><head><title>Ohai2</title></head><body>Hello, world 2!</body></html>" | |
self.log.info(line) |
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
from socbot.pluginbase import Base | |
from twisted.application import internet | |
from twisted.web import resource, server | |
class Plugin(Base): | |
class Simple(resource.Resource): | |
isLeaf = True | |
def render_GET(self, request): | |
line = "<html><head><title>Ohai2</title></head><body>Hello, world 2!</body></html>" | |
self.log.info(line) |
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
from socbot.pluginbase import Base | |
from twisted.application import internet | |
from twisted.web import resource, server | |
class Plugin(Base): | |
class Simple(resource.Resource): | |
isLeaf = True | |
def render_GET(self, request): | |
line = "<html><head><title>Ohai2</title></head><body>Hello, world 2!</body></html>" | |
self.log.info(line) |
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
from inspect import getmembers, ismethod | |
import logging | |
from twisted.application import internet | |
from twisted.web import resource, server | |
from twisted.internet import reactor | |
class Base(object): | |
def __init__(self, manager): | |
self.manager = manager | |
self.log = logging.getLogger("plugin") |
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 os, sys | |
from subprocess import Popen | |
# java -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft | |
appdata = os.path.dirname(os.path.abspath(__file__)) | |
# java -cp ... | |
args = ['java', '-cp',] |
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 os, sys | |
from subprocess import Popen | |
# java -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft | |
appdata = os.path.dirname(os.path.abspath(__file__)) | |
# java -cp ... | |
args = ['java', '-cp',] |
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 urllib2 | |
import subprocess | |
loginurl = "https://login.minecraft.net/?&user={0}&password={1}&version=9999" | |
user = "user" | |
pass_ = "pass" | |
loginurl = loginurl.format(user, pass_) | |
print "attempting login" | |
data = urllib2.urlopen(loginurl) |
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
def launchUpdate(updated, user, ticket, appdata=None): | |
if appdata: | |
appdata = os.path.abspath(appdata) | |
if sys.platform == "win32": | |
os.putenv("APPDATA", appdata) | |
else: | |
os.environ["HOME"] = appdata | |
url = "minecraft.jar?user={0}&ticket={1}".format(user, ticket) |
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.define | |
- worldguard.region.redefine |
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 | |
from PyQt4 import QtCore, QtGui | |
class GraphWidget(QtGui.QGraphicsView): | |
def __init__(self): | |
super(GraphWidget, self).__init__() | |
self.font = QtGui.QFont("System") | |
fontinfo = self.finfo = QtGui.QFontMetrics(self.font) |