Coder’s Eye

A site about one of the three passions in my life.

Coder’s Eye header image 1

Weewar Status Notifier for Adobe Air

June 10th, 2008 · 13 Comments

Weewarify icon
I’m pleased to announce the release of my first Adobe AIR application. This is a simple little desktop (not browser) app which checks your status on Weewar to see if you have any games waiting for your attention.

Revision 2.2 feature list:

  • Checks your status using the Weewar API
  • User settable interval between checks
  • You can force an update by clicking on the “x games waiting” message.
  • Semitransparent, draggable window
  • Built with HTML, not Flash.
  • (New in version 1.1) If you have waiting games and you click on the message, you’ll open a new browser window and go to your headquarters.
  • (New in version 1.2) Works on Windows.
  • (New in version 1.3) Turns red when you have games waiting. Resizes to fit contents.
  • (New in version 1.4) Lists the games waiting for your attention
  • (New in version 1.5) Added the option to have the window always stay on top
  • (New in version 1.5) Changed the last checked display to show “xx minutes ago”
  • (New in version 1.7) Compatible with AIR Beta 2
  • (New in version 1.7) The window floats to the top automatically if you have waiting games. That way it doesn’t get buried but you don’t have to have it always floating on top of the other windows.
  • (New in version 2.0) Updated for Adobe Air 1.1
  • (New in version 2.2) You can now click on the “checked x minutes ago” status line to do an immediate status check.

Installation

  • Install the AIR Runtime. It is very small and fast.
  • Download Weewarify 2.2
  • Install the app by double-clicking on the downloaded installer.
  • The first time you run it, it should detect that you haven’t configured, and show you the configuration window. Put in your username and your “token” from your Weewar account page.
  • Click the icon on the top right to save and flip back to the status page.
  • That’s it, the program will now check Weewar every few minutes for you.
  • Important! If you let the installer run the app after install (which is the default), it doesn’t work. I have no idea why. Just quit and restart it. It will work when launched normally.
  • WARNING: Doesn’t work on Windows at the moment. I’ll fix very soon.

Open Source

Feel free to contribute, browse the source, report bugs, or request enhancements at Weewarify’s home on Launchpad.

Technorati Tags: , ,

→ 13 CommentsTags: Adobe AIR · Javascript

How to send HTML Mail to a Mailing List

June 4th, 2008 · No Comments

Many stores use GNU Mailman to maintain a mailing list for store sales and newsletters. Satchmo has this as a built-in option, for example. It isn’t too bad an option, after all. You can easily set options so that it is “push only” and therefore only the mailing list owner can send mail.

(Yes, it really isn’t a great idea. I heartily recommend a service such as Aweber to manage your list, which will lead to much better legal compliance and more professional results. But bear with me, not all store owners want to pay for additional services.)

However, what if you want to send nicely formatted HMTL newsletters? How do you get your mail client to send those so that they’ll look nice for your customers? Answer, you don’t. You send it manually from the commandline.

Here’s how…

[Read more →]

→ No CommentsTags: Best Practices · Linux

Why I didn’t switch from jQuery to ExtJS after all

June 4th, 2008 · 9 Comments

A while back, I wrote an article about why I was switching to ExtJS from jQuery. This remains one of the top ten pages on the site, despite the fact that I never really did switch. Checking it just now, I am certain that it is the most heavily commented article on the site.

The fact is that I started to switch, did a site or two, and then I quickly changed my mind.

There are four reasons I didn’t end up switching from trusty jQuery. Size, familiarity, purpose, and license.

[Read more →]

→ 9 CommentsTags: Libraries · Open Source · Javascript

Updated Weewarify for Adobe AIR

June 3rd, 2008 · No Comments

Using the free AIR code signing certificates offered by Adobe AIR Marketplace I’ve signed Weewarify 2.1 so that it doesn’t give nasty “UNKNOWN PUBLISHER” warnings when one goes to install it. Evidently, I’ll now be able to publish updates as well, and have them be automatically offered as available, so long as I use the same cert.

