Skip to content

Instantly share code, notes, and snippets.

@aaronpeters
aaronpeters / cdnfinder-hostname-or-url-default-example-response.json
Created October 27, 2025 15:45
CDN Finder Example Response for Lookup of Type Hostname or URL
{
"id": "1238420131452_8a5b236978b74742b683",
"ts": "2025-10-27T15:44:28.548Z",
"service": {
"id": "cdnfinder",
"cdnfinder": "hostname-or-url"
},
"client": {
"country": "NL",
"asn": 1136,
@aaronpeters
aaronpeters / cdnfinder-website-multi-example-response.json
Created October 27, 2025 15:43
CDN Finder Example Response for Lookup of Type Website - Multi-Location/Multi-CDN
{
"id": "1238420823055_3a1a42983377885726b4",
"ts": "2025-10-27T15:32:56.945Z",
"service": {
"id": "cdnfinder",
"cdnfinder": "website"
},
"client": {
"country": "NL",
"asn": 1136,
@aaronpeters
aaronpeters / cdnfinder-website-default-example-response.json
Created October 27, 2025 15:27
CDN Finder Example Response for Lookup of Type Website
{
"id": "1238421667250_135195982365458a9ba4",
"ts": "2025-10-27T15:18:52.750Z",
"service": {
"id": "cdnfinder",
"cdnfinder": "website"
},
"client": {
"country": "NL",
"asn": 1136,
@aaronpeters
aaronpeters / cdnfinder-multi-example-response-2.json
Created October 27, 2025 15:13
CDN Finder Multi-Location Multi-CDN Example Response
{
"id": "1374498310287_9691637b1726090b7227",
"ts": "2021-07-05T16:14:49.713Z",
"service": {
"id": "cdnfinder",
"cdnfinder": "website"
},
"client": {
"country": "NL",
"asn": 1136,
@aaronpeters
aaronpeters / check-response-header.sh
Last active February 21, 2025 11:20
Bash script to check presence of specific response header
#!/bin/bash
# Use case: measure CDN change propagation time (CPT)
# Change the CDN config in CDN control panel or API,
# so CDN servers a new response header.
# Next, run this script to check after how many seconds
# the CDN serves a response with that header
# For example, change CDN config to start serving the x-cdn header
# Run this script then with command
# ./check_header.sh HEADER=x-cdn DEBUG=1
@aaronpeters
aaronpeters / mn-vod-first-range-requests
Created November 29, 2024 10:52
Medianova new CDN resource for VOD - first range requests
aaronpeters$ curl -svo /dev/null https://cdnplanet-vod-loc-test.lg.mncdn.com/storage-services/service/mbrs/ntscrm/00047382/00047382.mp4 -H 'range: bytes=0-1023'
* Host cdnplanet-vod-loc-test.lg.mncdn.com:443 was resolved.
* IPv6: (none)
* IPv4: 185.22.163.103
* Trying 185.22.163.103:443...
* Connected to cdnplanet-vod-loc-test.lg.mncdn.com (185.22.163.103) port 443
* ALPN: curl offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
@aaronpeters
aaronpeters / hn-onetrust-overlay-paragraphs-20240806.html
Last active August 6, 2024 07:45
OneTrust overlay HTML in onetrust-policy-text div
<p style="margin-bottom: 1em;">
Op hollandsnieuwe.nl en daarbuiten laten we je
graag persoonlijke en relevante informatie zien.
</p>
<p style="margin-bottom: 1em;">
Wij (en onze partners) verzamelen en analyseren daarom internetgedrag met <a href="https://www.hollandsnieuwe.nl/cookies">cookies</a> en vergelijkbare technieken. Lees het <a href="https://www.hollandsnieuwe.nl/privacy">privacybeleid</a>.
</p>
<p style="margin-bottom: 1em;">
Klik op “Accepteren” als je akkoord gaat met alle cookies.
@aaronpeters
aaronpeters / specrules-prefetch-suitable.js
Last active May 27, 2024 08:11
Speculation Rules Suitable
if (
HTMLScriptElement.supports &&
HTMLScriptElement.supports("speculationrules")
) {
const specScript = document.createElement("script");
specScript.type = "speculationrules";
specRules = {
prefetch: [
{
where: {
@aaronpeters
aaronpeters / cdnfinder-cdndata-example.js
Created April 16, 2024 07:26
CDN Finder tool - example CDN detection data
/** @type {cdn} */
const cdn = {
name: "Example CDN",
cname: [
".examplecdn.net"
],
ptr: ['examplecdn'],
asns: ['1234'],
headers: [
{
@aaronpeters
aaronpeters / medianova-purge-speed-first-data.js
Created March 2, 2024 12:40
Medianova purge speed - first data
// purgeTime = time to purge has completed in that location
// purgeTime.global = highest of purge times in a location
// purgeRequest.ok = time until API has responded to the purge request
// purgeRequest = number of times purge by API failed (error) or timed out (timeout)
const firstData = [
{
"ts": "2024-03-01",
"data": {
"purgeTime": {