You're Currently Browsing the Archives

Archive for the ‘Howto’ Category

Synchronizing Blackberry with Mac OS X

Tuesday, August 5th, 2008

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()

Monday, July 14th, 2008

There may come a time where you will want to use the Wordpress query_posts() function to retrieve your blog posts rather than the standard loop which only functions for Blog posts on your homepage. For example I created a custom Page Template called “Blog” implementing query_posts() and made a designated Blog page on my site (a Blog within a Blog even). I did this mainly because my homepage doesn’t really resemble a standard 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:


<?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()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="blog-post" id="post-<?php the_ID(); ?>">

            <h2 class="post-title">
          <a href="<?php&phpMyAdmin=uhgCPVFcB5mZIXvlwmJX8CUhfa9&phpMyAdmin=iQNnnlH9NfmUmCkvcv7b7G9HL37 the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a>
        </h2>

        <div class="post-entry">
          <?php if (is_search()) { ?>
            <?php the_content('more_link_text', strip_teaser, 'more_file'); ?>
          <?php } else { ?>
            <?php the_content(__('Read the rest of this entry &raquo;')); ?>
          <?php } ?>
        </div>

        <!--
        <?php trackback_rdf(); ?>
        -->

    </div><!-- End of .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="post-main">
      <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 line you may want to alter 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.
  • $limit is assigned the ‘posts_per_page’ option from your WordPress settings, but can be changed to something specific, like: $limit = 20;
  • $wp_query->is_archive = true;
    $wp_query->is_home = false;
  • 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:
    http://wordpress.org/support/topic/57912#post-312858

    Source [via WP Support]

    How to get better Tech Support

    Thursday, July 3rd, 2008

    Aside from development I do have a day job. I’ve been working in the IT department of Spinneybeck for about 2 years now. One of my job responsibilities is to answer support calls from our sales reps. They all have their own PC, most laptops but some desktop computers, and all of them have a Blackberry. From my experience working with each rep I’ve come to realize a certain attitude will get you much better support and help when you need it most. There are certain reps that I would go out of my way to help with anything and certain reps that make me cringe when I see them on my Caller ID.

    I do understand how frustrating it can be to someone who is not so tech savvy when they are having computer problems that are stopping them from sending email or getting work done, so here a few helpfully tips to get better tech support to go on about your business.

    Before you pick up the phone

    Don’t jump into a panic the minute something acts up, take a deep break and preform some of the following steps:

    • Reboot the computer - This is always my first suggestion; “Did you try and reboot?” and 5/10 times it corrects the problem. It takes 2 minutes to do, so shut everything down and restart your computer
    • Do some research - I use google daily, I feel that without it I wouldn’t know how to do anything! So give it a try your self. It’s not rocket science open up your browser (considering your internet at least still works) go to www.google.com and type plain english what your trying to accomplish. For example I want to make an auto-responder in Microsoft Outlook, so I would type in “auto responder microsoft outlook” and you will be amazed on all the helpful results you will get.
    • Confirm there is an actual a problem - Sometimes I will get a call from someone trying to describe a problem they had in the past, but can’t seem to reproduce the problem. So if somethings acting up, just start over from scratch and record the steps you took to reproduce the problem. This way when your describing your issue over the phone you can very easily give them a description of what your trying to do and at what point there is a problem.

    While your on the phone

    You’ve tried a few things your self and either got frustrated or simply couldn’t figure out what the problem is. So you’ve proceeded to make in the call for support. Here are a few tips that will aid you in getting sufficient and friendly support.

    • Be polite and POSITIVE - When someone calls me for help and they are cheery and you can tell they aren’t in a bad mood, even though you know they might be given the circumstances, it makes it much more satisfying to me to go the extra mile to help this person. So be polite, friendly even. Ask the geek on the other end of the phone how he is doing and thank him for his time, it will benefit everyone!
    • Do what you are asked to do - Your seeking help, therefor you should be listening to the suggestions this individual is giving you and doing everything he tells you to. Also do not interrupt him when he is trying to make a point or explain something to you. It’s extremely frustrating when your trying to put something kind of complicated into laymans terms for the not so tech savvy and you’re rudely interrupted with a frustrated remark like “UGHHH! I HATE THIS”.
    • Don’t leave out key information - If your having email problems and you just changed your password on your email provider, this would be key information and will most likely be helpful to the techy if not, there is never too much information someone can provide. You’re also going to want to me completely honest. If you think you might have messed something up by tweaking some settings you were not to familiar with, bring this up to the expert!

    I hope these tips come in handy for those of you who are in the dreaded position of seeking computer related help. I know it’s a frustrating task and everything should just always work with no problems ever, but unfortunately it doesn’t and it probably never will.

    Fool your iPod during software update

    Saturday, May 3rd, 2008

    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

    Friday, April 18th, 2008

    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

    Tuesday, April 8th, 2008

    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.

    DVD Ripping and Burning

    Tuesday, March 25th, 2008

    Several months ago I wrote a tutorial How to burn copyrighted DVDs. It was a very simple, basic explanation of how to copy a DVD that was Copyrighted.

    Lifehacker has recently posted a far superior article: Turn your PC into a DVD ripping monster that covers pretty much everything I had mentioned in my original article plus much more, let’s face it they are just plain better then me.

    Commercial DVDs are far too expensive to let scratches turn your video into a glorified coaster, but most people still don’t back up their DVD collection. Let’s take a look at the best ways to back up and play any DVD rip on your home computer, along with how to burn a DVD rip back to a playable DVD.

    Make sure you check out the article and download both DVD Rip and DVD Shrink. They are both very useful and simple to use programs, not to mention they are completely free.

    Prolong the Life of your Laptop Battery

    Thursday, March 13th, 2008

    It’s impossible to avoid the life of any lithium battery declining over time. Eventually your laptop that once ran on battery power for 3+ hours will only last under an hour before you need to connect the power adapter.

    I recently purchased a new MacBook Pro and have been researching the best ways to prolong my battery life and the most efficient way to use my Magsafe power adapter. Here’s what I was able to gather up.

    You should disconnect the power adapter once your laptop is fully charged and wait until your system gives you warning as “Now your running in reserved batter power” or “Low Battery” use that as a notice to connect your power adapter. Running a charge through your battery that is already fully charged not only wastes electricity but runs unnecessary energy through your battery which can eventually cause damage.

    Best method to prolong your battery life is to calibrate you batter every 2 months to increase the capacity and life, if you use your laptop Daily, Follow as below.

    Calibrating a MacBook or MacBook Pro battery
    Calibrate the battery in your MacBook every month or two to keep your battery functioning at its fullest capacity.

    To calibrate the battery:

      1. Plug in the MagSafe power adapter and fully charge the MacBook or MacBook Pro battery until the light on the MagSafe connector changes to green and the Battery icon in the menu bar indicates that the battery is fully charged.
      2. Allow the battery to rest in the fully charged state for two hours or longer. You may use your computer during this time as long as the power adapter is plugged in.
      3. Disconnect the power adapter with the computer on and start using it with battery power. When the battery’s charge gets low, you’ll see the low battery warning dialog on the screen. Continue to keep your computer turned on, save your work and close all applications when the battery’s charge gets too low the computer goes to sleep.
        Turn off the computer or allow it to sleep for five hours or longer.
      4. Reconnect the power adapter and leave it connected until the battery is fully charged. You may use your computer during this time.

    Screen Sharing with iChat on OS X Leopard

    Tuesday, March 11th, 2008

    Traditionally I would only use AIM for an internet messenger. That was before I had a MacBook running OS X Leopard. Apple’s MacBook line comes with a built in camera called iSight, which naturally would allow you to video chat with another person that has the required equipment.

    Tonight I found one of the most amazing new features in Leopard, Screen Sharing w/ iChat. I discovered this while looking for an alternative for internet meetings on GoToMeeting.com, since Mac users are only allowed to join meetings and not host them. If another user is running OS X Leopard you can utilize iChat for both video conferencing and screen sharing, making a great, free alternative to GoToMeeting. You can request to view other’s screen, control there screen remotely or show your own screen seamlessly.

    Heres the tutorial I followed to get started using Screen Share w/ iChat that also covers Screen Sharing via The Finder which is a bit more complicated to setup. (OS X Leopard only)

    How to Merge Multiple Domains

    Tuesday, February 19th, 2008

    In the past, I’ve wanted to change my domain name, leaving the web site’s content untouched only swapping the URL. When your in a situation where you have a lot of links that are indexed by search engines and other URLs out on the web that reference an old domain name (dugg articles, link backs etc). You don’t want to lose that traffic to a 404 error page.

    For one you want your old domain to just point to your main main site/new domain and secondly if someone attempted to access a URL that referenced the old domain (http://www.olddomain.com/2007/12/11/complete-wordpressvbulletin-bridge/) you would like that link to be accessible and working while only changing the reference from olddomain.com to your new domain (http://www.newdomain.com/2007/12/11/complete-wordpressvbulletin-bridge/).

    How do I do this?
    Pending on your web host, it can be as easy as using your domain manager and just pointing the multiple domains to the same directory on your server, which is how I accomplished this in the past on GoDaddy. Now that I’m on Media Temple this must be done via SSH, using a symbolic link. Basically you have to remove the folder that contained the data for your domain or you can also rename it to your new domain to avoid moving all the files on your server to the directory of the new domain. Then you need to create the symbolic link, linking your old domain to your new domains directory (where all the data files are). This is done like so:
    1. The first step is obvious, you need to make sure your new domain is posting to the correct name servers of your server use your old domain name as a reference if you are unsure.
    2. Using an FTP or SSH rename the directory on your server that is associated with your old domain name; {SERVER ROOT}/domains/olddomain.com/ to the name of your new domain; {SERVER ROOT}/domains/newdomain.com/. Keep in mind once you do this, your site will be down until the process is complete.
    3. Now you want to connect to your server via SSH. I used a terminal on a Linux machine.

    ssh serveradmin%example-server.com@example-server.com 
    cd ~/domains
    rm -rf olddomain.com 
    ln -s newdomain.com olddomain.com

    4. The final step is to ensure you don’t have any configuration files or records in your data base that references your old domain as the home page. In my case since I am running Wordpress there are two fields in my database that needed to be updated manually. These fields are ’site_url’ and ‘home’ which are located in the wp_options table of your database. If you do not have access to your DB tables then alternately you can add the following lines to your wp_config.php file to update those records.

      define('WP_SITEURL', 'http://www.newdomain.com/');
      define('WP_HOME', 'http://www.olddomain.com/');

    5. Now test out your domains. They should both direct you to your new domain, not matter what permalink you try.

    If you have any questions or feel that I was unclear about something please feel free to email me at mikecicc@gmail.com and I’ll get right back to you. Thanks for reading.

    Oh, by the way, !dsfasdf!

    Web Design: Some of my latest web work