Skip to content

Instantly share code, notes, and snippets.

@nullvariable
nullvariable / cache-aggressive-license-checks.php
Last active Oct 15, 2020
Make annoying WordPress plugins that constantly perform license checks in the admin behave.
View cache-aggressive-license-checks.php
<?php
/**
* Plugin Name: Cache Aggressive License Checks
* Description: Cache the license checks for plugins that are lame and check on every request.
* Author: Doug Cone
* Author URI: http://dougcone.com
* Version: 0.0.1
*
*/
View OMGWTFBBQSPEEDYDASHBOARDS.php
<?php
/*
* Plugin Name: Remove crazy counts slowing down my dashboard
* Plugin URI: https://pmgarman.me
* Description: Those comment counts are such a pain when you have a lot of comments
* Author: Patrick Garman
* Author URI: https://pmgarman.me
* Version: 1.0.0
* License: GPLv2
*/
@derhansen
derhansen / numJobsDatabaseDriver.php
Last active May 9, 2018
Laravel 5 - get amount of jobs in a queue (database driver)
View numJobsDatabaseDriver.php
$numJobs = DB::table('jobs')->where('queue', 'myqueue')->count();
@Rarst
Rarst / class-global-sniffer.php
Last active Oct 4, 2017
Discover where is array global being modified, because WordPress.
View class-global-sniffer.php
<?php
namespace Rarst;
/**
* Discover where is array global being modified, because WordPress.
*/
class Global_Sniffer implements \ArrayAccess {
protected $name;
View wp-query-ref.php
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/