Skip to content

Instantly share code, notes, and snippets.

View tvinhkhoa's full-sized avatar

Trương Vĩnh Khoa tvinhkhoa

View GitHub Profile
@tvinhkhoa
tvinhkhoa / adonis-inertia-ssr-react-ts.md
Last active November 27, 2024 06:54 — forked from irwing-reza/adonis-inertia-ssr-react-ts.md
Adonisjs Inertia SSR React Typescript
@tvinhkhoa
tvinhkhoa / nvmCommands.js
Created March 9, 2024 03:10 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@tvinhkhoa
tvinhkhoa / LocalStorageManager.cs
Created November 20, 2023 03:14 — forked from matthias-dirickx/LocalStorageManager.cs
Local storage manager after the example as found in https://gist.github.com/roydekleijn/5073579
using OpenQA.Selenium;
//Did not yet test this code
//I'll update if needed (and if I think of it), but this is the gist of it (pun intended)
namespace LocalStorageManager
{
class LocalStorageManager
{
private IJavaScriptExecutor js;
@tvinhkhoa
tvinhkhoa / LocalStorage.java
Created November 20, 2023 02:45 — forked from roydekleijn/LocalStorage.java
Selenium WebDriver Javascript execution for localStorage
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
public class LocalStorage {
private JavascriptExecutor js;
public LocalStorage(WebDriver webDriver) {
this.js = (JavascriptExecutor) webDriver;
}
@tvinhkhoa
tvinhkhoa / install_setup_tidb.sh
Created September 2, 2023 01:08 — forked from jniltinho/install_setup_tidb.sh
Install and Setup TiDB on Linux
#!/bin/bash
## Install and Setup TiDB on Linux
## https://github.com/pingcap/tidb
## https://github.com/pingcap/docs/blob/master/sql/privilege.md
## https://pingcap.com/blog/2016-10-17-how-we-build-tidb/
useradd tidb -d /var/lib/tidb -m
usermod -a -G tidb tidb
cd /var/lib/tidb
@tvinhkhoa
tvinhkhoa / multiprocess_selenium.py
Created January 29, 2023 17:57 — forked from wooddar/multiprocess_selenium.py
Easy Python script to run selenium web workers/browsers in parallel
"""
This is an adaptable example script for using selenium across multiple webbrowsers simultaneously. This makes use of
two queues - one to store idle webworkers and another to store data to pass to any idle webworkers in a selenium function
"""
from multiprocessing import Queue, cpu_count
from threading import Thread
from selenium import webdriver
from time import sleep
from numpy.random import randint