Sunday, December 6, 2009

Disney PhotoPass Hack: Low-Res

This only gets you the low-res version of the image. Get 'em before they change the API:

1) Login to your Disney PhotoPass account.
2) Select the gallery you want to view
3) Click a photo you'd like to save
4) In the url, you'll see an argument passed called imageId=
5) Copy the imageId value and paste it into the url:
http://www.disneyphotopass.com/API/photostore/previewEdits.pix?ImageID=
Alternately, you can also use the URL:
http://www.disneyphotopass.com/API/photostore/Getlowresimage.pix?ImageID=
-or-
http://www.disneyphotopass.com/API/photostore/Getlowresimage.aspx?ImageID=

If you're feeling extra sassy, you can add an additional argument to the url to see a slightly larger version: aspectRatio=EightByTen

Only really useful for grabbing the 1 in 20 photos these trained monkeys with expensive cameras are capable of taking. Even a blind squirrel gets lucky sometimes and finds an acorn.

For more advanced users, there's a slightly easier way. Using the "Web Developer" plugin for FF, you can do the following:

1) From the gallery page: Tools » Web Developer » Images » View Image Information
2) When this loads, scroll until you find the small thumbs of your pictures.
3) Click the links and then remove the argument: &width=

Thursday, November 19, 2009

Connecting Navicat to a GoDaddy MySQL Server

Why re-invent to the wheel?

http://blogs.navicat.com/?p=26

If Navicat ever changes their blog I'm screwed. I hope the way back machine can save my ass on this one.

Wednesday, November 18, 2009

Align Form Select with Image Submit Button Using CSS

I pulled my hair out over this one for about 45 minutes tonight. There's a trick out there for getting your form submit image to line up with your text input box, but it wasn't working when using a select form element. The process is the same, but rather than using the css:

  • vertical-align: text-top;
Use one of these:
  • vertical-align: top;
  • vertical-align: bottom;
Code Sample:

<form action="pdfcall.cfm">
<select name="quarterly" style="vertical-align: top;">
<option value="0">-- Select a Quarter --</option>
<option value="#">Q1 2009</option>
<option value="#">Q4 2008</option>
<option value="#">Q3 2008</option>
<option value="#">Q2 2008</option>
</select>
<input type="image" src="images/submit.jpg" style="margin-left: 10px;" />
</form>

Friday, November 13, 2009

Dreamweaver Crashes in Vista

In my particular situation, I'm working in Dreamweaver CS3 in Vista Enterprise (x64). Every time I opened DW, it would crash with no warning. The DW screen would get washed out and an error would come up telling me that DW crashed and vista was trying to figure out why. The explanation vista crash adviser gave was something related to MS kb937491, but after researching the reg keys this addresses, it was not the issue. Some additional research indicated that this was (yet another) problem with DW's use of a WinFileCachexxxx.dat file. See my previous post about the solution to this problem. Interestingly, this happened right after DST took affect and some of the things I researched indicated that this switch has a tendancy to corrupt the WinFile files.

Monday, September 28, 2009

Windows Update Page is Blank in IE on XP SP3

Here's a new one I've never seen until last week. Latest and greatest IE8, XP SP3 with all the trimmings (all fixes) and when you visit http://windowsupdate.microsoft.com - you get a blank (white) page that doesn't appear to load anything. If you view the source, you'll see that there's a whole page there telling you that either your browser doesn't support active x or it is not allowing active x content. Smooth move there MS, way to test your shit!

If you visit http://update.microsoft.com/ - the page loads, but you see an error message telling you:

"Files required to use Windows Update are no longer registered or installed on your computer. To continue:

Click option 1: Register or reinstall the files for me now (Recommended)
Click option 2: Let me read about more steps that might be required to solve the problem."

Clicking option 1 may fix the problem, but this is doubtful. Ignore option 2 as it does not contain ANY relevant information for fixing the problem. The problem is that for some reason, a bunch of the DLL's required by windows to run windows update have become unregistered. What you'll need to do:

1) Start -> Run -> cmd (to open a command window)
2) type: regsvr32 wuapi.dll [enter]
3) type: regsvr32 wups.dll [enter]
4) type: regsvr32 wuaueng.dll [enter]
5) type: regsvr32 wucltui.dll [enter]
6) type: regsvr32 atl.dll [enter]
7) type: regsvr32 msxml3.dll [enter]

