Skip to content

Instantly share code, notes, and snippets.

View DarkGL's full-sized avatar

Rafał Więcek DarkGL

View GitHub Profile
@DarkGL
DarkGL / opcache-preload.php
Created April 17, 2024 05:51 — forked from fedek6/opcache-preload.php
Working WordPress opcache preloading config
<?php
/**
* WordPress opcache preloading.
* Requires PHP >= 7.4.
*
* @author Konrad Fedorczyk <[email protected]>
* @link https://stitcher.io/blog/preloading-in-php-74
*
* @version 1.0.0
*/
@DarkGL
DarkGL / machette.js
Created April 17, 2024 05:50 — forked from Boshen/machette.js
npm machette - find unused dependencies by grepping the dependency name
// pnpm -r -c exec 'node /path/to/machette.js'
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const process = require('process');
const path = require('path');
async function main() {
const cwd = process.cwd();
@DarkGL
DarkGL / expressvpn_setup_on_debian_based_linux.md
Created April 17, 2024 05:50 — forked from raven-rock/expressvpn_setup_on_debian_based_linux.md
How to set up ExpressVPN on Debian/Ubuntu/Pop!_OS Linux
@DarkGL
DarkGL / missing_indexes.sql
Created April 22, 2023 18:07 — forked from timhwang21/missing_indexes.sql
Spotting missing indexes for MariaDB & MySQL
SELECT
t.TABLE_SCHEMA,
t.TABLE_NAME,
c.COLUMN_NAME,
IFNULL(
kcu.CONSTRAINT_NAME, 'Not indexed'
) AS `Index`
FROM
information_schema.TABLES t
INNER JOIN information_schema.`COLUMNS` c ON c.TABLE_SCHEMA = t.TABLE_SCHEMA
@DarkGL
DarkGL / php.ini
Created December 12, 2022 17:09 — forked from fuyuanli/php.ini
Disable Dangerous PHP Functions
disable_functions = "apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode"