While working on a PHP script on a CentOS Linux server that runs from crontab I ran into an issue where PHP was bogging the server down because of memory use. The script has a lot of output that is not necessary to store though when using the exec function within the PHP script it was storing the unneeded output to an away which I believe was causing the memory usage problem. At first I thought I simply needed to modify the memory_limit setting within php.ini however that was not the true issue at hand. Below I describe two items to look at modifying if you run into a similar issue.
Tonight I needed to console into a old Cisco 2900 switch to test a couple password related items and it was the first time that I would be using USB to Serial adapter on my Macbook. Previously there had been a lot of issues with the adapter I have, which is a PL-2303, and getting the right drivers installed on Windows 7 64-bit so I was thinking there might not even be drivers available for OSX Lion. After a little research I cam across an article that purehate had written on QD however after following the instructions in the article the USB to Serial adapter still was not working. Below is information on installing newer drivers that will work on OSX Lion.
Earlier I was transferring some configuration files from an application on a Windows 7 computer to an application on a OSX Lion computer. The location of a file referenced in the configuration files had changed so I needed to update about a hundred different INI files with the new location. Doing this on OSX is very easy using perl as long as you get the syntax correct as it can be tricky if there are multiple quotes and or slashes. Below is a quick example of a perl command used to replace a single line of text in multiple files without having to modify each file individually.
One key that always gets in the way for me on any keyboard I use is the caps lock key. On Windows 7 I use a third party application to disable the caps lock key as noted in this article. On Mac OSX the functionality to disable the caps lock key is built in so it doesn’t require any third party software. Use the information below to disable the caps lock key on your Macbook laptop or other computers running OSX. I believe the functionality to disable the caps lock key was added in OSX 10.4 and I can confirm that it is still available in OSX Lion or OSX 10.7.1.
I recently got a Macbook Pro which is running OSX 10.6 and is the first MAC I have used as my primary computer. Setting it up has been like setting up the first computer I ever setup since I am used to setting up computers running Windows or Linux. Anyhow it has been a great learning experience so look out for a lot more articles related to OSX and Macbooks in the near future. Anyhow the below steps will assist you changing the default application that opens text files from TextEdit or TextEdit.app to TextMate or TextMate.app.