Skip to content

Instantly share code, notes, and snippets.

@Souvent22
Last active August 29, 2015 14:02
Show Gist options
  • Save Souvent22/ca9ad74b3ae2ae35726e to your computer and use it in GitHub Desktop.
Save Souvent22/ca9ad74b3ae2ae35726e to your computer and use it in GitHub Desktop.
Snipppets for DrupalCon Austin
## APACHE BENCH COMMANDS
ab -c 25 -n 100 http://localhost/heavy
ab -c 25 -n 100 http://localhost
# This are snippets for DrupalCon.
# Bitly link: http://bit.ly/DDAustin
# Files: http://www.earnestberry.com/austintalk.zip
# <esi:include src="/robots.txt" />
# White list items
# FIlter out cookies.
#set req.http.Cookie = regsuball(req.http.Cookie, ";(Drupal\.visitor\.color)=", "; \1=");
#set req.http.Cookie = regsuball(req.http.Cookie, ";(color)=", "; \1=");
# include "/includes/mobile_detect.vcl"
# call mobile_detect
# Hash function
sub vcl_hash {
if (req.http.Cookie) {
hash_data(req.http.Cookie);
}
if (req.http.X-Device) {
hash_data(req.http.X-Device);
}
}
# Use this to monitor the varnish log for certain requests, in this case /austintalk
varnishlog -c -m 'RxURL:^/austintalk/.*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment