Skip to content

Instantly share code, notes, and snippets.

View joychetry's full-sized avatar
🎈
Never settle

Joy Chetry joychetry

🎈
Never settle
View GitHub Profile
# OpenClaw Implementation Prompts
Each prompt below is a self-contained brief you can hand to an AI coding assistant (or use as a project spec) to build that use case from scratch. Adapt the specific services to whatever you already use — the patterns are what matter.
---
## 1) Personal CRM Intelligence
```
Build me a personal CRM system that automatically tracks everyone I interact with, with smart filtering so it only adds real people — not newsletters, bots, or cold outreach.
@joychetry
joychetry / emergency-admin.php
Created September 1, 2025 08:50
WordPress Admin URL Reset & Emergency Admin Access
<?php
// Emergency WordPress Admin Access
// DELETE THIS FILE AFTER USE!
require_once('wp-config.php');
require_once('wp-load.php');
if (isset($_GET['action']) && $_GET['action'] == 'reset_admin_url') {
// Reset common security plugin settings that hide admin
delete_option('whl_page'); // WP Hide Login plugin
@joychetry
joychetry / wp-adv-admin-handbook.md
Created May 11, 2025 11:13 — forked from kasparsd/readme.md
WordPress handbooks as a single markdown file for LLMs (source https://developer.wordpress.org)

Advanced Administration Handbook

Source: https://developer.wordpress.org/advanced-administration/

Welcome to the WordPress Advanced Administration Handbook! Here you will find WordPress advanced documentation. Use the “Contents” menu on the left to navigate topics.

Why Advanced Administration?

Not all users who use WordPress have to know about technology, and therefore in its documentation should not appear either, and developers do not have to know certain advanced system configurations.

@joychetry
joychetry / .htaccess
Created March 31, 2025 06:51
Basic .htaccess WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@joychetry
joychetry / functions.php
Last active December 17, 2024 08:36
Show More / Show Less + Button Inside showHide__txt
<style>
.showHide__txt {
display: flex;
flex-direction: column;
gap: 8px;
}
.showHide__btn {
text-decoration-thickness: 2px !important;
text-underline-offset: 2px !important;
}
@joychetry
joychetry / functions.php
Created October 30, 2024 18:23
Copy Taxonomy Data WordPress
// Define your source and target taxonomies, as well as the post type (optional)
$source_taxonomy = 'project-category'; // Source taxonomy
$target_taxonomy = 'project-tag'; // Target taxonomy
$post_type = 'project'; // Replace with your post type, or leave empty for all
// Function to copy terms from the source taxonomy to the target taxonomy
function copy_taxonomy_terms( $source_taxonomy, $target_taxonomy, $post_type = '' ) {
// Step 1: Get all posts in the specified post type with terms from the source taxonomy
$args = array(
'post_type' => $post_type ?: 'any', // Use 'any' for all post types if not specified
@joychetry
joychetry / functions.php
Created July 30, 2024 05:49
Dark Mode Switch
/*!
* Dark Mode Switch v1.0.1 (https://github.com/coliff/dark-mode-switch)
* Copyright 2021 C.Oliff
* Licensed under MIT (https://github.com/coliff/dark-mode-switch/blob/main/LICENSE)
*/
var darkSwitch=document.getElementById("darkSwitch");window.addEventListener("load",(function(){if(darkSwitch){initTheme();darkSwitch.addEventListener("change",(function(){resetTheme()}))}}));function initTheme(){var darkThemeSelected=localStorage.getItem("darkSwitch")!==null&&localStorage.getItem("darkSwitch")==="dark";darkSwitch.checked=darkThemeSelected;darkThemeSelected?document.body.setAttribute("data-theme","dark"):document.body.removeAttribute("data-theme")}function resetTheme(){if(darkSwitch.checked){document.body.setAttribute("data-theme","dark");localStorage.setItem("darkSwitch","dark")}else{document.body.removeAttribute("data-theme");localStorage.removeItem("darkSwitch")}}
@joychetry
joychetry / functions.php
Created July 30, 2024 05:47
SMTP Test in WordPress Dashboard
add_action('admin_menu', 'smtp_test_email_menu');
function smtp_test_email_menu() {
add_menu_page(
'SMTP Test Email', // Page title
'SMTP Test Email', // Menu title
'manage_options', // Capability
'smtp-test-email', // Menu slug
'smtp_test_email_page' // Callback function
);
@joychetry
joychetry / functions.php
Last active July 29, 2024 12:53
WordPress Custom Gmail SMTP
//In functions.php
//Custom SMTP
/** Custom SMTP Settings */
function custom_phpmailer_smtp( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = SMTP_HOST;
$phpmailer->SMTPAuth = true;
$phpmailer->Port = SMTP_PORT;
$phpmailer->Username = SMTP_USER;
@joychetry
joychetry / terminal
Last active June 29, 2024 07:58
Update maxmemory and maxmemory-policy in Redis Server
No need of changing any thing in the .conf file just follow the following steps
Step 1: First check whether redis-server is working or not
$ redis-cli
127.0.0.1:6379> ping
PONG
if the reply is PONG then your server is working absolutely fine.
Step 2: To get the current max memory run the following commands: