Skip to content

Instantly share code, notes, and snippets.

@Xaroth
Xaroth / MyTownMod.py
Last active April 14, 2019 15:07 — forked from TrueBrain/MyTownMod.py
My Town Mod
class CustomMap(Map):
class NewTownEvent(Map.Event):
map: CustomMap
def onTownFound(map, town, location) -> None:
map.api.setTownType(town, AggressiveTown)
class NewIndustryEvent(Map.Event):
map: CustomMap
from django.apps import apps
from django.conf import settings
from django.core.urlresolvers import RegexURLResolver
from importlib import import_module
from django.utils.module_loading import module_has_submodule
class AppUrls(object):
_get_urls = None
reraise = settings.DEBUG
@Xaroth
Xaroth / gist:11273909
Created April 25, 2014 00:15
libzfs-python zpool status
from ..zpool import ZPool, c_libzfs, ffi_libzfs, enums
zpool_status_t = enums.zpool_status
import sys
from datetime import datetime
import time
def nicenum(value):