Category Archives: Uncategorized

On Trump and taxes

According to the Epoch Times, Donald and Melania Trump reported negative income in four of the six years’ worth of tax returns that were dumped. I’m sure the usual scumbags will try to make something of this, but as long as all the “I”s are dotted and “T”s are crossed, I don’t see anything at all wrong with this:

Anyone may arrange his affairs so that his taxes shall be as low as possible; he is not bound to choose that pattern which best pays the treasury. There is not even a patriotic duty to increase one’s taxes. Over and over again the Courts have said that there is nothing sinister in so arranging affairs as to keep taxes as low as possible. Everyone does it, rich and poor alike and all do right, for nobody owes any public duty to pay more than the law demands.

– Learned Hand

Imagine if the roles were reversed

My tax refund finally came through today, 4½ months after filing. By far, this is the longest it has ever taken. Even though I file by mail with printed forms, somewhere around 3-4 weeks is more typical.

If I owed money, do you think the IRS would tolerate such a lengthy delay without at least tacking on some penalties? Didn’t think so.

Fuck Joe Biden.

Solid advice

Hate them back:

I’m a big believer in giving back to people what they give to others. Think of it as a twist on the Golden Rule: if someone is a bad person to others, even if it isn’t you, treat them accordingly. Someone who is a bad person to people who aren’t you will eventually get around to you because it’s who they are at their core. That’s how I see Democrats, particularly Joe Biden. Jill too, but she’s such a non-entity without him she barely deserves a mention. If you are not with them, not one of them., they hate you, they really do. Return the favor.

Fuck Joe Biden.

Generate QR codes for Zebra EPL printers

I have a Zebra LP2844 at home that was originally purchased to print shipping labels, though I’ve used it from time to time for other types of labels. Recently, I had a need to produce labels that include QR codes. The LP2844 is a fairly old printer; its page-description language, EPL, knows nothing about QR codes. (Newer printers with newer languages have a feature to just drop a specified QR code anywhere on the label you want it.)

It does have the ability to print arbitrary bitmapped graphics, and the format of the bitmapped image data is similar to a PBM file without the header. We can therefore abuse the NetPBM tools to produce image data the printer understands:

#!/usr/bin/env bash

# generate a QR code and render it as an EPL fragment
# params: x y max_size "QR code contents" [qrencode options]

x=$1; shift
y=$1; shift
max_size=$1; shift
msg=`echo $1 | sed "s/\"/\\\\\"/g"`; shift
size=$(qrencode -t PNG -s 1 -m 0 -o - $* "$msg" | pngtopnm | pnmfile | sed "s/^.*raw, //;s/ .*//")
mul=$(expr $max_size / $size)
width=$(expr \( $size \* $mul + 7 \) / 8)
echo -n GW$x,$y,$width,$(expr $size \* $mul),
qrencode -t PNG -s $mul -m 0 -o - $* "$msg" | pngtopnm | pgmtopbm -thresh | pnminvert | tail -n +3
echo ""

The first two arguments to the script are the coordinates where you want the QR code to be placed. The third is the maximum size (in printer pixels, which are 1/203″ for most Zebra printers) of the code. The fourth is the content of the QR code. Any additional arguments are passed to qrencode (such as -i to ignore case).

Something like this will crank out a QR code suitable for a 1″ label:

(echo N; make-qr-epl 10 10 180 "This is a test"; echo P) | lpr -Plp2844_raw

The intent is that you could call this within a script that puts together a more complex label layout and sends it to the printer.

If you wanted to be able to send arbitrary bitmapped images to your label printer, it wouldn’t be much of an exercise to rip out the calls to qrencode and replace them with a different image source.

Fuck Joe Biden.