After every time you hit enter, you should see a window that pops up and tells you that the DLL has been successfully registered. When you're done with registering the last DLL, go back to the updates page in IE and click on option 1 - let windows do its thing. When it's done, you should be able to visit either updates.microcrosoft.com or windowsupdate.microsoft.com without a problem.

And now, a big round of applause to MS for creating an error message page that their browser won't display. Good work fellas! Way to test and maintain your products. Helluva job... really!

Friday, September 25, 2009

Thunderbird Error: Dovecot/Postfix

"The current command did not succeed. The mail server responded: error"

This is the error that Thunderbird 2 [2.0.0.23] reported when I tried to check my email this morning. Did some digging and found that the problem is with the mbox format on the server. Some tweaking yesterday for mail server migration must have messed this one up. I tailed /var/log/maillog on the mail server and watched for errors. I saw:

File isn't in mbox format: /var/mail/username

Edited /var/spool/mail/username and got rid of 2 garbage lines at the top of the file. Restarted postfix and dovecot for good measure and fired Thunderbird back up. No more errors and it looks like all my email is there.

Sunday, August 16, 2009

GoDaddy Domain and Hosting Transfer

I'm blogging about this as a warning to others. The scenario:

You have a client who is dissatisfied with their current web developer and wants you to take control of their domain, update their site and provide hosting for them. Lucky for them, their current developer has everything hosted at GoDaddy and you happen to have a hosting account at GoDaddy as well. As the techs will tell you on the phone or over email, "it's a very simple procedure and your customer will not experience any interruption of service". This is only partially true.

Now, the first thing you should do as a developer who isn't a shyster, always register your client's domains in their name. Make yourself any of the other contacts so that you can make changes as needed, but for the good of everyone, register the domain in their name. The client in question was new to the web and trusted his former developer to do the right thing and allowed them to register everything in the developer's name. Now that we want to transfer control, the developer decided to be difficult. No worries, the Hebrew Hammer never takes no for an answer and so began the "Domain Dispute" process with GoDaddy.

Step 1: Email 'domaindisputes@godaddy.com' - this gets the ball rolling.

Step 2: They will email you back and ask you to fill out a form on their website. In my case, the information I was entering did not match the whois info for the domain and no combination of what the whois information *should* have been worked. This required an email to domains@godaddy.com explaining to them the error I was getting when trying to complete the form. They replied back and gave me the option of sending them some form of ID that identified me as a legal representative of the "rightful owner" of the domain. This was done so in the form of my client's fictitious name registration with the state of Florida. Two days later I was in control of the domain.

Transfer of the domain, dns and email internally with GoDaddy was a breeze. No interruption of email to my client whatsoever, but the process of getting their hosting set up again has been an issue. The problem with GoDaddy is thus; if someone else (regardless of whether or not they control the domain) has the domain you want to host in THEIR hosting account manager, you *cannot* add it to YOUR hosting until they delete it. Well, we've already established that the previous developer was a scum-bag, so good luck getting them to delete the domain in a timely manner. Enter...

Step 3: Establish a 'Cease and Desist Order' through GoDaddy. If you've gone through the whole domain transfer process and the individual formerly in control of hosting (through GoDaddy) won't remove the domain, you can ask GoDaddy to initiate a "Cease and Desist Order" which basically gives the former controlling party 72 hours to comply with the order before GoDaddy forces the deletion of the domain from THEIR hosting account which will then allow YOU to add it to yours. I URGE YOU TO START THIS PROCESS AS SOON AS YOU CAN TO MINIMIZE DOWNTIME OF YOUR CLIENT'S WEBSITE.

The 72 hours has come and gone and because of a "backup in the processing queue" at GoDaddy, I still can't add my client's domain to my hosting account. From the time GoDaddy released the domain to me my client's site has resolved to the GoDaddy parked page. This is good in the sense that at least the former developer can't forward users to obscene content, but at the same time my client's site has been down for over 4 days.

This post serves as a warning to others that GoDaddy has a few kinks to work out in their hosting transfer policies. If you are researching information on what to expect in the process, be warned that the site you are transferring may experience down time while GoDaddy muscles control away from the previous owner. However, rest assured knowing that there is no interruption to email service, which to my client was the most important factor.

Thursday, July 2, 2009

DSN-Less Database Connection to MySQL in Coldfusion

Have not tried this myself yet, but wanted to drop it here so we can play with it in the future.

