Recovering a Stuck Linux EC2 EBS AMI

This is a rare but very annoying situation. This is especially true if you have invested a lot of time configuring the Linux machine and it got stuck. It happened to us because the /etc/fstab file was configured incorrectly and Ubuntu could not recover from it and it got stuck during boot.

The following steps worked for me (This only works for an EBS based instance). In almost all steps you can use the EC2 Console or ElasticFox, except for step 5.
  1. Take a snapshot of your root volume
  2. Create a new volume from that instance
  3. Attach the volume to a working AMI as a regular EBS volume and using regular file system access, look at the boot logs and fix the problem. This is important, because if you skip it, your new instance will get stuck exactly the same as the first one.
  4. Detach the volume and create a snapshot from the volume.
  5. Register the snapshot as an AMI (using ec2-register). You need to specify the Kernel and Ramkdisk (use the same ones as your original AMI had).
  6. Start your new instance. It should work now.

That's it. Drop me a note if you have any questions.

Startup Marketing: Tactical Tips From The Trenches (OnStartups.com)

Media_httponstartupsc_hyeef

This is must have tactical checklist for startups that are in process of creating a web presence. Highly recommended to follow it. The only thing that has changed is that facebook now allows to create clean URLs for your pages, given that you have enough followers (25 is the minimum). 

Original Post is at http://onstartups.com/tabid/3339/bid/9008/Startup-Marketing-Tactical-Tips-Fro...

Office 2003 automation objects in Win 2008 x64

 

Part of the server side software we developed relies on having Office 2003 installed. It uses automation objects to create PPT Charts and PPT decks. It used to run flawlessly (with some performance issues) on win2000 and win2003 servers.

Recently, when installing our software on a Windows 2008 x64 server, this stopped working. Nothing we tried worked (including trying to use dcomcnfg.exe and many registry hacks). Our salvation came from a blog post by H Ogawa. It is a very unlikely solution, but it worked like a charm:

 

“This solution is … 

Windows 2008 Server x64 
Please make this folder.
C:\Windows\SysWOW64\config\systemprofile\Desktop
 

Windows 2008 Server x86 
Please make this folder.
C:\Windows\System32\config\systemprofile\Desktop”


 

You can look at the original full thread here. Look at H Ogawa’s answer. Simply amazing. It works!

 

Auto Highlighting The Top Menu - CSS trick

When I created my tumblr theme, I wanted to create a top menu with automatic highlighting. For that, I have created the following code. It utilizes jquery for simplicity

It automatically looks at the current URL, then searches the top menu with the matching href. It then adds the “selectedmenu” class to that <li>. If you choose to implement this you’ll need to have this class defined in your CSS.

Comment if you find this helpful.

Tal

 

<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js">
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                // do stuff when DOM is ready
                var activeURI = getURI(document.URL);
                $("#topmenu li a[href=" + activeURI + "]").parent().addClass('selectedmenu');
            });
            
            function getURI(mystr){
                var s0 = mystr.split("\?")
                var s1 = s0[0].split("http://");
                var s2 = s1[1].split("/");
                var rt = "/";
                for (var i = 1; i < s2.length; i++) {
                    rt = rt + s2[i];
                    if (i + 1 < s2.length) {
                        rt += "/";
                    }
                }
                return (rt);
            }
        </script>