Skip to content

Instantly share code, notes, and snippets.

View kirtangajjar's full-sized avatar
😎
Crunching code

Kirtan Gajjar kirtangajjar

😎
Crunching code
View GitHub Profile
╰─➤ phpcs --standard=PHPCompatibilityWP,WordPress-VIP-Go -s --report=source --ignore=third-party,includes/vendor,assets plugins/web-stories
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
-------------------------------------------------------------------------------------------
SOURCE COUNT
-------------------------------------------------------------------------------------------
WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_ 5
Squiz.PHP.CommentedOutCode.Found 2
-------------------------------------------------------------------------------------------
A TOTAL OF 7 SNIFF VIOLATIONS WERE FOUND IN 2 SOURCES
@kirtangajjar
kirtangajjar / 1-Index-Now-Plugin-Audit-Summary
Last active December 6, 2023 13:24
Index-Now-Plugin-Audit
╰─➤ phpcs --standard=PHPCompatibilityWP,WordPress-VIP-Go -s --report=source --ignore=vendor-prefixed plugins/mihdan-index-now
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
---------------------------------------------------------------------------------------------------------
SOURCE COUNT
---------------------------------------------------------------------------------------------------------
Squiz.PHP.CommentedOutCode.Found 6
WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout 6
WordPress.DB.DirectDatabaseQuery.DirectQuery 5
WordPress.Security.NonceVerification.Recommended 5
@kirtangajjar
kirtangajjar / ee3-wpredis.conf
Created July 2, 2018 11:21
Config file for single wpredis site on ee3
# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
worker_rlimit_nofile 100000;
pid /run/nginx.pid;
events {
worker_connections 4096;
multi_accept on;
}
@kirtangajjar
kirtangajjar / Migrations.md
Last active June 27, 2018 13:05
Handling Migrations In EE [RFC]

Handling migrations in EE,

Migration Classes & file structure

Migrations will be used to make changes(db/file/containers) to existing ee installation. Migrations will be stored in /migrations folder in EE root. Each migration will be stored in seperate file. Name would be like 'timestamp_migration_title.php' i.e '1530101102_migrate_to_beta2.php'

Each of them will have a class that will extend a base abstract class. The abstract class will have one method - migrate(). The class that implements it can create more methods to group different types of changes.

<?php
/**
* Plugin Name: rtCamp Slideshow Plugin Assignment
* Description: A simple plugin that can add slideshow to any post
* Version: 1.0.0
* Author: Kirtan Gajjar
* License: MIT License
*/
/**

Keybase proof

I hereby claim:

  • I am kirtangajjar on github.
  • I am kirtangajjar (https://keybase.io/kirtangajjar) on keybase.
  • I have a public key ASCXIuB2dd5Pucb0lWpxzfEhhWMR60UV5yu1WULPBrcIbgo

To claim this, I am signing this object: