Monthly Archives: September 2018

Compound Indexes

drop index INDEX_NAME on TABLE_NAME;

ALTER TABLE TABLE_NAME add index INDEX_NAME(col1, col2);

SHOW INDEX FROM yourtable;

git squash – cleanly

git reset –soft $(git merge-base develop elasticsearch) && git commit -am “Full text search with Laravel Scout” && git rebase -i develop

Ansible apt update

ansible web -m apt -a "upgrade=yes update_cache=yes cache_valid_time=86400" -u david -K --become

 

search and replace from the command line

ack-grep -l --print0 "$@" "$FROM_STRING" | xargs -0 -n 1 sed -i -e "s/$FROM_STRING/$TO_STRING/g"

 

Xdebug remote server

https://confluence.jetbrains.com/display/PhpStorm/Remote+debugging+in+PhpStorm+via+SSH+tunnel

 

SSH tunnel is the crucial part!