Lotka-Volterra Equation: Plotting with Python

To learn how to use matplotlib I wrote an application in Python that plots the Lotka-Volterra equation, which gives a simple model of growth and death rates for prey and predator populations. I wrote this app a while ago, I think around the time I was learning some game theory basics which lead me to the Lotka-Volterra equation. For more detail on the Lotka-Volterra equation check out the Wikipedia article. Continue reading

Practice Network Lab for Cisco Packet Tracer

When studying for the CCNA I often wanted a simple “baseline” practice network in Cisco Packet Tracer so that I didn’t have to do do all the tedious side of a network set up over and over (e.g. connecting devices, assigning IP addresses, adding device components). So to save time I created a 12 subnet network that uses both serial and ethernet links, and uses a VLSM addressing scheme. See below for a screenshot of the lab network. Continue reading

Prisoner’s Dilemma: Simulating with Python

I first read about the Prisoner’s Dilemma game in Richard Dawkin’s book The Selfish Gene. For a full explanation see Wikipedia’s article. From Wikipedia:

The prisoner’s dilemma is a canonical example of a game analyzed in game theory

Realising that this would be easy to model in Python I wrote an application to create players and pit them in games to see which strategy would perform best. Continue reading

LDAP (with TLS) Installation Script for CentOS 6.3

While studying for the RHCSA exam I needed an LDAP server with TLS enabled to test against. After browsing many guides that were either out of date or just failed to work I found a forum post on Overclockers that worked for me on a plain CentOS 6.3 installation. I took the steps from Stratus_ss’ forum post on Overclockers and created a script performs all the required installation and configuration in one go. Continue reading

Service Health Check for Nagios

On load balancers you can typically set up health checks for services that listen on a port (e.g. SMTP, HTTP, etc). These health checks usually work by creating a TCP connection and sending some data to the service, then checking for an expected response. I wanted a script to do this as a Nagios plugin, the result is the script below. Continue reading