diff --git a/astro.config.mjs b/astro.config.mjs index ce9c762..3ad60f7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -26,7 +26,7 @@ export default defineConfig({ base, markdown: { shikiConfig: { - theme: 'github-dark' + theme: 'github-light' } } }); diff --git a/content/micro/consult-ripgrep-search.org b/content/micro/consult-ripgrep-search.org deleted file mode 100644 index 3dca2d5..0000000 --- a/content/micro/consult-ripgrep-search.org +++ /dev/null @@ -1,18 +0,0 @@ -#+title: Searching Specific File Types in Emacs -#+date: 2025-03-23 -#+categories[]: micro -#+tags[]: tools - -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: - -#+BEGIN_SRC -M-x consult-ripgrep RET -- -g '*.scala' -#+END_SRC - -- 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: - -#+BEGIN_SRC -M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt' -#+END_SRC diff --git a/content/micro/day-light-savings/index.org b/content/micro/day-light-savings/index.org deleted file mode 100644 index 2f1f952..0000000 --- a/content/micro/day-light-savings/index.org +++ /dev/null @@ -1,10 +0,0 @@ -#+title: Day Light Savings Explained -#+date: 2025-03-09 -#+categories[]: micro -#+tags[]: micro - -[[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. diff --git a/content/micro/diffusion-innovation/index.org b/content/micro/diffusion-innovation/index.org deleted file mode 100644 index 54c5998..0000000 --- a/content/micro/diffusion-innovation/index.org +++ /dev/null @@ -1,34 +0,0 @@ -#+title: Diffusion of Innovations -#+date: 2025-02-13 -#+categories[]: micro -#+tags[]: mental-models - -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. - -#+begin_quote -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. -#+end_quote - -#+BEGIN_SRC mermaid :file ./diffusion-innovation.png :exports none :results silent -pie - title Law of Diffusion of Innovation - "Innovators" : 2.5 - "Early Adopters" : 13.5 - "Early Majority" : 34 - "Late Majority" : 34 - "Laggards" : 16 -#+END_SRC - -[[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. diff --git a/content/micro/duckdb.org b/content/micro/duckdb.org deleted file mode 100644 index 6adf06e..0000000 --- a/content/micro/duckdb.org +++ /dev/null @@ -1,15 +0,0 @@ -#+title: Local Analytics with DuckDB and UI -#+date: 2025-03-14 -#+categories[]: micro -#+tags[]: tools -#+draft: true - -* Installation - -#+begin_src sh -brew install duckdb - -duckdb -ui -#+end_src - -You will see an UI launching. diff --git a/content/micro/emacs-file-type-search.org b/content/micro/emacs-file-type-search.org deleted file mode 100644 index 1259875..0000000 --- a/content/micro/emacs-file-type-search.org +++ /dev/null @@ -1,18 +0,0 @@ -#+title: Searching Specific File Types with consult-ripgrep in Emacs -#+date: 2025-03-19 -#+categories[]: micro -#+tags[]: emacs - -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: - -#+begin_src -M-x consult-ripgrep RET -- -g '*.scala' -#+end_src - -+ 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. - -#+begin_src -M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt' -#+end_src diff --git a/content/micro/woods-quote.org b/content/micro/woods-quote.org deleted file mode 100644 index 5950111..0000000 --- a/content/micro/woods-quote.org +++ /dev/null @@ -1,14 +0,0 @@ -#+title: Stopping by Woods -#+date: 2025-01-18 -#+categories[]: micro -#+tags[]: quote - -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. -#+BEGIN_QUOTE -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. -#+END_QUOTE diff --git a/src/content/micro/local-analytics-with-duckdb-and-ui.md b/src/content/micro/local-analytics-with-duckdb-and-ui.md new file mode 100644 index 0000000..d8f7e90 --- /dev/null +++ b/src/content/micro/local-analytics-with-duckdb-and-ui.md @@ -0,0 +1,19 @@ +--- +title: Local Analytics with DuckDB and UI +description: Quick setup to run DuckDB with its local UI. +pubDate: 2025-03-14 +tags: + - tools +category: Micro +draft: true +--- + +## Installation + +```sh +brew install duckdb + +duckdb -ui +``` + +You will see a UI launching. diff --git a/src/content/micro/searching-specific-file-types-in-emacs.md b/src/content/micro/searching-specific-file-types-in-emacs.md new file mode 100644 index 0000000..ab69419 --- /dev/null +++ b/src/content/micro/searching-specific-file-types-in-emacs.md @@ -0,0 +1,23 @@ +--- +title: Searching Specific File Types in Emacs +description: Search only selected file extensions using consult-ripgrep. +pubDate: 2025-03-23 +tags: + - tools +category: Micro +draft: false +--- + +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. + +```text +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: + +```text +M-x consult-ripgrep RET -- -g '*.scala' -g '*.sbt' +``` diff --git a/src/content/micro/stopping-by-woods.md b/src/content/micro/stopping-by-woods.md new file mode 100644 index 0000000..c40754f --- /dev/null +++ b/src/content/micro/stopping-by-woods.md @@ -0,0 +1,18 @@ +--- +title: Stopping by Woods +description: A short note on Robert Frost's timeless lines. +pubDate: 2025-01-18 +tags: + - quote +category: Micro +draft: false +--- + +These lines are from *Stopping by Woods on a Snowy Evening* by Robert Frost, written in 1922 (published in 1923) in his New Hampshire volume. + +The poem highlights the importance of enjoying the beauty and peace of nature while also fulfilling 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. diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index a51ae92..6714173 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -9,7 +9,7 @@ interface Props { const { title, - description = 'Minimal Astro writing theme focused on editorial readability and technical content.' + description = 'This space is where I share my ‘Today I Learned’ moments and other explorations in tech, life, and beyond.' } = Astro.props; --- diff --git a/src/pages/index.astro b/src/pages/index.astro index 1d3bebf..f8c07e8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,11 +12,10 @@ const micro = (await getCollection('micro', ({ data }) => !data.draft)).sort( ); --- - +

