Posts

Showing posts from July, 2026

Adding fetchpriority="high" to HTML

Image
 I have been adding 'fetchpriority="high"' to the HTML of images that are visible when the page is first shown. Chrome's 'Lighthouse' tool suggested this. But I show slightly different sets of images for mobiles and desktop computers.  If I set fetchpriority' in JavaScript then it may be too late.

How to remove a filename with strange characters on Linux

Image
 I learnt how to remove a filename with strange characters in its name. I say:     ls -li to get the inode number, and then delete the file with:       find . -type f -inum 155192 -exec rm {} \; I adapted this from an article on 'distrowatch.com' I tried to use the graphical file manager 'Midnight Commander' but I have mapped the function keys it uses to letters that do not work anymore on my keyboard. I can use 'Midnight Commander' outside of X Windows though. My old 'find' command does not support the '-delete' option.

JavaScript error that I dread

Image
 I dread getting the error, "Unexpected token ')'" from Chrome, at the last line of JavaScript in my game. Usually, there is an unclosed brace somewhere in the code. The last line of my game is the end of a self executing anonymous function enclosing the whole game: '})()'. Recently, I used 'rcsdiff' to see all the recent changes. Among the changes I had deleted the closing brace just above a change I had made. I use the RCS version control system. Another time, I commented out or deleted code until the error disappeared.