Adding on to backup bash scripts

So, ages ago, I wrote up a couple of bash scripts that automated the backup process on a server. It’s all text based, so you’d have to be logged into a terminal or be ssh’d into the box.

Today, I got to thinking, I should give it a pretty web gui that makes the process easier and functions through a web gui.

It’s still really early in the through process, but I’m intrigued by the project and will start working on it soon.

Original Post:


The Hackers Diet, WordPress plugin

Awhile back, I started looking into fixing the hackers diet wordpress plugin and publishing it for the world to use. Here recently I finally started towards that goal. I reached out to the original creator and got his blessings to go forward.


So, first on the todo list, is to figure out the series of errors that keep showing up. I was able to correct the installation issues that were showing up. The biggest issue now is, when you enter your weight and save it, a whole slough of errors show up.

Second on the list is to update the jquery graphing, to one a bit more aesthetically pleasing.

With any luck, I will be able to give this plugin a new life and add a few features in the process.

When @afex wrote the original code, he laid the groundwork for a widget, which I completed and it works perfectly. Another issue that I ran into was, when entering a weight on a given day, it always rolled back a day. I got that fixed as well.

Thanks for reading, until next time.



I’ve been a code junkie recently.

So, recently I have been doing a lot of coding, both bash and php/html. The other day I was at work and a co-worker of mine who handles abuse complaints mentioned he had to process over 100 domains for something he was working on. I instantly thought about writing code to accomplish it, I asked what he needed off of the domains, to which he responded IP and who owns it.

At first I started with a pretty simple script, with two domains hard coded into the script for testing purposes, which worked decently. 

Here is the original script.

foreach($x as $host){
$ip = gethostbyname($host);

echo “$host – $ip”;
echo “<br />”;



While this works, it was missing a few things, it would be really difficult to enter all 100 domains, each needing to be separated by a comma and wrapped in quotes, just a little too much work for me. Plus it doesn’t have the whois information. So, onward I go.


My second incarnation of the script allows for user entry of the domains, the only thing that’s needed is a comma separated list.

Here is the second script.

<form name=”list” action”” method=”post”>
<input type=”text” name=”list”>
<input type=”submit” name=”submit” value=”Submit”>
$list = $_POST[‘list’];

$listreturn = explode(‘,’, $list);
foreach($listreturn as $host){
$ip = gethostbyname($host);

$whois = shell_exec(‘whois -h ‘ . $ip);
$result = preg_match(‘/^OrgName:s*(.+)$/m’, $whois, $matches);
$org = $matches[1];
echo “$host – $ip – <b>$org</b>”;
echo “<br />”;


This script offers the ability to have a list of comma separated domains and it does all the work for you. It takes the domains, gets the IP address of the domain and then does a whois on that IP address to determine who owns the IP and then presents a nice list of information.

Within an hour I had the second version up and running and about 5 minutes later the list of domains that my co-worker had compiled, was processed and done.


“Off The Grid” Cloud File Hosting

I have used Google Drive and Dropbox for quite sometime without any encryption, and thought nothing of it. That is until this whole N.S.A. thing cropped up.

I had previously installed and played with OwnCloud and found it be quite nice. It doesn’t have all of the options that Dropbox or Google Drive have, but for off the grid cloud hosting, it’s pretty damn nice!

One thing I wanted to have with my OwnCloud was encryption to all my files. I found that OwnCloud has an app for that! So I’ve enabled it and got it all working.

That got me thinking, even though there are a lot of services out there offering encrypted cloud file hosting, I still don’t entirely trust them.. So, what I’ve decided to do is offer 5GB of free Cloud file hosting. I have limited it to just 15 people though. Mainly because, unlike the big guys, I don’t have endless amounts of Data Storage. Just email dwalker at merval dot org asking for a cloud hosting account.