• Thu
    30
    Dec 10

    More wins using unsigned drivers...

    As you may have seen before, I have spent much effort in the past on learning how to sign my own drivers and get these installed in windows.

    Recently, I had to do the same again. I was building a computer for downstairs using "spare parts" (this is in quotes since this is actually a VERY long story spanning 2007 to 2010 and sort of sad too). Well the motherboard I ended up using has sound on it, but not digital audio.

    I had an extra soundblaster live sitting around that I was hoping to use so that I could get a nice digital signal from the machine to my stereo.

    Well, apparently I am WAY behind the times since these are now only in the ARCHIVE section on creative's download site. My new machine is of course 64 bit, which means I needed 64 bit drivers and this device was old enough that windows did not support it natively.

    To my surprise, Creative actually does provide a software installer for 64 bit drivers if I select windows 7 as the OS. I thought this was going to be easy. I was wrong.

    It turns out that their installer has all the drivers hidden away inside and that additionally they are not signed. Right away, this is an error on Creative's part. If I select win7 64 bit, either A. They need to NOT provide me with an installer that has unsigned drivers, or B. Provide me with actually signed drivers. They claim that they pass the windows driver bench, so they should get a cert for that, but Creative just did not want to include the right version I guess. Not too much I can do to correct their error though.

    Well, that means my only solution is to break out the article I wrote before. The first hard part was just getting the drivers out. I had to use the program called 7Zip to open the self-extracting EXE file and find the driver package. Then as I wrote, create the CAT file, and then sign both it and all the drivers in the folder too.

    Sure enough, that worked and I have sound on that machine. I am only writing an additional note here to keep the idea fresh in the search engines in case others stumble on this. (The previous article is the most read blog post I have ever posted according to my Graffiti Blogging Engine, so it must be reaching some people.)

    Creative, would it hurt you to just sign the darn drivers you release? Really?

    J.P.

  • Fri
    24
    Dec 10

    Slideshow 2010 is here…

    It’s not the end of the year quite yet, but I already have more than enough pictures to make a decent slideshow, so I am cutting off the entries.

    I learned a lot over the last 7 years of making these. Technically speaking with the music and the software and the encoding, etc; this is probably one of the better ones. However, I had quite the challenge trying to narrow down the music selection to only 6 songs that made the final cut. I hope everyone likes it.

    I am posting this in a larger format than normal. In fact, its covering up some of the normal content on the right at the moment. However, the pictures are well worth it. In fact. I almost thought against posting this “web” version at all. The colors in this are all washed out and its somewhat blurry compared to the 1080p reference version I started with. However, I can’t quite let everyone stream a 1GB file from my site. So such are the tradeoffs of the web I suppose. Not all the pictures are uploaded to flickr yet, but most are. Also, I have not updated the slideshow site yet. This entry is your exclusive access. I will have download links closer to new years.

    Enjoy! (Note: Depending on your internet connection speed, it make take some time after hitting play for the file to download.)

    P.S. If you are reading this on Facebook, you will need to click “View Original Post” below to get the video.

  • Sat
    18
    Dec 10

    Scripting Saturday

    Right now as I type this, the windows scripting host and Adobe Photoshop are interacting in the background of my computer making quick work of the 150 or so pictures which will be a part of this years slideshow.

    I have used this script for several years now for a variety of purposes. It has always been a huge hack (ok, it still is), and I just kept pasting hard coded data / statements in the script to do what I wanted each year. This was the first year where I decided to edit the script to create a general purpose script that would work for me each time.

    Of all things, the first thing I did was that while I was adding proper error codes (yes, in vbscript, you can exit with a correct error code… wscript.quit) to various initial error conditions. In the last 5 years or so, I have learned to get rather picky about my scripting (vbscript / batch) habits. Even at work when I write small scripts for use in automation, I try to follow any coding standards I can which would apply to native development. On a side note, I am now the office wiz at batch development and love using the for command as a general regex substitute in batch.

    I have been either using or working on windows for at least 18 years and only in the last year at work have I found the “net helpmsg” command in windows. Currently at work, I need this command almost every day since there are hundreds of different error codes my component produces now with almost no clear way to know what they mean without feeding the error code number into this command. From what I can tell, for the most part, what this command does is translate known and existing errors which are in winerror.h into actual strings. There are other sources which get compiled into this tool however from across windows as well. (On a personal note, when this doesn’t work, I also recommend hrplus.)

    I realized though that net helpmsg did not have a reverse function. For instance, I wanted my script to return errors like ‘folder does not exist’ or ‘invalid parameter’ but wanted to look up the standard errors for these. (At this point many of you would ask why I didn’t just search… the answer is because for whatever reason, the first thing I thought of was how to make my own lookup file.) So, beaming idea in my head, that is what I did. I whipped up this VERY short script to create a file with a list of the most common windows errors. (I have added comments to help with the logic. ;))

    REM Clear and reset text file
    echo Help File>Messages.txt
    echo. >>Messages.txt

    REM Cycle through top 1000 errors
    FOR /L %%i in (1,1,1000) do (

        REM This command is here simply to check
        REM whether there is a valid error value
        REM or not, errors piped to NUL
        net helpmsg %%i 1>NUL 2>NUL

        IF NOT ERRORLEVEL 1 (

            REM Assuming we found an error
            REM echo that number to the file
            echo %%i>>Messages.txt

            REM Then echo the text matching
            REM that number to the file
            net helpmsg %%i>>Messages.txt
        )

    )

    So, file at hand, I was able to find the error codes I needed. Somewhat a waste of time, but honestly its simple, quick, and fun solutions like this which keep me amused both at work and at home a lot. At work, they get way more complicated at times, but honestly, its about finding creative and fun solutions to easy and every day problems.

    So after that was out of the way, I headed off to refine my Photoshop script. I should point out that, this script will not adjust the visual quality of your pictures. You could program it to do that for you, but what I have found over the years is that the composition of every image is different and color balance, highlights, noise reduction always takes a hand touch. So each year, I adjust all 100+ images in the slideshow by hand. I don’t make HUGE changes, but just try to clean up any crappy conditions I may have taken the picture in. The purpose of this script though is just to turn each picture into a 16x9 image for the slideshow (since the built-in movement scripts in the slideshow applications work better when all the images are the same size) and to cut them down to a more manageable size. I have found I can crash almost any slideshow app with panoramic pictures that are 70,000 pixels wide. With that said, here is the script I created. (You may re-use however you like, you may repost only with attribution, and this code is released ‘as is’ with no warranty or rights attached.)

    Option Explicit

    Dim NamedArgCount

    NamedArgCount = WScript.Arguments.Named.Count

    if ((NamedArgCount < 1) or (Wscript.Arguments.Named.Exists("Folder") <> True)) then

        wscript.echo "This script takes a named argument to set the folder location."
        wscript.echo "cscript SlideshowImages.vbs /Folder:""c:\Full_Path_To_Images"""

        'Invalid Parameter
        wscript.quit 87

    end if

    Dim FolderPathString
    FolderPathString = Wscript.Arguments.Named.Item("Folder")

    Dim fsoRef, folderRef, outputFolderRef, f

    Set fsoRef = CreateObject( "Scripting.FileSystemObject" )

    if (fsoRef.FolderExists(FolderPathString) <> True) then

        wscript.echo "Input Folder was not found!"
        wscript.echo FolderPathString

        'Path not found
        wscript.quit 3

    end if

    Set folderRef = fsoRef.GetFolder( FolderPathString )

    if (fsoRef.FolderExists(folderRef.Path & "\OutputImages")) then

        wscript.echo "Output folder already exists!"
        wscript.echo folderRef.Path & "\OutputImages"
        wscript.echo
        wscript.echo "Please rename or remove the existing folder."

        'File Exists
        wscript.quit 80

    end if

    wscript.echo "Found " & folderRef.Files.Count & " files in: " & folderRef.Path
    wscript.echo
    wscript.echo "Creating output path: " & folderRef.Path & "\OutputImages"
    wscript.echo

    set outputFolderRef = fsoRef.CreateFolder (folderRef.Path & "\OutputImages")

    wscript.echo "Detecting and Initializing Photoshop..."
    wscript.echo

    Dim appRef, startRulerUnits, startTypeUnits, startDisplayDialogs
    Set appRef = CreateObject("Photoshop.Application")

    ' Save the current preferences
    startRulerUnits = appRef.Preferences.RulerUnits
    startTypeUnits = appRef.Preferences.TypeUnits
    startDisplayDialogs = appRef.DisplayDialogs
    ' Set Photoshop CS2 to use pixels and display no dialogs
    appRef.Preferences.RulerUnits = 1 'for PsUnits --> 1 (psPixels)
    appRef.Preferences.TypeUnits = 1 'for PsTypeUnits --> 1 (psPixels)
    appRef.DisplayDialogs = 3 'for PsDialogModes --> 3 (psDisplayNoDialogs)

    Dim jpgsave
    set jpgsave = CreateObject("Photoshop.JPEGSaveOptions")
    jpgsave.quality = 9

    For Each f in folderRef.Files

        if (LCase(Right(f.ShortName,3)) <> "jpg") then
            wscript.echo "Skipping file:" & f.Name
        else   
            wscript.echo f.path
            dim document

            set document = appRef.Open(f.Path)

            dim h, w, newHeight, newWidth, resave
            h = document.Height
            w = document.Width

            wscript.echo "Resolution: " & w & "x" & h & "(" & CStr(Round(w / h, 6)) & ")"

            resave = false

            if (Round(w / h,6) <> Round(16/9,6)) then

                resave = true

                if (Round(w / h,6) > Round(16/9,6)) then
           
                    newHeight = Round(w * (9 / 16),0)
                    newWidth  = w

                    wscript.echo "WIDE: " & CStr(newWidth) & "x" & CStr(newHeight)

                else

                    newHeight = h
                    newWidth  = Round(h * (16 / 9),0)

                    wscript.echo "TALL: " & CStr(newWidth) & "x" & CStr(newHeight)       

                end if

                document.ResizeCanvas newWidth, newHeight

            else

                Wscript.echo "Image is already 16/9, skipping canvas adjustment..."

                newHeight = h
                newWidth  = w

            end if

            if (newWidth > 3840) then

                'Since many slideshow software does VERY badly / crashes on images
                'which are more than 7000px wide, just cut these down to 4K

                wscript.echo "LARGE: 3840x2160"           
           
                document.ResizeImage 3840, 2160

                resave = true

            end if

            if (resave) then

                wscript.echo "Saving as: " & outputFolderRef.Path & "\" & f.Name
                document.SaveAs outputFolderRef.Path & "\" & f.Name, jpgsave
               
            end if

            ' 2 == Do not prompt
            document.Close(2)

        end if
       
        wscript.echo
    Next

    ' Reset the application preferences
    appRef.Preferences.RulerUnits = startRulerUnits
    appRef.Preferences.TypeUnits = startTypeUnits
    appRef.DisplayDialogs = startDisplayDialogs

     

    Now that the pictures are just about ready to go (they are now all in the right format and ready to get put in the timeline) I need to settle on the soundtrack. My possible song options ballooned in the last few months and I have been re-considering the songs be listening to a playlist over and over again. You can check out the list here. Not all 39 songs can make it. Maybe only the top 6 or 7. They are listed on that page in the order in which I first heard them this year.

    Honestly I have so many other topics I could sit down and write about here lately such as the article I want to write about Portland now (similar to my “J.P.’s Guide to Vegas”), but I just have not had the time lately. (Nothing there is new I guess.)

    My photos from my recent trips to Phoenix and Portland are both online now. Many more in the later than the former.

    I also found that over 90% of the images in this year’s slideshow happened to already be ‘lurking’ in my Flickr photostream from the year as well. So for the hell of it, I corralled them into a preview bucket. Of course EVERY image from all of my slideshows is neatly stored on Flickr still as well in this collection. Not to mention the collections I have specifically dedicated to Travel and Hiking/Biking as well. And as always, my moblog (perma-linked at the top of this page) is hosted on Flickr as well.

    Have a very happy holidays everyone. Looked for a finished slideshow “soon” ;).

  • Fri
    17
    Sep 10

    Summer Recap – May to September

    Wow, it has sure been a while since I have posted here. I guess I should start off with a few apologies. First for letting it go so long, and the second for the fact that for those that have been reading since the beginning, this post will no where be as detailed, verbose, or as visually descriptive as previous posts you have seen here. In making notes for what was on my list to blog about, there have been no less than 19 significant enough places / events to write about since my last post. Given how much time I usually put into writing about any given thing, this would probably take weeks to properly link and catalog everything. But, I will try to embed lots of links to Flickr pictures.

    If you REALLY just want the quick and dirty, then the best thing you can probably do right now is just head over to flickr and check out the sets on the right. At the time of this writing, the last 9 sets you see on the right contain pictures of journeys I want to write about here.

    Well, I mentioned the haul ash in one of my last posts. I spent more time biking and building up to that one earlier in the summer and actually accomplished it. All 41 miles. It was tough. I don’t have a road bike and had never done a ride over 33 miles before, so 41 was the longest I had ever been on to date. I find it rather interesting actually how quickly the body gives up / hits a wall though. a 20 mile ride is pretty easy for me (assuming the right conditions / flat), but just about every mile beyond that, and even more so beyond 26 miles or so is very difficult, painful even. No gradual discomfort or fatigue, just a point at which its tough to go any further. I have of course heard of this from others before, so it’s not a new concept, but I find it rather fascinating as an engineer. We aren’t like a battery that slowly runs out. We are more like a lamp that runs out of fuel. I have ridden a few more times with friends after that, but as you may find evident soon, I haven’t actually had much time to do much riding since then.

    Early in May, I had a whirlwind travel tour, going to both Vegas and New York with only a matter of hours in between (but having to fly back to Seattle in the middle). Vegas was fun, but was still Las Vegas. Not that much has changed outside of the new City Center being completed. This is a time where there are so many stories from Vegas I would probably dive into here if I was dedicating an entire post to the two trips, but suffice to say that we saw a few shows, went to a few bars, relaxed by the pool, and went to some nice restaurants. The next time I go to Vegas will be too soon though. I have had more than my share over the last 7 years, going what I think is now 9 times in that time frame. I didn’t get to this time, but my best Vegas recommendations are still, Zion national park, Red Rock Canyon, Hoover Dam, and the Atomic Test Museum. We did all have a really fun time at Hofbräuhaus this time though too.

    Flying to New York was fun too. I was there to see my cousin graduate from NYU. I had not been to New York since I went for a school trip back in my freshman year of high school. (I’ll help you with math, that was 7 years prior to 9/11. As an interesting note, as I sit and write this it is 9/11/2010 today.) I was glad I went back then though. I have pictures of inside the world trade center from ‘94 and of course got to ride the elevators to the top back then. I am saddened by the tragedy of course (especially since the person that lived across the hall from me freshman year in college was working in one of the towers that day and didn’t make it out), but was nice to see the city again even after and see things still as bustling as ever. I went to see a show, went to some nice restaurants, got to see central park, the Met, the Brooklyn Bridge, and of course see some family members I had not gotten to see in quite a while. It was a good trip.

    At the beginning of June a group of us went camping at the Bedal camp ground which is on the Mountain Loop Highway in the Mt. Baker-Snoqualmie National Forest, just east of Darrington. It was actually a great campground. It's right on the river and is far enough away from civilization that you actually feel like you are camping. Whether it was hiking the Sauk river, taking pictures, relaxing, or just hanging out, we all had a good time. Check out the album I link to above for even more pictures.

    I also got to go see a taping of ‘Wait Wait Don’t Tell Me’ here in Seattle as well during June. That was pretty fun, but I don’t mind saying that I felt a bit distracted when I could see what was going on. Something about only having to listen meant that I was able to follow the discussion more on the radio normally, however, when I had to watch many people on the stage while trying to listen to just one, I was challenged to keep up.

    The rest of June was also a busy month as well, but other than some more biking, much of it was spent helping my friends get ready for their wedding at the end of June. Once again, I also managed to preempt my birthday by having a party a few weeks earlier and not happening to mention my birthday was coming up. :) This is the best of both worlds the way I see it since I still got to spend time with friends, but without all the pressure / awkwardness of a “birthday party.” I found a few weeks beforehand was early enough that people didn’t suspect it either. I may not be as successful at preemption in future years though.

    July was then the month of hiking. I love getting out in nature and hiking. There is something about the northwest vistas of trees, mountains, and sky that is very calming. A group of us went and hiked Rattlesnake Ledge. I had not hiked it before, but it was not bad at all and the views are just amazing. Next up and probably my favorite was hiking the John Wayne Trail as it cuts through Olallie State Park. I have a soft spot for bridges and trestles. This hike is over old train tracks (loose gravel) so the valleys it crosses go over amazing bridges you get to walk on. Finally, the next weekend after that was another quick hike up Little Si. Though parking for Little Si just seems to be getting worse. They basically now have signs now just after the turn in North Bend telling people to go away. Note, I don’t think the signs are discouraging enough for people, the parking lots were all packed, with lots of people still illegally parking.

    Jumping back a bit in time, this year for July 4th (the same day I walked through Olallie State Park), I went to a friends place on the lake for their own fireworks show. More fireworks pictures are available in the set from that weekend. In the middle of the month, I got to go to a bbq where they actually roasted an entire pig over a fire pit. Let me tell you that was darn good bbq.

    Rounding out the end of the month, my parents came out again to visit. We went to Gas Works park for a great view of the city, to Ballard to see the salmon (and have some of the best gluten free pancakes ever), to golden gardens (on what was probably the busiest day there I have ever seen), up to see the Peace Arch at the Blaine crossing, and finally rounding out the trip, a trip to Tacoma to the museum of glass.

    Also on the last day of July, I managed to go to some place I can’t believe I had never been to before: Discovery Park. It was a great day to walk around the park and take pictures, look over the cliff, and even sit on the beach listening to the waves for a while. In total, that day was comprised of about 9 miles of walking. It was fun, but sure tiring. We are headed into the wrong season now, but I look forward to when I can go back there!

    For another first, starting in August I was invited on a kayaking day trip! We only went about 8 miles or so and stuck to the shore near Bellingham, but it was amazing. I had never been sea kayaking before. For that matter, only one week earlier was the first time I had ever gone kayaking at all before. For that trip we just went out for a few hours in Lake Union (rented from Aqua Verde). But sea kayaking was even more fun because everything is so much more open. The plant, animal, and mineral life that you get to see (as well as the cool places to visit at low tide) is just wonderful. Sorry that I don’t have more pictures from these trips, but electronics (cameras) don’t like the water all that much, so I was trying to be more careful.

    Also in August, I finally got to go to my first Seahawks game too! It was fun (and loud) and they won! This year is definitely a year where I have been following more football than in years past. ;) It’s all ok with me though, since there are times I miss following/watching.

    Right around this time in the summer, my blueberries out front were also just ripening up as well. I should sheepishly admit at this point that while I have lived in this house for more than 3 years now, I had no idea I had blueberry bushes (large ones) out front. I have honestly no idea where I was in past summers not to know or notice, but somehow, I sure didn’t. While they weren’t necessarily as plump or sweet as other home-grown blueberries I have had, it was neat to have these as a snack from my front yard for a few weeks this year. Once they REALLY ripened, then the birds and other animals around just decimated it. One day all of the fruit was gone. Next year, I’ll know better though and have some netting ready.

    This summer, I have decided to go back to being gluten free again. I grew up knowing that I had celiac / was gluten intolerant. For the most part, I didn’t grow up on pasta, cookies, cake, pizza, etc. However, once I left for college for sure, I had gone the route of waffles, pizza, cookies, bagels, etc. and had not looked back. I was pretty lucky overall. There were a few times where it would bother me, but for the most part, only part of the time would I feel bothered. This continued on through my twenties and it wasn’t until after I turned 30 that every time I started to eat/drink any gluten I would start to feel ill. Well this year I decided that enough was enough and gave it up (to the dismay of my drinking buddies). I have never regretted the decision though. I haven’t felt sick all of the time anymore. I feel like I have much more energy, and somehow this also managed to trigger a bunch of weight loss as well which I certainly won’t complain about. (Of course biking / hiking / no beer all help with that as well.)

    This summer I also purchased a bread maker which has a gluten free setting on it. My local grocery has gluten free bread maker mixes as well which are easy to throw together and put in the  machine. I then slice it up and freeze two slices at a time to take lunches into work. I love it. It tastes close to real bread and there is nothing like having warm home-made bread out of the bread maker. So far its easy to just do this every few weeks for slices of bread compared with the frozen gluten free bread at the store.

    For the last weekend in August, I went with some friends to spend a few days on Decatur Island here in the San Juans. It was a nice fun and relaxing time. There were games, gatherings, relaxing, hiking, and exploring. This was the second year I was invited and it’s been fun both years!

    For labor day weekend, I was lucky enough to be able to spend several days in and around Boston. Whether it was walking around Cambridge and Salem, walking the freedom trail, relaxing in the gardens, or exploring Georges island in the harbor islands, I had a great time! One other amazing activity on the trip was being able to go to Fenway park as well to see the Red Sox completely crush the Rays. There were of course plenty of other reasons why this was such a great trip. Those that know will understand.

    In terms of notable events / activities, that brings you to “current day” at this point. However some other notables are that I bought an iPhone (I love it so far). I have been discovering a lot of new music and have a new pandora station tracking the new artists as well as a few new last.fm stations corresponding to the new music too. Soon, I need to start selecting which music to put in the slideshow this year as well. I already have more candidates that will fit than I have time, but this year, I think they are all really great songs so far. Also, I have a TON of pictures to choose from this year as well and of course plenty of events to showcase too. It will be a fun time making it this year. I should start on it sometime in November or so.

    Well, now you are mostly up to date on some of the larger activities of the last several months. There is just way too much detail in the middle that I would love to share with everyone, but this is the 3rd late night of typing this now, so hey, its bed time. :) I hope everyone else’s summer was just as fun! Here its back to being 60s, rainy, and turning dark just around 7pm again (it will eventually creep up past 5pm).

    There is and was oh so much more left out and much I purposefully censored to protect the innocent as well. But I think much of that is for another time.

    J.P.

  • Sat
    10
    Jul 10

    Busy

    So, I have been building up a long list of blog topics for months now, but I just have not found the time to compose the posts.

    I have taken more pictures in the last week alone than most months of the year.

    I am creating notes for an upcoming post (I have for some time), but just need to sit down for half a day or so and write it out (yeah, it normally takes several hours to put these together right).

    As usual, I suggest following both the Flickr and Moblog links above as well for more constant real-time posts.

    Also, I am ALREADY looking forward to the slideshow this year. I think it’s going to be great!

    J.P.