Upgrading A Cisco AP To Autonomous

Upgrading a Cisco AP, in this case a LAP1142N, from "lightweight" [not very useful] more to "Autonomous" [useful] mode. This assume the access point has been reset to factory defaults. For this example the AP is being upgraded to c1140-k9w7-mx.153-3.JBB.tar which is available on a tftp service @

Linting JSON On The Command Line

JSON is a strange format [I'm not a fan]. Opening a large JSON file in many text editors is unfruitful when the file is one long line - they will burn CPU trying to line wrap the data.

JSON however can be easily linted on the command line, producing a more friendly file.

cat onelongline.json | python -m json.tool > linted.json

And the file linted.json is readable and friendlier with text editors.


Postfix IPv4 Only

I have a postfix SMTP relay buried deep in a network behind proxy servers, all the infrastructure [sadly] is IPv4 only. This works, yet one ends up with many log messages like:

connect to smtp.office365.com[2603:1036:304:2857::2]:587: Network is unreachable

The server attempts if IPv6 result from the DNS lookup first. So let's make postfix use IPv4 only.

postconf -e inet_protocols=ipv4

That's it! No more "unreachable" log messages.

Virtual Box Start Error (VNC)

I went to start my Windows XP virtual machine, after something like ~4 years. And it failed to start with an 0x80004005 error: "Could not find the VirtualBox Report Desktop Extension library." Hmmm, that's strange.

Turns out that the extensions loaded by the Windows XP VM uses the library libvncserver which was no longer installed on the host. Unfortunately the VirtualBox Extensions are not integrated into the distribution's package manager.

Dropping An Element In An Iterative Parse

Using lxml's etree to iteratively parse an XML document and I wanted to drop a specific element from the stream...

        for event, element in etree.iterparse(self.rfile, events=("end",)):
            if (event == 'end') and (element.tag == 'row'):
            elif (event == 'end') and (element.tag == name_of_element_to_drop):
                element.getparent().remove(element) # drop element

The secret sauce is: element.getparent().remove(element)

Installing The Zoom Client On openSUSE 15.1

Uh oh, in a default-ish GNOME install of openSUSE 15.1 there are a couple of unmatched / unclaimed dependencies. It appears Zoom Inc. did not try very hard when drafting the spec for their LINUX clients.

gEdit's Amazing External Tools

In a few recent conversations I have become aware of an unawareness - an unawareness of the awesome that is gedit's best feature: External Tools. External Tools allow you to effortlessly link the power of the shell, Python, or whatever into an otherwise already excellent text editor yielding maximum awesome. External Tools, unlike some similar features in many IDEs is drop-dead simple to use - you do not need to go somewhere and edit files, etc...


Uncoloring ls (2019)

This is an update from "Uncoloring ls" which documents how to disable colored ls output on older systems which define that behavior in a profile.d script.

PostgreSQL: "UNIX Time" To Date

In some effort to avoid time-zone drama, or perhaps due to fantasies of efficiency, some developer put a date-time field in a PostgreSQL database as an integer; specifically as a UNIX Time value. ¯\_(ツ)_/¯

How to present this as a normal date in a query result?

PostgreSQL: Casted Indexes

Dates in databases are a tedious thing. Sometimes a time value is recorded as a timestamp, at other times - probably in most cases - it is recorded as a date. Yet it can be useful to perform date-time queries using a representation of time distinct from what is recorded in the table. For example a database which records timestamps, but I want to look-up records by date.

To this end PostgreSQL supports indexing a table by a cast of a field.



Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer