Skip to content

Coffee enthusiast and self-proclaimed programmer, musician, and curler.

Apache, VirtualHosts, and .me domains

August 5th, 2015

Dave Umrysh

despicable-me-movie-clip-screenshot-the-greatest-villain_large

After searching what felt like the entire Internet for a solution I finally solved the terrible problem I had been having in setting up a virtual host in httpd for my .me top level domain.

I had set up plenty of virtual hosts in my httpd.conf file for .com domains in the following manner with absolutely no issues:

<VirtualHost *:80>
     ServerAdmin me@email.com
     DocumentRoot /var/www/html/example.com
     ServerName example.com
     ErrorLog logs/example.com-error_log
     CustomLog logs/example.com-access_log common
</VirtualHost>

But when I tried to set up my .me domain the same way my server would always route the visitor to the default document root, /var/www/html/
Read more

[Updated] The Farmer’s Buddy Archival Site Offline

June 23rd, 2015

Dave Umrysh

Farmers Buddy

I woke up this morning to a fun little email informing me that my little website has been serving up some not so nice webpages for use in spam emails.

*sigh*

So for right now I took The Farmer’s Buddy offline ( and put up my favourite 404 page) until I can have a chance to review the logs and files thoroughly. Which I am actually very much looking forward to doing :)

Read more

Update to my Piwigo Extension

May 21st, 2015

Dave Umrysh

piwigo

I just pushed an update to my Twitter Cards Piwigo Extension that should help users in the same situation as Spaldam:

Good Day,

I just thought I should let someone know about an issue I found with using the Twitter Cards plugin (http://piwigo.org/ext/extension_view.php?eid=759) along-side the Database Synchronization With Files feature, you end up importing the “_tw_thumb.” files when they are created. This creates duplicates of the same photo in different sizes.

(link)

Twitter Cards will now store all created thumbnails inside its own “thumbs” subfolder.

All-in-all I’m still pretty impressed with how many people have utilized my little extension. There has been 1573 downloads of the most recent version. Just crazy :)

Uploads

PS If you would like to contribute please feel free to submit a pull request on github.

NextScripts goes offline, dragging my website performance with it

February 23rd, 2015

Dave Umrysh

cd777261ffc93f2c301b91b49bef5fdf

Being a use of the Pro version of the Social Networks Auto Poster {SNAP} from nextscripts I was a little disheartened to see their website disappearing from the Internet yesterday afternoon.

Mostly because their auto-updater script pings back to their website during every page load thus causing my own website to take forever to load. Looking through the plugin code I found that they set a timeout of 45 seconds! After a quick change to only 2 seconds, my website loads at a manageable speed again.

Here is the code to change if you are interested:

1
$arr=array('method'=>'POST', 'timeout'=>2, 'blocking'=>true, 'headers'=>array(), 'body'=> array('lk'=>$t['lku'], 'ukver'=>$t['ukver'], 'ud'=>$u));

I really hope everything is alright with nextscripts as I am really enjoying their plugin.

My First Attempt At Comic Binding

February 17th, 2015

Dave Umrysh

Open Book

Last September I turned the big 3-0. As a birthday gift to myself I decided I would begin binding one of my favourite comic books runs, the 2005 Geoff Johns Green Lantern series.

I had the issues bagged/boarded and stored in long boxes but I found I rarely (if ever) would pull them out to re-read them. Having them bound makes it easy to pull the hard cover off the shelf and read some comics. I decided to complete just my first three volumes at this point with the plan to complete the rest in the near future.

This being the first time I have ever had comics bound I wasn’t to sure what to expect. I had heard great success stories from way back when I used to listen to the Comic Geek Speak podcast but they of course discussed binding companies located in the USA. With the current CAD being worth almost 20% less then the USD I needed to find a Canadian library binding company.

After some searching I came across Wallaceburg Bookbinding in Ontario. I wrapped up my issues, put them in the hands of UPS, and waited anxiously for them to return. I was either going to be really excited or completely disappointed in the results. I am happy to say they turned out fantastic!
Read more

My Simplistic Mailgun Webhook

