IE - Expected identifier, string or number
Monday 02/9/2009 – Category: Uncategorized – 1 Comment
If you're getting this error, chances are you have an extra comma after a curly brace:
a = { b: function() { }, c: function() { }, }
Get rid of the trailing comma and your JS error woes will disappear!
(source)
Safari doesn’t read inline css
Monday 02/9/2009 – Category: Uncategorized – No Comments
I'm not sure why I haven't come across this until this past week, but I found out that Safari doesn't render css within style tags outside the head tags.
The workaround is to inject the style into the head with javascript--similar to what Rails' content_for does:
var cssDefinitions = '..my style chunk goes here'; var style = document.createElement('style');' $(style).html(cssDefinitions); $('head').append(style);
(jquery code from stackoverflow)
After this things were looking dandy in Safari but now IE was giving a weird "unexpected call to method or property access" error. It turns out that IE doesn't let you add style elements like this. The workaround for IE looks like this:
var styleElement = document.createElement("style"); styleElement.type = “text/css”; if (styleElement.styleSheet) { styleElement.styleSheet.cssText = “a { color: red }”; } else { styleElement.appendChild(document.createTextNode(”a { color: red; }”)); } document.getElementsByTagName(”head”)[0].appendChild(styleElement);
source: YUI blog
Server Upgrade
Monday 02/9/2009 – Category: Uncategorized – No Comments
I finally bit the bullet last night and upgraded my Slicehost slice to a 512slice. It's running much zippier now (with much more room to breathe RAM-wise)!
The upgrade process was pretty painless through the admin panel--it took less around ten minutes to do the pre-resize setup and then another few minutes to complete the process. Go Slicehost!
Strange Downtime Issues
Friday 01/23/2009 – Category: Uncategorized – No Comments
Flickr Original users and everyone else--my server hiccuped sometime yesterday afternoon which caused most of the running apps to die, resulting '503 service unavailable' errors. I've looked at my logs and charts over the past day and I can't tell what exactly happened yet...my merb processes totally disappeared and php-cgi instances stopped responding. I'll be continuing to investigate what caused the hiccup...sorry for the inconvenience!
As a side note, I really need to write some monit scripts to notify and restart services if they start acting up again.
Setting up Ubuntu 8.10 (Intrepid Ibix) on a Dell PowerEdge 2400 in a RAID1 configuration
Saturday 01/17/2009 – Category: Uncategorized – No Comments
Thanks to this guide and this post, I was able to setup Ubuntu 8.10 (Intrepid Ibix) on a Dell Poweredge 2400 in a RAID1 configuration.
I ran into more than a few hurdles along the way:
- The first iso I burned was corrupted...I suspect it was because I had paused/resumed the download a few times. Grr.
- On my first install attempt I just installed onto one hard drive. Upon booting up, I got this message:
Loading...
Gave up waiting for the root device.
Alert /dev/disk/by-uuid/cf921ca07-7fa3-4031-a5de-44099fd5b82a does not exist.
- After I found that first guide I properly partitioned and formatted all 5 drives in a RAID1 configuration. After booting, I got this message:
Gave up waiting for root device. Common problems:
...
ALERT! /dev/md0 does not exist. Dropping to a shell!
Google yielded this second post that suggested to add rootdelay=40 to your grub kernel line so /boot/grub/menu.lst looks like:
kernel /boot/vmlinuz-2.6.27-4-server root=UUID=401eb0e1-f624-4d86-a1a4-47374ba9a556 rootdelay=40 ro quiet splash
- To get to the grub bootloader screen, hit ESC and you should see your partitions. Hitting 'E' will bring up a prompt to edit the command. Hit enter to accept and the hit 'B' to boot from that partition. Once you've booted successfully, make sure you edit /boot/grub/menu.lst because the grub editor didn't seem to save my changes.
Phew. So after a few hours of trial and error, googling and fixing, I finally got things up and running.
The End.
Recent Posts
- Good Word - Words With Friends Word Checker
(Thursday 02/25/2010 – Uncategorized – 31 Comments) - Facebook App Development gotchas
(Friday 02/19/2010 – Uncategorized – No Comments) - StoreKit SKErrorUnknown
(Friday 02/19/2010 – Uncategorized – 1 Comment) - Flickr Original updated to 1.0.4
(Wednesday 12/30/2009 – Uncategorized – 12 Comments)
