How to install Composer in Windows

I wanted to install PHP Composer in Windows. And to begin, I already have a copy of XAMPP 1.8.1, I think if you have a different way to get your PHP that should not matter. I tested this to work for Windows 7 but it should work for all versions of Windows.

0. Download and install XAMPP

You can download XAMPP here. I got the 7zip version rather than the installer itself. The ZIP version is similar, just with a larger file size. I extract the xampp folder into my C: drive, i.e. to C:xampp. Then install it by opening the file C:xamppsetup_xampp.bat. That will set the paths in XAMPP’s configurations.

1. Setting up environment variables

Continue reading “How to install Composer in Windows”

How to make Firefox address bar faster

Firefox’s address bar, also known as the Awesome Bar, stores all sorts of awesome information in a SQLite database. The SQLite database slowly starts getting fragments and the Awesome Bar just isn’t as awesome if it gets all laggy. To solve this, you can vacuum the SQLite database that Awesome Bar used.

Go to Tools, then Error Console. And copy the following:

[code lang=”php”]Components.classes[ “@mozilla.org/browser/nav-history-service;1” ].getService( Components.interfaces.nsPIPlacesDatabase ).DBConnection.executeSimpleSQL( “VACUUM” );[/code]

And paste and click on Evaluate:

Vaccuming Firefox in Error Console
Vaccuming Firefox in Error Console

The browser probably freezes for a few seconds and the address bar feels faster.

[via MozillaLinks]

How to run XAMPP’s PHP CLI and CakePHP console

XAMPP is one of the easiest options to develop using PHP or PHP CLI. I use CakePHP for development and one of the features of CakePHP is to back the MVC. In this guide, we’ll see how to get started. This tutorial doesn’t teach you how to use CakePHP’s bake feature. This guide is specifically written for Windows Vista or Windows 7.

0. Objective

To run XAMPP’s PHP CLI, you first have to set up the environment variables for PHP CLI. Also introduce how to get started on CakePHP’s console.

1. Setting up environment variables

Continue reading “How to run XAMPP’s PHP CLI and CakePHP console”

Up Up Down Down Left Right Left Right B A Start

Want to know the story behind Up Up Down Down Left Right Left Right B A Start? It’s sometimes referred to as Konami code and is implemented in many games, even those not from Konami.

Up, Up, Down, Down, Left, Right, Left, Right, B, A

First executed on an NES game (not Contra!) developed by Konami in 1986, the Konami code (and slight variances of it) can now be inputted in more than 125 different computer, video, and arcade games—some of which aren’t even developed by Konami, the company that created the code in the first place!

Because Contra was one of the more popular NES titles in the day and basically required the Konami code for the average player to complete (the code granted 30 lives from the start, instead of three), most people associate the code’s existence with it. In reality though, the Konami code first appeared in Gradius in 1986, two years before Contra.

In Metal Gear Solid 2: Sons of Liberty on PS2, entering the sequence at the end of the game has the main character, Snake, barking, “STOP FOOLIN’ AROUND KID!” At the end of Metal Gear Solid 3: Snake Eater for PS2, Snake confirms “One More to Go…” referring to the fourth and final installment in the series on PS3.

There are a number more of hilarious consequences for using the code, like it causing your main character to self destruct in Contra 4 if you use the code more than once per level to power-up your guns or in the Dog-developed NES title 3-D World Runner, a message pops up that exclaims, “I AM NOT KONAMI.” The code can even be used in Google Reader of all things, enabling a different background color for the left-hand navigation and updating all unread counts to 30 (a homage, no doubt, to Contra’s 30 lives). You know the code has reached pop culture when Google starts using it. (Source: Game Informer)

There you have it, this is what happen in Google Reader, you get a ninja and your unread count becomes 30. Refreshing will return your unread count to the original value. Pretty cool I say.

Up Up Down Down Left Right Left Right B A Google Reader

(Press Up Up Down Down Left Right Left Right B A in Google Reader and get Ninja!)

The code is even in a song by The Moldy Peaches – Anyone Else But You (of Juno fame).