Nagios Python Plugin Check Lock File Exists

Code Highlighting Test

I just installed the crayon code highlight plugin from the link below, man you got to give credit where credit is due. This plugin was simple to install on my site and it has endless code highlighting capabilities.
Crayon Highlight
OMG: This is some pretty code highlighting if I must say so myself. Have a look:







CYGWIN – clear.exe from scratch C Program

Hello all,

TL;DR – I wrote a C program to use as clear.exe on cygwin, I know about CTRL-L but I wanted a binary for scripts, and I am used to typing clear at a terminal

I was recently enforced to use Windows as my daily computer at work for all types of compliance PCI reasons, reasons that I do not wish to dive into. However I am now on Windows, I spend most of my day in a BASH shell on a remote system, so it’s not that bad. However traversing around Windows with CMD or PS sucked. I was introduced to cygwin and I was really impressed, I was able to use a ton of tools that I was already familiar with on the Linux CLI. Native SSH,SCP were huge for me at this time, also the ability to customize the colors with the TTY settings was awesome.

One issue I ran into was I liked to use the clear command in my scripts and from the CLI when I want a fresh terminal. Well, I figured I could just re launch the cygwin installer and search for clear.exe and install it. This was not the case, unfortunately I was instructed to install ncurses and the associated libraries. I followed these recommendations and never got clear.exe to work.

So I did what any computer scientist would do, research how to write a C program on this and compile it and copy it to my $PATH and wouldn’t you know it works!!.

So Here it is in all it’s glory. clear.exe for Windows and CYGWIN:

### Clear no workie ###

Ok so we can see the clear program was not working in the above example. So I wrote the following lines of C code below and compiled them.

OK, cool, now you will need to get GCC on your Windows machine from the CYGWIN installer, so just re run the installer and search GCC, you can install it from there like so.

View post on

Ok now for the awesome stuff, it’s time to compile this with GCC and create a new clear.exe binary for Windows and CYGWIN.

Now that we see we can use the new executable to clear out cygwin shell, let’s copy it somewhere so we can just type “clear” to get what we want.

And there you have it, have fun!!!



I was sitting here thinking about how much I miss Stowe Vermont and how bad the snow count for this season 15/16 was up north. Stowe Vermont is a very magical place in northern Vermont that has one of the most desired ski resorts in the northeast(STOWE).

I love Stowe and it has a deep spot in my heart, I have so many memories of the place. Anyway I kind of wanted to pay a tribute to the resort and post some awesome pictures I found on the web. Hope you like it……………


C Code Learn – Open file write user input to it

Every once in a while I will get this urge to want to learn some C, C++. I am versed in Python and know my way around bash / Shell scripting like the back of my hand. But as always I am continuing to learn and self teaching myself is how learn the “BEST IS IS”.

Anyway let’s get to it, I wanted a program that would prompt a user for a sentence and then take that sentence and write it to a file, the program would have to create the file if it did not exist. Let me show you the code and attempt to break it down.

WeatherUnderground API fun – PYTHON

I started to play with web scraping in Python, this is pretty neat. I can grab an extended forecast from weatherunderground for any city and display this in my bash shell. This is just the tip of the iceberg, so much fun and capabilities.

Weather Code

Here is a sample of the raw JSON from the API request.

Puppet Enterprise Installation /bin/bash: bad interpreter: Permission denied

I thought I would write up a quick post in regards to installing PE and getting a BASH permission denied error.

information:bash: /tmp/pe-installer-ibqD7803/install/puppet-enterprise-installer: /bin/bash: bad interpreter: Permission denied

When using the enterprise installer from Puppet, I was able to get to the webpage and enter all the parameters. When I clicked deploy I was faced with the above error about the BASH interpreter. It turned out that I had NOEXEC permission on the /tmp directory. Once I changed this with the following command I was able to install PE.

To remove noexec:
mount -o remount,exec /tmp

To Put it Back:
mount -o remount,noexec /tmp

BASH Clear Semaphores Linux

Parse Nagios status.dat and send daily report