January 30th, 2015

Dave Umrysh

Mailgun_Icon

I thought I would quickly post my extremely simplistic webhook that I utilize for my mailgun.com accounts. Before I threw it together I searched for something similar online with no success. By posting it hopefully I can save somebody else the time writing their own from scratch.

To set it up you need to fill in your Mailgun API Key (so the script can verify the messages submitted to it are valid) along with a sending and receiving email address.

Then it’s as simple as uploading the file to your webserver and setting it’s location in your Mailgun account.

I have also posted it on github.com

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$key = "<API Key>";
$from = "info@example.com";
$to = "dave@example.com";
 
 
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	if(isset($_POST['timestamp']) && isset($_POST['token']) && isset($_POST['signature']) && hash_hmac('sha256', $_POST['timestamp'] . $_POST['token'], $key) === $_POST['signature'])
	{
		if($_POST['event'] == 'complained') {
			$subject = "[Mailgun] Spam Complaint";
			$body = "Recipient: " . $_POST['recipient'] . "\nDomain: " . $_POST['domain'] . "\n\nMessage-headers: " . $_POST['message-headers'] . "\n";
			mail($to, $subject, $body, "From: " . $from,"-f". $from);
		}elseif($_POST['event'] == 'bounced'){
			$subject = "[Mailgun] Bounced Email";
			$body = "Recipient: " . $_POST['recipient'] . "\nDomain: " . $_POST['domain'] . "\nCode: " . $_POST['code'] . "\nError: " . $_POST['error'] . "\nNotification: " . $_POST['notification'] . "\n\nMessage-headers: " . $_POST['message-headers'] . "\n";
			mail($to, $subject, $body, "From: " . $from,"-f". $from);
		}elseif($_POST['event'] == 'dropped'){
			$subject = "[Mailgun] Failed Email";
			$body = "Recipient: " . $_POST['recipient'] . "\nDomain: " . $_POST['domain'] . "\nCode: " . $_POST['code'] . "\nReason: " . $_POST['reason'] . "\nDescription: " . $_POST['description'] . "\n\nMessage-headers: " . $_POST['message-headers'] . "\n";
			mail($to, $subject, $body, "From: " . $from,"-f". $from);
		}
	}
}
header('X-PHP-Response-Code: 200', true, 200);
?>

A Sunday Spent Web Scraping

December 14th, 2014

Dave Umrysh

Scraper

I had some free time today so I thought it would be fun to write a quick little web scraper to alert me if any new land comes up for sale near where I grew up. I guess you could boil the reasoning down to a little bit town-gossip and a little bit curiosity. Finding out that Farmer John is selling the old homestead makes for interesting Xmas dinner conversations :)

The code currently scrapes the Remax website once a day looking for any properties withing a specific radius of my set middle-point and will ignore any town addresses.

Scraper

 
 
Comments? Reply via Twitter:

Adventures in Wine Making (part 5)

December 14th, 2014

Dave Umrysh

Glass

The day has finally arrived, bottling time!

Due to other plans coming up I wasn’t able to bottle the wine at exactly 14 days from stabilizing. Instead we bottled the wine a full 30 days after step 4!

Full Carboy

Again, I can’t recommend enough the use of old milk crates for holding your carboys. I had to carry the full carboy up two floors in the house for bottling and having nice handles to hold made it so easy.

Read more

Namecoins

November 28th, 2014

Dave Umrysh

Namecoin_Coin

After mining Bitcoins on Eligius for some time I somehow just recently realized they provide merged mining of Namecoins. According to chatter in their IRC channel it appears payouts are processed manually. Even so, after only a few weeks I came to posses over 3 Namecoins. Yay!
Read more

Time-based One-time Passwords for Email

November 16th, 2014

Dave Umrysh

TOTP

A few months ago a thought crossed my head why no one had ever integrated TOTPs into the existing email protocols. I’m not talking about adding it as a second factor but rather replacing passwords entirely with TOTPs. I’m sure there must be a reason as to why no one has done this but I thought it would be fun to see if it was possible.
Read more