Skip to content

Instantly share code, notes, and snippets.

View tranphuquy19's full-sized avatar
🐒
Doraneko

Doraneko tranphuquy19

🐒
Doraneko
View GitHub Profile
@tranphuquy19
tranphuquy19 / action_record.js
Created October 20, 2025 07:30
Action Recorder
// ==UserScript==
// @name Smart Web Action Recorder
// @namespace http://tampermonkey.net/
// @version 2.5.0
// @description Record user actions with multi-select support, selector validation, and playback
// @author Your Name
// @match *://*/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
@tranphuquy19
tranphuquy19 / install-ddns-updater.sh
Created September 13, 2025 09:01
DDNS updater installation script
#!/bin/bash
# DDNS-Updater Installation Script
# Author: Auto-generated installer
# Description: Downloads, installs and configures ddns-updater service
set -e
# Configuration variables
@tranphuquy19
tranphuquy19 / delete_google_photos.js
Last active March 15, 2025 03:38
Google Photos Auto Delete Script
// ==UserScript==
// @name Google Photos Auto Delete
// @namespace https://github.com/tranphuquy19
// @version 1.0.1
// @description Automatically delete multiple images from Google Photos. Source: https://gist.github.com/tranphuquy19/f8eeb02c7ca4b10f3baf02093eb80085
// @author Quy (Christian) P. TRAN
// @match https://photos.google.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@tranphuquy19
tranphuquy19 / libvirt-usage.sh
Created January 16, 2025 17:00
Show Memory and CPU usage of libvirt vms
#!/bin/bash
#
# RAM
#
echo "RAM"
echo "---"
SUM=0
@tranphuquy19
tranphuquy19 / sonarqube.docker-compose.yaml
Created January 15, 2025 18:05
sonarqube.docker-compose.yaml
version: '3'
services:
sonarqube:
image: sonarqube:latest
ports:
- "9000:9000"
environment:
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
volumes:
@tranphuquy19
tranphuquy19 / Vagrant.shared_memory
Last active January 16, 2025 17:15
Libvirt Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.configure("2") do |config|
config.vm.box = "generic/debian12"
config.vm.box_version = "4.3.12"
config.vm.synced_folder ".", "/vagrant",
πŸ”” @all
πŸš€ Speed Test Results
πŸ“… 2025-01-02 20:55:32
━━━━━━━━━━━━━━━━━━━━
πŸ“Š Threshold - Download: 300 Mbps, Upload: 200 Mbps
━━━━━━━━━━━━━━━━━━━━
πŸ“ Server ID: 44677 - FPT Telecom (Da Nang, Vietnam)
@tranphuquy19
tranphuquy19 / Ubuntu_Vagrant_libvirt.md
Created September 5, 2024 09:13 — forked from PaulNeumann/Ubuntu_Vagrant_libvirt.md
How to Install the Vagrant libvirt Provider on Ubuntu 22.04.2 LTS Desktop or Server

How to Install the Vagrant libvirt Provider on Ubuntu 22.04.2 LTS (and above) Desktop or Server

This document describes how to install the Vagrant libvirt provider on Ubuntu 22.04.2 LTS Desktop or Server. Much of the content is based on a blog post by Philippe Vanhaesendonck of Oracle Corp. describing how to set up the Vagrant libvirt provider on Oracle Linux.

All of the commands shown should be run in a terminal window or SSH session.

Before You Start

Verify That Your CPU Supports Hardware Virtualization

@tranphuquy19
tranphuquy19 / gh_runner_clean.md
Created August 16, 2024 21:12
Auto clean Github runner
#!/bin/bash

# Create the clean_runner.sh file
cat << 'EOF' > /home/actions-runner/clean_runner.sh
#!/bin/bash

# Check if any job is running
if pgrep -f "./run.sh" > /dev/null
@tranphuquy19
tranphuquy19 / search.js
Created August 14, 2023 15:18
Search value in a json object
function search(obj, value, checkedObjs = [], path = '') {
if (Array.isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
if (obj[i] === value || (typeof obj[i] === 'string' && obj[i].includes(value))) {
return path + '[' + i + ']';
}
}
} else if (typeof obj === 'function') {
var str = obj.toString();
if (str.includes(value)) {