Mac OS X – Moving Windows Quick Tip

If your Mac won’t let you move a window because of a dialog or something, but you really want to move the window, just open Spaces and move the window from there! This seems to work every time. Its made working with some poorly developed applications a little easier.

Now if I could just make some dialogs stay in front of the actual application window I would be completely happy!

Mini MP3 Searching Shell – Skreemr

So its way to hard to download an mp3 in Safari. Right click the link and download? Pff, I want to ⌃S and be done with it. Well, this time I decided to avoid the problem all together. I use Skreemr to search for a particular song when it interests me.

In the past I wrote a little bash script, that makes use of curl, to download an mp3 to my desktop unique named so it wouldn’t have conflicts. This shell essentially wraps and drastically improves that to allow for searching, pagination, history, downloading, and opening mp3s off of Skreemr. It gives me just what I need. The functionality that I want without having to use torrents etc. I’m thinking of turning this into a gem.


This script requires the popular “escape.rb” script that gives some nice and safe shell escaping functions. You can download both from my GitHub scripts project.

Of course its available on my ~/bin and there will be another article later on that goes over a few aspects of this simple little script.


Instant Web Sharing on Your Mac

I came across a few articles recently that point out how to instantly share a folder on your computer. They basically ride on top of this elegant python script:

python -m SimpleHTTPServer

It works great but I wanted to improve on it in a number of ways:

  • Automatically copy a URI into my clipboard so I can easily paste it to others.

  • Make that URI nicer then just an IP address.

  • Use a non-standard port, for security.

  • Open in a new tab so I can keep working in the directory and yet still monitor the HTTP requests being made.

Here was what I produced. (Its up in my ~/bin.)

# Start Date: Sunday February 8, 2009
# Current Version: 0.9
# Author: Joseph Pecoraro
# Contact:
# Decription:  Immediately Share the current directory
#   in a new tab so you can monitor the requests made
#   have your original tab to continue working in that
#   directory.  Meant for Mac OS X.
#   1. Echos the URI
#   2. Puts the URI into your Clipboard
#   3. Opens a new tab in the terminal
#   4. Changes Directory to the other tabs directory
#   5. Echos the URI
#   6. Runs the Web Server
#   7. Optionally Opens in Safari
# Sources that Helped:
#   New Tab Here:
#   HTTPServer:
#   Paul Berens:

# -----------------
#   Host and Port
# -----------------