A DSN-less connection is made completely through the code, without the need for configuring anything within the ColdFusion Administrator. All of the information for the connection is specified within the code. This includes the driver, servername, databasename, username and password.


To make a DSN-less connection to a MySQL database, the following code snippet can be used:



<cfscript>

classLoader = createObject("java", "java.lang.Class");
classLoader.forName("sun.jdbc.odbc.JdbcOdbcDriver");
dm = createObject("java","java.sql.DriverManager");

con = dm.getConnection("jdbc:odbc:DRIVER={MySQL ODBC 3.51 Driver}; SERVER=server; PORT=3306;
DATABASE=database; USER=username; PASSWORD=password;OPTION=3;");


st = con.createStatement();
rs = st.ExecuteQuery("Select * FROM table");
q = createObject("java", "coldfusion.sql.QueryTable").init(rs);

//the query is stored in the variable q


</cfscript>

Wednesday, July 1, 2009

Image Expired: Please Refresh The Page to View This Image

We've run into this problem before and so I've stolen the solution from the cfchart blogspot blog site:


Problem

The following message is shown instead of the graphs:
"Image Expired
Please refresh the page
To view the image"


Lot of people have faced this problem, the reason is the timeout in the caching engine of the Coldfusion keeps the charts for any request only for a default value of 5 seconds.
We missed providing an interface to change this value in the CF Admin, but you can still change this value by:

1. Stop the CF server.
2. Open <cf install path>\lib\webcharts3d.xml
3. You can increase the timeout for keeping the graphs in the cache by editing the minTimeout and maxTimeout attributes:

<?xml version="1.0" encoding="UTF-8"?>
<server image="PNG" cache="Memory" minTimeout="5000" maxTimeout="30000"....

change this to whatever values you want.(Values of minTimeout and maxTimeout are in milliseconds.)

The minTimeout and maxTimeout are per each request, i.e. the graphing cache will keep the graphs for each request for minTimeout amount of time. So if there are 4 graphs in one page then request for the page arrives at lets say 1'o clock and the min timeout is 5 secs, then each graph for the request will be kept only in cache for 1'o clock + time to generate graph + minTimeout. So a problem could be if the last graph takes lets say 10 secs to generate, then by the time it is ready all the previous graphs will timeout and will be removed from the cached.

This can create a problem when:


  1. There are a large number of charts one page (> 200). In this case, some charts will be drawn but remaining charts will display the error message

  2. There are only a few charts on a page but some charts take more than minTimeOut amount of time to generate in this case the remaining charts will not be generated and the error message will be thrown.

Wednesday, June 24, 2009

Start ESX or ESXi Guests at Boot

I've had to do this before and always forget, so here goes.
  1. Launch the VIC
  2. Click on the server icon (not the guest icon)
  3. Click the "Configuration" tab
  4. Click on Virtual Machine startup/shutdown
  5. Click on "Properties"
  6. Click on "allow virtual machines to start and stop with the system"
  7. Click on the guest you want to start automatically and then click "move up" until it's in the 'Automatic Start Up' section
  8. Rinse, repeat for any other guests OS's

The last few steps are not very intuitive, but you get the idea once you've done it a few times. Thanks to Merrick for reminding me which tab these settings were on. I had to do this a few months ago and had forgotten.

Friday, April 24, 2009

Streaming Flash Video in 2003 (IIS6)

I don't know how many times I've come across this problem and remembered what the issue was, but not the solution. Scenario: Windows 2003 with IIS6. You have a page with an fla file that plays an flv video, but the video won't show up. Issue: IIS is missing the correct MIME type for FLV videos. Solution:
Open IIS Manager on the server:
  1. Expand the Local Computer Server.
  2. Right mouse click and choose 'Properties' of the local server
  3. Select the MIME Types tab.
  4. Click the 'New' button and enter the following:
    Associated Extension box: .FLV
    MIME Type box: flv-application/octet-stream
  5. Click Ok and restart IIS.
Update: This same solution can be used if the file you are streaming is an mp4 file. Mime type: video/mpeg

Monday, April 20, 2009

Expanding a Virtual Drive in VMWare Workstation

David Merrick and I ran into an issue today growing a windows 2003 WMWare disk partition running on VMWare workstation. Apparently, you cannot use the GUI tools in Workstation to increase the size of vmdx files. However, you *can* use the command line:

vmware-vdiskmanager -x 12GB “Windows Server 2003 Standard Edition.vmdk”

Where 12GB is the new size of the disk. Make sure you do this from the VMWare Workstation install directory.

Check out David's blog post on this for more details. After that, we used PMagic to inflate the partition to the new drive size.

Thursday, April 16, 2009

Can't Undo in Dreamweaver CS3

A few days ago Dreamweaver CS3 stopped allowing me the ability to undo things whether I was in code view or design view. I thought maybe restarting DWCS3 would fix it, but to no avail. I did some googling and found a post where people were saying you needed to delete the FileCache.dat file in the Macromedia application data folder for the user having the issue. This information did not hold so true for DW CS3, but it did lead me down the correct path.

My solution was to close DW and navigate to:

C:\Documents and Settings\<user>\Application Data\Adobe\Dreamweaver 9\Configuration

In there I found a file named: WinFileCache-AD76BB20.dat Your WinfileCache file might be named slightly different, but it's the only .dat file in that directory. Rename that file or delete it (I always err on the side of caution) and restart Dreamweaver.

Thursday, March 5, 2009

Creating a VMDK file indepedent of a Guest VM

So you've got your ESX or ESXi server set up with a bunch of guests. What if you wanted to share a drive between them independent of any particular guest os? You can use the command line tool vmkfstools to achieve this. Let's say you wanted to create a new virtual disk 3GB. Open up your command line and change to the directory you want your new virtual drive located in. Use the command:

vmkfstools -c 3000M ./file.vmdk

That's it. Now you can mount this as a drive on any of your VM guests. This is a good idea if you have a bunch of tools or installs you use on a variety of systems. Unfortunately, you cannot share the vmdk file on multiple guest vm's at the same time.

Resources:
http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1348873,00.html
http://www.esxguide.com/esx/content/view/18/25/

Open Source [Free] Disk Partitioning Tool

PartedMagic - so very cool! Patrick Verner and his development team have created a really awesome FREE tool for manipulating drive partitions. A big thank you to Patrick and his team for creating this utility. Works great for growing NTFS disk partitions in the guest once you've grown them in your ESX (or other hypervisor) environment.

Tuesday, March 3, 2009

Super Secret ESXi Command Line Access

Even though they tell you it doesn't exist and they want you to use the RCLI tools, you can get to the command line interface on ESXi. Here's how:

  1. Alt+F1
  2. Type: unsupported (you won't see anything) and press enter
  3. You should see the support warning and then the prompt for your password
  4. Enter your password

Jon Warburton has more information about this and how to enable ssh on his blog.

Converting NRG disk images to ISO using DD

I use Nero for a lot of things under windows. Unfortunately, Nero does not allow you to create disk images as standard ISO files - not to mention I have a lot of old NRG image files laying around. Well, ESX doesn't know what to do with NRG image files, so I needed to convert them to ISO. I found 2 solutions:

1) MY SOLUTION: Use DD

dd if=image.nrg of=image.iso bs=4096 skip=75

2) Use nrg2iso from Gregory Kakanosky

