my name is michael ciccarelli and i'm a web designer & developer out of buffalo, ny. currently available for freelance and other opportunities.

Archive for 2008

Hacking iTunes

| no comments

article

I’ve recently picked up a few iPhone/iTunes tricks that I’d like to share with those of you that would like to do the following:

Creating Custom Ring Tones with iTunes only

Using the instructions in this article I can now take any DRM free music (MP3s) from my computer and convert them into perfect quality ring tones without paying iTunes $1. Not that I’m cheap or anything but it’s nice to be able to create ring tones from any song you’d like and not be limited to the few songs iTunes offers as ring tones.

In short what your doing is clipping the song down to 30 seconds or less, converting the .MP3 into iTune’s AAC format (.m4a) then renaming the file extension .m4r so iTunes recognizes the media as a ring tone. It’s really quite simple, and only takes a couple of minutes.

Synchronizing your iPhone with multiple iTunes Libraries/Computers

sync-warning

In my opinion this should be an option to any iPhone owner. I understand why Apple designed it this way, so you can’t just plug in your iPhone to any library and steal other peoples music, but what if you have 2 computers of your own, both sharing a library on an external HD on your own network? I’m sure there are a ton of other scenarios where people would want to synchronize their iPhones with multiple PCs and not lose the data from their device.

Thanks to this article I can now sync all my Contacts and iCal with my Macbook, while I control which music I want on my iPhone using my desktop PC. Basically I changed the library ID on my PC to match the library ID of my Macbook so iTunes thinks it’s the same library each time I synchronize. Just be careful with these steps, you could very easily mess things up.

Synchronizing Blackberry with Mac OS X

| 1 comment

article

I’ve been using a Blackberry for some time now, longer than I’ve owned my Macbook. Originally I was always under the impression that there was no way to Sync my Blackberry contacts and calendar with Apple’s iCal and Address Book, without purchasing additional software. So I was content on syncing my Blackberry data with Outlook on my Windows PC, then to my Gmail account in order to get this data to my Macbook. It was a pain in the ass so I never did it much. Typically just used my Blackberry device as my main source for everything and periodically would sync with my PC as a means of backing up in case something was to happen to my device.

Anyways I recently found a simple and free solution to Synchronize my Blackberry user data with OS X’s iCal, Address Book and StickiesNotes. It’s called Pocketmac.

 

A quick tutorial

If you need me to hold your hand through the steps
 

My setup

  1. First Download: Pocketmac and install it (you will need to reboot).
  2. Open up Pocketmac and attach your Blackberry device via USB to your Mac.
  3. Run through each tab representing your Blackberry user data (Contacts, Calender etc.) and check the desired OS X application you wish to sync with.
  4. Once you got everything checked, proceed to the giant green “Sync” button to the top right and click.
  5. That should do it, give it a few minutes to synchronize everything, and then confirm all of your user data made it from your Blackberry to your designated OS X app.

and heres a little doodle for the lazy, non-readers…

Fix pagination on query_posts()

| 55 comments

article

Here is a simple solution for those of you looking to customize your WordPress theme, to use the WordPress query_posts() function to retrieve your blog posts rather than the standard loop.

I created a custom Page Template named “Blog” using query_posts() and assigned this template to be used on a designated Blog page within my site at http://michaelciccarelli.com/blog/ (a Blog within a Blog even). I did this mainly because my original homepage didn’t really resemble a traditional blog and I wanted something more than just your average archives page that only lists the titles of all your previous blog posts.

So here’s my Blog Page Template’s Source Code:


<?php
/*
Template Name: Blog page
*/
?>
<?php get_header(); ?>
<div id="content">
  <div id="primary">
    <?php
    $limit = get_option('posts_per_page');
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('showposts=' . $limit . '&paged=' . $paged .'&cat=-166,-167,-168');
    $wp_query->is_archive = true; $wp_query->is_home = false;
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="blog-post" id="post-<?php the_ID(); ?>">
      <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
      <div class="post-entry">
          <?php the_content(__('Read the rest of this entry &raquo;')); ?>
      </div>
    </div><!-- /post -->
    <?php endwhile; ?>

    <!-- Page Navigation -->
    <?php if (function_exists('wp_pagenavi')) : ?>
    <div class="pagenavi">
        <?php wp_pagenavi(); ?>
    </div>
    <?php else : // Use WordPress default page navigation. ?>
    <div class="pages">
        <span class="older"><?php next_posts_link('&laquo; Older Entries'); ?></span>
        <span class="newer"><?php previous_posts_link('Newer Entries &raquo;'); ?></span>
    </div>
    <?php endif; ?>
    <?php else : ?>
    <div class="blog-post">
        <h2 class="post-title"><?php _e('404 - Not Found'); ?></h2>
        <div class="post-entry">
          <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
          </div>
  </div>
  <?php endif; ?>
      </div>
      <?php get_sidebar(); ?>
</div><!-- content -->
<span class="clr"></span>
<?php get_footer(); ?>

Notes:

The only bit you may want to alter in the function that retrieves your posts is the 3rd line in from top:query_posts('showposts=' . $limit . '&paged=' . $paged .'&cat=-166,-167,-168');

Notice the &cat=-166,-167,-168 this basically says exclude the following category IDs, which in my case are portfolio categories, that I don’t want to display in my blog section. This parameter is more commonly used like cat=1,3,5 which will only return posts from those categories.

$limit is assigned the ‘posts_per_page’ option from your WordPress settings, this stopped working for me for some reason but not a big deal because it can be changed to something specific, like: $limit = 20;


$wp_query->is_archive = true;
$wp_query->is_home = false;

These variables that come after the query_posts() are important as they force posts_nav_link() (and so pagination) to work, along with a few other helpful results gained for fooling WordPress into thinking we’re in the archive pages.

For the $paged stuff, see: this support forum postSource [via WordPress Support]

XP stuck in Safe Mode

| 1 comment

link

Some guy I work with brought in his home computer for repair that was absolutely taken over by spyware. Normally I don’t mind taking a look at friend and co-worker’s home computer for free, because usually it takes very little effort to clean up things, but this one I wish I wouldn’t have even touched.

It was a Dell Dimension 8110 that was so infected, it couldn’t even detect a USB drive so I could load some anti-virus software or establish an internet connection, even in safe mode. So I pulled out the HD to hookup to another machine to scan as a slave drive, it found a bunch of viruses and “repaired” about 50 problems. So I was hopeful that maybe it was in better shape to at least get some software installed. I installed the HD back into the Dell, to find out the Dell machine no longer could detect the Primary Disk 0 (hard disk). I tried severally different things, swapping out the IDE cable, making sure the jumper settings were correct, I even went as far as trying a different HD, no luck. So it led me to believe that maybe the IDE controller on the board was toast, I did some research and apparently it’s a pretty common problem and the only solution I found was to “wait it out, it will eventually start detecting the primary disk again”. I thought that was funny, so I pulled out everything from the board, and let it just hang out on my desk overnight. I came in the next day, put everything back together and it boots, no problem. Finds the HD and loads right up! unfortunately it was still taken over by spyware to a point where I decided to reinstall Windows.

Windows XP stuck in Safe Mode
This was where i ran into my biggest problem, while troubleshooting I had went into msconfig (Start -> Run -> “msconfig”) within the BOOT.INI tab and checked the /SAFEBOOT option under Boot Options, which basically sets the system to boot in safe mode without jamming on your F8 key while your system is booting. Problem was I never removed this option when I decided to re-install Windows. I came to find out, that although you completely reinstall XP it somehow keeps the bootcfg in memory and uses the options set in your previous installation.

So at the finally steps of the XP installation where your machine reboots and you are asked to set the language and all those settings, it would come to a halt and say “Windows XP Setup cannot run under safemode. Setup will restart now.” Which doesn’t really give you many options because this will happen each time you try to boot from your HD, since the XP installation is only partially complete.

Solution: change bootcfg options from Recovery Console

  1. boot from the XP CD and into the recovery console.
  2. Once you chose the number OS you want to repiar (usually 1) type in this command: bootcfg /list to see what was going on in the bootcfg.
  3. Then enter the command bootcfg /rebuild and reenter the necessary info. If you’ve never done this, first you select the Windows installation to use and enter the corresponding number (default is “1″). Then it asks you to enter the load identifier. (Microsoft Windows XP Professional).
  4. Finally, it will prompt you for the OS load options. Here you would type in:
    /noexecute=optin /fastdetect“(without the quotes). Restarted the machine, and the setup continued normally.

Right now I’m reinstalling all his Dell drivers and migrating all his Documents and Settings back to the new installation. It’s been a nightmare with this Dell, and this guy is probably missing his computer, but at least it didn’t cost him anything and now I know that the bootcfg does not get reset during a fresh installation of XP.

Insufficient access privileges

| 2 comments

link

After recovering my Macbook Pro using the OS X Archive and Install. I had to manually restore all my documents and settings by dragging and dropping everything from the Macintosh HD/Previous Systems/Previous System 1/Users/mike to my new user’s directory.

Once I got everything in place I was having trouble working with my files on my admin account. I was unable to make changes or rename the recovered files, without giving “Everyone” Read & Write access through the Get Info menu, which obviously wasn’t the solution.

For example when trying to rename a directory; Users/mike/Sites/PSD I would get this Error Message:

Although when I checked the info of the PSD directory, it looked fine (see below):

So OS X was contradicting itself because it was telling me “You Can read and Write” but at the same time telling me “You do not have sufficient access privileges to rename the item “PSD”. I tried a series of things as far as running the Repair Permissions within the Disk Utility, creating a new admin account to try to reset all the permissions enclosed within the Users directory. Nothing was working.

So since the notebook is very new, I still have some free telephone support from Apple so I gave them a call. Spent about an hour on the phone with Tech support and we finally got it working. Here are the steps that we took.

  1. Boot your system from the OS X 10.5 install disk. To do this put the install CD into your computer, restart the system while hold the “c” key on your keyboard. This will force a boot from CD.
  2. Once you select your language from the Installation wizard, you will notice the menu bar appears at the top of the screen, from here go to Utilities > Password reset.
  3. From this screen, select your user account from the combo box. Then without entering a new password, go down towards the button and you will see a “Reset” button that will reset this accounts Privileges and ACL libraries.
  4. Once this is done you can Quit the OS X Installation, and reboot your system to your HD. You may need to remove the CD from your machine.
  5. once the machine boots, open a Terminal and enter the following two commands, entering your password when prompted. (be sure to replace “Mike” with your own Short Name)
    • sudo chown -R Mike ~
    • sudo chmod -R 755 ~
  6. The last steps are simple, open up Macintosh HD/Users then command+click on your Home directory (in my case this was mike) then go to Get Info. In the info screen, Make sure the admin group is in the list, if it’s not then add it with Read & Write Access. Also change everyone in the list to “Read & Write” access temporarily. Then click the tiny Gear icon to and chose “apply to enclosed items” which will apply these permissions to all the files within this directory.
  7. Once this is set, go see if you can now make changes to the files. If so then your just about done, you need to only go back into the Get Info screen you were just in for your home directory and change the permission of “Everyone” to Read Only access. Then Apply to enclosed items again.

Hope that works for anyone else having similar insufficient access privileges. After doing a bunch of research on this problem it appears there is quite a bit of issues out there with permissions on OS X Leopard, so if this did not help take a look at these two links:

Macbook Pro Recovery

| 5 comments

article

Last week my Macbook Pro crashed. It would hang on the startup screen with the Apple logo and the spinning gear for about 5-10 minutes then restart it self, and continue to loop. The culprit may have been a recent firmware update from Apple, but I have a hunch it had something to do with me messing around with the permissions on the HD.

Ever since I setup Leopard I was having problems installing software on my main admin account, mike. So I made an alternate account to install software, I figured this had something to do with permissions, so I decided to try adding a custom permission on the entire Macintosh HD to allow “mike” Read & Write permissions. It took like 20 minutes for the permissions to apply to the enclosed items, after it finished I rebooted, and was never able to recover.

Steps to Recovery
First thing I tried was the obvious, Safe Boot, which is Mac’s equivalent to Microsoft Window’s Safe Mode. To do this as soon as you power on your computer start holding the Shift key down. I had no luck with Safe boot, so I was hoping I could boot to CD still in order to run the Disk Repair utility thats built into the startup disk that came with my Macbook, or at the very least reinstall the operating system.

To boot from CD, the steps are similar to Safe Boot only as soon as you power on your computer start holding down the “C” key, once your CD is in the drive of course. This was successful, So I proceeded to load the startup disk. Without Clicking next on the Setup Wizard I chose Utilities from the Menu at the top of the screen and went into the Disk Utility. From here I was able to run a “Disk Repair” and also a “Permissions Repair” both returned no errors, so I was pretty sure the problem wasn’t fixed.

