- class Router(object):
- def __init__(self, server):
- self.__routes = []
- self.__server = server
- def addRoute(self, regexp, controller, action):
- self.__routes.append({'regexp': regexp, 'controller': controller, 'action': action})
- def route(self, path):
- for route in self.__routes:
- if re.search(route['regexp'], path):
- cls = globals()[route['controller']]
- func = cls.__dict__[route['action']]
- obj = cls(self.__server)
- apply(func,(obj, ))
- return
- # Not found
- self.__server.send_response(404)
- self.__server.end_headers()
Senin, 09 Mei 2016
small router snippet
Minggu, 03 April 2016
tmuxomatic
A completely different kind of tmux session manager.
Introduction
Other tmux session managers require pages of documentation for basic use, and define windows using a complicated nesting of pane splits. Instead, tmuxomatic is so easy that anyone could use it after just one example. Yet tmuxomatic is more flexible and more powerful than other tmux session managers.At the heart of tmuxomatic is the windowgram, a better way of arranging tmux windows. The windowgram is a rectangle comprised of alphanumeric characters (0-9, a-z, A-Z). Each character grouping identifies the name, position, size, and shape of a pane. It should take only one example to demonstrate the power and flexibility of the windowgram.
https://github.com/oxidane/tmuxomatic (Read More..)
KONG !!!!
Sabtu, 19 Maret 2016
pupy Remote Administration Tool with an embedded Python interpreter.
Pupy is an opensource, multi-platform
(Windows, Linux, OSX, Android) Remote Administration Tool with an
embedded Python interpreter.
Langganan:
Postingan (Atom)