David Raleche's blog

Log SLOW Request mysql

#/etc/init.d/mysqld
get_mysql_option mysqld_safe log-slow-queries "/var/log/slow-query.log"
slowqueryfile="$result"

/usr/bin/mysqld_safe --datadir="$datadir" --socket="$socketfile" --log-slow-queries="$slowqueryfile" \
--log-error="$errlogfile" --pid-file="$mypidfile" --max_allowed_packet=36M \
--user=mysql >/dev/null 2>&1 &

MAYBE USEFUL
[root@ip~]# touch /var/log/slow-query.log
[root@ip ~]# chown mysql:mysql /var/log/slow-query.log
[root@ip~]# chmod -R 777 /var/log/slow-query.log

#ETC/MY.CNF

[mysqld]
datadir=/var/lib/mysql

Show hidden files with his MAC

Type the following into a Terminal :

defaults write com.apple.finder AppleShowAllFiles TRUE

Redirect non-www to www in the htaccess file

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Easy !
David Raleche

Faster Apache - httpd.conf - Ralech Solution - Gzip-Etag - Make it Faster !

# ETAG

Header unset Pragma
Header unset ETag
FileETag None

#Header unset Last-Modified
Header set Last-Modified "Fri, 21 Dec 2013 00:00:00 GMT"
Header set Expires "Fri, 21 Dec 2013 00:00:00 GMT"
Header set Cache-Control "max-age=864000, public, must-revalidate"
ExpiresActive On
ExpiresDefault "access plus 19 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType image/gif "access plus 3 months"
ExpiresByType image/png "access plus 3 months"

GIT resolved a conflict on your Centos server

git checkout --ours filename.c
git commit -m "using theirs"

David Raleche

Experience Online

How to READ EMAILs on a CENTOS Unix Server
mutt -f /var/spool/mail/root

This is a command that will allow you to read your mails on a centos server.

PHP_CodeSniffer - Pear - PHP
phpcs - PHP Codesniffer

Project Manager here is the tool for your developer.
That will guarantee at least a clear code. It won't guarantee your developer's logic but the code will be readable.

PHPDOC
$ phpdoc -d [SOURCE_PATH] -t [TARGET_PATH]

This tool is great to create a quick API for your web Applications

phpdoc -d . -t doc/ -ti 'API Aptnewyork' -dn aptnewyork

Pages

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