Skip to content

Instantly share code, notes, and snippets.

View vulieumang's full-sized avatar
📜

Vu vulieumang

📜
View GitHub Profile
@vulieumang
vulieumang / ff_custom_payment
Created October 17, 2024 15:05
ff_custom_payment
<?php
use FluentFormPro\Payments\PaymentMethods\BasePaymentMethod;
class MyCustomPaymentMethod extends BasePaymentMethod
{
public function __construct()
{
parent::__construct('myCustomPaymentKey');
}
@vulieumang
vulieumang / update_cloudflare_ip.php
Created October 3, 2024 08:34
replace ip cloudflare
<?php
// update_cloudflare_ip.php
// Thiết lập các biến cấu hình
$apiToken = "";
// Old IP address to find
$oldIP = "";
@vulieumang
vulieumang / gist:2840ae5ac6b9b069678c500369fd86a7
Created September 13, 2024 08:00
How to copy from a protected Google doc?
Change the end of the document URL from /edit to /mobilebasic.
Disable JavaScript:
Click the Site settings icon to the left of the URL
Select "Site settings"
Under "Permissions", change "Javascript" to "Block"
Go back to the tab with your document and reload the page.
Select All in your doc, Ctrl+A
Copy the selection, Ctrl+C
Open a new document and then Paste, Ctrl+V
Repeat Step 2 above, but this time for Step 2.3, change "Javascript" back to "Allow"(default).
sudo pm2 install typescript
sudo pm2 install @types/node
cd node_modules/.bin
pm2 install typescript
cd ..
cd ..
pm2 start src/server.ts --watch
https://github.com/Unitech/pm2/issues/3312
@vulieumang
vulieumang / gist:ba1e7fcc21c4db3406bddb99382eb8a5
Created April 29, 2023 14:17
// Add custom tab in ultimate member account page.
// Add custom tab in ultimate member account page.
// global $form_id;
// $form_id = 26;
/**
* Add custom tabs.
*
@vulieumang
vulieumang / export_db.command
Created April 5, 2022 14:59
Using wordpress cli to auto export db to db.sql file
// using for command file
cd `dirname $0`
wp db export db.sql --allow-root
// using command on terminal
wp db export db.sql --allow-root
@vulieumang
vulieumang / laravel-auto-refresh.md
Created October 13, 2021 15:25 — forked from vades/laravel-auto-refresh.md
Auto refresh after changes with Laravel Mix

Laravel auto refresh after changes

To achieve this you can use Laravel Mix

  1. Ensure that Node.js and NPM are installed: run node -v and npm -v.
  2. Install Laravel Mix npm install.
  3. Open webpack.mix.js and add mix.browserSync('127.0.0.1:8000');.
  4. Run php artisan serve.
  5. And the npm run watch.

Sources

@vulieumang
vulieumang / gist:fb1c60d44790a01550f3419365f2b1f1
Created August 20, 2021 07:04
Translate wpDiscuz from label
// using chrome and press translate and using this script in console
// sử dụng chrome để dịch trang, sau đó dùng script ở console, script sẽ copy label to input
let products = [];
let product_wrapper = document.querySelectorAll('.wp-list-table tr');
product_wrapper.forEach((product) => {
let dataJson = {};
try {
dataJson.title = product.querySelector('label font font').innerText;
product.querySelector('input').value = dataJson.title;
product.querySelector('textarea').value = dataJson.title;