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
sub vcl_backend_response { | |
# Happens after we have read the response headers from the backend. | |
# | |
# Here you clean the response headers, removing silly Set-Cookie | |
# headers and other mistakes your backend does. | |
if (bereq.url ~ "^/$" || | |
bereq.url ~ "^/(frauen|maenner|kinder|outlet|marke)(/.+)?" || | |
bereq.url ~ "^/api/(seen2bought/|similarProduct/|product\?)" || | |
bereq.url ~ "\.(css|js)\?.*" || |
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
sub vcl_hash { | |
# Strip out Google Analytics campaign variables | |
# They are only needed by the javascript running on the page | |
# utm_source, utm_medium, utm_campaign, gclid, … | |
hash_data(regsub(regsuball(req.url, "(vid|ef_id|gclid|kw|cof|siteurl|zanpid|origin|emst|sc_[a-z]+|utm_[a-z]+|mr:[A-z]+)=[%@\.\-\:\+_A-z0–9]+&?", ""), "(\?&|\?|&)$", "")); | |
if (req.http.X-Forwarded-Proto ~ "^(https|http)$") { | |
hash_data(req.http.X-Forwarded-Proto); | |
} |
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 directors; | |
backend ay_p_www1 { | |
.host = "10.10.0.137"; | |
.port = "80"; | |
.probe = { | |
.url = "/status"; | |
.timeout = 1s; | |
.interval = 5s; | |
.window = 5; |
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
sub vcl_recv { | |
# Happens before we check if we have this in cache already. | |
# | |
# Typically you clean up the request here, removing cookies you | |
# don't need, rewriting the request, etc. | |
if ((req.url ~ "^/$" || | |
req.url ~ "^/(frauen|maenner|kinder|outlet|marke)(/.+)?" || | |
req.url ~ "^/api/(seen2bought/|similarProduct/|product\?)" || | |
req.url ~ "\.(css|js)\?.*" || |
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
<?php | |
// serve static files | |
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); | |
if (file_exists(__DIR__ . '/web' . $uri)) { | |
return false; | |
} | |
// output access log | |
function output() |
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 json | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from datetime import datetime, timedelta, timezone | |
import argparse | |
# This script can be useful when filling your freelancer timesheets, | |
# it generates a heatmap image with the messages/hour/day. | |
# |