I’ve got some big AIR plans, especially now that my Flash skills are growing exponentially. I think I’m going to make a store monitor app for Satchmo to allow admins to know when they’ve made sales or the site is down.

Technorati Tags: , ,

→ No CommentsTags: Adobe AIR · Satchmo

Fixing a category assigned with itself as parent in Satchmo

June 3rd, 2008 · 1 Comment

One annoying possibility in Satchmo is that administrators sometimes accidentally set a category as its own parent. This causes an infinite loop and hangs the site. So you can’t even use Django to fix the error.

Luckily, the solution is simple. At the commandline do like so:


/opt/webapps/mystore $ ./manage.py dbshell
mysql> update product_category set parent_id=null where id=parent_id;
mysql> quit

Problem solved.

Technorati Tags: ,

→ 1 CommentTags: Satchmo

Free Code Signing Certificate from Adobe

May 28th, 2008 · 1 Comment

Score! I just got a free Adobe AIR code signing certificate from Thawte. Adobe is giving out 125 of these to the first people who upload to the new Adobe Air Marketplace.

This is a $300 value, and it is good thinking by Adobe, because while I enjoy making free apps for AIR, I wouldn’t have spent the money on the cert otherwise.

Warning, this only works if you have a company to associate the cert with. You can’t get one without a company. That’s why everyone should have at least a solo company set up at all times. It gives you freedom to do a lot of stuff closed to the rank-and-file.

Technorati Tags: , ,

→ 1 CommentTags: Adobe AIR · Best Practices

Updated my AIR apps to version 1.1

May 26th, 2008 · 3 Comments

I finally got around to updating my Adobe AIR apps to the latest version of the runtime. Argh.

They keep changing the sandbox! It is incredibly annoying to have to work around the sandbox, and then to have to go make seemingly arbitrary tweaks on every version update.

Regardless, I’ve now updated Bluegrid and Weewarify to work with the latest AIR.

Mostly, I did it so that I could get a free Thawte AIR developer cert from the Adobe Air Marketplace. Those things cost $300, and Adobe is giving away 125 of them to AIR developers who post apps there.

Technorati Tags: , , ,

→ 3 CommentsTags: Adobe AIR · Open Source

Setting up SSL for Lighttpd/Django

May 13th, 2008 · 1 Comment

My latest client Farinaz Taghavi is finally in beta on her site, and one of the last steps to push her live was to set up SSL for her.

Luckily, I’ve done this a number of times, so it was quick and easy to do, but still I had to refer to various reference sites and remember exactly what I do differently than some.

First off, I use the Lighttpd configuration I describe in “Django and Lighttpd Configuration for smooth SSL”, I don’t have any need to vary it much from what I did for my other site, but since I am using Satchmo for my ecommerce engine on this one, I can’t have a separate domain name for my secure and non-secure domains. In other words, I want both http://farinaz.com and https://farinaz.com to work.

The changes are simple, but since it is slightly different, you can download it and modify for your own use: lighttpd_ssl.zip

In that file are the two very important lines:

ssl.pemfile = "/etc/lighttpd/ssl/farinaz.com/farinaz.com.pem"
ssl.ca-file = “/etc/lighttpd/ssl/farinaz.com/farinaz.com.crt”

The rest of this article will discuss how to acquire those files.

Creating the Certificate

1. Create a working directory. I always put them in “/etc/lighttpd/ssl/servername

mkdir -p /etc/lighttpd/ssl/yourserver.com
cd /etc/lighttpd/ssl/yourserver.com

2. Create your server key, and then (optionally) remove the password from it. The only critical question is “common name”, which must be the domain name you want to secure. In our example, “yourserver.com”

openssl genrsa -des3 -out yourserver.com.key 1024
openssl rsa -in yourserver.com.key -out yourserver.com.nopass.key

3. Create the CSR (Certificate Signing Request) that you’ll be using at the certifying authority to get your cert.

openssl req -new -key yourserver.com.nopass.key -out yourserver.com.csr
cat yourserver.com.csr

4. Copy the text to your clipboard. It will look something like this:


