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();
}
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active September 22, 2024 16:45
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@shivaluma
shivaluma / avg.js
Last active August 2, 2024 06:31
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 September 14, 2024 06:59
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>