Micro

Searching Specific File Types in Emacs # 2025-03-23

If you're using Emacs with consult-ripgrep (M-x consult-ripgrep), you might want to search only within certain file types—say, just .scala files in a project. Here's the trick:

M-x consult-ripgrep RET -- -g '*.scala'
  • The – separates ripgrep (rg) options from the search term.
  • -g '*.scala' tells rg to search only in .scala files.
  • You can add multiple -g flags for different file types:
M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt'
Searching Specific File Types with consult-ripgrep in Emacs # 2025-03-19

If you're using Emacs with consult-ripgrep (M-x consult-ripgrep), you might want to search only within certain file types—say, just .scala files in a project. Here's the trick:

M-x consult-ripgrep RET -- -g '*.scala'
  • The -- separates ripgrep (rg) options from the search term.
  • -g '*.scala' tells rg to search only in .scala files.
  • You can add multiple -g flags for different file types like below.
M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt'
Day Light Savings Explained # 2025-03-09

day-light-savings.png

Daylight Saving Time, as you can see, shifts an hour of morning sunlight to the evening so people can enjoy more sunlight during summer evenings. As the graph shows, the sun rises as early as 4:50 AM in summer months when most people would be asleep. Shifting the clock forward by an hour moves that potentially wasted early morning sunlight to the evening when people can better utilize it.

However, this practice does disrupt people's biological clocks, causing sleep disturbances, increased accidents, and temporary health impacts during transition periods. The debate continues about whether these societal benefits outweigh the physiological costs, especially since the original energy-saving rationale has become less relevant in modern times.

Diffusion of Innovations # 2025-02-13

The theory of Diffusion of Innovation is most commonly attributed to Everett Rogers, a sociologist who popularised it through his seminal 1962 book of the same name, though early ideas were explored by others like Edward T. Hall.

It's a mental model that explains how new ideas, products, or technologies spread through a social system.

The theory proposes that innovation diffusion follows a logical pattern, with the initial adoption of innovations being by a small percentage of the population (the innovators), followed by early adopters, early majority, late majority, and laggards.

diffusion-innovation.png

Innovators: The first to adopt, risk-takers.

Early Adopters: Opinion leaders, quick to adopt after innovators.

Early Majority: Pragmatic adopters, wait for some acceptance.

Late Majority: Sceptical adopters, only adopt when commonplace.

Laggards: Traditionalists, resist change, last to adopt.

Stopping by Woods # 2025-01-18

These lines are from Stopping by Woods on a Snowy Evening by Robert Frost written in 1922 (pub 1923) in his New Hampshire Vol.

The poem highlights the importance of enjoying the beauty and peace of nature while also fulfilling one's responsibilities and obligations, without becoming entirely lost in that joy.

The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep.