Skip to content

Instantly share code, notes, and snippets.

View arifhazwan's full-sized avatar

Arif Hazwan arifhazwan

  • Penang, Malaysia
View GitHub Profile
@levantoan
levantoan / [Support-WPML]set_product_category_base_same_shop_base.php
Last active December 15, 2023 07:06
How to set product category base the same as shop base in WooCommerce
<?php
/*
Support WPML - 25/02/2019
/*
function devvn_product_category_base_same_shop_base( $flash = false ){
global $sitepress;
$languages = icl_get_languages('skip_missing=0&orderby=code');
if($languages && !empty($languages)){
$original_lang = ICL_LANGUAGE_CODE;
foreach($languages as $key=>$lang) {
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@roachhd
roachhd / README.md
Last active April 18, 2024 07:25
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@reifman
reifman / default.vcl
Last active September 9, 2021 08:15
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}