Main menu

Subscribe to www.johngiovannis.com RSS

Distance to the horizon

Submitted by johng on 16 March, 2012 - 17:29

Have you ever wondered how far can you see to the horizon from an elevated position ? Using simple trigonometry the distance to the horizon along the Earth's surface can be easily determined. Two cases are considered: (i) light travels in a straight line and (ii) light travels along a curved path as a result of atmospheric refraction. In both cases it will be assumed that the Earth is a sphere resulting in a circular cross section when examining the problem in two dimensions.

Updating Drupal

Submitted by johng on 30 January, 2012 - 17:31
A regular maintenance task for a Drupal website is to update the core files.  This document describes the update procedure for a minor revision update, e.g. from Drupal 7.10 to 7.12. Prerequisites for this procedure include: (i) a familiarity with the command line, (ii) ssh connectivity to the target drupal website and (iii) the availability of existing backups of the website (including the drupal database)

Directory structure

The instructions assume the following directory structure:
 

Calculating $\pi$

Submitted by johng on 14 October, 2011 - 00:16

$\pi$ is a mathematical constant defined as the ratio of the circumference of a circle to its diameter. There are many other definitions including the ratio of the area of a circle to the square of its radius. It is a constant that also appears in many formulae used in mathematics, physics and engineering.

Linux shell commands

Submitted by johng on 4 April, 2011 - 17:19

The linux shell command line interface is a powerful tool for performing system administration tasks. In comparison a graphical user interface (GUI) is easier to use but has limitations: (i) confined to perform specific tasks, (ii) required to navigate through menus and (iii) not easily configurable to perform batch jobs.

Some of the advantages in using the command line interface are: