Skip to content

Instantly share code, notes, and snippets.

View pqviet07's full-sized avatar
🎯
Focusing

Phung Quoc Viet pqviet07

🎯
Focusing
View GitHub Profile
@jimevans
jimevans / NetworkInterception.cs
Last active May 31, 2024 07:49
Selenium C# network traffic logging example
public async Task LogNetworkRequests(IWebDriver driver)
{
INetwork interceptor = driver.Manage().Network;
interceptor.NetworkRequestSent += OnNetworkRequestSent;
interceptor.NetworkResponseReceived += OnNetworkResponseReceived;
await interceptor.StartMonitoring();
driver.Url = "http://the-internet.herokuapp.com/redirect";
await interceptor.StopMonitoring();
}
@shivaluma
shivaluma / avg.js
Last active May 27, 2024 19:33
Tinh diem trung binh hcmus
// tinh diem trung binh hcmus, vao trang diem va paste vao console.
// khong tinh anh van, quoc phong, the duc va nhung mon rot
var tinchi = document.querySelectorAll("td:nth-child(3)");
var monhoc = document.querySelectorAll("td:nth-child(2)");
var diem = document.querySelectorAll("td:nth-child(6)");
var tongdiem = 0,
tongtinchi = 0;
@eneko
eneko / list-of-curl-options.txt
Last active July 5, 2024 19:06
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@FedericoPonzi
FedericoPonzi / socket_portable.c
Last active March 8, 2024 01:36
C sockets portable in windows/linux example
// As seen on http://www.di.uniba.it/~reti/LabProRete/Interazione(TCP)Client-Server_Portabile.pdf
#if defined WIN32
#include <winsock.h>
#else
#define closesocket close
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
#include <stdio.h>