Wednesday, November 8, 2017

String PDF Files in OS X and Control Image Quality

This guide is using information from here and providing clearer instructions and a Automator script to compress many at once.


  • Go here and click the green Clone or download button, then select Download ZIP.
  • Go to Downloads on your computer and rename the downloaded folder to Filters.
  • Make a new Finder window (Command+n) and then hold Option while clicking Go -> Library in the menu.
  • Drag the Filters folder with he files you downloaded into this new Library folder.
  • Download this program to your Applications folder or Desktop.
  • Now you can just all your PDF's files at once and drop them onto the application and it will compress them and save the compressed versions to your desktop.

Thursday, August 17, 2017

Connecting to MySQL Server from a Microsoft SQL Server

This seams to me that connecting MySQL and Microsoft SQL databases is something that should be simple to do. Unfortunately looking around online there was no real clear directions or even indications that this was possible without buying some additional drivers.  While fear not because this does work out of the box without needing to buy any additional software on pretty much any versions of the two databases.

In short what we will do is add a MySQL ODBC driver, configure a System DSN using that driver, Link MsSQL to that DSN connection, and to do a few test queries and updates.  This will allow full insert, update, and delete commands.

Friday, July 21, 2017

Netflix to Trakt.tv Sync

Update Details Below. Note that if the dialog shows an older version you may need to recreate your bookmarklet.

Also note that this will probably only work in English, though you may be able to temporally change your language on Netflix to get the sync to work.

There used to be a nice Chrome plugin to synchronize by Netflix history with Trakt.tv but it had been unreliable and doesn't seam to be working now.  I wrote this code to solve my own need but it does the same thing and I am posting it here for others to use.

Note that this is not 100% perfect as some show names aren't exactly the same and some Netflix show's don't use episode names at all. This code it not using any Netflix API calls but rather just scraping your Viewing Activity page and then making API calls to your Trakt.tv account to post the item's it finds.

Monday, June 19, 2017

Restricting Access at in Varnish Server Wide to Admin Areas

There are lots of ways to implement access controls and additional security on your hosting. I recently implemented a very restrictive but easy to manage implementation for our FreeBSD server that runs everything through Varnish. I could have placed this restriction in Apache via .HTACCESS files or global rules but placing them in Varnish they execute earlier and have less server overhead and ensure there are no caching related flaws.

Read XML Sitemap to a CSV File

You may need to process a sitemap for redirects or get a list of all your pages for some testing or monitoring process.  Here is a simple script you can run to convert your sitemap to a CSV file.  It even supports multi-file sitemaps.