The malware triple cocktail

I have always prided myself on being savvy enough when browsing the web to avoid things like viruses and other malware.

I’m not so confident anymore, after I got hit with the triple cocktail of Virtumonde, Smitfraud, and Worm/Downadup.

The first sign of trouble was when Firefox started randomly opening unrequested web sites.  It turns out that this was the action of the vile Virtumonde.
Continue reading “The malware triple cocktail”

Advanced photo management issues in Picasa

I recently did a reorganization of our photo library (approximately 30,000 photos).  We had previously been using a centralized desktop computer to store our photos, which we would access via Windows laptops.  The desktop bit the dust recently, so I moved the library to a pair of external USB drives, which we connect directly to the laptops (eventually, I hope to move to an inexpensive, low-power NAS solution).

A problem we ran into is that Picasa, our photo management software of choice, isn’t really meant to operate in such a shared environment.  Let me detail some of the problems we ran into because of this.

Continue reading “Advanced photo management issues in Picasa”

Trouble syncing iTunes and Apple TV

I was having trouble syncing iTunes to my Apple TV (this is after I have been syncing for a number of months).  All of a sudden, iTunes would crash during the synchronization with Apple TV.  I tried limiting what was being synced (unchecking Movies, TV Shows, and Photos).  Nothing was working.  Turns out Genius is to blame…
Continue reading “Trouble syncing iTunes and Apple TV”

Auto-refreshing pages and bandwidth optimization

I have the pleasure of managing the technology side of a fairly large-scale Web site for a traditional media company.  We do somewhere around 2.7 million pageviews on a normal day, and as many as 7 or 8 million on a busy day.

Obviously, with traffic levels like this, optimizing our bandwidth usage is critical.  We use a CDN to deliver “static” content like CSS, Javascript, and images.  The CDN offers cheaper bandwidth than our hosting provider, so we try to limit what we serve from the hosting provider to content that is not cacheable, like dynamic, customized HTML.

But just because the bandwidth is cheaper at the CDN doesn’t mean that it’s free.  We still want to minimize the amount of data we push through that network.

Obviously, a smart caching policy is the first place to start.  We use Apache’s mod_expires to set sensible expiration policies on content.  For example, we allow visitors to cache our CSS files for a week before their browser even needs to check to see if it’s changed.  

Despite such efforts, we have had trouble containing the traffic to the site.   When I performed a deep analysis of our CDN traffic and compared it to the number of pageviews and visitors, I found some disturbing results.
Continue reading “Auto-refreshing pages and bandwidth optimization”

Mootools Hash Cookie Compatibility Class

Mootools is a fantastic Javascript framework library that gives you clean, well-tested, cross-browser mechanisms for browser capability detection, manipulating the DOM, injecting SWFs, making AJAX requests, and building animation into your client-side applications.  I’m won’t try to sell it over other libraries like scriptaculous, dojo or jquery.  But if you’ve selected mootools as your javascript framework, you might find this article useful.

Mootools has a nifty concept of a hash cookie, where you serialize a hashed array and stuff it into a cookie.  I like this, because as an application developer, you don’t have access to an unlimited number of cookies.  With a hash cookie, you can store a number of values in a single cookie.  

If you build any Web applications using javascript and PHP, you may find occasion to share cookies between client-side javascript and server-side PHP.   In a more sophisticated application, both the client and the server code may need to read and write to the cookie.  Enter my library for manipulating hash cookies in PHP.  With this library, you can move the hash seamlessly from your PHP code to your Javascript.

Continue reading “Mootools Hash Cookie Compatibility Class”

AppleTV: one of my favorite things

When I first heard about the AppleTV, I was underwhelmed.  It seemed like a sort of gateway into the iTunes Store, with a focus on video purchase and rental, something I wasn’t particularly interested in at the time.  It also was only 720p-capable, when I was lusting after 1080p components.  I also thought that you had to use it in conjunction with an always-on iTunes running on another computer.

In early 2008, I was searching for a system that would let me file away my CDs and use a digital media center to access all my music.  I was leaning strongly toward a Mac Mini for the task, having been impressed by the Front Row interface.  But the deeper I looked, the more problems I saw:

  • the Mac Mini has DVI out, which you can convert to HDMI, but without HDCP support, some devices (like my Sony receiver) won’t play nice with it
  • I read reports of users having trouble setting the resolution to nicely fill a 1080p monitor
  • it’s expensive and underspec-ed.  The storage on the system is pitifully low, and if you bought the right storage, you’d need to spend around $800-900, plus the elegance factor is diminished with a USB drive and power supply sitting next to it

