Category: Quick Tip


Convert certificate format with OpenSSL

Convert a PEM file to DER (crt etc) $ openssl x509 -outform der -in certificate.pem -out certificate.crt Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM $ openssl pkcs12...

ZSH Home / End Keys 0

ZSH Home / End Keys

Self note, Add this lines to ~/.zshrc bindkey ‘\e[1~’ beginning-of-line # Linux console bindkey ‘\e[H’ beginning-of-line # xterm bindkey ‘\eOH’ beginning-of-line # gnome-terminal bindkey ‘\e[2~’ overwrite-mode # Linux console, xterm, gnome-terminal bindkey ‘\e[3~’ delete-char...


Matching non ASCII characters in NGiNX location

If you need to match a non ASCII string with NGiNX, and don’t want to use the encoded URL, you can use this trick, location ~* (*UTF8)^/אודות$ { return 301 “”; } Resources


[PHP] Validate Email Address Format

A quick snippet I use to validate email address format. <?php if (empty($argv[1])) { echo ‘usage: ‘ . $argv[0] . ‘ [email protected]’ . PHP_EOL; exit (1); } array_shift($argv); foreach ($argv as $key => $email)...