Skip to content

Instantly share code, notes, and snippets.

View palpalani's full-sized avatar

Palaniappan P palpalani

View GitHub Profile
@jniltinho
jniltinho / 00 - Cursor AI Prompting Rules.md
Created March 23, 2025 19:30 — forked from aashari/00 - Cursor AI Prompting Rules.md
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework

This repository provides a structured set of prompting rules to optimize interactions with Cursor AI. It includes three key files to guide the AI’s behavior across various coding tasks.

Files and Their Roles

core.md

  • Purpose: Establishes foundational rules for consistent AI behavior across all tasks.
  • Usage: Place this file in your project’s .cursor/rules/ folder to apply it persistently:
  • Save core.md under .cursor/rules/ in the workspace root.
#!/bin/bash
# Update package lists
sudo apt update
# Install zsh
sudo apt install -y zsh
# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
@muuvmuuv
muuvmuuv / how-to-php-fpm-pm-optimized.md
Last active September 5, 2024 12:43
Get optimized PHP-fpm "pm" config
@aneesdev
aneesdev / EnhancedEnum.php
Created September 19, 2022 18:59
EnhancedEnum PHP trait
<?php
trait EnhancedEnum
{
/**
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice'
*
* @param string $name
* @return static
*/
@mortenscheel
mortenscheel / functions.sh
Last active December 8, 2024 01:28
Laravel specific git hooks for post-checkout and post-merge
#!/usr/bin/env bash
NC='\033[0m' # No Color
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
MAGENTA='\033[0;35m'
notify_about_actions_required() {
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)"
@Larsklopstra
Larsklopstra / install.sh
Last active November 19, 2024 13:33
Ubuntu Laravel Development Environment
#!/bin/bash
echo '🏃 Starting setup...'
echo '--------------------'
sudo apt update
sudo apt upgrade
echo '🐠🚀 Installing Fish and Starship...'
@chimit
chimit / bitbucket-pipelines.yml
Created August 7, 2020 02:35
Bitbucket Pipelines config for Laravel 7 with PHP 7.4, GD and EXIF
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.4-fpm
definitions:
services:
mysql:
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active March 26, 2025 13:12
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@Ruzgfpegk
Ruzgfpegk / wp-perf.md
Last active April 9, 2025 09:04
WordPress Performance & Development tips