Skip to content

Instantly share code, notes, and snippets.

View msulaimanmisri's full-sized avatar
:electron:
Coding sampai lebam

Muhamad Sulaiman Misri msulaimanmisri

:electron:
Coding sampai lebam
View GitHub Profile
@msulaimanmisri
msulaimanmisri / benchmark.md
Last active August 11, 2025 00:52
Benchmarking NGINX + PHP-FPM Performance with wrk (Stress Test Script Included)

About this bash script

Ever wondered how well your server handles high traffic?

Currently I'm studying how to optimize PHP-FPM performance, especially for applications like Laravel and WordPress. One of the most crucial settings is pm.max_children, which determines how many child processes PHP-FPM can spawn to handle incoming requests.

So, instead of running a multiple pm.max_children values and guessing which one is best, I decided to benchmark it using wrk, a modern HTTP benchmarking tool. This way, I can find the optimal value for pm.max_children based on real data and results in one go.

This guide helps you benchmark your PHP-FPM performance using wrk. A modern HTTP benchmarking tool to find the optimal value for pm.max_children. This is especially useful if you're running Laravel, WordPress, or any PHP-based application on a VPS.

Sometimes your server feels "fine", until traffic spikes. And then things start to choke. One of the key reasons? PHP-FPM runs out of available child processe

@alexander-young
alexander-young / functions.php
Created January 17, 2022 17:00
WP Basic Cleanup
<?php
// //remove emoji support
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
// // Remove rss feed links
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );
@yiedpozi
yiedpozi / functions.php
Created June 3, 2021 07:30
Display total stock and total variations in WooCommerce products management page
<?php
add_filter( 'manage_edit-product_columns', 'woocommerce_product_custom_columns' );
function woocommerce_product_custom_columns( $columns ) {
$new_columns = array();
foreach ( $columns as $key => $value ) {
$new_columns[ $key ] = $value;
// Add total variations column after stock status column
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active December 5, 2025 03:48
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@daggerhart
daggerhart / 1.WordPress-Developer-Environment-Setup.md
Last active May 3, 2025 22:01
Modern WordPress Theme Development

Development Software

  • VirtualBox - Virtualization software for running local operating systems within your computer. This allows us have a full version of linux within our computers that better match how a live webserver works.
  • Vagrant - A tool for provisioning (creating) virtual machines.
  • VVV - A pre-built, community-supported Vagrant configuration for WordPress development.
  • Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
  • SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
  • Github.com - A website that provides free Git repositories for both open source and private projects.
  • SASS - (SCSS) A CSS preprocessing implementation that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.