Its the USB age, chuck dvd drives!

USB = pen drive, SD card reader, iPod or your-favorite-usb-mass-storage device

Find below, a compilation of sources that explain the process of installing various Operating Systems available for us mortals.

Installing Windows 7 from USB

Installing Windows XP from USB

Installing OpenSolaris from USB

Installing Ubuntu from USB

Installing Leopard from USB

So chuck those dvd drive’s out the fuckin window!

Installing WordPress Locally on Your Mac OS X

What is WordPress ?

WordPress is an open source blog tool and publishing platform powered by PHP and MySQL. It is often customized into a content management system (CMS). It has many features including a plug-in architecture and a template system. WordPress is used by over 14.7% of Alexa Internet’s “top 1 million” websites and as of August 2011, it powers 22% of all new websites. WordPress is currently the most popular CMS in use on the Internet.

What is MAMP?

MAMP stands for Macintosh, Apache, MySQL, and PHP. MAMP is an application you can install on your Mac which allows you to have access to a local PHP server and MySQL server. Essentially, MAMP gives you all of the tools you need to run WordPress on your machine, for development and testing purposes. You can accomplish this in different ways, but the other ways aren’t nearly as simple (see MacOS_X_Local_Mirror for the long, manual version of installing PHP and MySQL on your Mac).

Step 1: Installing MAMP

Before you can install MAMP on your Mac, you’ll need to download it from the MAMP website. MAMP requires that your Mac be running Mac OS X 10.4.x or later.

Once the MAMP download is complete, double-click the MAMP disk image (it should be something like MAMP_2.0.3.dmg), and you should get a MAMP window pop up. Drag the MAMP folder (not MAMP PRO – we’ll save that walk-through for another time) to the Applications folder.

Step 2: Basic MAMP Settings

Now that you’ve got MAMP installed on your system, launch MAMP.app (located at /Applications/MAMP/MAMP.app).

While you’re editing settings, MAMP might prompt you for an administrator password. This is required because MAMP needs to run two processes: mysqld (MySQL) and httpd (Apache), and depending on the settings you set for those processes, you may or may not need to input your password.

Once you open MAMP, click the Preferences button. Next, click over to “Ports.” The default MAMP ports are 8888 for Apache, and8889 for MySQL. If you use this configuration, you shouldn’t get asked for your password, but you’d need to include the port number in the URL (localhost:8888). If you’d like to leave the port number out of the URL, change the Apache port to 80. The downside of using port 80 as your MAMP Apache port is that you’ll always be asked for your password.

On the PHP tab, select PHP version 5. The PHP minimum requirement for WordPress was raised to 5.2.4+ in version 3.2.

Lastly, on the Apache tab, you’ll need to set a document root. This is where all of your files are going to be for your local web server. An example of a document root is /Users/USERNAME/Sites/wordpress/.

Once you’re done editing all of the settings, hit OK to save them.

Step 3: Starting MAMP Servers & Creating The Database

To start the MAMP Apache and MySQL servers, simply click “Start Servers” from the main MAMP screen. Your MAMP servers have now been started.

Once the MAMP servers start, the MAMP start page should open in your default web browser. If not, click on “Open start page” in the MAMP window. Once that’s open, select phpMyAdmin from the webpage.

Under “Create new database”, enter in a database name such as “wordpress”, and press “Create.”

Step 4: Downloading and Installing WordPress

Now it’s time to download WordPress. Once you’ve downloaded and unzipped the WordPress download, open up the “wordpress” folder. Click and drag all of the files from the wordpress folder to your MAMP document root (I use/Users/USERNAME/Sites/wordpress/).

Lastly, we’ve got to run WordPress’ famous 5-minute install. Visit your local site (localhost:port or localhost:port/wordpress), and enter the following information into the database setup form:

database name: wordpress
database host/server: localhost
database user: root
database password: root

