Create multiple directories with LINUX mkdir -p

mkdir -p maindir/{assets/{css,js,img},src/{sass,types,img},dirX,dirY} Produces: The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case). The words in the brackets are part of the “brace expansion list”....

Automate WordPress Installation with scripts

Create the project directory and get the most recent version of WordPress PROJECT=”somesitedomaincom” # you can replace all occurrences of “~/Sites” with ${BASEPATH} BASEPATH=”some/path/to/dir” # Setup site folder, replace all...

MySQL – Regular expression replace

As of MySQL 8.0 and MariaDB 10 we can use  native REGEXP_REPLACE function. See also See MariaDB docs and PCRE Regular expression enhancements. — REGEXP_REPLACE(col, regexp, replace) SELECT REGEXP_REPLACE(“stackoverflow”,...

Mysql utf8_general_ci vs utf8_unicode_ci

Why to use utf8_unicode_ci over utf8_general_ci, or simple why never not to use utf8_general_ci. Basically utf8_general_ci is a broken version of utf8_unicode_ci. It is slightly faster bit only a little bit and it can produce unexpected result while sorting or...

SERVER HARDWARE FOR WEBSITE HOSTING

How to create your own sewer? Where to start and what hardware to use? Create your own U server Why 4U server is better then 1U? The advantage of 4U server is that you can build them almost as you would build a computer PC. You can change power adapter, motherboard...

Setting up Raid 1 (Keep your data safe)

You can set up Raid 1 system using one of three approaches (Hardware, Hybrid and Software). This post will point you to Software Raid 1 for both Windows 10 and Linux Ubuntu operating systems. Hardware RAID Advantages: Hardware RAID is dedicated processing system,...