Archive for August 2016

PSR-2 Conding standard checker

vendor/bin/php-cs-fixer fix path/to/folder –level="psr2" -v The –dry-run option displays the files that need to be fixed but without actually modifying them vendor/bin/php-cs-fixer fix path/to/file –level="psr2" –dry-run –diff -v

MySQL Profiling

set profiling=1; call functionname(@functionparam); show profiles;

Ssh tunnel

Random port tunnelling using a private key: #!/bin/sh   ssh -L 5446:hostname:5446 -i /home/imran/Servers/iaghayev iaghayev@192.168.1.10 -p 2222 Mysql port tunnelling using a private key: #!/bin/sh   ssh -L 3309:127.0.0.1:3306 -i /home/imran/Servers/iaghayev iaghayev@192.168.1.10 -p 2222

Configuring Exim4 on Ubuntu

Use the following utility: dpkg-reconfigure exim4-config

Rsync examples

cd /home/imran/Projects/pp-frontend rsync -azP –exclude .git/ –exclude .idea/ –exclude user_guide . imran@192.168.56.101:/var/www/vhosts/httpdocs Rsync local to remote cd /home/imran rsync -avz –exclude default-soapui-workspace.xml –exclude Desktop –exclude Dropbox –exclude "Google Drive" –exclude –exclude NetBeansProjects –exclude PhpstormProjects –exclude Public –exclude Software –exclude "Software Archive" –exclude "Soap UI Configuration" /home/imran/* /home/imran/Google\ Drive Rsync remote to local rsync -chavzP kaspi-emlak.com@ssh.kaspi-emlak.com:/www/* […]