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
CREATE | |
PROCEDURE `sp_dev_re_guid`() | |
BEGIN | |
/** | |
* DEGREE: UTILITY | |
* TABLES AFFECT: any with creature.guid value in use | |
* | |
* THIS PROCEDURE IS IN A TESTING PHASE, USE AT OWN RISK! | |
* | |
* ex: CALL `sp_dev_re_guid`(1000); -- will renumber all existing guids in creature table starting with 1000 as initial |
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
(lambda n,s,I:n.classobj('h',(),dict(__init__=(lambda M,S,P,C:M.__dict__.update( | |
dict(R=(S,P),H=C,O=s.socket()))),C=(lambda M:(M.O.connect(M.R),setattr(M,'D',M.O | |
.makefile()),setattr(M,'S',(lambda l: M.O.send('%s\r\n'%l))),M.S("NICK hue"),M.S | |
("USER a b c d :LOL!"),setattr(M,'R',lambda n,m: M.S('PRIVMSG %s :%s'%(n,m))),M. | |
P())),G = (lambda M,S:S.split(' :',1)[1] if' :'in S else ''),P=(lambda M:next(I. | |
dropwhile((lambda Lu:((lambda L:((lambda: M.S("PONG :%s"%M.G(L))if L.startswith( | |
'PING')else(lambda P,G,S:({'001':(lambda: M.S('JOIN %s'%M.H)),'PRIVMSG':(lambda: | |
M.HC(L[1:].split('!',1),P[2],G[1:].split(),G)if G.startswith('!')else None)}.get | |
(P[1],lambda: None)())if len(P)>1 else None)(L.split(),M.G(L),M.O))()))(Lu.strip | |
()),True)[1]),iter(M.D)),None)),HC=(lambda M,(N,H),C,P,L: {'hello':lambda:M.R(C, |
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
s..[){+[^{}.;y.{+}^)[. \-\/fmr.;qx.$_.; | |
# How it works | |
s..[){+[^{}.; # defines $_ as "[){+[^{}." | |
y.{+}^)[. \-\/fmr.; # translates | |
print $_; | |
# "{" = " " | |
# "+" = "-" | |
# "}" = "/" |
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 twisted.internet import protocol, reactor | |
from twisted.web import static, server, proxy | |
from twisted.web.resource import Resource | |
import base64, urllib | |
#from os import fork, setsid, umask, dup2 | |
from sys import stdin, stdout, stderr | |
from os import getpid | |
from urllib import quote as urlquote | |
pid_file = "/home/tahoe/gateway/gateway.pid" |
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 twisted.internet import protocol, reactor | |
from twisted.web import static, server, proxy | |
from twisted.web.resource import Resource | |
import base64, urllib | |
#from os import fork, setsid, umask, dup2 | |
from sys import stdin, stdout, stderr | |
from os import getpid | |
from urllib import quote as urlquote | |
pid_file = "/home/tahoe/gateway/gateway.pid" |
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
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
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
######################################################## | |
# How to NOT use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda const-# | |
# ruct in Python 2.x. DO NOT USE ANY OF THIS EVER # | |
# by: e000 (13/6/11) # | |
######################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much annymous "one line" functions |
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 Foo: | |
def __init__(self, a, b, c): | |
self._a = a | |
self._b = b | |
self._c = c | |
def getA(self): | |
return self._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
from Core.ZalgoUtil.CancellableClient import getPage | |
from twisted.python.util import OrderedDict | |
from urllib import quote | |
from hashlib import md5 | |
from Core.ZalgoUtil.ModUtil import xhtml_unescape, utf8 | |
import re | |
class AlreadyRunningError(Exception): | |
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
strToBin = (function() { | |
var binarr = [] // build an array to hold the binary form of 0-255 | |
for(var i = 0; i < 256; i++) { | |
bins = '' | |
for(var j = 7; j >= 0; j--) { | |
c = Math.pow(2, j) | |
bins += (i & c) == c ? '1' : '0' | |
} | |
binarr.push(bins) | |
} |