Chris Pollock

Chris Pollock - web developer & ecommerce entrepreneur
undivided… my thoughts on world, family, church, business, technology and Jesus Christ (all in all)

Blocking Google Images with Dansguardian

Google images safe search isn't safe enough for our house. I wanted to find a way of blocking google images without blocking all of Google's services. This solution works as of 12 November 2013. Keep in mind Google is always changing things so this isn't a permanent fix. The thing I found was that a google image search uses a particular web parameter that can be detected by dansguardian and effectively replaced to "break" goole image search.

Here is the code that needs to be added to the urlregexplist

# ban google images

[ Leave a Comment ]

Restarting Dansguardian on OSX

I recently installed Dansguardian on my mac to have finite control over web traffic.

This post from drb80 was very helpful in getting it installed.

After you edit the conf files you'll need to restart the daemon. Here's how to do it:

sudo launchctl unload -w /Library/LaunchDaemons/org.macports.dansguardian.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.dansguardian.plist

[ Leave a Comment ]

YouTube Sanitizer – No Suggested Videos

Has this ever happened to you: You're watching a perfectly acceptable You Tube video with your children, when the video ends you are presented with a nasty thumbnail of what You Tube considers to be a "Related Video".  My wife has asked me if there was a way to get rid of the suggested videos at the end of the You Tube videos – the fasetest solution was for me to create a quick tool that parents could use to create a playlist free from "Suggested Videos".

Banner ads will still show at the bottom of the video from time to time.  I haven't found a way to diable that yet.

Access this tool here:


How To Use the Tool

It's pretty simple to use.

Pull up the video you want to "sanitize" and copy the code from the URL:

Screen Shot 2013-02-16 at 5.42.37 PM

Enter the copied code into YouTube sanitizer:

Screen Shot 2013-02-16 at 5.45.59 PM


You can enter more than one code.  Put each code on a new line.

Click Submit and you'll be on your way to viewing your video without the "threat" of Suggested Videos.

Update 1: Bookmarklet Available

Now you can sanitize your videos even easier.  Simply drag the link below to your bookmarks bar.  Then, when you're on a YouTube video that you want to sanitize, click the bookmark link in your toolbar.  A new page will open with the sanitized version of the video.

YouTube Sanitizer




[ Leave a Comment ]

Must Have Mac Software – Web Developer

It's been almost a year since I switched to using a Mac from a PC.  Since then there have been a number of other converts.  Our entire household now uses Mac computers and I know other people who are switching as well.  I wanted to list out some of the software that I've found helpful over the past year.  Note that this is mostly from the perspective of a web devleoper

  • Transmit – Great FTP clients that even supports S3 –
  • Sequel Pro – Must have manager for anyone who deals with mySQL –
  • Time Out – Prevents eye fatigue by prompting you to take breaks –
  • Text Wrangler – Good text editor –
  • Apple developer tools – Install these from the disk that comes with your Mac.  The program I use the most is FileMerge
  • Growl – notification software –
  • Adium – IM client – I love how it can be tucked away off screen –
  • Hyperdock – I use this to manage my windows – allows them to be made full size or part size by dragging them around the screen –
  • USB Overdrive – – a necessity for running my Evoluent Vertical Mouse –
  • Typinator – a shortcut text expander program –
  • Alfred – quick launcher application –
  • Clean Archiver – take the junk out of the standard mac compression –
  • Jing – great for quick screen casts –
  • Jumpcut – clipboard app that keeps a record of your latest clipboard cuts –
  • iStats Menus – allows you to keep an eye on our processor and memory –

There are a lot of other programs that I use that are more well known, but these form the foundation of smaller apps that make computing on the mac even easier.

[ Leave a Comment ]

Pondering: Is Health Insurance the New Social Glue?

My wife was reading an article in the NY Times about a man who was rushing into marriage because he need to get onto his girlfriends health insurance before his ran out.

My reaction: Is health insurance the new social glue? How many times have you heard that someone is doing something, staying at a job, even staying in a relationship because of the healthcare benefits? I suspect most everyone has heard someone say something along those lines.

I don't think there is any doubt that this "benefit" is providing a certain amount of glue. Something that I've never thought of thus far is: with the prospects of a nationalized healthcare system, what would become of that glue. My guess is it would lose it's stickiness.

I'm definitely not out to make a political statement on this one, my thinking here is purely philosophical. I'm not out to say it's better or worse without the current glue, but rather: how sad is it that this is one of the core things that's holding our society together is health insurance. Not love, not family, not a sense of duty, but health insurance.

Your thoughts? Comment.

[ Leave a Comment ]

Add Google Reader Link Back Into Gmail with Chrome Extension

I installed the Minimalist Gmail plugin (thanks to Life Hacker). The great part about this extension is that it allows you to populate the Google links list with your own custom links.


If you're one of the many user chagrined by Google's recent removal of the reader link in the Gmail header, this is a quick and easy way to get it back. Supposedly they are bringing it back, but until then enjoy the extension.

[ Leave a Comment ]

Track 404 Errors with Google Analytics

Tracking 404 pages is a part of being a web master. I was using a service called Link Patch, but they recently shut down. Why this never occurred to me before I don't know, but I thought, why not just track 404s as an Event in Google analytics. I tried it and it worked like a charm.

Here is the code I placed on my 404 page:

<script type="text/javascript">
	// log 404 in google analytics
	_gaq.push(['_trackEvent', 'Error', '404', '<?php echo $_SERVER['REQUEST_URI']; ?>']);

