Crumpled Thoughts

May 29th, 2006

CakePHP to the Rescue

Posted by Chris in Technology, PHP

I’ve got a few upcoming web projects that I need to get cranking on. My PHP skills are a little rusty right now (as typically happens when I don’t touch PHP for several months). I watched a super cool demo of Ruby on Rails about 6 months ago and got really excited. Ruby on Rails makes the claim of cutting development time by a factor of 10 for web applications.

The problem is that I don’t feel like learning an entirely new language (Ruby). I’ve gone through some tutorials and kept thinking “I wish I could do this with PHP.” Well, it turns out you can.

CakePHP is an open-source web framework written in PHP. It uses the same MVC framework that Ruby on Rails uses, and does it all in PHP. I’ve watched some of the demos, gone through some of the tutorials, and feel much more at home with it. The biggest challenge I am having is wrapping my head around the whole MVC thing. I can see how it really simplifies things, but it is taking some getting used to.

By this time next month I hope to have two projects completed; one for my Mom, and one for Paula. Then there’s a bigger project (for myself) I’ve been dying to get underway once I’m more comfortable with CakePHP.

April 16th, 2006

Kairi Cute Pictures

Posted by Chris in Life, Kairi

The Family and I went over to my parents house last weekend to visit. My mom took these two great pictures.
Kairi11.jpg Kairi2.jpg

March 14th, 2006

I love this kid

Posted by Chris in Life, Kairi

Haven’t posted in a while. I’ve been really busy. This weekend Kairi fell asleep in my arms when she would normally take her afternoon nap. I didn’t have the heart to disturb her, and she slept like this for a couple hours. Paula took the picture. She’s such a sweetie.

Chris and Kairi

February 15th, 2006

The Multi-State Lottery Association’s Strange Math

Posted by Chris in Life

The Powerball jackpot is huge. I used my trusty PHP Powerball Picker to generate 5 picks for tonights drawing for $310 million dollars. Shortly after 9:00 MST I went to the Powerball web site to check the results. in one of my picks I got 2 of the 5 main numbers, but not the Powerball. I went to the “Prizes and Odds” page to see if that was worth anything. I found this chart:

Powerball Prizes and Odds

I don’t have a math degree… but this just doesn’t look right. The easiest one to spot is at the bottom of the chart. The odds of getting just the powerball number correct. The value of the Powerball will always be an integer of 1–42. They show the Odds of that prize as 1:69. I don’t get it. It seems wrong. I can guarantee you that I can win that prize if I spend $42. So how do the odds end up as 1 in 69? I found this page which shows the odds more specifically as 1:68.96. I still think it’s wrong. If I am assured to win that prize playing 42 times I think the odds should be 1:42… of course this ignores the 5 white balls, but hey— I’m after my $3.

By the way, in one of my 5 picks I got 2 of the 5 white balls. My shitty math figures that is a 1:148.5 chance of matching 2, but I’m sure that’s not how the Multi-State Lottery Association would calculate it.

February 8th, 2006

McCall Winter Carnival

Posted by Chris in Life, Kairi

Went up to McCall, ID last weekend for the McCall Winter Carnival. Came home with these great pictures.

Paula and Kairi Kairi Playing in the Snow Sleepy Baby Main St.

February 7th, 2006

My PHP Powerball Picker

Posted by Chris in Life, PHP

I generally have terrible luck with the lottery. I only seem to play it after the jackpot goes over $200 million. That’s when my demented psyche deems it to be worth $1 to play.

I typically buy a 1-5 dollar Quick Pick… and I’ve never won. In all 20 or so times I’ve played. Obviously the Quick Pick is intentionally giving me bad numbers. To test my theory I created my own system to pick numbers. No longer will the lottery machine choose my numbers for me. Now I’m sure to win.

You can use it too if you like: Chris Hillman’s Powerball Picker™.

If you’d like to see the source… steal it, molest it, claim it is yours… you can get it here. I give up all rights to this code. Use at your own risk. No warranty expressed or implied. Of course if it picks winning numbers for you I know you’ll do the right thing and send me a fat check.

January 31st, 2006

Broken iTunes m3u support

Posted by Chris in Technology