Mihai Criveti has more information about this on his blog about this and some responses from people who disagree with his solution. Those people can suck it, it worked fine for me!

ESXi Windows XP Install: scsi disk drivers

In setting up a new ESXi (3.5.0) server I came across the issue of not having the BUSLogic driver or the LSI Logic driver when attempting to install windows xp pro as a guest os. I was getting that "Setup did not find any hard disk drives installed in your computer" error message.

You've got several options:

1) MY SOLUTION: Download the BusLogic driver disk directly from VMWare: http://download3.vmware.com/software/vmscsi-1.2.0.4.flp.

2) Download the LSI Drivers from the LSI website and make your own .flp image.

3) Slipstream a copy of windows XP installer to include either of these drivers using something like nLite (good god, that software is AWESOME!)

Vincent Vlieghe has much more detailed instructions on his blog. These instructions work for both ESX and ESXi.

Everyone's got a blog - why should we read yours?

Don't. This blog is for me - so I can remember how to do stuff. I've given up on writing things down, making paper notes. Inevitably those get lost and I'm sure at some point this website might go away - but until then I'm hoping I'll be able to document stuff I've done (IT or otherwise) so I can come back to it and remember how (or why) I did something. Secondary to my own selfish desire to keep ideas for posterity, maybe this blog will get indexed and my ramblings might help someone else solve a similar issue.