- Minimal Astro theme for technical writing. Structured lists, calm typography, optional TOC, and - dark mode included. + This space is where I share my ‘Today I Learned’ moments and other explorations in tech, life, and beyond.

diff --git a/src/pages/micro/index.astro b/src/pages/micro/index.astro index 88bcabb..3e5d18d 100644 --- a/src/pages/micro/index.astro +++ b/src/pages/micro/index.astro @@ -5,6 +5,12 @@ import BaseLayout from '../../layouts/BaseLayout.astro'; const notes = (await getCollection('micro', ({ data }) => !data.draft)).sort( (a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime() ); +const entries = await Promise.all( + notes.map(async (note) => ({ + note, + rendered: await note.render() + })) +); const formatter = new Intl.DateTimeFormat('en-CA'); const base = import.meta.env.BASE_URL; --- @@ -13,15 +19,20 @@ const base = import.meta.env.BASE_URL;

Micro

- {notes.map((note) => ( -
-
-

{note.data.title}

- -
-

{note.data.description}

-
- ))} + {entries.map(({ note, rendered }) => { + const { Content } = rendered; + return ( + + ); + })}
@@ -63,10 +74,8 @@ const base = import.meta.env.BASE_URL; margin: 0 0 0.7rem; } - p { - margin: 0; - color: var(--muted); - font-size: 1.03rem; + .feed-content :global(*:first-child) { + margin-top: 0; } time { diff --git a/src/styles/global.css b/src/styles/global.css index ad3f6d1..af78ed5 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -7,7 +7,8 @@ --text: #1f2933; --muted: #627282; --line: #d8e0e7; - --code-bg: #eff3f6; + --code-bg: #f3f7ff; + --code-line: #e0e9f7; --link: #1f2933; --link-hover: #000; --max-width: calc(920px * var(--ui-scale)); @@ -22,6 +23,7 @@ --muted: #9eb0c0; --line: #243343; --code-bg: #1b2834; + --code-line: #2a3948; --link: #eef3f8; --link-hover: #fff; } @@ -66,6 +68,15 @@ h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; } overflow-x: auto; } +.prose pre.astro-code { + background: var(--code-bg) !important; + border: 1px solid var(--code-line); +} + +.prose pre.astro-code code { + background: transparent !important; +} + .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace; font-size: 0.92em;