dfbills.com blog

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

Word of the week

“Borked”

comment on this | posted in: Overheard

iPhone & iPod: Is Apple Giving Up On Its Users?

Will Shipley posted a well-argued opinion piece on the state of affairs at Apple, Inc.

“Apple has to always remember that simply making money CANNOT be its point of existence. The point of any company should be to make customers want to give it money, NOT to get money from customers. It’s a subtle distinction that is the difference between good and evil.”

You tell ‘em, Will. 

comment on this | posted in: Mac

Lexus taxicab

I guess it’s ok to drive a Lexis SUV yellow cab if you’re going to be pulling 12-hour shifts 6 days a week.  Do other cabbies find this pretentious?

I spotted this one on Central Park East in the 70’s.

Large Image Large Image
(2) comments | posted in: Photos from iPhone

Does anyone find this creepy?

I snapped these pics on the corner of 57th and 8th avenue (in New York) on my way to lunch.  What happened to all the children that go in those shoes?  Too bad you can’t see the lawn chairs and other sketchy items visible in the van.

Large Image Large Image Large Image
comment on this | posted in: Photos from iPhone

The original carbon copy goes to the third level: 3.0

Mike Bombich has finally released Carbon Copy Cloner 3.0.  For years, Carbon Copy Cloner was the best way to clone MacOSX hard drives.

The new version has been a long time coming and includes many heavily-requested features.  I’ll admit I jumped ship to SuperDuper! years ago after tiring of waiting for this update.

Among the new features are:

  • Support for block-level disk-to-disk clones.
  • Synchronization built-in.
  • Support for backing up across the network to another Macintosh.
  • Advanced scheduling capabilities—Backup tasks can now be scheduled on an hourly, daily, weekly, or monthly basis, or you can indicate that a backup task should run when the backup device is attached (e.g. an iPod).
  • CCC recognizes iPods specifically, allowing time for the iPod:iTunes synchronization to complete.
  • The ability to drill down into folders to select exactly what gets copied and what doesn’t (you can drill down indefinitely).
  • Built-in software update feature notifies you when updates are available.
  • Universal Binary
  • A pretty new interface

Best of all is the fact that it is “Uncrippled shareware” meaning that you can use it without limitation.  Just don’t forget to drop a tip in Mike’s jar at some point.

 

comment on this | posted in: Mac

Set a custom css signature on your iPhone (updated 4x)

Last week I spent a stupid amount of time figuring out how to set a custom css signature on my iPhone after being ridiculed by a friend for my semi-default “Sent from my iPhone.” tagline.  In the spirit of sharing, I’ve written it up to spread the word.

First, you must have access to the filesystem on your phone.  If you’re on a Mac, I recommend Installer.app Beta.  It couldn’t be easier.  If you’re on Windows, check out Gizmodo’s guide.

Once installed, launch it on the iPhone and install two packages: BSD Subsystem and OpenSSH.  Get your iPhone’s IP address from Settings: Wi-Fi: Your Network: & Tap the arrow.

Now you can SSH into the phone.

ssh root@youripaddress

The password is “dottie”.  Once logged in, change your password using “passwd”.

Now, you can use SFTP with a FTP client like Transmit. Or even use a FUSE filesystem like MacFUSE with sshfs to mount it on your desktop.

At any rate, once you’ve decided how to access the filesystem, you need to copy this file to your Mac:

Firmware 1.0 - 1.1.3
/private/var/root/Library/Preferences/com.apple.mobilemail.plist

Firmware 1.1.4
/private/var/mobile/Library/Preferences/com.apple.mobilemail.plist

On my machine, I just hit command-J in Transmit and it opens in Apple’s Property List Editor (PLE).  This application is installed as part of Apple’s Developer Tools package.  The package comes with every Mac, but is not installed by default.  If you don’t have it, you can grab it from Apple’s developer site.

The reason I recommend PLE is that the plist file is a binary and not plaintext.  Erica Sadun has written an iPhone commandline tool called plist2text.  This is included in her EricaUtilies package in availble in Installer.app.  plist2text is supposed to be able to dump the binary file to a txt directly on the phone avoiding the need for PLE, but in my testing it corrupted the binary.

Once com.apple.mobilemail.plist opens in PLE, click the Root disclosure triangle and observe the SignatureKey value.  If this value is not present, go into iPhone’s Settings: Mail: Signature and change it to anything other than the default.  This should create the key value.

Now onto the design-

For the actual design, you will use html.  Being a CSS convert, I recommend using some tasteful, lightweight css code.  The signature itself is just html with CSS defined inline.  I created a valid xhtml page and used the body portion for mine.  Just take out the html, head and body tag sets.

Mine is simple, clean and designed for the small screen:

David F. Bills
http://dfbills.com
sent from my mobile

Here’s the code:

<div style="font: 10px 'Lucida Grande',Verdana, Arial, Sans-Serif;
line-height: 18px;
color: #525252;
margin: 6px 0;
padding: 6px;
border-top: 1px #999999 solid;
border-bottom: 1px #999999 solid;
background: #fff">
<div style="padding: 2px 0 2px 70px; background: url('http://dfbills.com/images/avatars/iphone.jpg">
<strong>David F. Bills</strong>
<br />
<a href="http://dfbills.com">http://dfbills.com</a>
<br />
sent from my mobile
</div>
</div>

