Category: Software


Systemd conditional restart / reload

A company I contract for recently upgraded their servers to Centos 7, which means we’re now in the world of Systemd instead of SysVinit.

It turns out that Systemd doesn’t have facilities to handle conditional restarts of a service. Reloads can be made to work with multiple ExecReload commands.

I did a decent amount of digging and in all the threads I found one maintainer, in particular, was staunchly against adding the capability to Systemd. I can only posit he doesn’t do work in the real world where this is a necessity and not just a nice to have. But seriously, would it be that hard to ExecRestartPre?

A solution was needed and this is what I came up with. I’m putting it out there in case anyone else might find it useful.

Our needs were fairly … Read More »

– Jamie @ 10:29 AM on Jan 24, 2018
Comments [0]

Man In The Middle

I got pulled into a problem at work yesterday. The issue is that some people (randomly) begin experiencing one-way audio on a phone call that moments before had been working fine. Packet captures revealed that when the problem occurs the audio stream makes it all the way to the IP phone, but fails to be played on the user’s handset. A colleague had analyzed the data and found an anomaly around the time the audio stopped working; the RTP timestamp in the packet jumped significantly. The working theory was that maybe the phone was confused by the time jump which caused it to quit playing the audio. It felt like a plausible theory, but it also felt like it could be a red herring.

The obvious thing would be to reproduce in a controlled environment to … Read More »

– Jamie @ 10:37 AM on Jul 31, 2009

Back / Forward

One of the browsing habits I’ve formed over the years is using the right-click (or context) menu for back and forward navigation, i.e. to return to the previous page I was on. I’ve found this to be fairly efficient; I don’t have to care where my mouse points is — I just right click, and then click ‘Back’.

I switched to Firefox a couple of years ago, and I’ve been really happy, except … There are certain times when the ‘Back’ and ‘Forward’ options disappear from the context menu. The biggest annoyance is when text is selected on a page they get removed. I would often go to a page; using find to search for text on the page; get what I need; then try to right-click to go back only to find the option was gone. … Read More »

– Jamie @ 7:45 AM on Aug 17, 2007

OneNote 2007 – The HTML Importer

Most recently I’ve worked on an HTML importer for OneNote. Originally, I had plans to build a Firefox extension that would allow right clicking on a web page and selecting a “Send to OneNote” option. After doing some initial research I decided that was going to be more effort than I could spare right now. Instead I compromised and built a tool that would work with both Firefox and IE, but the downside is that it is a two step process.

The code I’ve written will be easily adaptable to a Firefox extension if I ever get around to that part of the project. I believe the key will be to take the save complete pages code from chrome://browser/content/contentAreaUtils.js in the core of Firefox and adapt it to the needs of the extension.

Note: In order to use … Read More »

– Jamie @ 6:58 AM on Nov 9, 2006

OneNote 2007 – The Importer

Today I’m going to talk about the general purpose file importer I’ve built, and how it is used to allow for email importing.

Note: In order to use this application you will need to copy JPHOneNoteUtilities.dll into C:\Windows\assembly, or ensure the file is in the same directory as OneNoteImporter.

Let’s look at how OneNoteImporter.cs works. This program looks in the directory specified on the command line for sub-directories. The sub-directories should contain files that are to be included in a OneNote page. A OneNote page will be created for each directory found. The files in this directory can be of any type, but the importer treats certain files differently.

All of the files are embedded into the page along the top. If they exceed a certain width, then they will wrap and form as many rows as is … Read More »

– Jamie @ 7:58 AM on Nov 8, 2006
Comments [0]