Sekai ๐ŸŒ ๐Ÿ—บ

Sekai (ไธ–็•Œ) is the kanji for “the world”. That’s a great word because of the scale that it designates.

Ten Probably Handy Sites

A brief summary of 10 Incredibly Useful Websites on Medium.

Upword.AI (paid)
summarise stuff
Gamma (free trial for the moment)
get professional slides in min, not open source
IMGCreator (free, point-based)
text/img โ†’ img, chatGPT powered
Popsy (free to create, paid to publish)
no-code website buider
Visual Capitalist (free)
explanatory charts
TypeLit.io (free for some ล“uvres, paid for own book)
type classics out to train typing
Zorp.one (free for trial, paid for deploy)
no-code app generator for businesses, e.g. delivery, store management, doc collection
Kialo (free)
repository for debate arguments, with discussion topology
Nomad List (free limited trial, paid content)
good for remote workers, find remote work opportunities, insights into cities, dating app (that I don’t recommend)
SuperMeme (paid)
AI meme generator

Encrypt PDF on Command Line

Background

On M$ Win*, I don’t have dedicated PDF readers like Adobe.

During visioconference, one might want to share some downloaded PDFs. Those documents can be part of an ebook or notes. In some situations, they can provide context to a discussion.

Problem

  1. Under the same folder, you might have
  • downloaded_ebook.pdf
  • personal_info.pdf
  • other_personal_stuff.pdf that you don’t want to expose while streaming.

However, each downloaded PDF usually comes with a name set by others. It can be tedious to rename them according to your own habits. To protect users’ privacy, we can

[Read More]
PDF  QPDF 

Adjust Git Bash Font and Window Size

Goal

Make the characters larger and more readable.

Solution

The option names might be found in the manual. Sometimes, I find opening MINGW’s settings through GUI helpful.

FontHeight=12
Columns=143
Rows=36

I’ve read Gerald Lee’s .minttyrc. I’ve enlarged the window size so that in the standard output, one line can contain more info.

Fujitsu LH532 Thermal Paste Application

Background

My old laptop was bought ten years ago. I had never changed the thermal paste between its CPU and its fan. As a result, it had been getting hot during my online tutorials.

Photos

thermal paste on CPU

thermal paste on CPU displaced after ten years

thermal paste on fan

thermal paste on fan displaced after ten years

CPU and fan cleaned

dried thermal paste cleaned and removed

with isopropyl and kitchen towel

[Read More]

Removed jQuery Dependency from My Math Editor

Background

jQuery provides many handy functions to speed up the development, for example document.ready(), element.toggle(), element.hide(), etc. My math editor used some of them. However, I replaced them with Vanilla JavaScript at commit 4a35c45b.

Goal

Some users complained about the white background in the past versions of my editor. That had motivated me to refactor the code, so that it would be easier to maintain and to add in new features.

HTML5 input types used

Actual appearance might vary across browsers.

[Read More]

Showdown KaTeX With mhchem

mhchem support for Showdown-KaTeX

Background

I’ve written about bringing user-defined KaTeX macros into Hugo a few years ago. Looking back, I realized that I only knew how to copy code at that time.

Goal

  1. To replace the current code for my math editor with Showdown-KaTeX.
  2. To bring mhchem into my LaTeX + Markdown sandbox.

Motivation

To get the benefits of the three free (as in “freedom”) technologies.

  1. Markdown syntax is (much) simple(r than its LaTeX equivalent, especially for tables, ordered/unordered lists, etc).
  2. LaTeX syntax for math is, in the long run, worth learning, so that your fingers can stay on the keyboard while editing math expressions.
  3. mhchem allows writing chemical equations conveniently as in the previous point.

However, Rattle has pointed out the difficulties of mixing LaTeX and Markdown syntax. In his proposed solution for WordPress, he first renders KaTeX before moving to Markdown. He has provided an example use case with a dollar sign $ in a normal Markdown content (e.g. An apple costs $1.5.)

[Read More]

Exponential Function Product Rule

A first definition of exponential and logarithmic functions

Motivation from compound interest

Increase the number of times that the interest is compounded each year ($n$), so as to increase the final amount of money ($A$)

$$A = P \left(1 + \frac{r}{n}\right)^{nt}.$$

$t$ and $r$ are the number of years and the interest rate per annum.

As $n$ becomes large, we can approximate the amount by

$$A = P e^{rt}.$$

The value of $A$ in the above formula is the amount compounded continuously.

[Read More]
limits 

Existence of Four Triangle Centers

A vector proof

Settings

Let

  • $P$ be an arbitrary reference point.
  • $\triangle ABC$ be a triangle.
  • $\vec{a} = \overrightarrow{PA}$, $\vec{b} = \overrightarrow{PB}$, $\vec{c} = \overrightarrow{PC}$

Remark: $O$ is reserved for circumcenter.

symbol name meaning
$G$ centroid center of gravity
$H$ orthocenter three “heights” are concurrent
$I$ incenter center of inscribed circle
$O$ circumcenter center of circumscribed circle

Centroid

Verify that $(\vec{a} + \vec{b} + \vec{c})/3$ satisfy the constraints.

Orthocenter

Let

  • $H$ be the point of intersection of two altitudes $AA_H$ and $BB_H$
  • $\vec{h} = \overrightarrow{PH}$
\begin{align} (\vec{h} - \vec{a}) \cdot (\vec{b} - \vec{c}) &= 0 \\ (\vec{h} - \vec{b}) \cdot (\vec{c} - \vec{a}) &= 0 \end{align}

Add these two equations together.

[Read More]

Katex Boxed Equations

Goal

To render a bordered box with multiple equations.

Background

My previous article about dot products contains some boxed math expressions: some are inline and some take up the whole line.

For inline math, that’s simple: either $\fbox{text}$ or $\boxed{a=1}$ will do. For displayed math, these two KaTeX commands will ignore the newline command \\.

Solution

A simple Google search ‘“katex” AND “box”’ saved the day. It led me to this relevant Stack Overflow question, whose accepted answer suggested the use of custom CSS. I copied the CSS class name boxedmath for my blog.

[Read More]
KaTeX  CSS 

Tikz to SVG in VS Code

My little LaTeX Workshop recipe

Goal

View SVG graphics generated from TikZ code in VS Code.

LaTeX TikZ coding + SVG preview in VS Code

Compile TikZ code and preview SVG in VS Code

with LaTeX Workship and SVG Preview

Part I: generate SVG using LaTeX Workshop

From the IDE’s parameters tab, I found the tools and recipes parameters. I clicked my user settings settings.json twice: once through the tools, and once through the recipes. Each click generated an array of default recipes or tools. Each of the former is a sequence of the later, which represents a command. The official examples and placeholders are easy to follow. Here’s the two JSON objects that I added.

[Read More]