Archives
- March 2026
- October 2025
- February 2025
- January 2025
- October 2024
- August 2024
- June 2024
- May 2024
- February 2024
- December 2023
- October 2023
- June 2023
- April 2023
- August 2016
- June 2016
- May 2016
- February 2016
- December 2015
- October 2015
- May 2015
- April 2015
- January 2015
- December 2014
- November 2014
- October 2014
- January 2014
- December 2013
- November 2013
- October 2013
- August 2013
- July 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- April 2012
Categories
Meta
Archives
- March 2026
- October 2025
- February 2025
- January 2025
- October 2024
- August 2024
- June 2024
- May 2024
- February 2024
- December 2023
- October 2023
- June 2023
- April 2023
- August 2016
- June 2016
- May 2016
- February 2016
- December 2015
- October 2015
- May 2015
- April 2015
- January 2015
- December 2014
- November 2014
- October 2014
- January 2014
- December 2013
- November 2013
- October 2013
- August 2013
- July 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- April 2012
Categories
Meta
Category Archives: Linux
Useful find Commands
The find command is very verstile, and I use it all the time. Here are the parameters that I use most often:-name <string> Finds files in specified directory whose name matches (case-sensitive) string-iname <string> Finds files in specified directory whose … Continue reading
Posted in Linux
Comments Off on Useful find Commands
Method to keep private libraries private
One method I have seen programmers (including myself) use to keep folks out of private libraries / include modules is to put a check in there. Easiest example: in index.php (or any script with permission to be called directly), this … Continue reading
Posted in Linux
Comments Off on Method to keep private libraries private
Recovering Corrupted InnoDB Table
Corrupted MySQL database: If you suspect data corruption in a MySQL database, First make a copy of the database for safe keeping: mysqldump –user=root post_planner > /tmp/post_plannerdb.sql Prove it: To prove that the database is corrupted, do: mysql> check database … Continue reading
Posted in Linux
Comments Off on Recovering Corrupted InnoDB Table
Restricting sshd by username
Step # 1: Open sshd_config file # vi /etc/ssh/sshd_config Step # 2: Specify a user Only allow user king to login by adding following line: AllowUsers king Step # 3: Restart sshd Save and close the file. In the above … Continue reading
Posted in Linux
Comments Off on Restricting sshd by username
Changing the MySQL timezone via PHP
If you don’t have root access in your mysql instance and want to change the time_zone, you’ll have to change it in the code: To have the time zone setup as you would like, you would you need to execute … Continue reading
Posted in Linux
Comments Off on Changing the MySQL timezone via PHP
Letting WordPress users install themes, plugins without FTP credentials
Quick answer: Put this in the user’s wp-config.php file: define(‘FS_METHOD’, ‘direct’); If you are having trouble updating the core wordpress, remember that no matter what the permissions are, wordpress needs it to be owned by apache:apache.
Posted in Linux
Comments Off on Letting WordPress users install themes, plugins without FTP credentials
Redirecting MySQL
To redirect traffic from one db to another (as a temporary measure if you have multiple places in your app to change the login data) you might try this: iptables -t nat -A PREROUTING -p tcp –dport 3306 -j DNAT … Continue reading
Posted in Linux
Comments Off on Redirecting MySQL
Which script sent this email
Sometimes you have multiple php scripts that send email and want to find out which one sent a specific email. I followed the instructions here: http://www.iezzi.ch/archives/217 Worked like a charm.
Posted in Linux
Leave a comment
Browser-Side Caching with Apache
Browser-side caching relies on HTTP headers to know whether or not the content it has in its local cache is still valid. If it is, then it uses the local copy, rather than downloading the file from the server again. … Continue reading
Posted in Apache, Linux
Leave a comment
Subversion Stuff
To establish a subversion repository anew: svnadmin create /var/svn/myrepos svn mkdir -m “creating the trunk dir” file:///var/svn/myrepos/repo1 svn import -m “Adding first directory” /var/www/vhosts/mydomain.com/wordpress file:///var/svn/myrepos/repo1 **Note that if you don’t specify a directory to copy, subversion is happy to add … Continue reading
Posted in Linux
Leave a comment