Toby's Log

Git aliases and POSIX sh

An interesting problem I encountered when moving to use Linux more is that git aliases are often run in POSIX sh instead of the terminal in use, such as bash or zsh. A few of my aliases are complex enough to require running an external shell command, ie using !. Some of those have complex comparisons or verify with the user what they are doing. I had long used some bashisms to simplify these, and didn’t have problems on my Mac, which uses bash as the sh implementation, but had problems in Ubuntu, which uses dash.

Continue reading post "Git aliases and POSIX sh"

Impreza: New battery

My car (2013 Impreza) wouldn’t start the other day. It had been near 0°F overnight. The accessories seemed to work just fine, but nothing from the starter, not even a weak turn over and then die. Jumping with my NOCO jumper failed. Based on some possibly inaccurate results from a multi-meter and charger, 10V and only taking 2A, I bought a new battery.

Continue reading post "Impreza: New battery"

CSS: Pixelated images filter

I recently made a console theme for my website. Photos left unmodified looked too clean and fancy to fit in with the theme. I played with the saturation and contrast functions of the CSS filter property, which gave okay results, but not enough. I thought a pixelated look fit in, and decided to see if it would be possible with pure CSS, something like pixel art or perhaps sixel on a low resolution terminal. This Stack Overflow answer led me to the solution of using an SVG filter through a url() value of the filter property.

Continue reading post "CSS: Pixelated images filter"

CSS: Repeating character borders

Since adding a theme switcher to my site, I’ve created several new simple themes, including a console theme. It is meant to look somewhat like a command line console / terminal. For this theme, regular borders didn’t fit in. I wanted something with repeated characters, looking more like some terminal application output or Markdown would have. Looking for doing this with pure CSS, a Stack Overflow answer helped me come up with a solution.

There is no way with the CSS content or the like to just have a character repeat to fill a given width or height. So the solution has us manually repeat the character in the content of a pseudo element enough times to handle our largest likely container. We position absolutely and use overflow: hidden to prevent our content from expanding our container and to cut it off at the appropriate length. With alignment and padding, we can then have repeating characters that line up properly in a monospace font grid.

Continue reading post "CSS: Repeating character borders"

Impreza brake calipers, suspension, money

It is perhaps deferred maintenance, but I had to put $2000 into my car (2013 Subaru Impreza). At this point that may just be around the value of the car itself. Brakes, suspension, and oil change. I’ve been wanting to get a new car, but that amount of money is going to make me want to keep this for at least another year to make it worth it. But I was somewhat forced into it by loss of most braking power.

Continue reading post "Impreza brake calipers, suspension, money"

</toby>