Skip to content

Instantly share code, notes, and snippets.

View nullvariable's full-sized avatar
☣️

Doug Cone nullvariable

☣️
View GitHub Profile
@userMacieG
userMacieG / engine.lua
Last active March 22, 2024 12:19
Turn engine on and off via key (ox_lib)
lib.onCache('ped', function(value)
SetPedConfigFlag(value, 241, true) -- PED_FLAG_DISABLE_STOPPING_VEHICLE_ENGINE
SetPedConfigFlag(value, 429, true) -- PED_FLAG_DISABLE_STARTING_VEHICLE_ENGINE
end)
lib.addKeybind({
name = 'engine',
description = 'Engine',
defaultKey = 'Y',
onPressed = function(self)
@Rasinzz
Rasinzz / serverId.lua
Created October 5, 2021 17:12
FiveM Get Player Server ID (client-side)
RegisterCommand('serverId', function()
print(GetPlayerServerId(PlayerId()))
end, false)
@nullvariable
nullvariable / cache-aggressive-license-checks.php
Last active January 24, 2023 11:59
Make annoying WordPress plugins that constantly perform license checks in the admin behave.
<?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
*
*/
<?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 July 15, 2021 17:16
Laravel 5 - get amount of jobs in a queue (database driver)
$numJobs = DB::table('jobs')->where('queue', 'myqueue')->count();
@Rarst
Rarst / class-global-sniffer.php
Last active October 4, 2017 14:14
Discover where is array global being modified, because WordPress.
<?php
namespace Rarst;
/**
* Discover where is array global being modified, because WordPress.
*/
class Global_Sniffer implements \ArrayAccess {
protected $name;
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// 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
*/