Localizing Go to JavaScript

While working a Go backend for a side-project, I implemented a custom templating system among other things. For my project, I needed to be able to pass nonce values down to my JavaScript. I realized that keeping the data in the front-end up-to-date with the backend would require a lot of leg work. In order to save time and effort, I built the localize package.

This package takes a pre-defined Go data structure and recursively translates it to JavaScript primitives. The JavaScript that is spit back out can be used in just about any fashion, but it is designed to work best with the html/template package. Since the html/template package provides support for calling functions assigned to data passed to the template.Template.Execute() function, templates can fire off the localization process themselves. Once you have a template setup to utilize the localize package, it’s a fire and forget situation. The best kind, in my opinion.

Read on! “Localizing Go to JavaScript”

Go formatting with rgblog

One of my projects involves a lot of console output, and to make it readable, I added some color. Cyan for important messages, red for errors, and yellow for normal (everything is fine) logs.

The short of it is: I wanted to do the same somewhere else, so I published it.

If you’re a Go developer and want some quick and easy functions to color things, check it out.

Here’s the GitHub repo if you want to see the README. Or, you can just go get github.com/foresthoffman/rgblog and use it right away.

Read on! “Go formatting with rgblog”

React Counter Customizer

Eons ago, I briefly looked into ReactJS, to see what all the hype was about. At the time, I didn’t see much value in it since it didn’t look applicable to the projects that I was working on. Recently, I decided to give it another go. I took a deeper dive this time, and tried making a React-based customizer for my radial Counter JavaScript library.

Read on! “React Counter Customizer”

Ambient Weaver

Ambient Weaver is an ambient sound player for macOS 10.12.2+ and Windows 10. The core mechanics of the player include the ability to create playlists which contain customizable sound tracks. Each track has controls for volume, a starting point, and whether or not the track should repeat. Normal audio players, designed for non-ambient songs, run one track at a time. When those players are used for ambient sounds, there are always momentary breaks in the sound that can break the listener’s concentration. That is the nature of having one playback loop. Ambient Weaver gives each track it’s own loop. This allows for tracks to be overlain in a way that masks the momentary breaks, creating a seamless listening experience.

Read on! “Ambient Weaver”

Basic WordPress Theme

An example of the theme's front page.
The front page!

The Basic theme is exactly what it sounds like. It’s a barebones starter theme built on top of the fantastic Underscores theme (_s). With support for Sass and some build tools that I pieced together, modification is reasonably easy.

Now, I’ve got a launch pad project for simple WordPress site development! Actually, we have a launch pad project for simple WordPress development. I’ve hosted the source code and build tools on Github. You can build the project yourself!

Read on! “Basic WordPress Theme”

JavaScript Radial Counter Library and WordPress

As a follow up to the post I wrote about my HTML5/JavaScript Radial Counter Library, I want to talk about how I am utilizing the library in my current theme. In order to make the library easily reusable throughout the site, I made a shortcode specifically for the counters. More accurately, I made a shortcode for the counters, and a shortcode to wrap the counters. The wrapping shortcode is particularly useful for ensuring that the positioning and styling of the counters works on both desktop and mobile.

Read on! “JavaScript Radial Counter Library and WordPress”

HTML5/JavaScript Radial Counter Library

2 yrs
JavaScript
2 yrs
HTML5
2 yrs
Awesomeness

When I started designing my new portfolio theme, I wanted the ability to present my technical skills in a more interesting way. That led me to the idea of counters. I needed the counters to display the amount of time that i’ve worked with a specific language/framework. The one gotcha was, I would have to keep the counters up to date. Thus, I arrived at a design for the counters, which required options for…

  • custom styles
  • custom text
  • self-managed durations

Read on! “HTML5/JavaScript Radial Counter Library”

Necessary Tools

The Necessary Tools plugin logo.

The Necessary Tools plugin is a WordPress plugin that builds on the default functionality of WordPress. Its purpose is to provide quality-of-life features to all users. Features include post cloning, and exporting posts individually or in bulk. Of course, custom post types are supported by both features.

Read on! “Necessary Tools”