Git Repository of my Drupal Distro

Sat Jun 19 2010

I have set up a public git repository for the Drupal distrubtion that I use on my sites. It's a Drupal 6.x platform with several must have contributed modules & themes.

You can access it at http://github.com/dgpalmer/remlap

or directly via the command line with:

git clone git://github.com/dgpalmer/remlap.git

This is how you get your CIS494 Final Project done!

Thu May 06 2010
Tagged w/:

 

 

It's going to be a long night, but I'm ready to rock this Image Gallery out.

Writing a sweet Korn Shell script to build an Image Gallery using sed, awk, m4, & ImageMagick!

 

The New Dork

Fri Mar 12 2010
Tagged w/:

Top 10 Newly Discovered Albums of 2009

Sun Jan 03 2010
Tagged w/:

Well 2009 was quite a year of musical exploration for me. Techno & Electro took over my ears this year. I had developed a taste for techno during the past few years, but this taste has blossomed into something big and now I'm obssessed. Deadmau5 & Boys Noize were probably my 2 biggest finds of the year.

If you want to follow my music listening more closely, be sure to check out my last.fm profile and add me as your friend!

Here are the top 10 albums that I discovered in 2009:

DonovanPalmer.net is now up!

Welcome to my new website, donovanpalmer.net! It's just going to basically be a blog where I rant about all the stuff that matters to me. I will be posting all sorts of guides/reviews/rants about various topics including Web Development, Drupal, Computers, basically anything nerdy. I'll also be posting Lakers stories and videos throughout the course of the NBA season. I'll also have reviews of video-games and other gadgets & devices. I hope you enjoy!

Thanks!

Donovan Palmer

NBA Offseason Wrap Up

Thu Oct 01 2009
http://donovanpalmer.net/sites/default/files/images/kobe_vs_artest.jpg
http://donovanpalmer.net/sites/default/files/images/artest_laker.jpg

With preseason right around the corner, I figured it was time to summarize what was a very intense offseason when in reality it could have gone a lot of smoother. Early in June, things looked great, especially at the Lakers parade, celebrating the 15th Championship for the NBA’s Winningest Team.

But the week after that, things got really iffy with 2 of the 3 free agents up for grabs. Trevor Ariza, who had become arguably my second most favorite Laker during the 2008-2009 season performed at an outstanding level during the 2009 playoffs. Trevor was playing at the peak of his career during the playoffs, shooting a 47.6% for 3-pointers and averaging 11.3 points per game1. Most importantly, he led the Lakers in defense with 1.6 steals per game, including 2 game saving steals against the Denver Nuggets in the Western Conference Finals. Now many would argue that Trevor Ariza saved the championship run for the Lakers, and I agree with that, but frankly, I wish we weren't in the situation were we needed 2 of Trevor's game saving steals to win.

About a week after the Laker's parade, Mitch Kupchak (GM of the Lakers) & Jerry Buss (Owner of the Lakers) offered Ariza a deal for $5.7 million dollars a season for 3 seasons. Ariza's agent, David Lee abruptly refused and said the offer was insulting. With the news of Yao Ming's perhaps career ending injury, Mitch thought about Ron Artest, sent the exact same offer over to Ron's way, and Ron was more than happy to accept the pay cut to play on a championship team. Thats the thing that Trevor Ariza forgot, that he was on a championship team.

Many people were trying to compare Ron Artest & Trevor Ariza, but there is no need for comparison, Ron Artest is a much better player, end of story. People argue that last season was Ariza's breakout season, and yes he did play better than he ever has in his career, but this is only because he was playing alongside Kobe Bryant & Pau Gasol. Every 3 pointer Trevor hit, he was wide open. Why was he wide open? Well cause Kobe has 2 defenders all up in his grill!

There is no doubt that Trevor Ariza is a great basketball player and was a huge asset for the Lakers, but we couldn't offer him any more, and he had his chance to stay on the team. He got greedy and refused a deal that virtually any player of his stature would take just to be on the Lakers. Ariza refused and Artest took the deal and thus Ariza went to Houston, well for how much more? $200k more a season?

Tell me Trevor, was $200k more a season worth it to be on a losing team rather than the best team in the NBA? Yes, Houston is a losing team now because Yao Ming is gone, Artest is gone, and McGrady is well, Tracy McGrady, overrated, overpaid, & overhyped. I wouldn't be surprised if Houston doesn't make the playoffs this 2009-2010 season. I'm sure next June when Trevor Ariza is at home with his family on the couch, watching Artest put on the championship ring that could have been his, Trevor will then realize the huge mistake he made, if he hasn't already realized it.

