Git

From the Wikipedia...

The development of Git began on 3 April 2005. The project was announced on 6 April, and became self-hosting as of 7 April.

I just think of Skynet when I read that.

Open an Application from the Mac terminal

On Macs you can run an Application from the terminal using the following command:

 
open -a TextEdit filename
 

Using some other options, -t opens the default editor and -e opens TextEdit

Android plugin wont install in Eclipse

Theres seems to be an issue in Eclipse that causes a few problems when installing plugins. I didn't get the usual WST error but an error for one of the Developer Tools "features" - possibly this one "com.android.ide.eclipse.traceview.feature.group".

Adding the Helios Software site done the trick

https://developers.google.com/eclipse/docs/faq?hl=es#wstinstallerror

Wampserver

I've pretty much always run a full Wamp setup on my machine (rather than using Xamp or Wamp) at home and at work. I found that it gave me far more control for setting modules.

Well, things seemed to have moved on since I first setup a WAMP many years ago and I've discovered how handy WampServer can be to run multiple PHP versions. I was looking into Magento again and as it requires a relatively new PHP version (5.2.13) I have had to upgrade from the 5.2.8 I was running. WampServer took care of this nicely. I now run 5.3 (which it came with) and 5.2.9 in order to support older Joomla versions.

Setting additional modules is easy too, although I prefer to setup Virtual hosts rather than the alias's that it provides by default.

Add an extra result using Union in MySQL

Using Union in MySQL can be useful to quickly add an extra result to your resultset. I find this quite handy for adding a blank entry to the start of a dropdown that has been built using values from a database.

The following would add Joe to the end of the resultset.

 
SELECT age, name FROM users 
UNION
SELECT 25 AS age, 'Joe' AS name
 

Ubuntu wont turn on properly

I've had an issue in Ubuntu for a while that wasn't solved in the upgrade to 11.10. Most of the time when turning on my Acer laptop I'd get some power and the hard drive spinning up but it would then turn off after a few seconds. The only way to solve this was to remove the battery and the put it back in. Quite an easy task and I had got used to doing it but tedious all the same.

I know there is a lot of power related issues regarding the suspend mode but I was shutting down completely, or so I thought. As far as I can see the Shutdown option in the menu doesn't shutdown completely because if I run shutdown from the terminal I dont have the same issue on next boot. Tests so far have proven successful anyway.

sudo shutdown -h now

Edit: The terminal shutdown above hasn't solved it. I've also tried Fedora and still the problem persists. My friend Hadrien at Grownseed suggested a Bios or Windows specific power setting but there doesn't seem to be anything that I can find.

I've ruled out the hardrive (I use a different HD for each OS) as putting the windows drive back in after a linux shutdown still demonstrates the problem. Once Windows shutdowns though its all back to normal.

Font size in Ubuntu Oneiric Ocelot

I upgraded to Ubuntu Oneiric Ocelot recently and couldn't find out where to change the font size (I find the defaults are a little too big on my laptop). It turns out you need to install an App to make the desired changes.

Advanced settings to change the font size

I can understand the decision to remove certain options in order to make it easier for new users, but surely the option could have been under an advanced tab or similar. Judging by other users comments it seems a lot would agree with me.

Open a program at the terminal and background it

A handy trick in Linux that avoids having many terminals open is to immediately send the program you want to open to the background.

If you want to run Gedit from the terminal, for example, you would normally lose control of the terminal until Gedit is closed. Instead, enter the ampersand to send it straight to the background and keep control of your terminal.

 
gksudo gedit &
 

Symfony display From errors

Display form errors in Symfony

$errors = $form->getErrorSchema()->getErrors();

How to reset file permissions via SSH

If you need to reset a lot of file permissions then the following two lines of code will do it very quickly from the command line. Your ftp client can be very slow at changing the permissions on a lot of files.

This will recursively search your directory tree starting from your current directory and chmod 755 all directories.

find . -type d -exec chmod 755 {} \;

This will chmod all files and ignore the directories

find . -type f -exec chmod 644 {} \;