“Broken” is a harsh word, but it is the only way I can describe how Apple’s iTunes handles m3u playlists. My music library is over 108 gigabytes. 21,192 songs, a play length of 61 days, 16 hours, and 47 minutes. That is a lot of music to manage. I use gnump3d as the interface to listen to my music from any internet connected computer, and at home. It works swell.

I’m a long time winamp user. On Windows, Winamp + gnump3d is great. When I’m running on Linux, XMMS + gnump3d is great. Even running it on a friend’s computer with IE & Windows Media Player it works great. So why do I care about iTunes?

Apple has a really cool device™The Airport Express. You can plug the airport express into your stereo an send music to it over the lan (using a wired or wireless connection) using iTunes. It is so much more elegant than hooking your stereo to your computer’s audio port because only the music is sent to your stereo. Other sounds such as new mail notifications or annoying web page audio remains on your local speakers— rather than disrupting your tunes.

Now, with the 6.3 firmware update for the Airport Express (released on January 3rd) and iTunes 6.0.2, you can send music to multiple basestations. You could have 3 Airport Express basestations connected to 3 different stereos thoughout your house and send the same stream to all of them. Not only would your music distribution rock— you would have one kick-ass wireless network.

Now, back to the “broken m3u support” in iTunes. m3u is an audio playlist format, which originated with winamp for mp3 files, and is now widely adopted in many programs. It is basically a file which contains a list of audio files to play in sequence. gnump3d sends m3u playlists of albums, or custom playlists to the browser, which then hands them off to the default application for handling m3u files so you can rock. Pretty much every other application that supports m3u playlists will then parse the lists, and play the files in sequence. Apple’s iTunes takes the m3u playlist separates all of the entries in it, and adds them to the music libabry independantly. This behavior sucks. It makes it a huge pain in the ass to listen to a playlist in iTunes.

I had almost given up on using iTunes, until I came across this. The folks over at iTweaks.com have released a utility called M3U2iTunes, which is a helper application which overcomes the problems iTunes has with m3u playlists. It is available for both Mac & PC. Thank God for independent hackers who come up with easy solutions to serious problems.

-Chris

January 28th, 2006

Installing Symantec AntiVirus 10.x using a Group Policy Object (GPO) installation

Posted by Chris in Windows, Sysadmin

Ever need to install or upgrade Symantec AntiVirus on a large number of machines rapidly? Check this out. Much easier than using a login script, or messing with transfom files for the installer.

Installing Symantec AntiVirus 10.x using a Group Policy Object (GPO) installation

January 27th, 2006

Mass Change Local Admin Password on Windows Domain Computers

Posted by Chris in Windows, Sysadmin

Yesterday I was at a client’s site and was tasked with changing the password for the local administrator account on approximately 200 MS Windows domain computers. Typically if I have to change the local admin password on a few domain computers I’ll just use the computer management MMC snapin, connect to a remote computer, change the password, lather – rinse – repeat. This would take forever though to do on 200 computers.

I came across a Visual Basic Script file which allowed me to complete the task in about 15 minutes. I just had to create a text file with the netbois computer names of each machine I wanted to change the password on, then run one command. This little script is going to come in handy. I found it published here, at VisualBasicScript.com.
(more…)

January 26th, 2006

Blog 2.0

Posted by Chris in Life

Here it is. Blog 2.0. Needed a place to post random thoughts, rants, and nuggets of sage wisdom.

This is going to be a real “grab bag” of stuff. Nice to have my soapbox back— Let’s see how it goes ;)

I’m really struggling with the design of this site. On one hand I really appreciate clean, lightweight web designs. I also like enjoy some eye-candy for visual interest. The photo at the top of this page (at time of publishing) is a picture I took of the submarine I was stationed on in the Navy. It was an early morning and we had stopped in Alaska after doing sound trials in the Puget Sound. I can’t remember why we were running the diesel generator. The billowing white smoke is the exhaust from the diesel. So much for nuclear submarines not contributing to greenhouse gasses.

Anyhow— That image takes up a bunch of screen real estate. Hopefully it’s worth it. Let me know your thoughts on it. I’ve modified the Falling Dreams Wordpress theme for use here. I dig the concrete background. Oliver Russell uses a very similar background on their web site. Since I generally think that Oliver Russell does some of the best design work around, I’ll stick with it. Immitation is the most sincere form of flattery after all.

-Chris

« Previous Page