Skip to content

Instantly share code, notes, and snippets.

@andydavies
andydavies / gist:6024703
Created July 17, 2013 21:31
httpd.conf
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
@andydavies
andydavies / gist:8653127
Created January 27, 2014 17:22
List of Web Perf Resources for
- Enable gzip - HTML 5 Server Configs has examples for 1 & 3 (perhaps 2) - https://github.com/h5bp/server-configs
- Enable keep-alive
- Set explict cache-lifetime
- Optimise images i.e. pick an appropriate format and run through tools like ImageOptim, JpegMini etc.
- Get a build process that minifies CSS & JS, and can combined multiple files together where appropriate
- Consider dataURIs or CSS sprites to reduce the number of requests for small images
- depending of where audience is consider a CDN (latency is the enemy in all of this
@andydavies
andydavies / 0_reuse_code.js
Created June 18, 2016 19:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@andydavies
andydavies / sslbookmarklet.js
Last active June 18, 2016 19:54
SSL Labs bookmarklet
javascript:(function(){hostname=document.location.hostname;window.open('https://www.ssllabs.com/ssltest/analyze.html?d=' + hostname + '&hideResults=on');})();
@andydavies
andydavies / .block
Last active October 16, 2016 19:35
Treemap of BBC News Resources
license: cc-by-sa-4.0
@andydavies
andydavies / .block
Last active August 17, 2017 20:20
Sunburst Chart of Web Page composition / download size
license: cc-by-sa-4.0
→ ssh -oKexAlgorithms=diffie-hellman-group1-sha1 -c 3des-cbc admin@192.168.1.254
http://conntrack-tools.netfilter.org/manual.html
# Commands
?
help
logout
exit
quit
@andydavies
andydavies / Beef and Ale Stew.md
Last active November 22, 2018 17:17
Beef and Ale Stew

Ingredients

  • Bottle of beer - I used Abbot this time but can be Guinness, Black Sheep, what ever takes your fancy
  • Knorr beef stock pot
  • Bay leaves
  • Black pepper
  • Carrots - 1 to 1 1/5 per person depending on size
  • Large onion or a couple of medium ones
  • 3 - 4 cloves of garlic
  • Shallots (bag off)
  • Lean stewing beef - 400g ish

Depending on where you are on your Data Viz journey, I'd probably start with Dona Wong or Cole Knaflic, then Andy Kirk, then Kopenen & Hildén (once I've read K&H I might swap the last two around)

Cairo's books are nice interlude and Few's is quite heavy weight (in both senses) though useful for dashboard design

(Amazon links are associate ones so feel free to buy elsewhere e.g. Hive in the UK)

The Wall Street Journal Guide to Information Graphics: The Dos and Don'ts of Presenting Data, Facts, and Figures, Dona Wong Amazon.com

Storytelling with Data: A Data Visualization Guide for Business Professionals Paperback, Cole Knaflic

sub vcl_recv {
#FASTLY recv
# We don't do other methods
if (req.method != "GET") {
return(error);
}
# Handle IPv4 or IPv6 provided in url path (nothing extraneous allowed, perform basic matching)
if (req.url.path ~ "^/([a-f0-9:.]+)$") {
set client.geo.ip_override = re.group.1;