Skip to content

Instantly share code, notes, and snippets.

As we were preparing Playwright 1.1.0, I learned quite a lot about Web Proxies. Below is the summary of my findings.

TIL: WEB Proxies

Reverse Web Proxy vs Forwarding Web Proxy

There are two groups of proxies that drive internet:

#!/usr/bin/env bash
xsv select message "$1" | xsv fmt --quote ' ' | sed -e '1d' | jq -c -r 'fromjson'
Estimated metric Weight Fast >90 Slow <50
First Contentful Paint (FCP) 3x <2.4s >4.0s
First Meaningful Paint (FMP) 1x <2.4s >4.0s
Speed Index (SI) 4x <3.4s >5.8s
First CPU Idle (FCI) 2x <3.6s >6.5s
Time to Interactive (TTI) 5x <3.8s >7.3s
@csabapalfi
csabapalfi / requestIdleCallback.js
Created March 13, 2019 23:08 — forked from paullewis/requestIdleCallback.js
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

via @ilana_horn

Are you struggling to shave words off of your writing?

I am weirdly good at this, so let me share some of my tricks. #AcademicTwitter #phdlife #gradstudent

1. Make things plural to omit articles. They can add up.

Ex: "The teacher needs to know..." --> "Teachers need to know...."

(function (history, trackingId, options) {
const getParameterByName = (paramName) => {
var searchString = window.location.search.substring(1),
i, val, params = searchString.split("&");
for (i=0;i<params.length;i++) {
val = params[i].split("=");
if (val[0] == paramName) {
return val[1] || undefined;
}
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello</title>
</head>
<body>
<script>
@csabapalfi
csabapalfi / keep-alive.js
Created October 3, 2018 14:00
node keep-alive
const net = require('net');
const {parse} = require('url');
const [,,url] = process.argv;
const client = new net.Socket();
const {hostname, port = 80, path} = parse(url);
client.on('error', (e) => {throw e});
const request = (cb) => {

Simple workflow for the #OWASP Amass tool suite: https://github.com/OWASP/Amass

  1. Google for the organization's ASN

  2. $ amass.netdomains -asn ASN -p 80,443 > domains.txt

  3. $ amass -v -ip -do data.json -df domains.txt

  4. $ amass.viz -i data.json -d3 graph.html