Skip to content

Instantly share code, notes, and snippets.

Arif Hazwan arifhazwan

Block or report user

Report or block arifhazwan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View object-cache.php
Plugin Name: Redis Object Cache Drop-In
Plugin URI:
Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, HHVM, replication, clustering and WP-CLI.
Version: 1.4.1
Author: Till Krüss
Author URI:
License: GPLv3
License URI:
arifhazwan / woocommerce.vcl
Created Mar 7, 2019 — forked from lukecav/woocommerce.vcl
Varnish v4 VCL for WooCommerce Stores - Beta
View woocommerce.vcl
* *********************************************************/
backend default {
.host = "";
.port = "8080";
# ##########################################################
arifhazwan / disable-wp-load-css.php
Created Mar 3, 2019
Wordpress Functions Disable CSS Load
View disable-wp-load-css.php
add_filter( 'style_loader_src', function($href){
if(strpos($href, "stylesheet.min.css") == true) {
return false;
return $href;
arifhazwan / install-comodo-ssl-cert-for-nginx.rst
Created Mar 3, 2019 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

arifhazwan /
Created Feb 24, 2019 — forked from denji/
NGINX tuning for best performance

Moved to git repository:

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

arifhazwan /
Created Feb 23, 2019 — forked from fevangelou/
The perfect Varnish configuration for Joomla, WordPress & other CMS based websites

The perfect Varnish configuration for Joomla, WordPress & other CMS based websites

IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).

USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.

IMPORTANT: The following setup assumes a 3 minute (180 sec) cache time. You can safely increase this to 5 mins for less busier sites or drop it to 1 min or even 30s for high traffic sites.

This configuration requires an HTTP Header and a user cookie to identify if a user is logged in a site, in order to bypass caching overall (see how it's done in the Joomla section). If your CMS provides a way to add these 2 requirements, then you can use this configuration to speed up your site or entire server. You can even exclude the domains you don't want to cach

View wp_disable_feed-functions.php
function wpfeed_disable() {
wp_die( __( 'Not available, check out <a href="'. esc_url( '' ) .'">Facebook</a>!' ) );
add_action('do_feed', 'wpfeed_disable', 1);
add_action('do_feed_rdf', 'wpfeed_disable', 1);
add_action('do_feed_rss', 'wpfeed_disable', 1);
add_action('do_feed_rss2', 'wpfeed_disable', 1);
add_action('do_feed_atom', 'wpfeed_disable', 1);
add_action('do_feed_rss2_comments', 'wpfeed_disable', 1);
View Has weird right-to-left characters.txt
You can’t perform that action at this time.