IE8 dead tabs
This is the second time I've had to resort to the registry to fix what i don't like in Windows 7. This time it's more of a true fix. This addresses 2 of my biggest nits with the new OS, now I can rest.
Problem: You open a new tab in IE8 and all you get is "Connecting..."
Setup: It's happening for me on: IE8 32 or 64 bit edition on 64 bit Windows 7 Enterprise
Solution: Below from David at Microsoft
To disable this feature, go to Start, type “regedit” in the search box, right click the regedit program, and choose Run as Administrator. You may be prompted to continue. In the registry editor click the arrow to expand a selection. Expand, HKEY_CURRENT_USER, then Software, Microsoft, Internet Explorer, and select Main. Check for an option on the right list named “TabProcGrowth”, if it is there double click on the item and set it to either “0” or “1” (see below for details). If it is not there create it by right clicking on the Main folder (in the left list) and selecting New, DWORD (32-bit) Value. “New Value #” should be created on the right, double click on this and set to “0” or “1” as desired (see below). Then right click on it and choose Rename, rename this to “TabProcGrowth”. Restart Internet Explorer for this to take effect.
Setting this to “0” will cause Internet Explorer to crash entirely if a tab crashes.
Setting this to “1” will allow Internet Explorer tabs to crash and recover without completely closing Internet Explorer and might be the better choice.You can find more information about this setting at the following link: https://blogs.msdn.com/askie/archive/2009/03/09/opening-a-new-tab-may-launch-a-new-process-with-internet-explorer-8-0.aspx
Order of CSS Values in Borders, Margins or Padding.
The issue, what direction do each of the values below pad?
padding: 4px 5px 2px 7px;
The short answer is: top, right, bottom and left. TRBL
I can never remember the order of values when setting borders, margins or padding in css. If you have the same problem take a look below:
- one value such as 10px to specify an equal margin on every side
- two values, such as 10px 5px, to specify the top/bottom (first value) and right/left (second value) margin
- three values, such as 10px 5px 2px, to specify the top (first value), right/left (second value) and bottom (third value) margin
- four values, such as 10px 5px 2px 1px to specify the top, right, bottom and left margins respectively
Thanks to: http://htmldog.com/reference/cssproperties/margin/
How to convert a website favicon.ico into an image
Few google searches bing back, oops, bring back amazing finds like this. However before reading on know that Google Share Stuff has been Discontinued since last March in favor of Google Reader's sharing bookmarklet. I'm not sure what that means to the favicon service defined below which clearly still works. You've been warned, meaning you can't expect it to work indefinably </captain obvious>
Google Shared Stuff (S2) offers a secret URL that can automatically pull favicon images of any website provided you know the URL. The images are in the PNG format (not ICO) and hence will render correctly in all browsers via the tag. - labnol.org
All you have to do is append a url to the following line and get the current favicon.ico of any website.
http://www.google.com/s2/favicons?domain=www.yancylent.com ->
I can't even tell you the trouble I went through a couple years ago writing a PHP routine that saved the files down to a folder, changed the name, added that name to a database, only to find out that IE Explorer didn't support .ico's like other browers do. This is a fine alternative, thanks google.
Technorati API… we’re waiting…
I got an email from a blogger on Planet SharePoint telling me his Technorati ranking wasn't being updated. I spent about an hour looking over the code, nothing out of place, did a google search, nothing. Then decided to login to my Technorati account and check my API key status, and that's when I saw this.
Technorati Developers
Our new API is currently under construction. Our new search technology will allow us to provide several new and interesting API features. As it gets near completion, we will announce the new features. If you are a current API user, please note the legacy API will remain in operation until October 25, 2009.
http://technorati.com/developers/
This is pretty amazing. The services has been down for just over 4 months with no new API to take its place. It's almost as if it was abandon. This is a real shame, not even an update.
It looks like all us Duck Soup users are out of luck. Kailash Nadh, if you're reading this please consider updating your fine code with the Technorati updates, when they get around to it.
How to Force a Unique Index on a MySQL Table
The simple answer is use "Ignore" instead of "Force".
This is being posted for one reason, I always try, and error out with a force instead of using ignore. This scenario applies when you want to weed out the duplicate entries, MySQL will error out if there are duplicate entries, you have to ignore simply to give MySQL permission to remove those dups. Here is an example....
To apply a unique index to an existing table (with dups) use:
ALTER IGNORE TABLE `sites` ADD UNIQUE (`url`)
Do NOT use:
FORCE ALTER TABLE `sites` ADD UNIQUE (`url`)
or
ALTER TABLE FORCE `sites` ADD UNIQUE (`url`)
or
ALTER FORCE TABLE `sites` ADD UNIQUE (`url`)
Yes, this is all basic stuff. I just want to help others making this same elementary mistake. It also helps to know if I get in the same jam a year from now, I have my own blog to search for the answer.
Server Backup so easy Danica Patrick could do it
If I only knew it was this easy in the first place. Not joke, the data backup feature in the Simple Control Panel provided with dedicated servers from godaddy.com is a snap to configure.
However the interface is only data. If they could tap into mysql dump it would be a truley amazing feature. For now you have to configure that on it's own. The back up of your mysql data, add it to the folders you want to back up then have your backup scheduled.
To tie this all together create a shell script that dumps your mysql data into a compressed file:
Add this to a file and name it website.sh
mysqldump -u root -p password databasename | gzip > /home/website/public_html/backups/website.sql.gz
Then enter the following into a new Cron Tab entry...
bash /home/website/public_html/backups/website.sh
The directions above work for godaddy's dedicated or virtual dedicated serves. Make sure if you're working with large data sets that you allow plenty of time to let the mysqldump to complete before performing the backup. To configure the back up itself go to the "Manage Backups" and configure the entire website along with the zipped data. You might want to "Rotate Backups" which means it you'll always more then one on file just in case, just in case.
Make sure to enable FTP. It's not good enough to have the data there safe in a zip file in a different location. If your dedicated / virtual dedicated servers go, they're gone. You are responsible for having a back plan in place, and they won't mount the drive to another, server, etc, they will do nothing, and they shouldn't, its in your contract. And if you're thinking ahead, they won't even as a servers. Your data is gone, as mine was when the kernel on my server when south.
The ftp area is very easy to configure, make sure to time it out a ways to let the data backups finish and if you can at all help it schedule all of your other server wide cron jobs around 'back up time', why not, let it breathe like a fine wine. Once it's complete, test, if you're backing up to another account at godaddy, its going to FLY, trust me. Also, this post isn't complete with out sending a virtual thank you to the CEO at Diligex for providing me with 2 gigs of space to get this all done.
Lastly, file sizes. The backup area has an "exclude folders" option so you can bifurcate your backups, the important areas every night and your huge downloads or images folder every week, the reason? Bandwidth, for the source and target server, each backup will burn some. If you don't have to worry about this then let it ride.
Twitter.class.php returning Error: 400
This could be one of my bigger lazy moments but after having to rebuild a server from v7 of Fedora to 8 and upgrading everything else in the LAMP stack I gave up and went with a new class, twitter.class.php and it works great, no more Error 400 on posts. The previous class (Twitter.class.php / Brandon Trebitowski Created: 02/26/2009 / Version: 1.0) was throwing too many errors and there were very little answers on the interwebs. Remember, can't stress this enough, I'm sure it's a configuration issue on my end that I don't have the patients to investigate.
This new class is just as easy to implement and comes with an example.php that is very easy to test. Thank you for your time in putting this together Simon Wippich.
Some final notes. This will throw 401 if you have the wrong credentials, Error 400 if you have them correct. The word around the blogs is 400 is related to flood control or the rate limit being reached. This was not the case. Also, Brandon, if you've addressed this in future versions of your class let me know and thank you for the amazing job you did on it!
How do I create a Subdomain in Simple Control Panel?
If you've read the instructions at godaddy.com then why are you at this page? I'll guess, you forgot that one step that always gets me, the Document Root, more specifically the correct way of typing it...
For Server name: y
For Document Root: public_html/y
As for Simple Control Panel, its amazing. I just learned recently that it's a property godaddy offering. If the developers are reading this post maybe they could use the same folder drop-down already in "Manage Backups".
Dedicated Server Died
This server hosted all my sites and will take a few weeks to get back on-line….. Details below.
-------------------------
Our support staff has responded to your request, details of which are described below:
Discussion Notes
Support Staff Response
Dear Sir/Madam,
Thank you for contacting Server Support.
Unfortunately, we are unable to restore access to your server. When attempting to boot the server, the server experiences a kernel panic. All attempts with other kernels and in single user mode results in the same behavior. A reprovision of your server would be necessary in order to restore connectivity. The reprovision of the server will remove all content and reset the server to the default settings.
To reprovision your server, deleting all data and applications and returning the server to its initial setup state, please follow the instructions below:
1) Log in to your account.
2) Select ‘Servers’ link.
3) Click ‘Launch Manager’ next to the Server that you’d like to reprovision. It will open up in a new window.
4) Click on the ‘Support’ section to expand it and then click on the ‘Reprovision’ button.
5) Confirm the reprovision.
Please note: reprovisioning the server will erase all the data on the server, including any backups stored on the server. You are responsible for the integrity of your data backup and restoration.
Please contact us if you have any further issues.
XXXX.
Server Support


