Skip to content

Instantly share code, notes, and snippets.

View neilstuartcraig's full-sized avatar

Neil Craig neilstuartcraig

View GitHub Profile
@neilstuartcraig
neilstuartcraig / perc-no-sni.md
Created July 19, 2023 09:59
Approximate percentage of requests to www.bbc.co.uk & www.bbc.com (July 17th 2023) which did not include a TLS SNI header. Comparison of all clients/user agents with those which are likely to be humans
Country All non-SNI % Humans-only (ish) non-SNI %
Afghanistan 0.01 0.01
Åland Islands 0.00 0.00
Albania 0.00 0.00
Algeria 0.20 0.17
American Samoa 0.00 0.00
Andorra 0.00 0.00
Angola 2.05 4.39
Anguilla 0.00 0.00
@neilstuartcraig
neilstuartcraig / insert-to-bq-in-cloud-build.md
Created December 10, 2021 11:05
Inserting a row into a BigQuery table in a Cloud Build step

Notes:

  • Make sure the Service Account running your Cloud Build job has sufficient permissions on BigQuery
  • The table in the example has 2 columns, datetime (timestamp) and deploy_sha (string)
  • The dataset and table must exist already and in this example, they're both named app_deploy_log
...
- id: app-version
  name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
 entrypoint: 'bash'
@neilstuartcraig
neilstuartcraig / wpt-preconnect-preload-script.js
Created April 14, 2020 20:16
WebPageTest preconnect/preload/... script
// Stolen from: https://andydavies.me/blog/2019/08/07/experimenting-with-link-rel-equals-preconnect-using-custom-script-injection-in-webpagetest/
(function () {
var entries = [
{'href': 'https://nav.files.bbci.co.uk', 'rel': 'preconnect'},
{'href': 'https://nav.files.bbci.co.uk', 'rel': 'preconnect', 'crossOrigin': 'anonymous'}
];
var fragment = document.createDocumentFragment();
for(entry of entries) {
var link = document.createElement('link');
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-tls1-uas.md
Created March 2, 2020 12:00
User agents (parsed) which used TLS1.0 Feb 2020
Operating system User Agent Percentage of TLS 1.0 usage
Unknown Unknown 38.02%
Android 4.2.2 Android Browser 4 2.54%
Windows 7 IE 7 2.30%
Android 4.4.4 Unknown 2.03%
Windows 7 IE 9 2.02%
Android 4.4.2 Android Browser 4 1.97%
Android 2.3.6 Android Browser 4 1.93%
Mac OS 10.11.6 Chrome 53 1.85%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-gb-us.md
Last active March 2, 2020 11:52
TLS usage for GB and USA on www.bbc.co.uk and www.bbc.com Feb 2020 vs Nov 2018
Country Num requests (Nov. 2018) % TLS 1.0 (Nov. 2018) Num requests (Feb. 2020) % TLS 1.0 (Feb. 2020) % reduction
Great Britain 23,778,043 1.43% 9,288,530 0.71% 51%
USA 2,373,620 1.47% 1,557,219 0.40% 72%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-tls1-countries.md
Last active March 2, 2020 11:34
Percentage of HTTPS requests which used TLS1.0 in Feb 2020 for countries with >= 10k HTTPS requests over 3 days
Country Num requests (Nov. 2018) % TLS 1.0 (Nov. 2018) Num requests (Feb 2020) % TLS 1.0 (Feb 2020) % reduction
Bosnia and Herzegovina 35,031 100.00% 418,582 0.90% 99.10%
China 2,261,506 86.93% 2,549,943 19.79% 77.24%
Montenegro 28,712 48.74% 193,059 0.61% 98.76%
Croatia 113,948 43.75% 1,210,262 7.79% 82.19%
Uganda 150,225 34.48% 1,619,262 6.22% 81.95%
Honduras 97,644 29.55% 916,586 6.77% 77.10%
Ethiopia 180,473 26.04% 2,186,672 6.67% 74.38%
Democratic Republic of the Congo 12,775 25.67% 138,347 3.80% 85.20%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-new-tls1-countries.md
Last active March 2, 2020 11:56
Top 10 countries (Feb 2020) for % usage of TLS1.0
Country Number of requests Percentage of TLS 1.0 usage
United States Minor Outlying Islands 389,725,509. 100.00%
Antarctica 4,979,351 100.00%
Kosovo 276,524 100.00%
Niue 12,758,637 100.00%
American Samoa 5,063,507 100.00%
Christmas Island 1,633,591 100.00%
Mayotte 8,590,803 100.00%
Svalbard and Jan Mayen 998,549 99.99%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-global-non-gtm.md
Created February 28, 2020 15:56
TLS usage on www.bbc.co.uk and www.bbc.com, 24-27th Feb 2020 non GTM
TLS Version Number of requests Percentage
TLSv1.2 712,028,269 99.35%
TLSv1.1 400,971 0.03%
TLSv1.0 4,284,627 0.60%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-global-gtm.md
Last active March 2, 2020 13:58
TLS usage on www.bbc.co.uk and www.bbc.com, 24-27th Feb 2020 (GTM only)
TLS Version Number of requests Percentage
TLSv1.3 1,163,496,361 69.07%
TLSv1.2 506,655,701 30.08%
TLSv1.1 500,971 0.03%
TLSv1.0 13,879,940 0.82%
@neilstuartcraig
neilstuartcraig / tls1-blog-pt2-global.md
Last active February 28, 2020 15:30
TLS usage on www.bbc.co.uk and www.bbc.com, 24-27th Feb 2020
TLS Version Number of requests Percentage
TLSv1.3 1,163,496,361 48.45%
TLSv1.2 1,218,683,970 50.75%
TLSv1.1 901,942 0.04%
TLSv1.0 18,164,567 0.76%