Memo Unix administrator PHP

READ EMAIL CENTOS

mutt -f /var/spool/mail/root

 
PHPCODE SNIFFER
phpcs - PHP Codesniffer
 
 
PHPDOC
$ phpdoc -d [SOURCE_PATH] -t [TARGET_PATH]
 
 phpdoc -d . -t doc/ -ti 'API Aptnewyork' -dn aptnewyork
 
 
Speed Performance
google chrome page speed - Chrome extension
 
 
#MYSQL PCONNECT
Establishes a persistent connection to a MySQL server.
 
mysql_pconnect() acts very much like mysql_connect() with two major differences.
 
First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection.
 
Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
 
This type of link is therefore called 'persistent'.
 
TRUC AND ASTUCE GIT
git reset --hard HEAD
git clean -f -d
git pull
 
 
LOG VSFTP
 nano /etc/vsftpd/vsftpd.conf
 
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
 
 
 
/etc/init.d/vsftp restart
 tail -n 30 /var/log/xferlog
 
 
GIT Tricks and Advices
Fixing un-committed mistakes
use RESET
 
Fixing committed mistakes
user REVERT
 
Quote 
OO design emphasizes the abstract class over the implementation. That is we work with Generalizations rather than specializations
Factory Method address the problem
 
Singleton Pattern
- must have a constructor and be marked private
- contain static member variable that will hold an instanceof the class
- contain a public static method to acccess the instance
 
 
Factory Patterns
 

Latest Post

Popular Post

Our Skills

Author

Project Director Information Architect Database Administrator Unix Administrator Senior Developer Project Manager Product Manager Web Marketer Cloud Engineer

Contact Us

For any questions or project ideas please contact me at the following.

I'm here