This file contains 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
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |
This file contains 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
# %W% %E% | |
# | |
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. | |
# | |
# Version | |
version=1 | |
# Component Font Mappings |
This file contains 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 signal | |
def set_signal_handlers(server): | |
def clean_shutdown(signum, frame): | |
logging.info("Signal received: {0}".format(signum)) | |
server.stop() | |
signal.signal(signal.SIGTERM, clean_shutdown) | |
signal.signal(signal.SIGINT, clean_shutdown) | |
server = TProcessPoolServer(processor, transport, tfactory, pfactory) |