• Which process at which port?

    I came back to the computer earlier today and found one of my servers to be unresponsive. The front-end of one of my bittorrent hosting boxes did not load so I tried some of the other websites hosted on the same box. None were loading.

    Luckily accessing via SSH worked fine and revealed that Apache had died for unknown reasons at some point from yesterday onwards. Trying to start Apache was not possible since it could not bind to the socket at port 80. I had already checked for any remaining PIDs from the previous httpd process, so I started worrying about a possible intrusion or some root-kit binding to port 80 instead of Apache.

    I started running netstat to reveal the listening ports but unfortunately the process information field was empty for this particular process in question. A quick search showed how lsof could also be used to display the name and pid of the listening process on any port number. In my case I typed:

    lsof -i :80

    This displayed a couple of known Python orphaned processes that belonged to the original and defunct httpd process. Once killed Apache was started with no issues.

    After all, nothing dramatic!

  • Remove white border on images in WP

    When posting last time I realised my example images had a little white border around them. For other occasions it may have been nice but this time I needed it without any borders.

    Another example below, left with white border and right with no border:

    test image test image

    To remove that automatically added border when you submit your post using WordPress do the following:

    1. Open your post for editing.
    2. Click on the image in question and select the Edit Image option.
    3. Click on the Advanced Settings tab on the top.
    4. Insert a 0 (zero digit) in the Border field under Image Properties.
    5. Save.

    Pretty simple stuff but thought I would share it in case someone else was looking for a remedy.

  • Rounded corners online tool

    Lately I have been working on improving my consultancy’s website towards a more showcase based look’n’feel. I had to post a photo of myself so I first decided to use my Gravatar image. As you can see below it looked a bit dull with square corners, so instead I changed the photo to round corners:

    Indeed nicer, no? Gravatar should definitely offer rounded corners as an optional feature.

    Thanks goes to RoundPic for providing an easy way of quickly rounding the corners of any photo or image.

  • Find a Windows Vista MAC Address

    Yesterday eve I had to add a laptop to my network which is using MAC address filtering. The laptop ran Windows Vista and I tried to locate its MAC address by using the good old ipconfig within a command prompt. This gave no results as apparently the network details only get listed once an actual network connection is made. As you probably have realised this is a catch-22 situation as without the MAC address registered on the router I was never going to make a network connection in the first place…!

    Actually the weird thing is that the MAC address is normally on a sticker on the bottom of laptops, but in this case there was no such sticker.

    Google as in most other cases provided a quick fix by pointing me in the right direction. There is a command specifically for this task named funnily enough: getmac.

  • <code> vs. <pre> in WordPress editor

    Writing my earlier post about the textarea issue I initially ended up with a funny looking post. It was due to the examples of HTML code included in the post not being parsed properly. Apparently I had been writing my post in HMTL mode instead of Visual mode and all the HTML code was parsed as “real” code.

    The code was wrapped in <code> tags, instead of the usual <pre> tags which keeps the code looking as expected.

    If you are neither certain of the exact uses of each of these two tags I suggest you read this documentation page for a quick overview of the differences along with other usage hints.