Archive for the ‘Web Programming’ Category

Lightbox JS

Wednesday, January 11th, 2006

Here’s a useful little chunk of Javascript which can probably be put to good use on your website:

Lightbox JS is a simple, unobtrusive script used to to overlay images on the current page. It’s a snap to setup and works on all modern browsers.

It works quite well, and is also somewhat instructive. I may work on my own version of this script to use here on my website.

Lightbox JS

[tags]Web Programming,Javascript[/tags]

Addendum: I’ve removed the AJAX tag, since this actually doesn’t do any asynchronous Javascript calls.

htaccess Cheatsheet

Monday, September 19th, 2005

My recent attempts to block hotlinking made me search for a few minutes to find the information contained on this handy htaccess cheatsheet. It’s got some good stuff in it.

Bye Bye, Freeloaders

Wednesday, August 31st, 2005
Don't Bogart My Bandwidth!

I received an email a couple of days ago from someone who thoughtfully noted that someone was stealing bandwidth from my by hotlinking to images in my /images directory. Effectively these people use your webserver to serve images for their websites. It’s tacky: kind of like filling your pockets with napkins and packets of ketchup when you go to a fast food restaurant. Any individual act is admittedly pretty trivial, but as of noon today, 546 images had been served to these people. Sigh.

A bit of research yielded a recipe for preventing this. Since I installed it a half hour ago, 46 further accesses have been routed to a banner image that will hopefully be less attractive.

All of my images are just a click away, but if you are going to swipe them, at least use your own bandwidth to distribute them.

Update: Two people have noted this broke reading from bloglines. I’ll fix it shortly.

Microsoft Virtual Earth is out…

Monday, July 25th, 2005

This is getting a lot of play everywhere, but Microsoft’s new mapping application, Virtual Earth is now live. In most respects, I find it very similar to Google’s offering, but the API seems a bit more refined, and it doesn’t have the problems associated with generating usage keys. You can find information about programming the api here, or the simplest example here. You can pan around, or double click somewhere to zoom in. I’ll try to work up some bigger examples later.

Google Video Search

Monday, June 27th, 2005

Today Google released their own plugin for playing video on their Google Video Search page. Apparently it is based upon VLC, and you can get the source. Unfortunately, no love for Linux, FreeBSD or Mac OSX users yet.

Return of Design - Individual Color

Monday, June 20th, 2005

I’m not color saavy savvy enough to actually design a good color scheme for websites. What I did years ago was come up with a particular blue (#336699) and just chose to use it as the predominant color for my website. I keep thinking that it would be nice to add some different colors, but frankly, I never get around to it.

Today, I discovered that returnofdesign.com had a cool webpage which you can use to find nearby hues, variations in saturation, and complementary colors. For instance, here is the page for brainwagon blue. Very nifty!

Google SiteRank Patent

Thursday, June 16th, 2005

Slashdot mentioned that the Google SiteRank patent application was available, so here it is for your perusal.

AXS and Wordpress Integration Plugin (2.1)

Thursday, March 31st, 2005

AXS is a pretty nice little program that can gather many of the web usage statistics that are provided by statcounter.com, but without any limits. There is a new AXS and Wordpress Integration Plugin that makes it very simple to add to your Wordpress setup: basically just put the plugin where they all go, configure three short options, and voila.

Check it out if you are in need of such a thing.

Minimo on Pocket PC

Wednesday, February 23rd, 2005

I had heard about the open source browser Minimo, but they just recently released their first trial build.

You can download a sneak peak at this build here:
http://www.meer.net/~dougt/minimo_ce/MinimoCE_0.002.zip. Keep in mind,
it is basically the second build that I made that actually rendered a
page successfully. When you check it out, remember I told you: Lots of
work to do; Lots of work to do.

I’ll have to check that out when I get home. Stay tuned for an update.

ajax: a new approach to web applications

Wednesday, February 23rd, 2005

I must admit to a certain fascination with Google Maps, and was trying to figure out how it works. AdaptivePath has a nice essay called ajax: a new approach to web applications that describes the alliance of Javascript and XML that makes it possible.

Greetings World Travelers!

Thursday, February 3rd, 2005

Where do you all come from?As I mentioned in a previous post, I’ve begun to use statcounter.com to help figure out various statistics about people who visit my blog. It’s somewhat fascinating to realize that less than half of my visitors come from the United States. Look at the pie chart on the right which shows the nationality of the last 100 visitors to brainwagon. The Internet (and apparently my own appeal) is somewhat more broadbased than I might have imagined.

And of course, the search terms that people use to find brainwagon are equally as varied, the last 36 queries are somewhat representative:

  • hacking linksys router rt31p2
  • daily show dr. baugh
  • hand shadows pictures
  • man powered helicopter
  • build a smoker from a trash can
  • the painting from the dodgeball movie
  • pvc flamethrower
  • simple telnetd
  • boots of escaping file quality
  • treo podcast
  • autochrome world war 2
  • gadget silly
  • through-wall surveillance
  • ark of the covenent
  • drivers aiptek dv 4500
  • scheme compiler
  • mythtv freebsd
  • squarpent
  • harold yahoo.com harold
  • cg podcast
  • configure thttpd
  • mindstorms balance
  • hipster pda
  • recording podcasts on windows
  • earthquake 9-12-2003
  • aiptek dv4500 poor
  • pongmechanik
  • doom3 hints
  • autochrome color war
  • origami crane eps
  • tablespoon individual lists of usa 2005 @yahoo.com
  • sillyusb devices
  • weight watcher points joes crab shack
  • os-tan john
  • 3d tour chernobyl
  • audio 101

I’m obviously a nut.

Gathering Statistics for Your Weblog

Friday, January 21st, 2005

Visits to brainwagon.orgI have to thank Russell Beattie for writing about StatCounter.com, the service that he uses to monitor his website. In the days immediately after the Apple Keynote, his website showed a significant bump in traffic. Neat. I decided to give it a whirl (for the level of traffic that I use it for, it is free, and presents no annoying ads or popups for my readers). I’m only a week into using it, but it’s really very helpful, and now it’s part of my daily “web maintenance” routine. It filters out spiders like Google and leaves you with raw counts on numbers of visitors, where they came from, and what search terms they may have used to find your website. All it requires is the addition of a small chunk of JavaScript to your webpage, and no muss, no fuss, you can access your account on statcounter.com and find out just how few actual readers you actually have. :-)

One small thing that could be improved is that it doesn’t do any monitoring of RSS feeds, so I can’t use it to monitor who is downloading my podcasts or reading brainwagon just on an aggregator. The reason is of course that even if you put JavaScript in the feed, no aggregator would know what to do with it. It would be nice to have an all-inclusive solution to monitoring downloads, but that would almost certainly require direct access to the Apache log files.

Incidently, I have no interest in this company other than as a satisfied customer. Give it a try if you like.

Roll Your Own RSS

Friday, December 3rd, 2004

The PhotoblogsWiki has a nice tutorial on rolling your own RSS feed for a photo weblog. Good stuff, and the kind of bootstrapping that I frequently do myself. The Wiki also references Stephen Downes’ How to Create an RSS Feed With Notepad, a Web Server, and a Beer, a very nuts and boltsy approach as well.

Hacking Wordpress…

Friday, November 19th, 2004

I’ve been thinking for sometime that I should really try out the new development version of WordPress. I hacked some crude support for enclosures into my version, but I heard that there was some new code that is supposed to deal with it in the current version, so I thought I’d give it a try.

The way that I hacked the system was by the use of custom fields: basically I added two fields audiourl and audiolength, which if they were present in a posting would:

  • add the necessary enclosure tag to the RSS feed, and
  • add a link with the word “Enclosure” and the size to the posting so those without ipodder scripts could download the mp3 file

This worked fine, but was sub-optimal because it required me to type in the size of the audio enclosure itself. In the CVS version of Wordpress, any link to an audio, video or image file is included in the feed as an enclosure, and the code in Wordpress is smart enough to try to fetch the header for the requested item to get its Content-type and its Content-length, so that simplifies the overall process.

It took me only a few minutes to go back through my database using a python script and the MySQLdb package and issue the appropriate UPDATE SQL commands to switch one to the other. Et voila! It worked just fine.

While I was trying out the new version, I noticed that it loaded the index page much faster than mine. The key difference would seem to be the right column, and in particular the code that I got from Chaitgear for tracking referers. Digging in the code, found that it does a wasteful SELECT that probably fetches the entire list of referers. Putting a limit onto that query results in the same result, but operates much faster. That’s in place now.

If the CVS version of Wordpress checks out, I’ll probably try to deploy it as soon as I can port my brainwagon “theme” over to it.

Happy Halloween!

Wednesday, October 27th, 2004

In an effort to get in the mood for Halloween, I thought that I would change the default color scheme on my weblog until after the ghosts and spooks are gone. Enjoy the pumpkin orange colors, soon we will be back to Brainwagon blue.