Skip to content

Instantly share code, notes, and snippets.

View itlvd's full-sized avatar

Lê Văn Đông itlvd

View GitHub Profile
@itlvd
itlvd / user.js
Last active January 19, 2026 04:53
Firefox personal config
//
/* You may copy+paste this file and use it as it is.
*
* If you make changes to your about:config while the program is running, the
* changes will be overwritten by the user.js when the application restarts.
*
* To make lasting changes to preferences, you will have to edit the user.js.
*/
/****************************************************************************
@itlvd
itlvd / Facebook Unseen
Created September 26, 2023 02:16
Facebook Unseen
// ==UserScript==
// @name Facebook Unseen
// @author noname
// @namespace http://www.example.url/to/your-web-site/
// @description Put a good description in here
// @license Creative Commons Attribution License
// @version 0.1
// @include http*://facebook.com/*
// @include http*://*.facebook.com/*
// @include http*://*.messenger.com/*
@itlvd
itlvd / RecaptchaSolver.user.js Recaptcha Solver in Browser | Automatically solves Recaptcha in browser by engageub | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Recaptcha Solver (Automatically solves Recaptcha in browser)
// @namespace Recaptcha Solver
// @version 2.1
// @description Recaptcha Solver in Browser | Automatically solves Recaptcha in browser
// @author engageub
// @match *://*/recaptcha/*
// @connect engageub.pythonanywhere.com
// @connect engageub1.pythonanywhere.com
// @grant GM_xmlhttpRequest
@itlvd
itlvd / auto_fill_survey.js
Last active August 10, 2022 07:42
Tự động điền 5 sao cho giảng viên HCMUS phiên bản cho chương trình đề án :)))
javascript: (() => {
var mssv = 19127363;
var ten = "Lê Văn Đông";
var lopChuyenNganh = "19KHMT";
var groupname = document.getElementsByClassName('group-name')[0].textContent;
if (groupname == "I. THÔNG TIN CHUNG") {
var Omssv = document.getElementsByClassName('text');
Omssv[0].value = mssv;
Omssv[1].value = ten;
Omssv[2].value = lopChuyenNganh;
#Uninstall Firefox snap and install Firefox ppa
snap disable firefox
snap remove --purge firefox
sudo apt remove --autoremove firefox
sudo add-apt-repository ppa:mozillateam/ppa
#Update OS
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get dist-upgrade
#Install google chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
@itlvd
itlvd / Code.gs
Last active February 13, 2022 03:51
Copy Folder Google Drive can resume
/*
Author: Lê Văn Đông - www.levandong.com
Refer: https://www.labnol.org/code/19979-copy-folders-drive
*/
function main() {
let src = "Folder src";
let des = "Folder des";
try {
src = src.match(/(?<=folders\/).*?((?=\?)|$)/g)[0].toString();
@itlvd
itlvd / cloudflare-purge-cache-service-worker.js
Last active September 29, 2021 03:04 — forked from vdbelt/cloudflare-purge-cache-service-worker.js
A CloudFlare service worker that proxies purge cache requests. Example: https://example.com/__purge_cache?zone=XX
addEventListener('fetch', event => {
event.respondWith(purgeCache(event.request))
})
async function purgeCache(request) {
const url = new URL(request.url)
void Insert(NODE* &pRoot, int x) {
if (pRoot == nullptr) {
NODE* temp = createNode(x);
pRoot = temp;
return;
}
if (x < pRoot->data) {
Insert(pRoot->pLeft, x);
pRoot->height = findHeightMax(pRoot) + 1;
//Balance AVL
/*Bool is check succesfull*/
bool BalanceTree(NODE* &pRoot) {
if (pRoot == nullptr) {
return 0;
}
BalanceTree(pRoot->p_left);
BalanceTree(pRoot->p_right);
if (isBalanceTree(pRoot) == -1) { // lech trai
NODE* p1 = pRoot->p_left;
@itlvd
itlvd / isBalanceTree.cpp
Last active December 25, 2020 09:26
isBalanceTree.cpp
/*Check Tree is Balance*/
int isBalanceTree(NODE* pRoot) {
int left = 0, right = 0;
if (pRoot->pLeft == nullptr && pRoot->pRight != nullptr) left = pRoot->pRight->height;// ton tai 1 node con ben trai
else if (pRoot->pRight == nullptr && pRoot->pLeft != nullptr) right = pRoot->pLeft->height;// ton tai 1 node con ben phai
else if (pRoot->pLeft != nullptr && pRoot->pRight != nullptr) {// 2 node con deu la nullptr
left = pRoot->pLeft->height;
right = pRoot->pRight->height;
}