Since it has become commonplace for email clients to deny http downloads in the body of emails, I’ve decided to go ahead and encode my jpeg image directly into base64 using DataURLMaker.  This is entirely optional and does not display when using clients other than the Apple ones.  For a more compatible signature, check out this post.

Replacing the image reference with the base64 code and compacting the linebreaks gives me:

<div style="font: 10px 'Lucida Grande', Verdana, Arial, Sans-Serif; line-height: 18px; color: #525252 ; margin: 6px 0; padding: 6px; border-top: 1px #999999 solid; border-bottom: 1px #999999 solid; background: #fff"><div style="padding: 2px 0 2px 70px; background: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAASwAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAAwICAgICAwICAwUDAwMFBQQDAwQFBgUFBQUFBggGBwcHBwYICAkKCgoJCAwMDAwMDA4ODg4O EBAQEBAQEBAQEAEDBAQGBgYMCAgMEg4MDhIUEBAQEBQREBAQEBARERAQEBAQEBEQEBAQEBAQEBAQ EBAQEBAQEBAQEBAQEBAQEBAQ/8AAEQgAOQA5AwERAA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GVDyfEKTz88 Q5V8nlFpXe62kwkMw7lYbDKi2OfIjR5BIo26VIQFAigCq054b2Re5qm1KcFLH5Cvdzu9LWz+3UjQ tkk9W+3oOKDmbM4FPcFvrPM0Ty88Ser1+csvYzv+r3uOYx0ERtVw0u7qFt/Uzj7FvecVJlsNp6iH HUpHTHA1pmqTi8Va5arQzD7MlHST5DS7DWXTV1vUqVpZxL6ptrnobyrKiUlkk/LzHEccSPHXHWKI 0+xbYuM3lFQsjf72ANiG+4r2ebiXTWjG5ehIqrhbFdXqNthxfpknNId6yqroCrO51DRA4oIQMhWD gZ9pGge4LbLXMcytIy7hpC6Ly3QMOx3fTKUKCU2hLmYlPJQAqpPnTELs9fyLTcs+l23TLX7WOhrz b+LrKOzL9BcI10hmsSexb5iHBQ8OPSp9eK+vr3Re30Lm3udaa+7X5P8Agxhum+FvtAtabL+K/Olt LzkCSwoI5dRaQKEgfAc8POib9PoNx78I7S/R/wACadwHbR3GblblzNS2zRc6VDU0y01IUWG65Kk0 QtwEfVidRW4wwyj7dqssytQYzOznubLaoqdvJSUFQUXVOxCslNRwPW4DjiSQxxfbz7MNytA6jnbg 7ooTbm1RX4ln0yXEvKU5JypXIf6ZKW0pCKDjU/UMccUO/om0/wCY9/Ej/BgYDk9upfyKZ/c/WME5bgzH8w4KEs7VYIDqOOCfJ54BxwYJwQdE/lTn+sf9tGEijYMcA//Z') no-repeat 0 1px ;"><strong>David F. Bills</strong><br/><a href="http://dfbills.com">http://dfbills.com</a><br/>sent from my mobile</div></div>

Now, my signature is complete, self-contained and ready to load into MobileMail.

Switch over the PLE and paste the your code into the SignatureKey string field, save and reboot the iPhone.  When it comes back up, create a new mail message on the iPhone.  You should now be able to see the results of your handiwork.

Signature

Update: A few people have asked for the iPhone photo frame file used in my sig.  I’ve posted the PSD for download.

(43) comments | posted in: iPhone Tips

New design launched!

At long, long, long last I’ve pushed out the new version of dfbills.com.  I won’t mention how long it has been since the last major update… let’s just say this version incorporates all of the incremental improvements I’ve had waiting in the wings.

Hope y’all enjoy.

-d

(2) comments | posted in:

I found one! (a bug)

Well, it was bound to happen.  I found a fairly severe Safari 3 beta bug.  If you’re a web developer or blogger I’ll bet you’ve seen it too.  Have you ever noticed odd characters like: ? & or html entities like &lt &gt appearing in your data? 

The bug has to do with the way Safari submits forms containing data in textarea fields- it randomly corrupts form submissions. 

It really sucks to have to check for randomly changed characters. I think I’m uninstalling safari 3.

I’ve submitted this bug as radar #5470536:

——-
09-Sep-2007 08:25 PM David Bills:

Summary:
The Safari 3 beta corrupts form data submissions from textarea fields.

Steps to Reproduce:
1. Load a webpage containing a form with Safari 3 beta
2. Submit data using a textarea field
3. Check submitted data
4. The data will begin to show corruption
5. This may take several tries as it seems to happen at random

Expected Results:
I expect the data to be clean with no extra characters inserted.

Actual Results:
I’ve found the appearance of odd characters my data since begining to use the Safari 3 beta at public launch. Most often, I see a ? at the top of the textarea data field. Occasionally, I notice that a double quote turns into a semicolon and that certain characters like a “greater than” get encoded into html entities.

Regression:
Submitting data to blogs seems to be a good way to trigger this bug. I see it on and off while working on several blogs I’ve developed.

Notes:
This bug has been reported across the web, but I was not aware of the severity until this evening.
——-

I wonder if Apple sees this bug appearing in their own radar forms.

comment on this | posted in: Mac

Labor Day 2007

Photos from Labor Day 2007

Large Image Large Image Large Image Large Image Large Image Large Image
comment on this | posted in: Photos from Aperture Gallery
« First  <  40 41 42 43 44 >  Last »