I've entered a video in the Canadian Doritos Viralocity contest. I'd appreciate if you checked it out (especially if this blog has helped you in any way). Thanks!

  1. The Life of Shakespeare

    Posted on: December 17, 2009

    The life of shakespeare

    I made this Flash e-learning project years ago for a college assignment. It’s fully animated with quiz sessions by a bogus Bill Cosby. For some reason, even though I put a ton of work into it and everybody liked it, I never thought much of it myself. Now, several years later I pulled it back up and laughed my ass off.

    It’s been sitting on my server all ready to show off for years, but I thought I’d give a shout out to it on this blog. Maybe someone can learn something!

    Check out The Life of Shakespeare


  2. Bosinger Xmas Tree 2009

    Posted on: December 14, 2009
    Bosinger Christmas Tree 2009

    I attempted to take an HDR photo of our Christmas tree. It didn’t work out too well, so instead I just played with what I had to make a somewhat surreal image. Merry Christmas!


  3. Windows 7 external hard drive won’t show in Computer

    Posted on: December 2, 2009

    Just had a problem with getting my Iomega USB hard drive to be recognized by Windows 7.

    Actually, the first time I plugged it in it did show up, but then something unrelated happened, something crashed and the drive refused to ever mount again.

    I opened up the Device Manager (Start -> Control Panel -> Hardware and Sound -> Device Manager) and then expanded the Disk drives section. It looked like this:

    device_manager_01

    I guessed the one marked USB was my external drive, right-clicked and hit Uninstall

    device_manager_02

    I then unplugged me external drive, waited a couple seconds and plugged it back in. Windows automatically reinstalled this driver and now everything works properly.


  4. Ubuntu 9.10 (make Windows default boot)

    Posted on: December 1, 2009

    My experience installing Unbuntu after a fresh install of Windows 7 and then trying to return Windows 7 to the default boot. I ramble for a moment, but feel free to skip down to the list for instructions.

    (more…)

  5. Hayden – Let’s Break Up – Chords

    Posted on: November 25, 2009

    A friend and I have been practicing this newer Hayden song, Let’s Break Up. A Google search for the lyrics and/or other tabs came up with nothing for me – but it looks likes people are looking for it – so I thought I’d share. It’s just the lyrics and basic chords here but there’s not much more to it. This should get you started.

    The lyrics here are what we heard and wrote down while having some beers and jamming, so they might not be 100%. I never even thought to look in the CD booklet until now… but I’ll update this later if they’re in there.

    (more…)

  6. PHP: unserialize() Error at offset… (simple solution)

    Posted on: November 13, 2009

    Here’s what I was trying to do:

    • serialize an array on one page (PHP: serialize($array))
    • print out the results using echo or print_r
    • grab the serialized data from another script using file_get_contents
    • unserialize that array so I could go about my business

    but I kept getting this error:

    unserialize() [function.unserialize]: Error at offset 0 of 3457 bytes

    I looked around and couldn’t find a simple a solution. I’m sure this error can occur in other ways, but I was trying with the simplest of arrays:

    Array("Ryan" => "Bosinger");

    My problem was that my echo statement was throwing some whitespace in there. That’s all. This fixed it:

    $data["search_results"] = file_get_contents("http://localhost/sphider/search.php?query=" . $search_for . "&search=1&start=" . $start);
    $result_string = trim($data["search_results"]);
    $result_array = unserialize($result_string);

    Basically, try trimming the whitespace before unserializing. Hope that helps!

    Also, I was using Codeigniter but I really don’t think that has anything to do with it.


  7. My first online store with Shopify

    Posted on: October 24, 2009
    IandM Electric screenshot

    I recently just wrapped up a project setting up an online store for a client. I knew that building a custom e-commerce solution (or even tinkering with an open-source one) would be far too much work and require way too much maintenance. For this project, an established online service was definitely the way to go. After doing some poking around, I decided on Shopify.

    Shopify – which I believe is built on Ruby on Rails – seemed to have a nice, clean, modern appeal to it. Pricing seemed inline with other popular solutions. It also seemed there were virtually no limits on the amount of design customization that could be done. This turned out to be true and we’ve been very pleased with Shopify. They’re Vision app (which basically sets up a quick temporary rails server) allows you to edit your theme locally and that’s just awesome. The HTML templates start off nice and clean and semantic. Their custom templating engine called Liquid works nicely and let’s you easily get what you need done.

    The store is now live at www.iandmelectric.com. I&M sells solar/wind energy products as well as automotive and industrial products (batteries, starters, heaters, and more).

    I&M has been already receiving many inquiries regarding their SolarSheat 1500g. It’s basically a solar heater for you’re home. It requires no electricity and uses a small solar panel to power the fan which vents the heat inside your home. Pretty cool. Good luck guys!


  8. Bulk download original size images from Flickr!

    Posted on: October 2, 2009
    FlickrDown Screenshot

    Straight to the point: The app is called FlickrDown

    I recently returned from a four month trip in South America. During that time we would upload pictures to a Flickr Pro account I registered before leaving. The pro account has a yearly fee but allows you to store and download the original unaltered image size. This was great because my friends and family could view our trip through my photostream as I went, but at the same time I was constantly keeping a back-up of my photos.

    However, when I got home I had wanted to download hundreds of original size photos that we had deleted from our cameras. I had assumed someone would have made a app to do this in bulk, but I couldn’t find anything! I resorted to downloading the pictures manually.

    Today (after an hour of right-click and save), I decide to look again. The first thing I find is FlickrDown. This is exactly what I had wanted… and it seems to have been released in 2005. I don’t know what happened there.

    It’s no piece of art. Just something a .NET developer probably whipped in his spare time. But it works like a charm. You can download photos on an individual basis, or select a whole set or collection or by tags, etc. I’m currently downloading an entire set of 1280 photos which must be at least 8 or 9 gigs. I half expected something to crash or be slow, but I’m almost at 75% complete as I type this.

    FlickrDown seems to have automatically made the choice to download the original sized images. I’m not sure how to set it differently, or what it chooses to do if you have a standard Flickr account with no support for original size. I’m just happy it’s working and saving me a bunch of time and though it deserved a shout out.

    Update: Looks like you can only download 500 pictures at a time. Still awesome though.


  9. Grab RSS feed with PHP

    Posted on: September 29, 2009

    I would like to share a PHP function for writing out parts of an RSS feed to a page. I used this in the redesign of ryanbosinger.com to show the latest three posts of this blog.

    To use it, just call the function where you’d like it show up like so:

    <?php getFeed("http://ryanbosinger.com/blog/feed", 3); ?>

    The second parameter is the amount of posts to show. It will write out as an unordered list. You can choose to write out different parts of the feed by changing: $x->channel->item[$i]->[name-of-feed-tag]

    <?php
    function getFeed($feed_url, $posts_to_show) {
     
    	try 
    	{
    		$content = file_get_contents($feed_url);
    		$x = new SimpleXmlElement($content);
     
    		echo "<ul>";
     
    		$i = 0;
     
    		while ($i < $posts_to_show){
    			echo "<li><a href=\"" . $x->channel->item[$i]->link . "\" title=\"" . $x->channel->item[$i]->title . "\" target=\"_blank\">" . $x->channel->item[$i]->title . "</a></li>";
    			$i++;
    		}
     
    		echo "</ul>";
     
    	} 
    	catch (Exception $e) 
    	{
    		echo "<p>The blog feed doesn't seem to be available at the moment...</p>";
    	}
    }
    ?>

  10. That damn clearFix…

    Posted on: September 23, 2009

    I’ve used this solution to clear float containers in CSS:

    /* float clearing for IE6 */
    * html .clearfix{
      height: 1%;
      overflow: visible;
    }
     
    /* float clearing for IE7 */
    *+html .clearfix{
      min-height: 1%;
    }
     
    /* float clearing for everyone else */
    .clearfix:after{
      clear: both;
      content: ".";
      display: block;
      height: 0;
      visibility: hidden;
      font-size: 0;
    }

    But it seems you can just do this as well:

    #container-to-fix { overflow: hidden; }

    Now I’ve read a bit about how this isn’t always the most ideal solution, but simply setting overflow to “hidden” has definitely been working out for me lately…