Skip to content

Instantly share code, notes, and snippets.

View yale8848's full-sized avatar
🐯
Tiger Year

Yale yale8848

🐯
Tiger Year
View GitHub Profile
@yale8848
yale8848 / gitstars.json
Created November 14, 2017 14:03
github stars manager for production
[]
@yale8848
yale8848 / httpclient.go
Created March 29, 2019 02:32
Go http request by local port
// Create by Yale 2019/3/29 9:43
package httpclient
import (
"net"
"net/http"
"time"
)
func GetLocalAddrHttpClient(localIp net.IP, localPort int) *http.Client {
@yale8848
yale8848 / local_port_soket.java
Created March 29, 2019 02:41
Java socket request by local port
private static void test(){
try {
String path = "/";
String host = "publicobject.com";
int port = 80;
Socket socket = new Socket(InetAddress.getByName(host),port,InetAddress.getByName("172.16.1.251"),39981);
socket.setKeepAlive(false);
OutputStreamWriter osw = new OutputStreamWriter(socket.getOutputStream(),"utf-8");
osw.write("GET " + path + " HTTP/1.0\r\n");
@yale8848
yale8848 / playwright_persistent_concurrency.py
Created May 20, 2023 12:01 — forked from mezhgano/playwright_persistent_concurrency.py
Playwright persistent context concurrency
import asyncio
import random
from pathlib import Path
from playwright.async_api import BrowserContext, async_playwright
CWD = Path().resolve()
# Example path
user_data_dir = Path.joinpath(CWD, 'playwright/data_dir/chromium')