Damodar's Musings

web development and miscellany

Browsing Posts in Tips

The simplest and easiest backup solution is built right in Redmond!

I’ve used SyncToy for a number of years now and this program is a nice little gem – sort of XCOPY with a GUI. It can be downloaded from here.

It takes pairs of source and destination directories and then keeps them in sync. It works great for backing up photographs, for instance. And, the best part is that the files are exact copies – no need to worry about native backup formats.

Even better is that SyncToy comes with a command line invoker, SyncToyCmd.exe.

You get a backup solution when you combine this invoker with the Windows 7 Task Scheduler (which lives at: Start Menu > All Programs > Accessories > System Tools.)

You can use the scheduler to set up a regularly scheduled task to run “SyncToyCmd.exe -R <folder-pair-name>”

The scheduler can also be configured to run this command line program at startup, and then at predefined intervals (of say, an hour) to give  you real time backups as you work on your system.

Awesome? Yes, truly. Simple? Ditto.

Updated  on: Mar 13, 2011. Describes the process for verifying the installation of MySQL and phpMyAdmin.

In this article, I describe the process of setting up a complete development environment for PHP, with full debugging support within the Eclipse IDE.

The complete setup includes Ubuntu 10-10, the Apache2 web server, the MySQL RDBMS, PHP, phpMyAdmin, the Zend Eclipse/PDT All in one package, and the PDT debugger.

Setting up a PHP Debugging Environment

Go to http://www.zend.com/en/community/pdt#debugger and download Eclipse PDT All-in-one. I picked the Linux 32 bit version for installation in Ubuntu.

Unpack the downloaded file (zend-eclipse-php-helios-linux-gtk-x86.tar.gz).

Execute the eclipse/eclipse executable to launch Eclipse, and pick the appropriate workspace.

Create a new PHP project (File > New) and ensure that its location is in the same area that is monitored by your Apache install. In my case, this is /home/damodar/public_html, so my “test” project is located at /home/damodar/public_html/test.

Create a new PHP file.

Debug as PHP Script, if you want to run it locally in a PHP interpreter within the PDT.

Debug as PHP Web Page, if you want to run it in a browser.

You can place breakpoints as appropriate.

Enjoy!

(Thank you Zend Technologies, for making this so easy!)

Note: You can also use the Zend Server Community Edition as your web server. As noted, I chose to stay with Apache instead.

An errant application was causing my phone to spontaneously recycle – I gave up after about a half dozen cycles.

Verizon support indicated that I should perform a safe mode reboot and uninstall any suspect apps. The process was fairly painless, and I was up and running in a few minutes … sans my most recently installed apps.

The process?

Hold the power key down, and when you see the Motorola logo (the big M), press and hold down the Menu key for 30 seconds. This boots your Droid X into safe mode.

Also the Android 2.2 update was simply awesome for the Droid X – it’s as if I installed a brand new battery. The phone seems to be a lot more conservative about using power, leaving me as one thrilled puppy. Fingers crossed.

One of the easiest ways to protect oneself whilst online is to function within a virtual machine environment. In such a scenario, even if you do catch a nasty bug doing something that you probably shouldn’t, the infection is confined to that virtual machine and does not spread to the rest of your computing environment.

To that end, I’ve been playing with Sun’s VirtualBox and the free distribution of Ubuntu Lucid Lynx (10.04). Together these make an unbeatable combination.

I got VirtualBox from here:

http://download.virtualbox.org/virtualbox/3.2.8/VirtualBox-3.2.8-64453-Win.exe

And, though I’m running Windows 7 64-bit, I downloaded the 32-bit version of Ubuntu from here:

http://www.ubuntu.com/desktop/get-ubuntu/download

Once VirtualBox is installed, you can directly install Ubuntu by mounting its ISO image into VirtualBox.

The only thing you should remember is to install the Guest Additions for Linux. Without doing so, maximizing the VirtualBox window does not maximize the Guest OS’s window. To do so, you need to choose Devices > Install Guest Additions to mount the guest additions disk image. Once this shows up on your desktop, browse into it, and execute the autorun.sh file from a Terminal window. If you don’t see it take effect right away, you might want to restart your virtual machine.

You can also share a folder between the host and guest operating systems, using the following commands:

1. Create the folder on the host OS. (C:\ubuntu-vbox)

2. Register it with Virtual Box using Devices > Shared Folders, and give it a logical name to be used later (ubuntu-vbox).

3. Create the mount point
$ sudo mkdir /mnt/shared

4. Next, mount the shared folder.
$ sudo mount.vboxsf ubuntu-vbox /mnt/shared

5. That’s it – now you can access files on /mnt/shared from Ubuntu, and on c:\ubuntu-vbox from Windows!

It is also very simple to install a complete LAMP stack – Apache 2, PHP 5, MySQL, and phpmyadmin on our fresh install of Ubuntu 10.04. Check out these links for tips:

http://blogote.com/2010/ubuntu/how-to-install-apache-2-on-ubuntu-10-04-with-php5-and-mysql-support-guide.html

http://www.shicho.net/lamp/?p=138

A key aspect of using Ubuntu in VirtualBox is to ensure that you have installed any guest additions. This enables sharing of folders as well as full screen displays. To install guest additions, first start up your Ubuntu instance. Then, select Devices > Install Guest Additions in the VirtualBox menu of your running Ubuntu instance. This adds a CD image to your Ubuntu  desktop named VBOXADDITIONS_<version>. Browse to this  image using the Places menu, and execute autorun.sh.

That’s the sprinkling of pixie dust necessary to get a fully functional Ubuntu install!

Powered by WordPress Web Design by SRS Solutions © 2012 Damodar's Musings Design by SRS Solutions