30 June 2008

How to make you Mac sing to you

There's a bunch of useful commands that you can use on Mac OS X's Terminal, but I guess that few are as interesting and funny as "say". Besides using it to have you Mac say anything, you can use the "say" command to play some simple tunes.

For example, paste the following command on Terminal (Mac OS X's console):

say -v Good oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Nice, hum? But it feels a bit boring without lyrics, right? Try the following command then:

osascript -e 'say "oh This is a silly song silly song silly song this is the silliest song ive ever ever heard So why keep you listening listening listening while you are supposed to work to work to work to work its because i hate my job hate my job hate my job its because i hate my job more than anything else No its because youve no life youve no life youve no life and you better go get one after forwarding this crap" using "cellos"'

Wow! :-)

Source: Using Mac

26 June 2008

How to download musics from MySpace using Safari and "wget"

DISCLAIMER: even though the instructions provided in this post may be (mis)used to download copyrighted material, this blog or its author do not support any piracy activities and cannot be held responsible for what others do with the knowledge acquired here. The author disseminates this knowledge with the sole purpose of allowing users to backup musics that MySpace's publishing artists already allow users to download, which is the case in the given example.

MySpace is a great social website that has specialized in providing access to a lot of musical material from musicians around the world. Some of those musicians publish their musics in their profile and even allow downloading them (as you can see in the figure below that shows the music box for Ani DiFranco), but for doing that you have to be logged in to your MySpace account.


But what if you don't have (or don't want to create) a MySpace account? Well, that's what I'm going to show you:

  1. First of all, let me remind you that this can only be done using version 3 of the Safari web browser and a small Unix utility called wget. To install wget in Mac OS X, check here (I tried using Firefox 3 but the Page Info's Media tab (Tools -> Page Info) does not show the necessary files)
  2. So, let's start. On the music box on the musician's profile (in this example, I'll be using Ani DiFranco's profile) click on the music you want to download and let it load entirely (you'll see it loading if the blue thin line is growing in the progress bar of the music player)
  3. Open the Activity window in Safari (Go to Window->Activity)


  4. Search for the file (or files, in case you've already load several songs) with a larger size (around 3 MB - may vary depending on the duration of the song) or you can search for the file with the address having some sort of combination of the words "cache" and "music". Then, double-click it.


  5. Safari will open a new window and will start playing the music that you just selected. If you take a look at the address bar, you'll notice that the URL points out to a complex address of an MP3 file. This is MySpace's cache file for the song you selected and can be downloaded directly.


  6. However, this cannot be done in Safari. If you try using the File->Save Page as... option, you'll notice that it's not enabled. That's where "wget" gets into play.
  7. After installing "wget", the command with the same name will be available on Terminal's prompt. Just copy the URL (until the "mp3" part, as shown in the figure above) and paste it after the command at the Terminal, as you see in the following figure:


  8. This will download the file and will place it in the current directory (In the figure, you can see that I did this in ~/Desktop)
  9. Then, just use the MP3 player of your choice and enjoy! :-)
Final remarks: the cached MP3 file is often of lower quality, so don't expect perfect CD quality whilst listening. Also, the downloaded MP3 file comes with no tagging information, so you'll have to fill in everything on the MP3 management application that you choose.

20 June 2008

How to open PDFs on Firefox 3

I had already posted a tip for viewing PDFs directly on Firefox (on Mac OS X) before but that included using a web service, which had some flaws. Now, for version 3 of Firefox, there's an add-on that uses Mac OS X's PDFKit to view PDFs directly on Firefox. That add-on is firefox-mac-pdf.


Source: Mac OS X Hints

17 June 2008

OS X Terminal commands

Looking for a list of available commands on Mac OS X's Terminal? It's here.



16 June 2008

How to see High-Def trailers on FrontRow

I've talked several times about FrontRow before (here, here and here). I find it to be one of the best applications in Mac OS X, mainly because it is a great multimedia centre for all the content on your Mac.



One of the most interesting aspects of FrontRow is the fact that you can use it to see the latest movie trailers available at Apple. By default, all trailers are displayed in high-definition but with a 480p resolution. But why should you settle for this resolution when Apple provides (most) trailers with a resolution of 720p or higher?

Luckily, there's an easy way to change that setting. Just open Terminal and type the following command:

defaults write com.apple.frontrow TrailerBypass http://www.apple.com/trailers/home/xml/current_720p.xml

Of course, if you have FrontRow running, you have to restart the process. Also, this may not work for all trailers as some may not be available in high-definition.

If you want to reset the definition to the default value, just type the following command on Terminal:

defaults delete com.apple.frontrow TrailerBypass

15 June 2008

Video Tutorials for Mac Newbies

My First Mac has posted a great list of video tutorials for Mac Newbies: 195 Free Mac Video Tutorials - Part 1 and Part 2. It's a great resource for all switchers out there. You can use it to learn (almost) everything about Mac OS X and/or native applications.

5 June 2008

Version Control on your Mac

If you work in software development, you know how important it is to maintain and organise the different versions of a program. There are several different systems that can be used to perform version control. The most well know are Concurrent Versions System (CVS) and Subversion (a.k.a. SVN). I've used both for the last few years and I prefer SVN but CVS works fine too. But now that I've changed to the Mac platform, I had to make sure that this worked as well.


Regarding the client side, if you use Eclipse for your software development then this task has been very simplified. Subclipse is an Eclipse plug-in that brings the SVN functionality to the popular IDE. Check here for a complete tutorial on how to install it.
But if you're looking for a SVN client app instead of a plug-in for a programming environment, then you should take a look at the Portuguese application Versions.

Regarding the server side, if you're looking to deploy a SVN server of your own, check here for a complete tutorial on how to install it on a Mac.

4 June 2008

How to open a terminal path in Finder


Hello, if you liked this post, please consider subscribing my RSS news feed. Thanks.
There are some paths that are not usually accessible thought the Finder. For example, when you open Finder on your Disk root, you don't see folders such as /Volumes/ or /usr/. But usually, they're accessible through Terminal.

But sometimes, it may be handy to access these folders through the Finder as this graphical interface allows to perform some tasks that are not possible (or that are simpler) to do in Terminal.

So, if you ever find yourself in the situation where you're in a Terminal path and you would like to see the corresponding folder in the Finder, run this command:

open .

This command will open a new Finder window with the exact path as in Terminal.


Source: Mac OS Hints