Categories
Technical

Mysqldump Unix commands

export all Databases

NOT A ROOT USER

mysqldump -uroot -p --all-databases > database-march24-2021.sql
mysqldump --all-databases -uuser -ppassword> database.sql
mysqldump --all-databases --skip-lock-tables -u user -p > Sept2018database.sql
Categories
General

Instanciate git new instance

git clone [email protected]/xxxxx.git

Categories
Web API

Swagger tool

Easy to implement and easy to use for cross functional team QA, producer and project manager

Categories
Web API

Web API Client

Postman has been the most reliable api client so far. It has proven efficiency and effectiveness ove rtime.

restlet client

Restlet has proven not reliable at many occasions. To reset the application the only solution was to uninstall and reinstall the plugin to chrome

Categories
Security

Website hacker security

https://cisofy.com/lynis/

https://www.clamav.net/downloads

toolkit

https://cve.mitre.org/

https://cisofy.com/lynis/

iptables to clsoe port

 

Categories
REDIS Scalability

Using a Redis Server

Using a Redis Server

Redis Command line

 redis-cli -h 127.0.0.1 -p 6379

Helper

zincrby ‘trending_threads’ 1 ‘Some Thread Title’

zrange ‘trending_threads’ 0 -1

zrange ‘trending_threads’ 0 -1 WITHSCORES

zrange ‘trending_threads’ 0 -1

Categories
Technical

Useful GIT merge command

How to merge see below

git merge –no-ff master

How to reset your git changes

git reset HEAD^ --soft (Save your changes, back to last commit)

git reset HEAD^ --hard (Discard changes, back to last commit)

Categories
Technical

Git Status old mode new mode

old mode 100755  
new mode 100644  

just do 
git config core.filemode false
Categories
Technical

Git Reset single file

git checkout HEAD -- my-file.txt
Categories
BEST PHP CODE

coalescing PHP – Elegant PHP

Coalescing can be chained: this will return the first defined value out of $_GET[‘user’], $_POST[‘user’], and ‘nobody’.

$username = $_GET[‘user’] ?? $_POST[‘user’] ?? ‘nobody’;

source : http://php.net/manual/en/migration70.new-features.php