# This gets your ip address and converts it to a nice string
es_host=$(curl --silent
es_host=$(nslookup $es_host | awk '/name =/{print substr($4,1,length($4)-1)}')

# -----------------
#   Script Below
# -----------------

echo "http://$es_host:$es_port"
echo -n "http://$es_host:$es_port" | pbcopy
osascript -e "
Tell application \"Terminal\"
  tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down
  do script with command \"cd '$(pwd)'\" in selected tab of the front window
  do script with command \"clear; echo '$es_host:$es_port/'\" in selected tab of the front window
  do script with command \"python -m SimpleHTTPServer $es_port\" in selected tab of the front window
end tell" &> /dev/null

# Optional: Open Safari, Just Uncomment the next line
# open "http://$es_host:$es_port"

# Cleanup
unset es_host
unset es_port

Now that should work on any Mac. And it should give a nicer URL then an ugly IP address. You should see something like this:


As soon as it starts you can paste the URL to anyone you’re chatting with. It couldn’t be simpler!

If you’re experienced enough with DNS servers and you’ve given your computer a Dynamic Name you can customize the script. Paul Berens gave me a great suggestion to determine if I’m on my local network at home. I can check the MAC address of my default gateway (my wireless router). That is a quick check to see if I’m at home. If I’m at home I use my URI automatically! Otherwise it defaults to generating the dynamic address generation. Check it out:

# -----------------
#   Host and Port
# -----------------

# Mac Address of my Router At Home
if [ -n "$(arp -a | grep 0:1e:2a:76:17:98)" ]; then
# Otherwise Dynamically Determine
  es_host=$(curl --silent
  es_host=$(nslookup $es_host | awk '/name =/{print substr($4,1,length($4)-1)}')

So now when I run easy_share at my house it always throws out URIs. Much nicer on the eyes and easy to remember. I’ll write about dynamic names like this another time!

Spaces, Exposé, Hot Corners, Dashboard Broken?

I ferociously make use of Spaces and Exposé. To utilize them I use QuickSilver, Cmd+Tab, the Dock, special Mouse Buttons, but most of all I use the Hot Corners! Occasionally, when I wake my Mac Book Pro these features won’t work. No reason given, just when I try I get the usual chime meaning “this can’t be done.” At the time the only sure solution was to reboot the computer. Not anymore. Just open up your terminal and run:

killall Dock

Since those major features (Spaces, Exposé, and the Dashboard) are tied to the Dock, this command will restart the Dock and, like magic, those features will work again. Killing the Dock and even Finder with `killall` are special cases. Those two will automatically restart on their own. However, for other programs, it will just quit. For instance if Firefox hangs you could type `killall Firefox` and Firefox would be force quit but would not reopen. Check the man page for more information.

5 Useful Mac Apps

I’ll admit it, I am a big fan of applications and an even bigger fan of Mac OS X applications. I even spent months researching which applications I would download and purchase even before I got my MacBook Pro (I’m thinking especially of TextMate).

This article is going not going to recommend the usual list of applications that you find being recommended like QuickSilver or TextMate. Instead I’m going to recommend those applications that I didn’t really hear of before I found them by luck. All 5 of these I use very often and I love them. They are not ordered from best to worst, that would be impossible given the different purposes and different areas that these apps address.

In the words of Bryan Hansen, the developer of Jolt (the first app I list):

The biggest problem for mac apps like this is getting the word out that they even exist.

Here are the players:

1 – Jolt – Bryan Hansen – Free or $5 donation
Jolt Icon
Jolt is a beautiful tool for all laptop users. Its goal is to temporarily prevent the power saving dim that we all experience. You might be watching a video or reading a long article and your Mac will interrupt you by dimming. This simple program solves that problem without interrupting your workflow at all.

The interface is strikingly simple. It sits in your menu bar and with a simple click it will activate. It defaults to 5 minutes but you can set multiple levels from 3 minutes to forever. To access its preference just right click the icon. I found this app useful just a few hours after I downloading it.

2 – cd to – Jay Tuley – Free
I’m a developer who really loves the terminal. I write Ruby/Perl scripts all the time. I have a terminal open 150% of the time I’m on my laptop (that means I have on average 1.5 terminals running at all times).
cd to icon
Seeing that I do so much in the terminal, Jay’s Finder Application is a godsend. Again, a perfectly simple interface, “cd to” is just a button you can place on the Finder’s toolbar. Right now it’s look and feel is just like Mac OS X 10.4 Tiger’s Finder window, but it fits in just fine on my Leopard Finder’s toolbar. With just a click it opens up the Terminal, changes directory to the current directory the Finder was in, and clears the screen so you have a fresh terminal. How awesome is that!? If you can’t think of how much time this will save you, then this isn’t the application for you. But, if you’re sitting there and already struggled this very day trying to find the current path to a directory in one of your Finder windows download this tiny app and struggle again.

3 – Desktoptopia – Desktoptopia Team – Now Free!
I am passionate about my desktop wallpaper. Until I bought Desktoptopia I would spend hours (it makes me cringe thinking about it) looking for that perfect wallpaper on my Windows laptop. Well, now I just click the menubar icon and in seconds I’ll have a really great wallpaper downloaded and set for me. This small investment has been a huge time saver and therefore a very smart purchase for me. You can freely check out most of my wallpapers for the last six months, I am proud of all of them:
my desktoptopia wallpaper

The interface for Desktoptopia is again very simple (seeing a trend with these great apps?). It is a preference pane where you can set general settings to choose the categories of wallpapers and if you want you can have your background change every few minutes. You can enable a menubar icon from which you can choose “Next Background,” rate the background (1-5 stars), and even visit the artists website.

In case anyone is interested the Wallpapers all download to ~/Library/Application Support/Desktoptopia/.Backgrounds/ so you will always have a hard copy. Still many of these wallpapers are submitted by users and so I would be hesitant about freely spreading the Wallpapers without the artist’s permission.

4 – Skitch – plasq – Free (Beta, if invites are not immediate then just leave a comment)
Skitch is simply phenominal at what it does. Skitch takes screenshots using crosshairs, fullscreen shots, iSight pics, simple but useful and fast editing like arrows and text, the list really goes on and on. Those are normally just the basic run of the mill features of image editors but Skitch makes it dead simple. Thats not even close to the good part.
skitch logo

The highlight of Skitch is the fact that it comes with your very own myskitch account. When you sign up with Skitch (very simple) you are given webspace to store your images. The desktop application, again a phenominal interface from the menubar, has a single button you can click that uploads (“web posts”) your image to your myskitch page. From there you can distribute that image freely, share it with friends, make it public, allow people to comment, or use them on your webpage like I do.

The superfast drag-and-drop feature to “Save” the image is integrated right into Skitch’s window design. To give the image a nice name and choose the format (jpg, png…) you don’t even have to open up a dialog box! Its almost too simple and intuitive. There is also a robust history, insanely easy cropping and resizing images, the list of feature just keeps going on and on.

You won’t believe me if you don’t try it yourself. This is one of the few apps I could have really benefited from having on a Windows machine but no such app existed. Lets just say that this little gem has seriously altered and improved my workflow in more ways then one.

5 – TextExpander – Smile on my mac – Free (Donationware)
This slogan is so true it actually isn’t funny:

If you’re not using it, you’re wasting time.

TextExpander example
Since downloading TextExpander I have grown so accustomed to having a shortcut type out my name that when I had to use a Windows computer the other day I had difficulty typing my name. This is not a bad thing, instead it is proof that this little program does what it does so well that I count on it, I depend on it, and it rewards me by making me smile every time I use it and hear the little chime of saving time and keystrokes. (run-on sentence?)

TextExpander makes a short snipper of text like typing “nname” expand to “Joseph Pecoraro” or “bjcom” expand to “”. I have a bunch of snippets for personal things but the most common have to be your name, address, phone, already prepped and ready to go once installed. Adding snippets is a breeze, and to top things off TextExpander even keeps stats on how many characters and how much time it has saved you. I have used just about 700 snippets, expanding to about 7,000 characters saving me about 2 hours worth of typing at 100 Words Per Minute. I can now no longer misspell “tomorrow” (because I just did and I had a snippet fix it for me).

So there you have it. 5 apps that you can use today that I think will directly impact your relationship with your computer. They will make certain things simpler, make you happier, and finally you will be more productive. Enjoy.

My MacBook Pro

This post is just letting some steam out, so there is a lot of text and a lot of links, all because I recently made a very worthwhile purchase. I bought a brand new MacBook Pro laptop and I am more then happy. I didn’t really know what to expect, I was really looking forward to it… however it has exceeded all of my expectations.

The quick specs are that its a Silver MBP with a 15.4in glossy widescreen display with the newest LED back-lightning. It houses a 2GB of RAM and an Intel Core 2 Duo that knock the socks of my previous 512/1.6 laptop. The software takes a larger explanation.

I had originally planned on holding out on buying a Mac until Leopard was released. My plans were pushing forward when I won a bundle of applications valued at more then $500 from MacUpdate and MacHeist. However I had been looking at software to download for weeks before my purchase and the list of free, high quality software is nearly endless. Still, there are always programs you have to splurge on.

I splurged on TextMate, a programming editor that translates into about $55. Its the single tool that I have heard the most about from web developers all around the world. I have to agree with the masses, its a fantastic editor that is grows more and more useful as I get acquainted with the Mac.

On the free end of things I have to mention QuickSilver. I might argue that every Mac user has at least heard of QS as its popularity is nearly as high as that of TextMate. I really appreciate this little app as it really does just make my life easier. It took a few minutes to setup these global triggers for iTunes: ?P to pause/play and ??? to go to the next song. That means from nearly anywhere those key combinations will trigger iTunes. I’m learning more as I go but QS is useful in more ways than one.

For Instant Messaging I thought I would like iChat. I thought it was okay, it certainly was easy to setup and worked great, however it just wasn’t up to my standards. I had heard about a Adium and decided to give it a try. That is an amazing IM program. There are plenty of great themes and almost everything is customizable. Its and incredible chat client that easily synced with my Google Talk account (the only Windows chat client I am willing to use).

However my favorite application so far has been Linkinus. That program has completely revolutionized IRC for me. Chatting in Linkinus is just fun. Its a work in progress and I plan to help out with the development. I am working on scripts, which require me to learn AppleScript, but it is worth it.

A worthy app to mention is Growl. You don’t realize how useful a standard messaging system is until you have used one. Almost every application I have can interface into Growl and therefore I have awesome standard notifications. Just typing this I got a notification that someone logged on Adium!! brb.

Looking for a really nice free RSS reader? Check out NetNewsWire Lite! RSS is fundamental when you are as busy as I am (which I expect you are). Have your news come to you, and link yourself back if you deem the article worthy of a visit. Most of the time I read it all in the RSS reader to save even more time. I sift through about 100 RSS articles each day, some are duplicates and many are short but I’d say that there are at least 5 full articles that I will read. They come from blogs and news sources alike, I currently subscribe to over 70 different feeds.

Common apps like iTunes and Firefox are obvious must haves. Although I will admit that I am interested in safari and I will likely give it a try for just common browsing (as it lacks many of the web development plugins that I have in Firefox). Photo Booth makes excellent use of the built in web cam aptly named the iSight that comes equipped on every MacBook Pro laptop. My recently engaged sister and said counter-part were kind enough to sit in front of my Mac for some pictures in Photo Booth. Half an hour later I was able to find a few serious pictures and I sifted thru another 30 or so pictures with various effects to get a group of pictures to put on my family website.

Now the beta apps. I am excited to try out Flow and I was able to sign up for the private beta, however I have not gotten any response yet. I did meet a nice contact chatting on Linkinus and got ahold of a the Skitch beta. Now Skitch is a really cool tool. I can take a picture of a section on my screen, add some quick features like (text, arrows, etc.) in seconds. That is impressive coming from the mspaint.exe experience, however it is not nearly Skitch’s coolest point. There is a drag and drop portion on the bottom of the app to allow you to quickly make a file in the most common picture formats (png, jpg, gif…). To top things off when you sign up for a Skitch account you are given a profile online. A single button on Skitch uploads the image to your Skitch site storage. That same button can then take you directly to the online image, some more single click buttons will copy the image location or xhtml compatible code and allow you to share the image with anyone in the world. You will be able to do all of this just by watching the 3 minute video included with the download. Skitch is a fantastic app! I’ve got some invites if anyone is really interested I might give one away.

Being a web developer its useful to have a local web server to test your work on. Although I manually installed everything I need to do Ruby on Rails development (ruby, rubygems, mysql, mongrel, and svn) I also downloaded a nice app to make things easy for myself. MAMP stands for Macintosh, Apache, Mysql and PHP and it is just plain simple. MAMP (like Easy PHP for Windows) is a completely isolated webserver with php and mysql. You can be sure that nothing else on your computer will be affected, for instance if you have another mysql database running. A great dashboard that even has phpMyAdmin. I made a few modifications to the default pages to add a quicklink to quickly accesses my web directories, but MAMP’s ease of use is much appreciated. A simple click to turn on/off… what more would I want?

SRS iWoW is an iTunes plugin that adds Three-Dimensional sound. I got it with the plugin but it a very cool plugin. Its enhancements to iTunes’ sound are immediately noticeable and gratifying. Simple to setup and customize you can have some real high quality sound. To be honest you won’t notice the difference until you try it, but once you do you will gasp at the difference.

I have a bunch more that I can write but I am going to finish now and hopefully finish working on my other website so that I can launch it! Goodbye for now.