Skip to content

Instantly share code, notes, and snippets.

View obiPlabon's full-sized avatar
🎯
1 goal

Md Obidullah obiPlabon

🎯
1 goal
View GitHub Profile
@AbmSourav
AbmSourav / Mac Terminal.md
Created November 21, 2022 08:05
Mac terminal customization

Create a file in the Home directory. touch ~/git-prompt.sh

Copy these codes into the file. Link here


put below codes in ~/.zshrc file

# auto complete on pressing TAB
@akshuvo
akshuvo / geo-search-wp-query.php
Created April 11, 2020 16:31
Sort by distance WordPress post meta/ WordPress Query / pre_get_posts
<?php if(!defined('ABSPATH')) { die(); } // Include in all php files, to prevent direct execution
/**
* Plugin Name: WP Geo Query
* Plugin URI: https://gschoppe.com/wordpress/geo-searches/
* Description: Adds location search support to WP_Query, making it easy to create completely custom "Find Location" pages.
* Author: Greg Schoppe
* Author URI: https://gschoppe.com
* Version: 1.0.0
**/
@iqbalrony
iqbalrony / custom-icon-add-to-elementor.php
Last active February 10, 2025 22:58
Adding custom icon to icon control in Elementor.
<?php
/**
* Adding custom icon to icon control in Elementor
*/
function modify_icon_controls($controls_registry) {
//3696 material design icon classes
$material_design_icons_cls = 'mdi mdi-access-point, mdi mdi-access-point-network, mdi mdi-access-point-network-off, mdi mdi-account, mdi mdi-account-alert, mdi mdi-account-alert-outline, mdi mdi-account-arrow-left, mdi mdi-account-arrow-left-outline, mdi mdi-account-arrow-right, mdi mdi-account-arrow-right-outline, mdi mdi-account-badge, mdi mdi-account-badge-alert, mdi mdi-account-badge-alert-outline, mdi mdi-account-badge-horizontal, mdi mdi-account-badge-horizontal-outline, mdi mdi-account-badge-outline, mdi mdi-account-box, mdi mdi-account-box-multiple, mdi mdi-account-box-outline, mdi mdi-account-card-details, mdi mdi-account-card-details-outline, mdi mdi-account-check, mdi mdi-account-check-outline, mdi mdi-account-child, mdi mdi-account-child-circle, mdi mdi-account-circle, mdi mdi-account-circle-outline, mdi mdi-account-clock, mdi mdi-account-clock-
@iqbalrony
iqbalrony / Extend-exiting-Elementor-widget.php
Last active June 12, 2024 19:13
Add a custom control and render attribute to an existing Elementor widget
<?php
// This example will add a custom "select" drop down & "switcher" to the "testimonial" section
// and add custom "color" to the "testimonial style" section
add_action('elementor/element/before_section_end', 'add_control_in_existing_widget', 10, 3 );
function add_control_in_existing_widget( $section, $section_id, $args ) {
if( $section->get_name() == 'testimonial' && $section_id == 'section_testimonial' ){
// we are at the end of the "section_testimonial" area of the "testimonial"
$section->add_control(
'testimonial_name_title_pos' ,
[
@SumonMSelim
SumonMSelim / .zshrc
Created May 9, 2019 18:18
My Terminal Configuration (oh-my-zsh+iTerm2)
# Path to your oh-my-zsh installation.
export ZSH=/Users/SumonMSelim/.oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE="awesome-fontconfig"
# User configuration
export TERM="xterm-256color"
export SHELL="/bin/zsh"
@jakubmikita
jakubmikita / Storable.php
Last active February 19, 2019 18:11
WordPress global storage using filter
<?php
/**
* Storable interface
*/
interface Storable extends \ArrayAccess, \Iterator {}
@luismts
luismts / GitCommitBestPractices.md
Last active April 24, 2025 04:55
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@mrharel
mrharel / proxyTrack.js
Created December 28, 2018 14:24
Using Proxy to Track Javascript Class
const callerMap = {};
function getCaller(error) {
if (error && error.stack) {
const lines = error.stack.split('\n');
if (lines.length > 2) {
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/);
if (match) {
return {
name: match[1].replace(/^Proxy\./, ''),
  • Make it exeicutable like: chmod u+x rsync.sh later you have to make chmod u+x .rsyncconfig and chmod u+x .rsyncignore
  • ./rsync.sh init
  • Do you have password less alias host? (Y/n): means if you use passwordless login like: ssh example.com were example.com is your alias hostname on ~/.ssh/config file.
  • ~/.ssh/config file example:
Host example.com
    HostName 12.12.12.12 # Your VPS IP Address
    User root
 Port 22