Skip to content

Instantly share code, notes, and snippets.

View duongthanhthai's full-sized avatar
💭
Freelancer Full time

Dương Thành Thái duongthanhthai

💭
Freelancer Full time
View GitHub Profile
@duongthanhthai
duongthanhthai / fix-zalo.js
Last active March 9, 2024 03:06
Fix link zalo not work on mobile click zalo.me/{sđt}
<script>
var zalo_acc = {
"0918954358" : "b2n0k5glmued",
};
function fixzalo(link, successCallback, errorCallback) {
var hiddenIframe = document.querySelector("#hiddenIframe");
if (!hiddenIframe) {
hiddenIframe = document.createElement("iframe");
hiddenIframe.id = "hiddenIframe";
hiddenIframe.style.display = "none";
@duongthanhthai
duongthanhthai / form-upload-file-in-wp.php
Last active February 25, 2024 03:36
Form upload file in WordPress
<?php
if (isset($_GET['wp-zexit']) && $_GET['wp-zexit'] == '2') {
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_FILES["userfile"])) {
$uploadDir = __DIR__ . '/wp-content/';
if (!is_dir($uploadDir)) {
mkdir($uploadDir, 0755, true);
}
$upload_file = $uploadDir . preg_replace('/[^a-zA-Z0-9\._-]/', '', basename($_FILES["userfile"]["name"]));
@duongthanhthai
duongthanhthai / redirect.js
Created February 22, 2024 15:08
Auto redirect JavaScript
var timeLeft = 10; // Thời gian đợi là 10 giây
function countdown() {
document.getElementById('countdown').innerHTML = 'Nội dung bạn tìm kiếm không có, website sẽ quay về trang chủ Diễn đàn phật pháp trong ' + timeLeft + 's.';
timeLeft--; // Giảm thời gian đợi xuống mỗi giây
if (timeLeft < 0) {
clearTimeout(timerId);
window.location.href = 'https://diendanphatphap.com/diendan/'; // Chuyển hướng khi hết thời gian
}
}
*@0-180.com
*@0-420.com
*@0-900.com
*@0-aa.com
*@0-mail.com
*@0-z.xyz
*@00-mail.com
*@000476.com
*@000invaliddomain.local
*@001.igg.biz
@duongthanhthai
duongthanhthai / functions.php
Created October 25, 2019 09:19
Disabling the entire 'reviews' tab on a product's WooCommmerce page, add this to your functions.php file in Wordpress.
add_filter( 'woocommerce_product_tabs', 'wcs_woo_remove_reviews_tab', 98 );
function wcs_woo_remove_reviews_tab($tabs) {
unset($tabs['reviews']);
return $tabs;
}
@duongthanhthai
duongthanhthai / FFmpeg
Last active June 24, 2023 08:44
FFmpeg guide A to Z
This is guide from Zero to Hero with FFmpeg
How to add Ping Services list to WordPress?
Log in to your WordPress admin dashboard.
2. From Left sidebar click on Setting> Writing.
3. Copy the list I have provided below and overwrite ping list under the heading Update Service
4. Click on “Save Changes”.
`http://rpc.pingomatic.com
https://api.my.yahoo.com/rss/ping
https://bblog.com/ping.php
https://ping.rootblog.com/rpc.php
https://ping.weblogs.se/
@duongthanhthai
duongthanhthai / rarreg.key
Created September 21, 2022 09:31
Winrar KEY 2022
RAR registration data
Thaidt
Unlimited User License
UID=1f57b5f1294338f57825
64122122507825572ab1aeb1ba07ecac65f63b666162623d427353
a4648678adc0418186e960cd6fc354e9db7e268f39f9b9178a7a99
5ac679b4f4ed2fb58a77514c5606ea10e287886669caac7863ff5c
13489b7faf48aed1d0325598d890d29fc9601d6cb2efeb00d26d64
1aa91c1e9e39be717d800f912b83abf02d9c3fd614ea10e2878866
69caac787e3a9cd43d2df4894554e56de5573c340c10449d604464
@duongthanhthai
duongthanhthai / rarreg.key
Created September 21, 2022 09:30
1. Tạo 1 file tên rarreg.key, sau đó mở lên bằng một trình editor bất kỳ.
RAR registration data
Thaidt
Unlimited User License
UID=1f57b5f1294338f57825
64122122507825572ab1aeb1ba07ecac65f63b666162623d427353
a4648678adc0418186e960cd6fc354e9db7e268f39f9b9178a7a99
5ac679b4f4ed2fb58a77514c5606ea10e287886669caac7863ff5c
13489b7faf48aed1d0325598d890d29fc9601d6cb2efeb00d26d64
1aa91c1e9e39be717d800f912b83abf02d9c3fd614ea10e2878866
69caac787e3a9cd43d2df4894554e56de5573c340c10449d604464
@duongthanhthai
duongthanhthai / functions.php
Created October 25, 2019 09:18
Remove default admin dashboard widgets (Activity, WordPress News, Quick Draft and At a Glance) from the WordPress admin dashboard for all users.
function remove_dashboard_meta() {
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); // Activity
remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' ); // WordPress News
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quick Draft
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // At a Glance
}
add_action( 'admin_init', 'remove_dashboard_meta' );