PHP Ternary Operator for If Else

These two snippets of PHP perform the same function but the ternary operator takes much less space. Read more great PHP tips at phpro.org /*** using if / else ***/ if(isset($variable)) { echo $variable; } else { echo ''; } /*** using ternary... » More

VirtualBox: Cloning a VM

My Virtual Machine was named http1 so I cloned the vdi as http2.vdi using the VBoxManage command:VBoxManage clonevdi http1.vdi ../pathtonewlocation/http2.vdiThe output was:0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%Clone hard disk... » More

SNMP with Nagios

I thought I would jot down a few notes about today's adventures with SNMP. Specifically using SNMP with Nagios mostly on Red Hat/CentOS. I have an appliance from a third-party from which I would like to monitor and graph performance. So view this as a... » More

Uptime

1084 days on this internal monitoring machine. Unfortunately I had to take the machine down as I was replacing it.

Linux Find Not Owner

In Linux to find files not owned by user using the 'find' command we negate with the exclamation mark so rather than:find . -user jonnywe use:find . ! -user jonnyWhere:find <dir> ! -user <username>

VirtualBox 4.0 on Ubuntu 10.10 Maverick

Add the following to /etc/apt/sources.listdeb http://download.virtualbox.org/virtualbox/debian maverick contribThen run:wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -sudo apt-get updatesudo apt-get... » More

msconfig Startup Programs

This searchable list if programs could come in useful when disabling programs from starting on slow windows machines.

MySQL: Too Many Connections

On a shared server with MySQL and Apache the MySQL server was periodically disallowing connections as there were already too many connections. The default is 150+1 so I added the following to /etc/my.cnfmax_connections=200To increase the maximum number... » More