Merging .pacnew Files

I have a couple Linodes running. My mail server is powered by Arch Linux, and I always forget to check if new configuration updates need to be applied. I’m not a professional IT admin, so when things are working, I tend to leave well enough alone.

A quick way to locate configuration updates that were never applied is:

$ sudo find /etc -name '*.pacnew'

I throw a sudo on there because some folders in /etc are protected from prying eyes. This tells me I have several updates to Postfix I missed:

/etc/postfix/main.cf.pacnew
/etc/postfix/master.cf.pacnew
/etc/postfix/access.pacnew

Once I’ve found a file I want to inspect further, I can use vimdiff to interactively merge them:

$ sudo vimdiff /etc/postfix/main.cf{,pacnew}

This shell expansion will open up vim and compare the original (on the left) and the update (on the right). You can quickly move between differences using ]c (for next) or [c (for previous). To quickly copy the current change over, use do (diff obtain). I prefer to manually type in the updates if I spot any I need.

Now maintain those servers!

Does CH5 Need Webpack?

In the last post, I messed around with Webpack a little. Webpack is a tool that solves an inherent problem in JavaScript: modularity. Web developers have had to deal with finding ways to create large, complex applications using a language designed for quick, simple scripting.

In this post, I want to look at what Webpack does for CH5 development and do we actually need it.

Continue reading “Does CH5 Need Webpack?”

A Quick Guide to Webpack

Webpack is the build system for your CH5 project. Think of it like a compiler for web apps. It’s a really flexible tool, so there’s a lot of complexity to it. I was having some difficulty separating out only the pieces I needed to make a very bare-bones configuration. I’m sure I’ll have to revisit this topic later once I’ve gathered a bit more experience playing with it.

Continue reading “A Quick Guide to Webpack”

Short Take: ch5-cli

I’ve been messing around with CH5 and Vue.js but I sometimes forget how to use the command line utility. I try to make sure I add at least these two NPM scripts to my package.json file:

"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "archive": "npm run build && ch5-cli archive -p ch5-vue -d dist -o archive",
    "deploy": "ch5-cli deploy -H <ip address> -p -t touchscreen archive/ch5-vue.ch5z"
},

Of course, you need to change IP address to match your touchpanel.

C# in VS Code

While I’ve been using Visual Studio 2008 / 2015 / 2017 / 2019 to do most of my C# programming, it is also possible to use VS Code. There’s a workflow I’m building up to where I’d like to deploy to a Raspberry Pi, and it looks like in VS Code it may be possible to do that.

I’m assuming you already have VS Code installed, but if not, you can grab it from https://code.visualstudio.com/. You’ll also need to install the .NET SDK. I’m going to be following the examples on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install and you can grab it from there.

Continue reading “C# in VS Code”

CH5: My Thoughts

After converting one minimal layout to CH5, I should be an expert, right? I purposely waited a week so that time would temper my emotions a bit (I was a little frustrated by the end of the last post). I wouldn’t say I’m going to give it 10,000 hours, but I think it’s only fair to invest some more time than I initially gave it. This could be a decent framework for converting touchpanel layouts, maybe I just need more exposure.

Continue reading “CH5: My Thoughts”

The Future of AV Programming: Part 5

It’s been about a year since the last time I thought about where AV programming is headed. The world was a different place then. COVID-19 has caused the shutting down of shared workplaces, diminishing the need for complicated spaces even further than before. What’s a programmer in the AV industry to do?

Continue reading “The Future of AV Programming: Part 5”

CH5: Full Project

tl;dr Yes, I actually go through each page of my mock up and try to make it work in CH5 so there’s a lot of HTML, CSS, and JavaScript in this post. I really wanted to link to a GitHub repo so you could download the files and follow along, but Crestron puts a copyright notice at the top of every generated file saying you can’t distribute them. So to be safe, I’m only including the bits here that I rewrote. Also, I plan to write a follow up post to this one that explores my thoughts trying to use the CH5 framework, so that might actually make for a better read anyway. But, if you want to follow my struggles trying to hammer HTML and CSS into shape, be my guest…

OK I think we’ve toyed around enough and can jump in feet first to CH5. In this post, I’m going to create a full touchpanel layout using Crestron’s Shell Template. We’ll focus on the look and feel in this post and deal with the control side later. That way, we don’t have to continually load to a touchpanel just to see if what we’re doing looks correct.

Continue reading “CH5: Full Project”