Sorting by Surname when Firstname and Surname are in one column

Microsoft Excel – Howto Sort

This is a guide to sorting by Surname when the Firstname and the Surname are in one column.

Here goes.

You can’t without putting the firstname and the surname in separate columns.

However, there is an easy way to separate them.

1. Highlight all column that contains the firstname and surname.

2. Click the Data tab then click ‘Text To Columns’

3. Select the Delimited option and click Next>

4. Under Delimiters, check ‘Space’ and uncheck anythying else. Then press Next>

5. Click Finish and you should find that the Firstname and Surname have been separated to allow you to sort by Surname.



Linux: Installing text mode setup tool

If you’ve done a Basic/Minimal OS install on RHEL/CentOS Linux, setuptool (which could be invoked typing “setup” in terminal), this tool is probably missing on your system.

To install it via Yum repository, simply type the following command :

yum install setuptool system-config-securitylevel-tui authconfig system-config-network-tui ntsysv

There is a description of each packages :

setuptool : text setup tool console
system-config-securitylevel-tui : for configuring the firewall
authconfig : for configuring authentication
system-config-network-tui : for configuring the network
ntsysv : for configuring the system services



Adding Suffix to Date in Microsoft Word

This is a guide to adding a suffix (th nd st) to dates in Microsoft Word

Microsoft have not made it simple.

1) Put the cursor to the Insert position where you want the date to be.
2) In the ribbon bar click on the Insert tab, then Quick Parts, then Field.
3) Under Field Name, select Date and then click the Field Codes button.
4) In the Field Codes text box, type in this DATE \@ d \*Ordinal
5) Press OK and you’ll get the first part of the date with the suffix.
6) Press the Space bar to leave a space between the day and month.
7) Click on the Insert bar again, and Quick Parts again.
8) Then click Field, Choose Date again and click the Field Codes button again.
9) In the Field Codes box, type in DATE \@ “MMMM yyyy” including the speech marks.
10) Press OK and you should be done.

It wasnt easy to find that solution!
If you are interested, I got it out from this website which has an example document on how to manipulate dates in Word.
Look for on that page.

How to: Logging MySQL Login Attempts

This guide shows how to enable logging on MySQL which includes SELECT commands and login attempts. This can cause performance issues so only use when really important.

1. Open the my.cnf file

2. Add the following files:-

general_log_file = /var/log/mysql/general.log
general_log = 1

3. Restart Mysql Server using ‘service mysqld restart’

You will now find the logs in /var/log/mysql/general.log

Remember that this log may show SELECT commands that include passwords and sensative details, so ensure you secure them and dont keep them longer than necessary.