blog Winter break and eight years in Japan

Eight Years

As of the end of last month, I’ve been in Japan for 8 years. Depending on my mood at the time, that sometimes seems like a short time and sometimes seems like a long time. I was only in San Francisco for a bit over 7 years so Japan is now where I’ve lived the longest outside of my family home.

The biggest changes from last year involve moving into a new place and adopting two cats. As a child, I always grew up with cats and especially with a lot of alone time I’ve been really happy to have two cats of my own. I may have been a bit naive on the difficulty of being a single (cat) father, but overall I think it has been a positive addition.

Read More →

blog Fluent Bit Exec Plugin

After experimenting the other day, I continued thinking about better ways to solve my analytics problem. I did not really want to run a separate fluentd instance in a container just to use out_exec but I wanted to use same functionality. I decided to take an afternoon and see how difficult it would be to create a go output plugin and built fluent-bit-exec_out .

graph LR nginx ---> |ltsv.*| fluent-bit fluent-bit --> |sematext.*| sematext subgraph fluentbit direction TB fluent-bit --> exec_out exec_out --> fluent-bit end

Building a plugin

I started looking for examples https://github.com/fluent/fluent-bit-go/network/dependents on how to build a plugin. I’m not a Go developer by default, so most of my code is not particularly nice but it works.

Read More →

blog Experimenting With Analytics

I’ve been using the self-hosted version plausible with my blog and development site. It generally works well, but there are times I’d like to have a little bit more customization on the reports. I’m already collecting nginx logs using ltsv and fluent-bit’s tail plugin. Since I have extra time to tinker over my winter break, I’ve been experimenting a bit.

graph LR javascript ----> plausible nginx -->|ltsv| fluent-bit fluent-bit -->|forward| processing processing -.-> firewall processing --> sematext processing -->|event api| plausible fluent-bit -->|raw logs| sematext

Default Plausible Configuration

graph LR javascript --> plausible

The default path with Plausible is easy. You create a site in their admin and copy the Javascript snippet onto your site. This works ok for simple cases but doesn’t work for most bots and such that do not run javascript. Since I want to get information on the bots that are hitting my site we need to do something with our server logs.

Read More →

blog Online Handles

Through middle and high school I was in the Boy Scouts. Each Boy Scout Troop is broken up into patrols of several boys. Each patrol has a name, which was often something pretty generic when I was in scouts. Common examples would be animals or creatures like fox patrol, bat patrol, dragon patrol, etc. While sitting around a campfire one evening, a friend commented on how generic some of the names were.

Read More →

blog What’s in a (folder) name

Quite a long time ago (long enough ago I do not remember the original source) I read a blog post or poll about various folder names on the computer. I recently remembered it and thought about writing it down.

Projects

I believe when I was in university, they had us using Eclipse as an IDE to write Java code. By default, Eclipse defaulted to a ~/Projects folder, so for many years that has been my default directory for my own projects. When I moved to web development and PHP and then later into Python, I used other editors like TextMate or Atom but I kept using ~/Projects for any of my coding projects.

Read More →

blog Removing Distractions with DNS

Many sites are designed to snare your attention and keep you scrolling for as long as possible. This is often not particularly compatible with taking just a short break. Because so many sites are designed with patterns to hijack your brain, often we need to be proactive about not letting them get the initial hook.

For a while now, I’ve been using DNS to help me out. A few months ago, I started using NextDNS to help me with that. With my heavy internet usage (and possibly a misconfiguration on my side) I exceeded their free tier a bit each month,but I was happy enough with their service that I became a subscriber. (They have an affiliate program though I doubt I would get much traffic from my link.)

Read More →

blog GitOps for My DNS

I’ve used Namecheap for many years for hosting my DNS. It’s nothing particularly special but it works well enough for my needs. When managing DNS entries it can sometimes be a little annoying doing everything on their web page. I’d rather be able to script something. After thinking about it for a while, I finally created something.

Namecheap’s API is implemented in XML which makes parts of it feel a bit old, but our use case is fairly simple. We can use get-hosts to download a backup of our DNS entries for history, and then set-hosts to publish our new values. I wrote a class to handle the basic Namecheap API calls (which is mostly formatting them and wrapping the requests library).

Read More →

blog Growl and MQTT

Many years ago before notification center, there was Growl . It was widely supported by many different MacOS applications, and had many nice customization options for the toaster popups. Eventually Apple released notification center and Growl slowly faded away, but I still appreciated the ability to send a remote notification and continue to use prowl for many of my projects.

Read More →