petfeedd 0.2 released, with Docker support!

By · Published · python, raspberry pi, petfeedd, open source, docker

petfeedd, the daemon I wrote for my Raspberry Pi-powered cat feeders has been updated to fix a number of bugs people were seeing attempting to install it since I originally wrote it in 2017.

Perhaps the biggest change is Docker support! That's right, if you just want to run petfeedd, now you can do it in just three commands! No more installing various libraries and things (but that approach still works as well.)

Read More...
( Comments )

New Open Source Code

By · Published · open source, php, swift

Launched two new pieces of open source code in the last couple of months.

PlayerControls

PlayerControls is a macOS Cocoa framework that creates a View containing playback controls for media like videos or sounds. It is written in pure Swift 4 and has no dependencies.

SearchParser

SearchParser is a parser that converts a freeform query into an intermediate object, that can then be converted to query many backends (SQL, ElasticSearch, etc). It includes translators for SQL (using PDO) and Laravel Eloquent ORM. It supports a faceted language search as commonly found on many sites across the web. It is written in modern PHP.

Both are licensed under the MIT license. Go check them out on Github.

( Comments )

Building Meaningful Video Thumbnails Using FFMPEG and PHP

By · Published · php

Working on doing some upgrades for one of my clients and I hit on an idea. He has a lot of videos available, but each one only has a static image as a thumbnail, taken at a set point in the video (by default; the owner or and admin can go in and recreate the thumbnail at a different time point if they want.) But what if, instead, we could create an animated GIF composed of several frames from the video?

From a user's perspective, a single frame might not tell you a lot about a video. But ten frames taken over the course of the whole video can tell you a lot more about the video than the single frame would. How would we implement something like that?

Read More...
( Comments )

Customizing Screens on a Toyota Entune Infotainment System

By · Published · cars

So after twelve years driving an ultra-reliable 2006 Toyota Tacoma, I decided it was finally time to upgrade. So, of course, what else to buy ... but a 2018 Toyota Tacoma. :)

Things have really changed in twelve years, and where my old truck originally came with a simple CD player head unit (that I later upgraded to a Clarion CX-501, primarily because I wanted Bluetooth), my new truck has this fancy touchscreen entertainment system that has mountains of options and can even show me weather radar while driving!

So I was exploring around inside the menus last night and I discovered that you can, theoretically, set custom images as your startup and "screen off" images. But, unfortunately, the details of how to do this are buried somewhere in a SEVEN HUNDRED PAGE owners manual with a very thin index. Ain't nobody got time for that. So I googled around and found some answers on forum threads, and decided to write a post on how to do this to raise the visibility of it some.

Read More...
( Comments )

Digitizing Two Hundred Cassette Tapes

By · Published · digitization, tapes, music

Like most people who grew up in the 80s and 90s, I had a pretty large collection of cassette tapes. But probably unlike a lot of people, I've managed to hang onto them, or at least a lot of them, over the years. This big box of tapes has traveled with me through probably a dozen moves over the years, and it's always been in the back of my head, "I should probably digitize them."

The thing was, I had a bunch of cassette albums, sure, but most of them I eventually replaced with CDs and later ripped to MP3s. But I had a ton more of mix tapes and TV recordings.

Read More...
( Comments )

Backing Up and Rotating MySQL Databases the Easy Way

By · Published · linux, bash, mysql

Here's a little quickie for you. Say you have a small MySQL server floating around your house that you want to have regular backups of. You do want regular backups right?

In my case, the biggest motivation was wanting a regular way to grab a recent MySQL dump of an internal tool I use at home to develop against. After poking around the Internet a bit, I was surprised that, other than mysqldump itself, there doesn't seem to be a simple tool out there that you can slam into a cronjob and let it do it's thing.

So, like any good hacker, I decided to brew my own. After all, when you have 256,428 different solutions, why not make solution 256,429? :)

Read More...
( Comments )

Securing static resources with cookies, nginx, and Lua

By · Published · nginx, lua

I've been working with one of my clients the last month on migrating his iron- based architecture to a cloud-based provider. In this transition, we are going from one or two physical servers to multiple cloud servers and separating out parts to better scale each individual service.

As part of this, we are moving a significant library of images and videos away from being served off the same web server as the application and to a server tuned to handle requests for these static assets. The problem is that a lot of these assets (the videos and full-size images) are for paying members only. We need a way to secure those resources across physical servers.

Read More...
( Comments )

Wallpaper Swapping with Hammerspoon

By · Published · hammerspoon, lua, mac, apple, osx

Hammerspoon is a pretty nifty tool. It's kind of difficult to explain what it does, but the best I can do is that it allows you to use Lua to script actions on your Mac and, crucially, respond to events.

For instance, I use Hammerspoon to lauch all my applications when I get to work and lay them out on the screen in the order that I like. I can do this because I was able to attach a location listener to work's location, and execute Lua code on arrival. The amount of things that you can do with this tool is pretty stunning. It's become an indespensible part of my macOS experience.

Read More...
( Comments )

That Time I Became A 76-Year-Old New Yorker

By · Published · security

Or, what happens when you send an email to the wrong place.

Note, for the time being, I have redacted the names of the company and doctor involved as I am attempting to follow through with a responsible disclosure process for this security issue.

I had something very strange happen to me today.

It all began with a random email to an address that I don't use much anymore, but still have in Mail. It's an email account I've had for over 13 years, so it still gets the occasional stray email. The subject read as follows:

Followed in quick succession by another one:

Wait, what?

Read More...
( Comments )

The Brilliance of Linux

By · Published · linux

I've been a Linux user for many, many years. Going all the way back to Red Hat 5.2, which I picked up to install on an ancient Packard Bell 486 in the late 90s. Since then there's always been at least one Linux machine in my dorm, apartment or house somewhere. At various times I've even run it for my desktop OS, although these days I use macOS for that.

For much of that time, Linux was the choice of hackers, but was definitely not a choice for everyday users and required a significant amount of technical knowledge to run. That's not true so much anymore, but growing in that environment I learned a lot about how computers and operating systems work.

Read More...
( Comments )