This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from werkzeug.serving import BaseRequestHandler | |
| class MyFancyRequestHandler(BaseRequestHandler): | |
| """Extend werkzeug request handler to suit our needs.""" | |
| def handle(self): | |
| self.fancyStarted = time.time() | |
| rv = super(MyFancyRequestHandler, self).handle() | |
| return rv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Credits goes to http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-window#answer-7911097 | |
| # I just slightly modified it to take an argument. | |
| new_tab() { | |
| pwd=`pwd` | |
| osascript -e "tell application \"Terminal\"" \ | |
| -e "tell application \"System Events\" to keystroke \"t\" using {command down}" \ | |
| -e "do script \"cd $pwd; clear; $1;\" in front window" \ |
NewerOlder