Skip to content

Instantly share code, notes, and snippets.

View apachols's full-sized avatar

Adam Pacholski apachols

View GitHub Profile
@apachols
apachols / kexp.py
Created May 18, 2023 17:41 — forked from dramamine/kexp.py
KEXP show scraper
import requests
import os
from datetime import datetime, timedelta
destination_path = "shows"
# ids from https://api.kexp.org/v2/shows/
programs = [
3, # expansions
5, # midnight in a perfect world
# COMPARE
import requests
HOST = 'https://staging-growth.webapp.staging.internal.rover.com'
def api_call(uri):
url = f'{HOST}{uri}'
D src/frontend/cloudflare/src/Worker.ts
D src/frontend/cloudflare/src/constants/workerErrorHandler.constants.ts
D src/frontend/cloudflare/src/utilities/workerErrorHandler.ts
D src/frontend/cloudflare/src/workers/debug.ts
D src/frontend/cloudflare/src/workers/edgeCacheHtml.ts
D src/frontend/cloudflare/src/workers/global.ts
D src/frontend/cloudflare/src/workers/imageCdn.ts
R100 src/frontend/cloudflare/src/middleware/requestInterceptors/setTrustScoreHeader.test.js src/frontend/cloudflare/src/middleware/preflight/setTrustScoreHeader.test.js
R100 src/frontend/cloudflare/src/middleware/requestInterceptors/setTrustScoreHeader.ts src/frontend/cloudflare/src/middleware/preflight/setTrustScoreHeader.ts
R100 src/frontend/cloudflare/src/middleware/primaryInterceptors/cdnifyImageUrls/index.test.js src/frontend/cloudflare/src/middleware/request/cdnifyImageUrls/index.test.js
Adam Pacholski (he/him) 1 day ago
[VARIANT 1] 945am -> 950am
median 299.82
mean 362.53
stdev 190.05
[VARIANT 2] 1115am -> 1120am
median 265.18
mean 334.07
stdev 159.89
@apachols
apachols / header-length-nginx-6.txt
Created February 28, 2020 19:08
Short URL, 1 Header, Just Right
curl -I 'http://rover.local:8001/?' -H 'cookie: c97bf46=holdout; eece95e=str_half; a0568ef=dampened_only; rover_cid=3fe971ce-4fc1-4f0f-97ca-9be4e6535539; ju_existing_account=1; mapSize=large; 69a1be4=true; 7f6f378=treatment; af85bf00=e811209c-0b03-4515-aae7-8bc42cc376c5; 758c5d7a=5c4524d8-785c-452c-b96f-2f3c44a68096; bfb268a=variant; ki_u=f252d3fd-5c53-9372-eb91-4565; 39f2b54=variant; 518870a2=b4aef9bb-9a76-48f9-8c77-cd2ca2bd9c8f; a8394f0=variant; ki_r=; ed14ef29=d2afeafa-dbf9-4ba1-b151-7baf136cad7d; 1f4c8056=42c51fca-0956-4671-ad16-35afa77435a3; 2809f70d=8ae51c53-bc12-4ac6-96ea-b3937002ad7a; b18d831=rtb_calibration; 0bb68a2=true; ffd55436=d373c512-d69c-4f9b-86ba-07da18e0e004; bb2d979=control; __cfduid=debd820e678cb47cbb53782249e82c6721570477251; entry_page=/search/; sm_uuid=1570477896283; _ga=GA1.2.2003249529.1570553009; alooma_session_key=fd7b1525-c735-49e3-8e3f-2251ece2ad59; 22b70a0=variant; __adroll_fpc=c99b5ce82e6998b2419ad16b2e5cb72d-s2-1571152244252; __ar_v4=%7CGNXBKTAWYVBMFAR5EUOKJD%3A20191014%3A1%7C4
@apachols
apachols / header-length-nginx-5.txt
Created February 28, 2020 19:06
Too Long By 1 Char
curl -I 'http://rover.local:8001/?' -H 'cookie: c97bf46=holdout; eece95e=str_half; a0568ef=dampened_only; rover_cid=3fe971ce-4fc1-4f0f-97ca-9be4e6535539; ju_existing_account=1; mapSize=large; 69a1be4=true; 7f6f378=treatment; af85bf00=e811209c-0b03-4515-aae7-8bc42cc376c5; 758c5d7a=5c4524d8-785c-452c-b96f-2f3c44a68096; bfb268a=variant; ki_u=f252d3fd-5c53-9372-eb91-4565; 39f2b54=variant; 518870a2=b4aef9bb-9a76-48f9-8c77-cd2ca2bd9c8f; a8394f0=variant; ki_r=; ed14ef29=d2afeafa-dbf9-4ba1-b151-7baf136cad7d; 1f4c8056=42c51fca-0956-4671-ad16-35afa77435a3; 2809f70d=8ae51c53-bc12-4ac6-96ea-b3937002ad7a; b18d831=rtb_calibration; 0bb68a2=true; ffd55436=d373c512-d69c-4f9b-86ba-07da18e0e004; bb2d979=control; __cfduid=debd820e678cb47cbb53782249e82c6721570477251; entry_page=/search/; sm_uuid=1570477896283; _ga=GA1.2.2003249529.1570553009; alooma_session_key=fd7b1525-c735-49e3-8e3f-2251ece2ad59; 22b70a0=variant; __adroll_fpc=c99b5ce82e6998b2419ad16b2e5cb72d-s2-1571152244252; __ar_v4=%7CGNXBKTAWYVBMFAR5EUOKJD%3A20191014%3A1%7C4
@apachols
apachols / header-length-nginx-4.txt
Created February 28, 2020 19:01
Way Too Many Headers
curl -I 'http://rover.local:8001/?' -H 'x-header-0: 012345678' -H 'x-header-1: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-2: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-3: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-4: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-5: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-6: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-7: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -H 'x-header-8: 0123456789_0123456789_0123456789_0123456789_0213456789_0123456789_0123456789_asdfghjklkjhgfdsasdfghjkl' -
@apachols
apachols / header-length-nginx-3.txt
Created February 28, 2020 18:57
Short URL, Short Cookie, Many Headers
curl -I 'http://rover.local:8001/?' -H 'x-header-0: 012345678' -H 'x-header-1: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-2: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-3: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-4: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-5: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-6: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-7: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-8: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-9: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-11: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-12: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-13: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-14: 0123456789_0123456789_0123456789_0123456789_0213456789' -H 'x-header-15: 0123
@apachols
apachols / header-length-nginx-2.txt
Created February 28, 2020 18:49
Long URL, Short Cookie, 1 Header
curl -I 'http://rover.local:8001/?long_param=TEST_LONG_VALUE_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_012345
@apachols
apachols / header-length-nginx-1.txt
Created February 28, 2020 18:44
Short URL, Long Cookie, 1 Header
curl -I 'http://rover.local:8001/?' -H 'cookie: c97bf46=holdout; eece95e=str_half; a0568ef=dampened_only; rover_cid=3fe971ce-4fc1-4f0f-97ca-9be4e6535539; ju_existing_account=1; mapSize=large; 69a1be4=true; 7f6f378=treatment; af85bf00=e811209c-0b03-4515-aae7-8bc42cc376c5; 758c5d7a=5c4524d8-785c-452c-b96f-2f3c44a68096; bfb268a=variant; ki_u=f252d3fd-5c53-9372-eb91-4565; 39f2b54=variant; 518870a2=b4aef9bb-9a76-48f9-8c77-cd2ca2bd9c8f; a8394f0=variant; ki_r=; ed14ef29=d2afeafa-dbf9-4ba1-b151-7baf136cad7d; 1f4c8056=42c51fca-0956-4671-ad16-35afa77435a3; 2809f70d=8ae51c53-bc12-4ac6-96ea-b3937002ad7a; b18d831=rtb_calibration; 0bb68a2=true; ffd55436=d373c512-d69c-4f9b-86ba-07da18e0e004; bb2d979=control; __cfduid=debd820e678cb47cbb53782249e82c6721570477251; entry_page=/search/; sm_uuid=1570477896283; _ga=GA1.2.2003249529.1570553009; alooma_session_key=fd7b1525-c735-49e3-8e3f-2251ece2ad59; 22b70a0=variant; __adroll_fpc=c99b5ce82e6998b2419ad16b2e5cb72d-s2-1571152244252; __ar_v4=%7CGNXBKTAWYVBMFAR5EUOKJD%3A20191014%3A1%7C4