with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
| # Add this snippet to the top of your playbook. | |
| # It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
| # [email protected] | |
| - hosts: all | |
| gather_facts: False | |
| tasks: | |
| - name: install python 2 | |
| raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
| import requests | |
| import time | |
| import json | |
| token = '' | |
| #Delete files older than this: | |
| ts_to = int(time.time()) - 30 * 24 * 60 * 60 | |
| def list_files(): |
| First of all, you need uapache2-utils tools. | |
| sudo apt-get install apache2-utils | |
| Then you add this in your virtualhost in your <Directory> tag : | |
| #Require all granted | |
| # you need to comment this line above to require a valid-user | |
| AuthName "This website is not ready to go public !" | |
| AuthType Basic |
| {# | |
| time can be any string acceptable by http://www.php.net/strtotime, the | |
| template will output that time's month. | |
| If you don't want to pass in a date you can set time like this: | |
| {% set time = "now"|date("U") %} | |
| {% set time = "December 2012"|date("U") %} | |
| How ever you want to output items onto the calendar is a different issue, | |
| but I'd assume pushing everything into an array numerically indexed by that day: |