Skip to content

Instantly share code, notes, and snippets.

@terrylinooo
terrylinooo / gist:18b99c535e30aa68969d52ca9649622f
Created May 18, 2021 09:56
WooCommerce 在多規格商品名稱上加上已售完字樣
/**
* 在多規格商品名稱上加上"已售完"字樣。
*
* @param string $option
* @param null $not_used
* @param array $attribute
* @param object $product
* @return void
*/
function add_sold_out_label_to_product_dropdown( $option, $not_used, $attribute, $product ){
@terrylinooo
terrylinooo / SSL.md
Created October 2, 2019 02:32 — forked from gangsta/SSL.md
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

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

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@terrylinooo
terrylinooo / SSL.md
Created October 2, 2019 02:32 — forked from gangsta/SSL.md
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

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

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@terrylinooo
terrylinooo / han_less.css
Created March 18, 2017 11:53
「Han.css 漢字標準格式」只針對注音符號的部分,如果只需要排版注音符號,實在沒必要載入全部的 Sass
ruby.zhuyin h-zhuyin,
ruby.mps h-zhuyin,
h-ruby.zhuyin h-zhuyin {
position: relative;
letter-spacing: 0; }
ruby.zhuyin h-diao,
ruby.mps h-diao,
h-ruby.zhuyin h-diao {
position: absolute;
right: -0.9em;
@terrylinooo
terrylinooo / comodo.pem
Created February 15, 2017 18:49
OCSP stapling PEM file for Comodo certificates used on Nginx.
-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQwMjEy
MDAwMDAwWhcNMjkwMjExMjM1OTU5WjCBkDELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZh
bGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAI7CAhnhoFmk6zg1jSz9AdDTScBkxwtiBUUWOqigwAwCfx3M28Sh
@terrylinooo
terrylinooo / install_php_v8js_centos7.txt
Last active January 17, 2019 02:45
Install PHP v8js with PHP 5.6 on Centos 7
yum install php-pear
yum install re2c
yum install v8-devel
pecl install v8js-0.1.3
// if failed, need to download v8js-0.1.3 and manually install it