Tec(h)tonic

Insights into building a solid I.T. foundation in the mid-size business world.

Category: How To

  • Split a string into an array based on a character

    var foo = “09/22/2011”; var arr = foo.split(“/”); document.write(arr[0]+”<br>”) document.write(arr[1]+”<br>”)document.write(arr[2])

  • Testing an external mail server

    There are times when I need to test the basic functionality of an external mail server (i.e. one I don’t control). Here’s a step-by-step process to perform some basic testing using telnet: Telnet to the remote server: telnet <server> 25 If it replies, you should get a response like: Trying <server>… Connected to <FQDN>. Escape character…

  • Delete empty directories in *nix

    find <directoryPath> -type d -empty | xargs rmdir Or, alternatively: find <directoryPath> -empty -type d -delete (note that the -delete option implies -depth)