Ref: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html http://www.w3.org/TR/esi-lang
In the template add something like:
<nocache callback="time" />| <?php | |
| /* | |
| Plugin Name: Secret Place | |
| Plugin URI: http://github.com/getsource | |
| Description: Make your dashboard your secret place. | |
| Author: Mike Schroder and Jason Cosper | |
| Version: 0.1 | |
| Author URI: http://www.getsource.net/ | |
| */ |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| <?php | |
| /* Plugin Name: Damn Vulnerable WordPress Plugin | |
| * Description: Intentionally vulnerable plugin for plugin author education | |
| * Version: 0.1 | |
| * Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/ | |
| * Author: Jon Cave | |
| * Author URI: http://joncave.co.uk | |
| * License: GPLv2+ | |
| * | |
| * DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE |
Ref: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html http://www.w3.org/TR/esi-lang
In the template add something like:
<nocache callback="time" />| ''' | |
| This is a module that defines some helper classes and functions for | |
| expiring groups of related keys at the same time. | |
| Written July 1-2, 2013 by Josiah Carlson | |
| Released into the public domain | |
| ''' | |
| import time |
| #!/bin/bash | |
| echo "This script will rebuild a Debian style package (deb) of latest stable" | |
| echo "Nginx. The original deb is from nginx.org apt repository." | |
| echo | |
| echo "This will prompt you yes or no on a few changes to the build as well as" | |
| echo "it will compile and package the latest Google NGX Pagespeed module." | |
| echo | |
| echo "This is built and tested on Ubuntu 14.04 LTS, fresh OS install." | |
| echo "There are no guarantees, and I take no liability if it breaks, but it" |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); }; | |
| source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); }; | |
| filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); }; | |
| filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); }; | |
| destination d_remote { tcp("central.syslog", port(514)); }; | |
| log { source(s_nginx_20); filter(f_nginx_20); destination(d_messages); }; | |
| log { source(s_nginx_21); filter(f_nginx_21); destination(d_messages); }; |