Negative background positioning

To set a background image just a little bit off the bottom right, use calc:

background-position: calc(100% - 5px) calc(100% - 40px);

background-position: bottom right is synonymous to background-position: 100% 100% which would put the image at the bottom right of its container.

All the calc does is move the image 5px to the left and 40px up.

Delete a problematic character

I was trying to parse some XML but it kept failing. Eventually tracked it down to a “substitute character” in the file that was messing everything up.

Because the file was over 140,000 lines, editing it with text editor was not something I wanted to mess with.

Eventually remembered the tr command-line tool that normally translates character sets but can also delete them:

$ tr -d '\032' < input.xml > output.xml

032 is the octal character codepoint of the “substitute character.”