Skip to content

Instantly share code, notes, and snippets.

@ifduyue
ifduyue / index.js
Created July 11, 2024 04:21
Network.responseReceivedExtraInfo may be fired before or after responseReceived
import { launch } from 'puppeteer';
import fs from 'fs/promises'
let messages = [];
const eventsToObserve = [
"Network.dataReceived",
"Network.eventSourceMessageReceived",
"Network.loadingFailed",
"Network.loadingFinished",
"Network.requestServedFromCache",
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:GetAccountPasswordPolicy",
"iam:ListVirtualMFADevices"
],
@ifduyue
ifduyue / Dockerfile
Last active April 14, 2025 10:29
socks5 and http proxy with tor and sthp (https://github.com/KaranGauswami/socks-to-http-proxy)
FROM alpine:3.21 AS build
RUN apk --no-cache --update --upgrade add git musl-dev cargo \
&& git clone https://github.com/KaranGauswami/socks-to-http-proxy.git \
&& cd socks-to-http-proxy \
&& cargo build --release
FROM alpine:3.21
COPY --from=build /socks-to-http-proxy/target/release/sthp /usr/local/bin/
#!/usr/bin/env bash
set -euo pipefail
if [ -z ${NOTE_DIR+x} ]; then
echo "Error: Please configure and export NOTE_DIR environment variable."
exit 1
fi
function usage() {