Trim an MP3 on your Mac

trim mp3

You can trim any MP3 file for free in Mac OS X thanks to QuickTime Player. Here’s how:

  • Make a copy of the MP3 file you want to trim
  • Open the MP3 file with QuickTime Player
  • Hit Command+T to open the Trim function
  • Drag the yellow sliders on the left and right side to trim down the section of the song to where you want
  • When you’re finished, click the yellow ‘Trim’ button
  • Go to File -> Save As and save as an iPhone .m4v movie file

Play PAL movies at correct speed in VLC

ave you been annoyed by PAL-encoded movies playing a little faster than usual, where the music's tempo is wrong and everyone talks a little faster?

you have VLC, here's how to fix it:

  • Open VLC.
  • Go to the 'VLC' menu and select 'Preferences…'
  • In the radio buttons in the lower-left corner of the window, change 'Basic' to 'All'.
  • Click on 'Input / Codecs' in the left-hand side list.
  • In the right-hand side frame look for 'Playback speed' and change it to 0.96 (use a comma if your system uses that as the decimal separator).
  • Click on 'Audio' in the left-hand side list.
  • In the right-hand side frame disable 'Enable time stretching audio'.
  • Click the 'Save' button on the lower-right corner of the window.
  • Quit and relaunch VLC.

Use Hotmail on the iPhone

If you use a Hotmail account, you’ll be happy to hear that you can now use your Hotmail account on your iPhone thanks to Microsoft enabling Exchange ActiveSync support. This allows Hotmail to push and sync email, calendar, and contacts to your iPhone.

Set up Hotmail on the iPhone

Here are the steps to setup Hotmail to sync and push to your iPhone (this works on the iPad too):

  • Launch Settings
  • Tap on “Mail, Contacts, Calendar”
  • Tap onto “Add Account”
  • Select “Microsoft Exchange”
  • Enter your full Hotmail email address into both the Email and Username fields
  • Leave Domain blank
  • Enter your password
  • Enter “Hotmail” as the Description
  • Tap onto “Next”
  • Now you must enter the server, use “m.hotmail.com” for the Server name then tap onto “Next”
  • The iPhone will now verify that your Hotmail information is entered correctly, the next screen you’ll be able to enable Mail, Contacts, and Calendars

Hotmail is the original web mail, so it’s not surprise there’s still millions of hotmail accounts still in use today despite the competing offers from Google, Yahoo, and others. It’s a bit surprising it took Microsoft this long to get Hotmail working with the iPhone, but better late than never.

Set IP Address from the Mac Command Line

The quickest way to set your IP address from the command line is to issue the following command in the Terminal:
sudo ipconfig set en1 DHCP
This will renew your DHCP lease and you will be issued a new IP address from the DHCP server. FYI: en1 is generally wireless/airport, en0 is generally ethernet.

You can check that the IP is set by getting your current IP address from the command line with:
ipconfig getifaddr en1
Doing this before and after will insure you have a new IP.

You can specify an IP address to set via the command line with the following:
sudo ipconfig set en1 INFORM 192.168.0.150

You can also get a new IP address from a DHCP server by bringing down the interface and starting it back up again:
sudo ifconfig en1 down ; sudo ifconfig en1 up

Note: for whatever reason, when you are setting the IP address manually via the command line the Mac OS X Network Preferences doesn’t necessarily catch up to the changes. Do not be surprised if the Network preference pane is telling you that you “Airport does not have an IP address and cannot connect to the Internet.” when in fact, you do have one and you are online. You can verify that you are connected to the LAN or internet by using the ping command.

Good command line usage habits and tips

If you use the command line frequently, chances are you may have some bad command line habits. IBM’s DeveloperWorks site has posted 10 good UNIX usage habit tips, some of them are just pretty handy tricks in general and if you’re new to the Mac OS X Terminal, you’ll probably learn something since practically all of them work within the Mac OS X command line. Here’s one of my personal favorites since it hit home with my command line activities:

* Change the path to unpack something into rather than moving the archive file itself, in this example by using the -C flag with the tar command:

tar xvf -C path/to/unpack newarc.tar.gz

I’m certainly guilty of moving archives around, but that’s partially because I like to keep all of them in a central location. But if you’re going to just delete the archive anyway, there’s no point in moving the archive file around just to unpack it. Save yourself the keystrokes.

Here’s the full list of tips in the IBM DeveloperWorks article:

  • Make directory trees in a single swipe
  • Change the path; do not move the archive
  • Combine your commands with control operators
  • Quote variables with caution
  • Use escape sequences to manage long input
  • Group your commands together in a list
  • Use xargs outside of find
  • Know when grep should do the counting — and when it should step aside
  • Match certain fields in output, not just lines
  • Stop piping cats

Check them out: IBM DeveloperWorks: Learn 10 good UNIX usage habits

Sudo without Passwords

Sudo is well known for its ability to provide very limited scope superuser privileges to otherwise normal users on Unix systems. Thus the name "sudo" (for "superuser do"). Users who run commands with sudo generally have to enter their own passwords to confirm their identities before sudo will run the commands with the authority of root. But this doesn’t always have to be the case. Let’s take a look at what you have to do to configure exceptions to this behavior. How do you allow a particular user to run a particular command via sudo without having to enter a password?

First, why might you want to do this? Well, you might want to put a sudo command in a script. If you do, you could send the password to sudo with an "echo password | sudo -S command" type of construct, but putting passwords in scripts is generally frowned on by the security-conscious admins among us.

Instead, you could configure the account that will run the script to not required to supply a password for the particular command. Let’s look at an example.

Say your user’s username is "squarepants" and you wanted him to be able to share and unshare a particular directory on a server. You might add these lines to your sudoers file:

# Allow specific users to share and unshare reports
squarepants ALL=NOPASSWD:/usr/sbin/share /var/data/reports
squarepants ALL=NOPASSWD:/usr/sbin/unshare /var/data/reports

If squarepants uses the share or unshare command for the /var/data/reports directory, he will not be prompted for a password, but for any other directory, he will both be asked for a password and be denied.

$ sudo unshare /var/data/reports
$ share
-               /var/data/reports
$ sudo share /var/data/logs
Sorry, user squarepants is not allowed to execute ’/usr/sbin/share /var/data/logs’ as root
on server1.

If your users are going to share and unshare on the command line, they won’t need to run the commands without a password, but if they’re going to include these commands in a script, removing the need to supply a password is actually a safer and better option than putting the password in the script.

Launch Mac VNC Screen Sharing client from Safari or Finder

launch VNC from safari

Did you know that you can quickly launch Mac OS X’s built in VNC program called Screen Sharing, just by typing an address into the URL bar of Safari?

In Safari, hit Command+L to go to the URL bar and type: vnc://
Hit Return and Screen Sharing will launch immediately. If you specified an IP address it will open to that host immediately, otherwise a window will pop up asking you for the VNC Host address.
screen sharing in Mac OS X

Where is the Mac VNC client located anyway?

You may have noticed that if you try to do a Spotlight search for Screen Sharing it won’t show up, this is because it’s located within the System directory CoreServices:
/System/Library/CoreServices/Screen Sharing.app/
Accessing Screen Sharing can be done either through Safari as mentioned above, or from the Finder by hitting Command+K and typing vnc://

How to Improve iPhone Battery Life

The iPhone battery is designed to provide a significant amount of talk time, internet/app use, and data consumption. By using the phone properly and customizing a few settings you can dramatically improve how long your iPhone battery lasts.

Read More...

-->