Author Archives: admin

Moon phases

Icons with moon phases are very often used on web calendars. The synodic month is 29.5 days long, but for calendar purposes we can think of four weeks of 28 days. The following is a total of 28 moon phase … Continue reading

Posted in workday | Tagged | Leave a comment

Reverse diff

Here is an example how to use grep a “reverse diff” to find different lines in sorted text files. Command grep is using options: -F, –fixed-strings PATTERN is a set of newline-separated strings -x, –line-regexp force PATTERN to match only … Continue reading

Posted in workday | Tagged | Leave a comment

JS: Music – Oxygene

Happy New Year with inventive javascript generated music. Just 19kb js code generating Oxygène Pt. 4 by Jean-Michel Jarre 1976.

Posted in workday | Tagged , | Leave a comment

SVG: NASA “meatball” logo – code update exercise

I recently went through NASA’s “meatball” logo, originally designed by James Modarelli in 1959. Looking at the svg version of this famous logo, I was interested in the svg code. It was obviously designed by some editor and not “by … Continue reading

Posted in workday | Tagged | Leave a comment

SVG: Resizing svg element

Sometimes there is a need to resize svg element by javascript. SVG image with pink background in the following example has initial “Fullsize” dimensions 1920×1080. SVGLength interface and more is described at https://developer.mozilla.org/en-US/docs/Web/API under letter S with prefix SVG . … Continue reading

Posted in workday | Tagged | Leave a comment

ChatGPT: Toggle Full size html page

There is a new kid on the block: ChatGPT powered by OpenAI. And here is a test question: “How to make web page with toggle button in Javascript to resize to full screen page showing screen dimensions“. It’s fascinating to … Continue reading

Posted in workday | Tagged , , | Leave a comment

SVG: Circular text

Sometimes is needed circular text. Here is few examples how it can be done. All of them are working with a circular path with radius 100, then circumference is 628. The first example is going to create circular path from … Continue reading

Posted in workday | Tagged | Leave a comment

SVG: Pleiades

In the recent post have been described how to create spiky star. Let’s utilize that knowledge to create star cluster Pleiades from the eight brightest spiky stars. Relative size can be computed by formula sqrt(8000/POW(2,511886432;magnitude). Number 8000 is just arbitrarily … Continue reading

Posted in workday | Tagged | Leave a comment

SVG: Spiky Star

Let’s say we would like to create spiky star. One option would be to utilize tag path. Picture below should help to explain, how to design path. In the center “C” is a unit circle with radius 1. Each spike … Continue reading

Posted in workday | Tagged | Leave a comment

Structural formula: HydroxylAmmonium Nitrate

Here is slightly better structural formula of the HydroxylAmmonium Nitrate mentioned in the yesterday post. H N O – +

Posted in workday | Leave a comment