17/12/2019

Export databases with mysqldump and gzip file

mysqldump -u[dbuser] -p[dbpass] [dbname] | gzip > [dbname].sql.gz
21/04/2020

Format number with Javascript

function formatNumber(num) { return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') } console.info(formatNumber(2665)) // 2,665 console.info(formatNumber(102665)) // 102,665 console.info(formatNumber(111102665)) // 111,102,665
14/12/2019

How do you use bcrypt for hashing passwords in PHP?

use password_hash() to create a bcrypt hash of any password: password_hash('yourPassword', PASSWORD_DEFAULT); use password_hash() to create a bcrypt hash of any password with option: $options = […]