Skip to content

Instantly share code, notes, and snippets.

View ImonAwesome's full-sized avatar
✔️
Github Verified!

Md. Imon Hossain ImonAwesome

✔️
Github Verified!
View GitHub Profile
@ImonAwesome
ImonAwesome / vc-mu_loop.php
Created April 10, 2021 00:24 — forked from Jany-M/vc-mu_loop.php
[WP] Visual Composer custom query loop block / module, for WordPress Multisite
<?php
// There's also a standalone version, no Visual Composer required, purely as a shortcode here https://gist.github.com/Jany-M/d3014a7039c884a8bbd8e8271cfcd982
if( class_exists( 'WPBakeryShortCode' ) && !class_exists( 'vcMUloop' ) ) {
class vcMUloop extends WPBakeryShortCode {
function __construct() {
add_action( 'init', array( $this, 'vc_multisite_mapping' ) );
@ImonAwesome
ImonAwesome / endpoint-order-received-tracking-code.php
Created October 12, 2021 17:00
Add Tracking Code or Script to WooCommerce Thank You Page
<?php
/**
* @snippet Add Script @ WooCommerce Thank You Page
* @endpoint happydesk.net/checkout/order-received/ (replace with your domain)
* @testedwith WooCommerce 5
*/
add_action( 'woocommerce_thankyou', 'happydesk_conversion_tracking_thank_you_page' );
@ImonAwesome
ImonAwesome / copyphpfile.php
Last active May 31, 2022 19:32
Copy file from remote server and save
<?php
// Copy files from remote server.
// https://stackoverflow.com/questions/9843933/copy-file-from-remote-server-or-url
$file = 'SOURCE_URL';
$newfile = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/ai1wm-backups/DIRECTORY_FIILE_NAME__WITH_EXTAINSION';
if ( copy ( $file, $newfile ) ) {
echo "Copy success!";
} else {
@ImonAwesome
ImonAwesome / custom_style.css
Last active November 19, 2021 21:32
Elementor Transparent Header
/*
Work Name: Elementor Transparent Header
Sticky: TOP
Sticky On: All Devices
Offset: 0
Effects Offset: 100
Entrance Animation: Default
@ImonAwesome
ImonAwesome / mysql_restart.md
Created February 21, 2022 14:52
How to Start/Stop MySQL Server on Ubuntu

Restart MySQL

To stop MySQL server use the following command:

sudo service mysql stop

To start MySQL server use the following command:

sudo service mysql start

@ImonAwesome
ImonAwesome / zip_ubuntu.md
Last active May 4, 2023 08:51
Zip a Folder Into Ubuntu

Install Zip Software Into Ubuntu

sudo apt-get install zip

Usages

zip -r zip_file_name.zip folder

Some solution | Stack Overflow.

@ImonAwesome
ImonAwesome / ssh_cpanel.md
Last active September 28, 2022 06:22
Cpanel SSH Access

CPanel SSH Access

To create SSH access from your CPanel follow steps below

  • Goto CPanel
  • SSH Access
    [ ✔ ] Manage SSH Keys
    [ ✔ ] Generating a New Key
    [ ✔ ] Fille Below Information as per your settings
    [ ✔ ] Generat Key
@ImonAwesome
ImonAwesome / remove_nitrocdn_copyright.js
Last active March 22, 2022 21:57
remove nitrocdn copyright
@ImonAwesome
ImonAwesome / woo_pixel_fire.html
Created March 23, 2022 19:15
WooCommerce Google Ads Conversion Pixel Fire On Click "Add To Cart" & "Cart" & "Checkout" by Selected CSS/ID Element | Google Ads
// WooCommerce Conversion Pixel Fire On Click "Add To Cart" & "Cart" & "Checkout" by Selected CSS/ID Element.
<!-- Global site tag (gtag.js) - Google Ads: TRACKING_iD -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TRACKING_iD"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TRACKING_iD');
@ImonAwesome
ImonAwesome / litespeed_not_save_data.php
Created March 23, 2022 20:54
Fix Litespeed Cache Plugin Save not working | Issue: Database corrupted or damaged
<?php
define( 'WP_USE_THEMES', false );
require( './wp-load.php' );
global $wpdb;
$table_name = $wpdb->prefix . 'options';
$table_name = "{$wpdb->prefix}options";
$wpdb->query( $wpdb->prepare( "DELETE FROM `$table_name` WHERE `option_name` like '%litespeed.%' " ) );