Skip to content

Instantly share code, notes, and snippets.

@pirogoeth
pirogoeth / memoize.py
Created June 18, 2011 02:40
labere's memoizer
#!/usr/bin/env python
import var
""" this is labere's internal memoization. im only writing this myself because i didn't want to user someone elses, and im quite bored. """
def memoize(name):
""" silly little decorator to get this done.
accepts a name to use for the dictionary to push/pull results from. """
if not var.memoize.__contains__(name):
def drop(msg, args = None):
""" drop a nickname and all registered channels from the database. """
if args is None or len(args.split()) < 1:
msg.notice(msg.params, "Syntax: /msg %s \x02DROP\x02 <account> <password>" % (var.bots[msg.params].data['nick']))
return False
if not msg.origin.logged_in or var.users[str(msg.origin)]['account'] == '*':
msg.origin.notice(msg.params, "You are not currently logged in.")
return False
try:
@pirogoeth
pirogoeth / Teleport.py
Created May 31, 2011 22:25
Teleport plugin for bravo minecraft server
class Teleport(object):
implements(IChatCommand)
def chat_command(self, username, parameters):
p = parse_player(factory, username)
if len(parameters) == 0:
msg = "not enough parameters..."
return (msg,)
else:
GNU nano 2.2.4 File: ../index.php
<?
include ('include/header.php');
include ('php/simplepie.inc');
function github_feed () {
$feed = new SimplePie;
$feed->set_feed_url('http://github.com/miyoko.atom');
$feed->enable_cache(true);
@pirogoeth
pirogoeth / global.sh
Created January 12, 2011 17:04
generates a global.tcl file to load eggtcl scripts simply.
#!/usr/bin/env bash
#global.tcl generator
# variables
select_list="Yes No"
if test -e ./global.tcl ; then
echo "Remove global.tcl?"
select choice in $select_list
do