—–BEGIN CERTIFICATE REQUEST—–
MIIBrzCCARgCAQAwbzELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8G
A1UEBxMIUG9ydGxhbmQxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
[… and so on …]
2JwW20fix2pFjK22E+jUvNh25cTRWpUKeTt5OEoE3hgkPZCjZPuzvXt7dw5N1CBv
1a9vX8LRMPRd+TtlOEBHhNZ2DLSkzAvTg4RI+1uPLN3KBpRp9FCTaPEmeuLfMBwl
Y7Se
—–END CERTIFICATE REQUEST—–

5. Go to a good cheap certificate source. I like to use Name Cheap since they are in fact cheap, their control panel is very usable, and they are not underhanded in business dealings unlike the infamous GoDaddy. (I currently have 49 domains with them!) Namecheap has SSL certs for as low as $12.88 per year.

A short aside. There is no reason I can see for 99% of all site operators to get anything more than the cheapest possible cert from RapidSSL. Ignore all the sales hype. The simple fact is that no one except extreme geeks even know or care about levels of certification, the vetting process, or any of that. It is simply not a factor in purchasing decisions from anything I’ve ever seen, and I used to work for a company that sold expensive certs!

6. After you purchase your cert, the site will ask you what type of system you have. I’ve never seen Lighttpd listed as an option, so you should select “Apache + OpenSSL”

7. Next it will ask for your CSR. Paste in the text you copied in step 4.

8. Make sure you can receive email at the address where the certificate authority will send the confirmation! Wait for it, and click the confirmation link.

9. Wait a few minutes to get your cert.

10. Copy the text of the cert to a file on the server. I just use emacs and paste in the contents of the cert I copied from the email. Save it as “yourserver.crt”.

11. Finally, create your pem file.

cat yourserver.com.nopass.key yourserver.com.crt > yourserver.com.pemchmod 0600 yourserver.com.pem

12. Verify that lighttpd has SSL.

/usr/local/sbin/lighttpd -v

It should say something like “lighttpd-1.4.11 (ssl).” If it doesn’t then you need to recompile it. Use the instructions on cyberciti.biz for that if you need it.

13. restart the server.

/etc/init.d/lighttpd restart

Done. This takes me about 15 minutes, most of that waiting on emails.

Technorati Tags: , , ,

→ 1 CommentTags: Lighttpd · Best Practices · Django · Linux

iPhones own SXSW

March 10th, 2008 · No Comments

Attending SXSW has been absolutely great for me. I’m feeling inspired and invigorated, really refreshed by taking time off and simply not dealing with clients for a few days.

I can’t help but notice just how deeply Apple has penetrated the cool-tech-people world. Without exaggeration, the ratio of mac to PC is easily 3 to 1.

More interesting to me is the incredible number of iPhones here. Wow. probably half the phones I see are iPhones. Those babies are not cheap, and yet everyone has one.

Better than simply seeing that a lot of people have them is seeing how used they are. People love them, and love interacting with them. Everywhere you see them taking pictures, connecting with LinkedIn, browsing, and texting.

The new LinkedIn iPhone portal is hot, too. It results in me often getting requests to connect on LinkedIn within minutes of me giving someone my business card. Interesting.

Technorati Tags: , ,

→ No CommentsTags: Equipment

At SXSWi

March 9th, 2008 · No Comments

I’m sitting in a panel “Social Design Strategies” at South by Southwest Interactive. What a privilege and a pleasure to be here. I can’t believe I’ve never attended this before.

So far the best panel by far was “Art of Speed”, with people talking about how to build successful, profitable companies very quickly. The strongest speaker on that panel was Michael Cassidy, who has built and sold 3 companies for $10-500 million. His most recent sale was a company that sold for $500 million in 500 days. Wow. That made me sit up and pay attention.

One of his great points was about culture and hiring. He does one-day funding rounds and one-day offers for new hires. Also, on the first day of a new hire’s employment, everything is in place. They have a computer, email, and a task list. None of the typical, “Ah, your computer is not quite ready, just sit here and read these manuals.”

Going to pay attention now. More later.

Technorati Tags: ,

→ No CommentsTags: Uncategorized