philipnorton42's blog

Exporting And Importing Munin Graph Data

Sunday, July 21, 2013 - 20:38

When Munin does a data update it stores all of the data from the nodes as a set of rrd files. These files are then picked up by the munin-graph and munin-html programs and turned into the graph images and web pages that you are probably familiar with if you use Munin.

Category: 

Sieve of Eratosthenes In PHP

Saturday, July 6, 2013 - 00:07

The sieve of Eratosthenes is named after Eratosthenes of Cyrene who was a Greek mathematician who devised a mechanism to find a sequence of prime numbers using a simple algorithm.

Normally, looping through a list of numbers and finding the primes can be an expensive process. The seive of Eratosthenes is one of the most efficient way of working out all of the smaller prime numbers below (below 10 million or so).

Category: 

Listing Phing Targets In A Project

Friday, June 28, 2013 - 18:05

Providing a Phing build file along with a project is a good way of allowing automation of certain aspects of the project. The only trouble is that users won't know what's in the build file unless they open it or just run it. You could provide documentation along with the build file so that users know what to use the file for, but a better approach is to list out the targets available in a project. This can be done easily by using the -l (lower case L) or list flag, which will just list the available targets in the supplied build file.

Category: 

PHPNW13 Call For Papers And Blind Bird Ending Soon!

Tuesday, June 18, 2013 - 23:15

The 5th annual PHPNW conference is set for October 5th and 6th this year and preparations for the Manchester conference are in full swing. If you want to talk at the conference then the call for papers is set to close on the 23rd June. The speaker package includes accommodation for the Friday and Saturday night as well as a speakers dinner on the Friday night.

Category: 

Copying Files With Secure Copy

Saturday, June 15, 2013 - 19:52

The secure copy command (run using scp) is a Linux command that allows the transfer of files between two computers. This can be locally to a remote server, from a remote server to a local location, or even between two remote servers.

When copying to or from a remote host scp uses ssh for the data transfer. This means that authentication is required, but the files are copied in a secure fashion. When starting a scp request the command first sets up an ssh connection to the remote location, which is then used for the rest of the transfer.

Category: 

Control Structures In Phing

Sunday, June 2, 2013 - 12:52

Phing has a few different tasks and elements that allow you to select paths of code execution depending on what you need to happen in a build file. These are limited to loops and if statements, but a lot of functionality can be covered with just a couple of lines of XML.

Category: