dfbills.com blog

Latest AOL Desktop for Mac includes Webkit browser

The latest AOL Desktop for Mac now includes a Webkit-based browser.  Who woulda thunk?

Over the years, they’ve gone from no web browser to proprietary browser to Tasman (IE 5.0) to Mozilla (Netscape 7.0) and now to Webkit (Safari).

comment on this | posted in: Mac Webdev

Safari single window mode

To enable Mac Safari single window mode: (available starting in Safari 3.1)

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

comment on this | posted in: Mac Tips Webdev

Real-time iPod scrobbling to iChat

A few months back, I was feeling a bit jealous of all the cool kids in iChat using their music as status messages.  I’ve played with this on and off since I first saw the scripts to make this happen on Doug’s Scripts for iTunes.  When it was officially added to iChat in the Tiger OS release, I toyed with it some more, but never could really use it on a regular basis since I play music at work on my iPod.

Then one day it hit me- with my jailbroken iPod, I could wirelessly scrobble tracks to last.fm and then pull that data back down and use it for a status message.  So, I whipped up a little shell script.

#!/bin/sh
while :
do
osascript -e ‘tell application “iChat” to set status message to (do shell script “curl http://ws.audioscrobbler.com/1.0/user/dfbills/recenttracks.txt | head -n 1 | cut -c12-”)’
sleep 110
done

Download here.

I’m sure this could be cleaner and I’ve been mulling over the idea of setting the data as a variable so that I can display a growl message too, but hey- my contacts in iChat can see my uber-cool status line showing my musical taste and that’s all I set out to do.

comment on this | posted in: Mac Music Unix Webdev

A win for web standards and HTML 5

Today, Apple unveiled the latest version of Safari web browser.  What’s new?  Not just the speed- Apple says Safari loads web pages 1.9 times faster than Microsoft’s Internet Explorer 7 and 1.7 times faster than Firefox 2 & JavaScript executes up to six times faster than other browsers.  But more importantly, this is the first browser to support the new video and audio tags in HTML 5, first to support CSS Animations, introduces support for CSS Web Fonts and support for integrated client-side database storage via offline SQLite database.

Go HTML 5!

comment on this | posted in: Mac News Webdev

How to create an iPhone WebClip Bookmark Icon

A clever developer has posted instructions on how to create an iPhone WebClip icons for your own website: (via MacRumors)

The lowdown:

- Create a 57x57 PNG
- Name it “apple-touch-icon.png”
- Upload to the root level of your website

You can override Safari’s WebClip search behavior just like with favicons:

<link rel="apple-touch-icon" href="myicon.png"/>

As usual, detailed instructions for iPhone web development are posted in Apple’s iPhone Dev Center.

comment on this | posted in: iPhone Tips Webdev

Refresh MacOSX DNS cache

To flush DNS cache

Tiger:

sudo lookupd -flushcache

Leopard:

dscacheutil -flushcache

comment on this | posted in: Mac Tips Unix Webdev

R.I.P. Netscape Again?

AOL has declared Netscape dead.  Has this not happened before?  “AOL Cuts Remaining Mozilla Hackers” (2003)

Most people have considered it dead for quite some time.  How many people have even heard of Netscape 9.0?  Asking around, none of the developers I know have. 

This might be the end of the AOL Netscape era, but certainly not the end of Mozilla.  Anyone ever heard of Firefox?  How about Seamonkey or Camino?

(1) comments | posted in: News Webdev

Safari is coming of age

Finally, the WebKit team has added support for Enhanced Rich Text Editing in version 3.  One less reason to fireup ‘ole clunky Mac Firefox. 

Check it out- just click the text and editing controls appear.

comment on this | posted in: Mac News Webdev

Blocking Chinese spammers

One of the sites I work on, Songwriter101, has been experiencing problems in the forums- Chinese drive-by spammers.  The forum moderators had been deleting posts for weeks by users called shoesnew, Hu, ch, shoeman and the like.  They were all posting about the same topic- deals on sneakers, athletic wear, etc.

My team was pulling out their hair.  “Of all things… why shoes?? Do these spammers think that songwriters have a thing for purchasing new shoes? I could understand if they were spamming guitar strings or something, but shoes???”

I asked if there were any good deals.. and then knew I had to deliver a solution.  After playing the cat and mouse game for some time with suspending the userids and banning the IPs, it was time for something more drastic.

A quick Google search pulled up a great site with complete IP blocks in several formats.  A bit of htaccess tweakery with the CIDR files and now, we’re Chinese spam-free! 

(I’m quite proud of the “error message.”)

From the moderators: “And… today is the first day all week of spam-free moderating. Thank you!!  ...enjoy the absence of sneaker ads.”

comment on this | posted in: Tips Troubleshooting Webdev
« First  <  7 8 9