Archive for the ‘tips’ Category
Sunday, February 14th, 2010
Pretty sure this stops TextMate from creating the ridiculous backup files in my network shares.
defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1
Posted in textmate, tips | No Comments »
Tuesday, January 5th, 2010
To get a quick idea of what ports you have open on your local box, you can use nmap.
~ jhaddad$ nmap localhost
Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-05 11:06 PST
Interesting ports on localhost (127.0.0.1):
Not shown: 499 closed ports, 492 filtered ports
PORT STATE SERVICE
80/tcp ...
Posted in apple, linux, tips | 2 Comments »
Friday, December 11th, 2009
I bought a MacBook Air in June this year, refurbished. I didn't really use it a lot for day to day work, and when I didn't use it I was charging it. It was very convenient - it weighs practically nothing and has almost no impact on me ...
Posted in apple, tips | No Comments »
Tuesday, April 21st, 2009
Peeping into memcached.
Really interesting read about how to examine what's stored in memcached.
Peep uses ptrace to freeze a running memcached server, dump the internal key metadata, and return the server to a running state. If you have a good host ejection mechanism in your client, such as in ...
Posted in linux, mysql, tips | No Comments »
Monday, July 7th, 2008
I ran into an issue just now compiling libjpeg on 64 bit CentOS. I found this very helpful post that gives a workaround using a config.guess file from libtool. For some reason, I didn't have the folder he suggested, but I did have the alternative (automake).
cp /usr/share/automake-1.9/config.guess .
cp ...
Posted in linux, tips | No Comments »
Sunday, March 23rd, 2008
I get a kick out of stuff like this. Add this to your .bash_profile to be greeted with the remaining space on your disk.
df -h | awk 'NR==2 {print "Space available " $4}'
This will actually change depending on which version of df you're using (i think). I get ...
Posted in awk, tips, unix | No Comments »
Tuesday, February 26th, 2008
I just bought a 1TB Western Digital drive. I am stoked.
However, I tried to format the drive on my Mac (Leopard) and got the error "File system formatter failed" when I tried to format the disk as MacOS Extended (Journaled). Not cool.
I found this forum thread which suggested ...
Posted in mac, tips | 103 Comments »
Thursday, November 1st, 2007
I ran into an issue trying to get Imagemagick (convert) working on OSX last night. I had compiled libjpeg and installed it, but when I would compile convert, it would not have jpeg support.
I found this post on dzone, which I followed and was able to use libjpeg just ...
Posted in mac, tips | No Comments »
Sunday, July 15th, 2007
I installed CentOS 5 on my VMWare a few days ago. I installed gcc via yum, compiled and installed libxml2. I then tried to install PHP 5.2.3 and received this error:
configure: error: installation or configuration problem: C++ compiler cannot create executables.
It took me forever to figure this out, ...
Posted in linux, php, tips | 2 Comments »
Wednesday, May 30th, 2007
I didn't find any simple ways to determine how hard our mysql database was working, so I whipped this up. It uses a 10 second delay to figure out the queries per second average.
time=10
orig=`mysql -e "show status" | awk '{if ($1 == "Questions") print $2}'`
sleep $time
last=`mysql -e "show status" ...
Posted in mysql, tips | 1 Comment »