This will place the url for the page in the events menu under the "Error" category

What I love about this approach is that:

  • Groups multiple errors together to help me track trends
  • Allows me to filter and get reports across date ranges
  • Get reports emailed to me on a weekly, monthly, quarterly or yearly basis

I think this is going to be a great shift. I just sorry I didn't set it up earlier!

[ Leave a Comment ]

Dual & Triple Monitors with a Mac Book Pro – Matrox DualHead2Go

When I pondered my conversion to Mac, one of the biggest issues for me was the ability to operate two large computer monitors side by side.  As a developer this is a huge issue for me, so you can imagine my dismay when after going to the Apple store and talking to “genius” they simply turned around and Googled my question (something I had obviously done many times before).  After looking around I did discover that there was a device that would do what I was looking for. 


This tutorial applies strictly to Mac Book pros (Mine was new in Sept of 2011 and is running 10.6.5).  If you’re using a desktop mac or another mac book I can’t promise similar results but here’s what I did.

The Device

The device that allows you to go dual and even triple screen on your mac book is the Matrox DualHead2Go DP Edition.  Some of the other device versions will work, but they won’t give you the resolutions you want to run 24” inch monitors.  If you want to go big on you monitors you’re going to need to use the DP (display port) edition.


The Adapters

Because I was operating DVI monitors I needed three different adapters!  2 DP to DVI adapters to connect the unit to the monitors and 1 Mini DP to DP adapter to connect the Mac to the Matrox unit.  I definitely didn’t appreciate all the extra costs of the adapters, but I was a man on a mission so I did it anyways.


Mini DP to DP Adapter



The Software

The software Matrox PowerDesk allows you to tell the OS what monitor (laptop or “dual screen”) should be the primary.

Screen shot 2010-11-18 at 10.15.58 PM

Screen shot 2010-11-18 at 10.16.16 PM

Screen shot 2010-11-18 at 10.14.45 PM


Little Annoyance, but Working Great!

One of the primary annoyances is that it treats the dual monitor setup form the device as a single monitor, so you can see that the task bar is completely stretched out across the top.  This really doesn’t cause too much pain except when I need to get to the file menu and I’m using the left monitor.

On the other hand the great part about this is you can stack a ton of stuff in your application bar at the bottom – fill it up as it will stretch all the way across the bottom if it needs to. 

Lots of cords need to be plugged in when you “dock” your mac, but nothing too overwhelming there.


Other Tips

You’ll need a USB hub.  The Matrox unit takes up the mini display port AND A USB port for power. 



Overall I’m very pleased with the results.  I work primarily off the two main monitors, but I can put secondary applications like script logs and skype on the less dominant lap top monitor.  If you are a developer you’ll definitely benefit from this arrangement.  Also, if you like my desk, check out this post.. I made it myself.


[ Leave a Comment ]

Make DOMPDF work with Magento

I’m currently working on a project where I wanted to use DOMPDF to export html from magento.  With some help from some folks who got DOMPDF to work with Zend I was able to get it working with Magneto.

Step 1

Copy the dompdf folder to the lib directory of your magento install.

Step 2

Edit app/Mage.php to include the following code

include_once 'dompdf/';

This goes around line 52 inside the else statement right after

 include_once "Varien/Autoload.php";

Step 3

Use the code.  Here’s an example of what I  am doing inside on of my custom contollers

public function printAction(){
        if ($quote = $this->_iniQuote()) {
            $html = $this->getLayout()->createBlock('crm/quotes_print')->toHtml();
            $dompdf = new DOMPDF();

Basically that’s it.  Pretty straight forward and seems to work like a charm.

NOTE:  This was done using DOMPDF 0.6.0 beta1 and Magneto

[ Leave a Comment ]

You have how many children???

We by no means have a lot of children by historical standards, but according to our current culture standards the reactions we get are quite the opposite. One of my little jokes when people remark about how many children we have, I say that I'm just making up for all the people who are not having children. Well it turns out that my joke is really no joke at all. Here's a short video on a stable population.

[ Leave a Comment ]


Things I see

Walk about near Ugley.PhotoIs there anything more springy than daffodils? £2 at Tesco is hard to pass up. #englandtrip2017 #springIMG_1560.JPGIMG_1537.JPGIMG_1567.JPGIMG_1614.JPGIMG_1608.JPGPhotoOliver PowerLucas power!Big bathtub fun. #lifewithboysTucked himself in like this on my bed this morning :relieved:#lifewithboysNeat tree in bloom. Looked like pussy willow blooms but this when opened. Bees were covered with pollen. #englandtrip2017English spring and a big swing. #englandtrip2017

Chris Pollock

Web Developer - proficient in both PHP and ASP.NET.
Rochester, New York

View my web developement site.

View Chris Pollock's LinkedIn profile

My Pictures

Walk about near Ugley.PhotoIs there anything more springy than daffodils? £2 at Tesco is hard to pass up. #englandtrip2017 #springIMG_1560.JPGIMG_1537.JPGIMG_1567.JPGIMG_1614.JPGIMG_1608.JPGPhotoOliver PowerLucas power!Big bathtub fun. #lifewithboysTucked himself in like this on my bed this morning :relieved:#lifewithboysNeat tree in bloom. Looked like pussy willow blooms but this when opened. Bees were covered with pollen. #englandtrip2017English spring and a big swing. #englandtrip2017