Skip to content

Instantly share code, notes, and snippets.

View devkabir's full-sized avatar
🎯
Focusing

Dev Kabir devkabir

🎯
Focusing
  • Dhaka
View GitHub Profile
@devkabir
devkabir / show-element-ids.php
Created June 9, 2025 05:46
Displays IDs of all child elements inside #seid-parent directly on each element using Tailwind CSS. No external files.
<?php
/**
* Plugin Name: Show Element IDs (MU - Inline)
* Description: Displays IDs of all child elements inside #seid-parent directly on each element using Tailwind CSS. No external files.
*/
add_action('plugins_loaded', function () {
add_action('admin_enqueue_scripts', function () {
// Enqueue Tailwind from CDN
@devkabir
devkabir / wp-cli-nightly.ps1
Created March 11, 2025 06:50
WP-CLI nightly installation in windows
# Define the directory and file paths
$cliDir = "C:\wp-cli-nightly"
$cliPharPath = "$cliDir\wp-cli.phar"
$batchFilePath = "$cliDir\wp-nightly.bat"
# Create the directory if it doesn't exist
if (-not (Test-Path -Path $cliDir)) {
New-Item -ItemType Directory -Path $cliDir -Force
}
@devkabir
devkabir / ip-generator.php
Created February 13, 2025 17:09
This script will open the webpage, fill in the comment form, and submit spam comments.
<?php
function generate_random_ip() {
return mt_rand(1, 255) . '.' .
mt_rand(0, 255) . '.' .
mt_rand(0, 255) . '.' .
mt_rand(1, 255);
}
function generate_random_ipv6() {
$ipv6 = [];
@devkabir
devkabir / recaptcha.php
Created January 14, 2025 11:24
google recaptcha plugin
<?php
/**
* Plugin Name: Google reCAPTCHA for Login
* Description: A simple plugin to add Google reCAPTCHA to the WordPress login form.
* Version: 1.0.0
* Author: CodeCraft Guide
* Text Domain: google-recaptcha-login
* Domain Path: /languages
* License: GPL2
*/
@devkabir
devkabir / package.conf
Created January 6, 2025 09:06
Numerous bug fixes and improvements, enabling you to easily add new services to Laragon via Tools > Quick Add
# PHP
# https://windows.php.net/download/
# NTS = Non Thread Safe
*PHP-8.4=https://windows.php.net/downloads/releases/archives/php-8.4.1-nts-Win32-vs17-x64.zip
*PHP-8.3=https://windows.php.net/downloads/releases/archives/php-8.3.14-nts-Win32-vs16-x64.zip
*PHP-8.2=https://windows.php.net/downloads/releases/archives/php-8.2.26-nts-Win32-vs16-x64.zip
*PHP-8.1=https://windows.php.net/downloads/releases/archives/php-8.1.31-nts-Win32-vs16-x64.zip
*PHP-7.4=https://windows.php.net/downloads/releases/archives/php-7.4.33-nts-Win32-vc15-x64.zip
---
@devkabir
devkabir / index.html
Last active November 24, 2024 14:27
Select2 Lazy Loading
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Select2 Lazy Loading</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link
href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css"
rel="stylesheet"
@devkabir
devkabir / custom-logger.php
Last active October 10, 2024 17:25
Custom Logger and Mock HTTP Interceptor for WordPress Developers
<?php
/**
* Plugin Name: Custom Logger and Mock HTTP Interceptor
* Description: Writes logs and provides mock HTTP responses for specific URLs.
* Version: 1.0
* Author: Your Name
*/
/**
* Writes a log message to a specified directory.
@devkabir
devkabir / install-wpcli.ps1
Created September 2, 2024 03:10
Install WP Cli on windows
# PowerShell Script to Install WP-CLI on Windows
# Step 1: Download WP-CLI Phar file
$wpcli_url = "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
$destination = "C:\wp-cli\wp-cli.phar"
# Create directory if it doesn't exist
if (!(Test-Path "C:\wp-cli")) {
New-Item -ItemType Directory -Path "C:\wp-cli"
}
@devkabir
devkabir / git.md
Created July 10, 2024 15:13
Git commands for daily usage

prune local remotes

 git fetch origin --prune

delete local remote less branch

 git branch | grep -v "\* " | xargs git branch -d
@devkabir
devkabir / plugin.php
Created November 22, 2023 17:41
Coding Section Plugin
<?php
/*
* Plugin Name: Coding Section Plugin
* Plugin URI: https://yourwebsite.com
* Description: This plugin creates a custom table in the WordPress database and provides shortcodes for user interaction.
* Version: 1.0
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Dev Kabir
* Author URI: https://yourwebsite.com