Skip to content

Instantly share code, notes, and snippets.

→ 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 / .block
Last active August 17, 2017 20:20
Sunburst Chart of Web Page composition / download size
license: cc-by-sa-4.0
@andydavies
andydavies / .block
Last active October 16, 2016 19:35
Treemap of BBC News Resources
license: cc-by-sa-4.0
@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 / 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
javascript:(function(){hostname=document.location;window.open('http://www.webpagetest.org?url=' + hostname);})();
@andydavies
andydavies / gist:3cdcca42bd9f4289424c
Created December 10, 2015 22:16
Query for HTTPArchive BigQuery data to list all font files for sites x top sites
select pages.url, pages.rank, req.url
from [httparchive:runs.latest_requests] as req
join (
select url, rank, pageid, reqFont from [httparchive:runs.latest_pages]
) as pages on pages.pageid = req.pageid
where lower(req.mimetype) contains "font"
and pages.rank <= 100 and pages.reqFont > 0
order by pages.rank
@andydavies
andydavies / gist:2a82839e30bff61dcffb
Created December 9, 2015 12:15
Bookmarklet for securityheaders.io
Save this script as a bookmark, then use it to test the current page
javascript:(function(){hostname=document.location.hostname;window.open('https://securityheaders.io/?q=' + hostname);})();
1. Install nginx
sudo apt-get install nginx
configure nginx.conf
2. Install PHP
# Fast socket version
# Parses JSON results from WPT e.g. http://www.webpagetest.org/result/140506_W2_c46551bac76ab45d87e7e2f32c3159e6/?f=json
# Relies on JSON to be locally downloaded first (avoid's timeouts when results need to be retrieved from archive)
# Produces a data.frame with selected values from all test results
# url in code is really a path to a file, all.urls is a data frame with a list of files
require(RCurl)
require(stringr)
require(rjson)