Skip to content

Instantly share code, notes, and snippets.

class Event(object):
def __init__(self):
self._subscribers = []
def attach(self, func):
self._subscribers.append(func)
def detach(self, func):
self._subscribers.remove(func)
@EntityReborn
EntityReborn / stad.py
Created December 1, 2011 19:24
Downloader for STaD
import urllib2, os, urlparse, re
from BeautifulSoup import BeautifulSoup
# User variables
DESTFOLDER = "STAD"
OVERWRITEHTML = True
OVERWRITEPICS = False
LASTCHAPTER = 81
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.gmail.entityreborn.launchii.config;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@EntityReborn
EntityReborn / SASL.java
Last active December 10, 2015 01:08 — forked from anonymous/SASL.java
public class SASL extends ListenerAdapter {
String user = "user"; // Change accordingly!
String password = "password"; // Change accordingly!
boolean connected = false;
@Override
public void onMotd(MotdEvent event) throws Exception {
connected = true;
}
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {

##Event:

http_request

@event data:

headers: (assoc. array)
    name: (array)
        value, 

value,

#Example Extension/Extension Skeleton

This maven project is a sample extension layout that provides a basic framework, with all the proper checks in place as well as a few utilities to get you started. It is built with NetBeans and Maven in mind, although other configurations might be possible, with less functionality (compile time errors, etc).

##Usage ###Standalone use This method makes for a simpler way to get up and running, but requires you to clone the original repo for each project.

  1. Clone this repo from where it's hosted.
  2. Remove the .git folder. Can't skip this one!
import _winreg
def DecodeKey(rpk):
rpkOffset = 52
i = 28
szPossibleChars = "BCDFGHJKMPQRTVWXY2346789"
szProductKey = ""
while i >= 0:
dwAccumulator = 0

Developing an extension

Extensions provide a means of adding functionality to CommandHelper and the MethodScript engine. While the API used is under construction still, it is still deemed stable enough for production use. Any breakages will be minimal, and deprecation will be used where it applies.

An extension currently consists of three core parts:

  1. The lifecycle class, which takes care of the life and identity of the extension.
  2. Events, which add new events that MScript can use, and
  3. Functions, which add new functionality to MScript. These can make use of the optimization engine as well, to be integrated with the MScript compilation process.

Developing an extension

Extensions provide a means of adding functionality to CommandHelper and the MethodScript engine. While the API used is under construction still, it is still deemed stable enough for production use. Any breakages will be minimal, and deprecation will be used where it applies.

An extension currently consists of three core parts:

  1. The lifecycle class, which takes care of the life and identity of the extension.
  2. Events, which add new events that MScript can use, and
  3. Functions, which add new functionality to MScript. These can make use of the optimization engine as well, to be integrated with the MScript compilation process.