Skip to content

Instantly share code, notes, and snippets.

@Deaygo
Deaygo / plugin.py
Created March 9, 2016 16:45 — forked from will-hart/plugin.py
A simple python plugin system using a custom metaclass
# a simple Python plugin loading system
# see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin-manager-vs-inspecting-from-plugins-import
class PluginMount(type):
"""
A plugin mount point derived from:
http://martyalchin.com/2008/jan/10/simple-plugin-framework/
Acts as a metaclass which creates anything inheriting from Plugin
"""
class NerdMessage {
private NerdMessageAPI api = null;
public NerdMessageAPI getAPI() {
if (api == null) {
api = NerdMessageAPI(this);
}
return api;
}

Keybase proof

I hereby claim:

  • I am deaygo on github.
  • I am deaygo (https://keybase.io/deaygo) on keybase.
  • I have a public key whose fingerprint is 42C8 DD16 9060 684C 0F6B 45E9 DE7A B10C BE96 DA27

To claim this, I am signing this object:

@Deaygo
Deaygo / stairs.lua
Last active December 14, 2015 11:09
height = 4
level = height - 1
length = 16
fuelslot = 1
local tArgs = { ... }
if #tArgs ~= 3 then
print( "Usage: stairs <width> <height> <depth>" )
return
end