I read more about the AppleTV, and it looked right for the job:

  • you can fully sync an iTunes collection onto the AppleTV’s hard drive, and play back your music without an external computer
  • HDMI output
  • 100% 10-foot interface
  • inexpensive

So I bought a refurb 160GB model and brought it home.  It was trivially easy to set up networking and sync it to iTunes.  I used a wired Ethernet connection to sync my music collection over.  That dramatically cut the sync time.  I was impressed at how easy it was to switch from WiFi (which I originally configured) to wired networking.  Plug it in, and the system detects the connection and automatically switches to the wired connection, and back to WiFi when you disconnect.  Very nice.

So I’ve been very happy with its capabilities for bringing our music collection into the digital age.  Having nightly access to the iTunes library on a 46″ display has also prompted me to spend more time cleaning up typos in the iTunes library and downloading album art.

Since we bought it, we’ve found tons of other things we enjoy doing with it:

  • its photo slideshows are mesmerizing; we have an LCD frame in the house, but it’s nothing like seeing 10-12 photos floating in 3-space on a big screen
  • I’ve enjoyed watching a number of video podcasts (MobLogic.tv, Play Value, and Happy Tree Friends are fun — wish there were more episodes)
  • with version 2.1 of the software, internet radio is great on the AppleTV — one more nail in the coffin of my satellite TV provider
  • we’ve actualy rented some movies, and I have to say I was too quick to dismiss 720p; it looks really good, especially since I don’t yet have a Blu-Ray player;  I’d say that the 720 rivals the highly-compressed 1080i that we get from Dish, and it blows away our standard def DVDs
  • having access to movie trailers before renting is really nice
  • YouTube is sometimes fun to browse through

I’ve got some issues with it, but I’ll save those for another post…

Dish Network ViP 622: Worst DVR Ever?

I am the not-so-proud owner of a Dish Network ViP 622 DVR.  This is my third receiver in 5 months.

Before I get too far into this, I should say that I’ve really had no problems with Dish Network.  I’ve been a subscriber for a number of years.  We made the switch from DirecTV when Direct dropped their MusicChoice and replaced it with XM.  That’s a whole different subject — suffice it to say that the XM promo spots were sufficiently irritating, and the playlist was so thin on the alternative rock stations that I switched providers.  Dish has kept their own music stations which they augment with Sirius.  Sirius is only marginally better than XM, but the Dish stations are reasonably good.

OK — so I’ve got no problem with Dish and its service (albeit all my positive experience was with their standard-definition product).  But this DVR is absolutely horrid.  As many have noted online, it runs very hot, which I’m sure does nothing for its stability.  It flakes out all the time with minor interruptions:

  • sporadic resets
  • periods where the menus are sluggish
  • periods where the unit ignores button clicks selectively (almost as if it is ignoring every other button click
  • weird dropouts in the digital audio that cause my Sony receiver to go nuts as its decoders switch modes, exacerbating the dropouts

Then there are the major failures:

  • unit one: failed after about two months of service; recordings would freeze and start over a few seconds into playback; also, skip back and ff/rew would not work anymore
  • unit two: locked up completely a few times (needed a full power-cycle to start back up), and finally refused to start up anymore

I’m convinced that this third unit will die a horrible death in a few months.  Regardless of whether it does, I’m considering taking some sort of action to replace it with another model.   But I don’t know if another will be much better.  I realize that decoding, recording, and playing back HD video requires a substantial amount of computing power, and I’m sure it’s hard to build a box that can do this and still be inexpensive enough to “throw in” to a subscription package.  This could be a case of being on the bleeding edge.  But there’s got to be something better than this boat anchor!

 

 

Accessing SMB servers with PHP

NOTE: this is not supported at this timem. Please use newer code, like https://github.com/icewind1991/SMB.

Recently, we had a need to retrieve and put files onto a Windows server from a Linux box.  I looked around for a good way to access samba or Windows file servers from within PHP, and I didn’t find anything promising.  There’s Victor Verela’s smbwebclient, but it’s really more than I was looking for, as it provides a full web gateway to the SMB server.  You could probably pull out his samba class and use that standalone, but it wasn’t quite what I was looking for.

Continue reading “Accessing SMB servers with PHP”