Let's take a look at some numbers:

Force Browser to Reload .swf's with jQuery

Mon Sep 28 2009

Recently, I ran into an issue with one of the flash apps I built. Since, I'm making changes almostdaily, there is always a new version of the swf, and right now there are users actively using this app and they weren't receiving the newest version unless their cache was cleared. The only option is to force the browser to reload the new .swf and so I searched on Google and this seemed to be those most frequent answer, but certainly not the best.

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

And yes it does work great but only if the user doesn't already have the .swf in their cache and it doesn't always work with Internet Explorer.

A co-worker suggested I try to make a javascript snippet that would append x number of random digits after a "?" to the default.swf file in order to trick the browser into thinking it was a new version of the file.

I decided to use the tools available with the jQuery API along with a simple "for" loop that will append a random 24 digit number to the end of the embed's src like this default.swf?8936273541227119153514771. This was relatively simple to set up. I simply use the .attr("src") function from the jQuery API to pull the source from the element of the #css_id being called. Then a for loop generates 24 random digits and creates a string of them and concanets them to the src of the element using the .attr("src", string) function again, but this time there is a 2nd parameter, and it is a string that will replace the current src of that element.

Here is the Javascript:

  1.  <script type="text/javascript">
  2. $(document).ready(function(){
  3.  var temp = $("#css_id").attr('src');
  4.  var rando='';
  5.  for(i=0; i<=24;i++){
  6.   rando = rando +((Math.floor(Math.random()*10))+1);
  7.  }
  8.  $("#css_id").attr('src', temp + '?' + rando);
  9. });
  10. </script>

The #css_id is the id for the embed tag in which you are loading the swf file.

<embed id="css_id" src="sites/default/files/default.swf"></embed>

That should about cover it! Please note though that this is more of a "hack" then an elegant solution. Each time your user visits your site, they will be downloading a new .swf file even if there is no update. If your site has a lot of loyal traffic and users come to your site several times a week or day, they will be downloading a new .swf each time and that can begin to fil up their temporary internet files pretty quickly. This is a good solution is you are updating the .swf frequently and it is of relatively small size.

Now if you add the meta tag I showed above to your &lt;head&gt;, this should keep the browser from storing each .swf in the cache and thus should resolve this issue of storing too many different .swf's for the same file.

If you know of a better way to do this, I would like to hear it! :D

inFAMOUS Review

Sun Sep 27 2009
Tagged w/:
http://donovanpalmer.net/sites/default/files/images/infamousboxart1060309580.jpg

After finishing a hard week of work last Friday, I decided it was time to head to Gamestop and buy a new videogame and really smash out over the weekend. After contemplating Prototype & Batman Asylum, a friend/coworker recommended that I look up inFAMOUS. After watching a few trailers, I wanted to play. I got off work around 2:30 and picked it up at the local store.

I got started and immediately was intrigued by this unique and very dark world. The game takes place in a quarantineed Metropolitian area known as Empire City.  I'm not really sure about all the details of the story, but basically a government experiment involving race & DNA went wrong but you ended up getting super powers of it. You are essentially an electro charged super Zeus :P You have a bunch of awesome electricity based powers. These include: Lightning Spark, Shockwave, Shock Grenades, Arc Lightning, Mega Watt Hammer, Bio Leech & many more.

The game has such a unique feel and lore, much like Bioshock did, but then it has an open world environment very similar to Grand Theft Auto as well as some similiarities to Crackdown. A very important aspect of the game is decision making. Like in Bioshock, each moral decision you make has a substantial effect on the outcome of the game. In inFAMOUS, you can choose to be Heroic and "help" people or you can choose to be Evil and become "Infamous".  Of course, I've chosen the latter and my duties include killing all innocent bystanders, blowing up as many cars as possible, and putting an end to the Reavers & Dust Men.

Here is a great video I found that basically highlights all the fun stuff you can do in inFAMOUS :D

As you can see this game is just about blowing stuff up and just having a good time. Whether you're flying around the city, blowing up people, grinding power lines & train tracks, base jumping off buildings, or all of these at once, you are going to be having a great time playing inFAMOUS.

Either way if you buy it or rent it, inFAMOUS is a must play title for the Playstation 3.

Syndicate content