I eventually came to the conclusion I needed to reinstall OS X. Although I didn’t want to lose all my files and settings only thing I wouldn’t be able to recover was my Thunderbird e-mail and folders. As i started the setup wizard I notice the installation method chosen for me by default was called “Archive and Install” after doing some research I discovered OS X will make a directory of all your user’s files and settings from any previous installations of OS X. This is completely new to me, when reinstalling Windows everything will be erased during the re-installation, unless you chose to do a repair install, which I guess may be similar to the Archive and Install. Anyways the installation took a little over an hour, when I was finally up and running again I opened Macintosh HD to find a directory named “Previous System 1″ that contained all my users’ directories, and application folder. So I was able to drag and drop the contents of my old Libraries folder, Documents and Applications over to my freshly installed OS.

So everything is back and better then it ever was. I can now even install software on my main user account. Only problem I had was with Adobe Photoshop CS3. Apparently if you do an Archive and Install on OS X, then the system doesn’t copy the Adobe Unit Types file to the ScriptingAdditions folder, you can read more details in this Adobe Technote.

Conclusion
After this experience I will no longer procrastinate setting up Time Machine to get a backup of my system as frequently as possible. I also know that if all else fails, the Archive and Install method works great and makes it simple to recover files and settings from a previous installation of OS X.

Trick your iPod during software update

| 1 comment

article

This afternoon I decided to restore my iPod Mini back to default factory settings. During the process iTunes suggested that I “Upgrade my iPod to the latest software” so I went ahead and answered yes to the upgrade. After a couple seconds all I seen was a little “plug iPod into the wall charger” icon thing.

After doing some research, apparently to complete a software upgrade on most iPods you have to plug your iPod into the wall charger. This is so the iPod doesn’t die mid-firmware flash, in result turning your iPod into nothing but an expensive paperweight. Probably a good call on Apple’s part, but what if you don’t have a wall charger handy? In most cases you would be out of luck.

Besides the obvious (borrowing a wall adapter) there is a surprisingly simple solution. If you’ve ever looked closely at a FireWire or USB cable you’ll notice that two of the pins stick out a little farther than the rest. Those are the pins that carry the electricity to charge the iPods while the other prongs are used for data transfer (right?).

The Fix:
Trick is if you plug in the USB or FirmWire (while the other end is connected to the iPod) into the computer just a little bit so only the two charging pins touch the accompanying pins on the computer, you should be able to fool the iPod into thinking it’s a wall charger. The firmware will update, and you’ll have a working iPod again.

Fix mouse cursor from going off screen

| 4 comments

article

There were a few laptops in the office that shared a similar problem, the mouse cursor would go beyond the right of the screen. So instead of the cursor/pointer stopping at all 4 edges of the screen, when you moved it towards the right side of the screen it would continue on past the edge of the screen, in result losing the location of your cursor.

I figured out that the culprit was the display adapter that is installed along with the software required to use our Epson projector. It was a simple fix all I had to do was the following:

    1. From the desktop right click and open the properties window, then the settings tab.
    2. There will be a number of “displays” shown as numbered boxes. Your main display (1) and one or two others (2 & 3).
    3. click on the secondary displays and uncheck the “Extend my Windows desktop onto this monitor” setting towards the bottom. That should fix the problem.

How to Access Windows Network Resources on OS X

| no comments

article

One of the only things I missed about working on Windows XP was the convenience of accessing other machine’s folders and files, that were on the network, from my desktop via Windows Explorer. I knew this was more than likely possible on OS X, I just didn’t know how to do so. Until recently I got fed up with the idea of emailing every change I make to a website file to my XP machine in order to update the web server. So I decided to do some research so that I could simply access the web server, along with other network resources from my Macbook.

I’ve always used this path: \\webserver\e$ in Windows Explorer to access the web server’s E:\, Or say if I wanted to access a user’s desktop I could do: \\ACCOUNTING1XP\C$\Documents and Settings\jondoe\Desktop to view the contents of Jon Doe’s desktop from my own desktop.

The process is just as Simple in OS X. The following steps are how I gained access to the webserver from my Macbook. Remember to change “webserver” to the name of your network resource, as well as the drive letter, in my case I’m using E:\

  • In the Finder, select the GO menu
  • then the Connect to Server command
  • Enter into the box: smb://webserver/e$
  • Enter your username and password for the Windows Network
  • To remember the login details, check the box to “Remember this password in my keychain”
  • You should now get a Finder Window with all the folders on files on that machine

    • If that didn’t work, you can try removing the trailing drive letter (/e$) or you might also want to try:

      • smb://192.168.1.1.. Where this is the IP address of the machine you are trying to access.

      I am super happy that I didn’t lose this convenience. I had a bad feeling that Mac OS X and Windows networks wouldn’t get along so smoothly, I was obviously wrong, so far so good.