Adding Spaces To Your OS X Dock

Adding spaces in your Dock on OS X is a nice feature that allows you to bring a little bit of visual organization to your icons. It is really easy to accomplish in just a couple short steps. First, you will want to locate your Terminal application. Terminal can be found at Applications > Utilities > Terminal. Or, for a little shortcut, you can hit Command + Space on your keyboard. This will being up Spotlight and you can then type in Terminal (or the name of any other application you wish to find) and it will show it up in a list below the search input.

With a Terminal shell open, copy the command below, paste it in and hit return:

[code language=”bash”]
defaults write com.apple.dock persistent-apps -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’
[/code]

Continue reading “Adding Spaces To Your OS X Dock”

Secure Copy Syntax Examples

Secure Copy (SCP) is a means of securely transferring files between hosts on a network. It is based on the Secure Shell (SSH) protocol. The command line scp program, which is provided in most SSH implementations, is the secure analog of the rcp command.

The syntax for scp is typically similar to that of the cp command.

Examples

Copying from a remote host to your local host:

[code language=bash]
# Copy a file
scp username@remotehost.com:sourcefile.txt /path/to/local/targetfile

# Copy a directory
scp -r username@remotehost.com:sourcefolder /path/to/local/targetfolder
[/code]

Continue reading “Secure Copy Syntax Examples”

Super Fast Find and Replace with Sed

Sed is a UNIX stream editor that can be used to filter text files. This can be extremely useful if you have to run a Find and Replace on a string of text across a large file. I find this to be much more efficient than using a Find and Replace feature in a text editor. It is much faster (especially on very large files) and you can let it run in a separate Terminal tab without holding up your workflow.

Continue reading “Super Fast Find and Replace with Sed”

Viewing Apache Logs with Tail and Grep

As a developer, there may be times when you need to monitor what is happening on an Apache server as live HTTP requests are coming in from a web page. In a UNIX environment, you can actually accomplish this quite painlessly through the command line, using the tail and grep commands. Tail is a command which outputs the last part of a file and the grep utility is used for pattern matching.

First, you will want to locate your Apache logs and cd into that directory. If you are running a local server through MAMP, you can most likely find them in the application folder.

[code language=bash]
cd /Applications/MAMP/logs
[/code]

Continue reading “Viewing Apache Logs with Tail and Grep”

WordPress Post Revisions

As of version 2.6, WordPress introduced a feature which autosaves your posts as revisions while you are editing them in the dashboard. While this functionality can be very useful, it can also be a bit of an annoyance. If a single post ends up going through multiple edits or simply takes a while to get finished, those revisions can add up. I personally don’t see the need to have billions upon billions (ok, slight exaggeration) of revisions saved for every one of my posts. Additionally, that is just extra information that is getting stored in your database, which you may not need. Disabling this feature or limiting the amount of allowed revisions (which is what I opted for) is actually quite simple. It only takes one line of code in your wp-config.php file.

[code language=bash]
/** Disables WordPress automatic post revisions. **/
define(‘WP_POST_REVISIONS’, false);

/** Limits revisions to specified number (second parameter). **/
define(‘WP_POST_REVISIONS’, 5);
[/code]

Continue reading “WordPress Post Revisions”

Must-Have Mac Apps

Recently a few of my friends have made the switch from using a PC to a Mac for their primary workstation. One of the first things people want to know when making that switch is what applications are available that would help them achieve the most optimal user experience on their new operating system. Since this is such a common concern and one of the first things I would want to know as well, I have decided to post a quick list of my current, personal favorites. These are apps that I typically run through and install right away when setting up a new workstation because they have become such a major part of my daily workflow.

Considering that I am a web developer, some of these listed will apply specifically to my craft and may not quite as be useful to someone outside the field. I, however, have also listed many general-purpose apps that any Mac user may find quite useful.

Continue reading “Must-Have Mac Apps”

A Procrastinated Start

When I went back to school to get my degree in web design, during my final term in the Usability class we were required to write a certain number of weekly, usability-related blog posts. I really enjoyed this part of the class. It was at that time that I decided I really wanted to add a blog to my website, as opposed to using it strictly as a portfolio. It seemed like a lot of the designers and developers that I look up to had blog-based personal sites where they share information and ideas about the latest in the tech industry. In addition to really enjoying the writing part, it seemed like it could be something that would add a nice personal touch to my site. I really liked the idea of having a place where I would be able to share my thoughts but, even more than that, I really wanted a good way to process and share all of the new information that I was (and still am) continuously learning as I strive to become better at what I do.

Continue reading “A Procrastinated Start”