Skip to content

Instantly share code, notes, and snippets.

View bdkoder's full-sized avatar
🎯
Focusing

Shahidul Islam bdkoder

🎯
Focusing
View GitHub Profile

Setup NGINX

Step 1 - install nginx

$ sudo apt update 
$ sudo apt install nginx 

Step 2 - check firewall

Check firewall :

@iqbalrony
iqbalrony / elementor-tips-tricks.php
Last active March 20, 2024 05:44
Elementor coding tips tricks. (Exclude & Include example for elementor group control)
<?php
/*
* Exclude & Include in group control
*/
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'item_background',
'label' => __( 'Background', 'happy-addons-pro' ),
'types' => [ 'classic', 'gradient' ],
@lordlycastle
lordlycastle / update_refs failed.sh
Last active June 6, 2024 20:52
When you get update_ref failed for ref error in git.
# Rename from 'C:/Users/Repos/phishfoodvr/.git/refs/remotes/origin/CHA/main.lock' to 'C:/Users/Repos/phishfoodvr/.git/refs/remotes/origin/CHA/main' failed. Should I try again? (y/n) n
# error: update_ref failed for ref 'refs/remotes/origin/CHA/main': couldn't set 'refs/remotes/origin/CHA/main'
$ cd $(git rev-parse --show-toplevel) # if necessary
$ rm -rf .git/refs/remotes/origin # remove all origin/*
$ mkdir .git/refs/remotes/origin # create empty origin/
$ git fetch origin # repopulate origin/*
@iqbalrony
iqbalrony / custom-control-init.php
Last active December 29, 2022 09:36
Create Elementor Custom Control. Image selector control
<?php
namespace ElementorControls;
if (!defined('ABSPATH')) exit; // Exit if accessed directly
class Elementor_Custom_Controls {
public function includes() {
require_once(plugin_dir_path(__FILE__).'inc/elementor/image-selector-control.php');
}