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
upstream php-handler { | |
server 127.0.0.1:9000; | |
#server unix:/var/run/php/php7.4-fpm.sock; | |
} | |
# Set the `immutable` cache control options only for assets with a cache busting `v` argument | |
map $arg_v $asset_immutable { | |
"" ""; | |
default "immutable"; | |
} |
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
def mainFunc(func): # func is the function | |
result = func() # which should be called at begin. | |
# Note: Python executes the file from top to bottom. so every statment that is not in a function (like | |
# `print`) will be executed before the main function if it is earlyer defined | |
def wrapper(): | |
nonlocal result | |
print(result) # print the result | |
return result # and return it |