Once that’s complete, enter a blog name and email address, and you’re ready to use WordPress on your Mac.

Resizing Windows in latest Mac OS Lion

A great new feature in Lion is the ability to resize windows in a much more flexible way. Whereas Snow Leopard only allowed resizing a window using a “handle” in the bottom right corner of every window, in Lion placing your mouse near any edge of a window will result in a new “Resize” cursor indicating that you can resize the window from there.

If this wasn’t enough, there are a few other new resizing features that can make this even more useful.

Firstly, holding the Option key while resizing results in both sides of the window resizing equally. For example, if you have a full screen window and resize it by Option-dragging the left side in towards the centre, the right side will also move in by an equal amount. If you resize from a corner using this method, it essentially has the effect of anchoring the window by its centre rather than by the opposing corner as usual.

Secondly, holding the Shift key while resizing forces the window to keep the same proportions. This is similar to when you resize an image and want to avoid stretching it in one direction. If you double the width of a window, the height will be doubled as well.

Finally, you can use the Command key to resize windows in the background without moving them to the front. This has actually been around since before Lion, but it has become much more useful now you can resize windows from any edge.

Now, if you really want to be a pro, you can try using the modifier keys in combinations. You can also press and release Option and Shift at various points while you are already resizing to add and remove the constraints.

Bonus Tip: If you go to resize a window from an edge, but instead drag the mouse cursor in the wrong direction (i.e. drag up/down while resizing from the left/right edges) you can move the window around. This means you no longer have to only move windows using the title bar at the top.

Source: macosxtips

Disable Spotlight Indexing in Mac OS 10.6 – Snow Leopard

Disabling Spotlight in Snow Leopard is pretty easy, launch the Terminal and type the following command:

sudo mdutil -a -i off

This tells the Spotlight manager to disable all indexing on all volumes, the command will require your administrative password to execute.

Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to:

sudo mdutil -a -i on

Now Spotlight indexing will be back on and work as usual.

Rebuilding Spotlight’s Index on OS X (Manually)

After doing a number of disk clean up and optimizations, I found myself in the circumstance of OS X’s spotlight returning no results. Whether I searched for a keyword in Mail, or by Spotlight using Command-Space, I got no results backs – just an empty list for my troubles.

It turns out there’s a neat utility out there called Rebuild Spotlight Index 2.7 that does all the grunt work for you. Problem is, it didn’t work for me. What’s going on is actually fairly trivial, and it’s possible to simply do everything via the command line.

The metadata utilities need to run as root, so to see what your drive is up to, you’d enter something like: sudo mdutil -s /

This shows the status on the root volume.

To turn indexing on for a volume, you enter: sudo mdutil -i on /

And, to force Spotlight to rebuild its index, you simply erase the master copy of the metadata stores on the volume like this: sudo mdutil -E /

However, while I did all this, Spotlight was still not building the indexed for me.

Here’s how I solved it, using just the Terminal.

First, I wanted to see the schema file, so I printed it out using to the standard input using: sudo mdimport -X

At the bottom of the schema listing, I say a reference to a schemaLocation, and took a shot in the dark that perhaps that Spotlight’s index rebuilding needed to check data against its schema before it would start. To do that, it might need network access, if not back to the local machine. And, for good measure, I went to check the date/timestamp on the Spotlight directory using: sudo ls -la /.Spotlight*

While most of the files had the timestamp of when I tried to delete the index, not all the files had the current date and time. Additionally, the file sizes were not growing, a good indication the index was not being rebuilt.

Then, I did the following commands to ensure indexing was on, the spotlight metastore was really gone, and that I wanted it rebuilt:

sudo mdutil -i on /

rm -rf /.Spotlight*

sudo mdutil -E /

The moment I did the last command, this time the system sprung to life, the directory /.Spotlight-V100 was created, and the files inside it were growing quickly. Spotlight on the toolbar showed a progress bar, indicating the system would be done indexing in a bit.