The Things' Engine – Blog

Table of Contents

TODO Copyright Statement

For the Puremacs:

;; Copyright (C) 2021-2026 Dr Yufeng Lin

;; Author: Ethan Lin <>
;; URL:
;; This file is not part of GNU Emacs.
;;; Commentary:

Lexical Scope, bingding for emacs-lisp

<2021-04-13 Tue>   Puremacs

;;; init.el --- -*- lexical-binding: t -*-

"Until Emacs 24.1 (June 2012), Elisp only had dynamically scoped variables, a feature, mostly by accident, common to old lisp dialects. While dynamic scope has some selective uses, it’s widely regarded as a mistake for local variables, and virtually no other languages have adopted it." – By Chris Wellons

See the article: Some Performance Advantages of Lexical Scope

Bertrand Russell: Love is Wise, Hatred is Foolish

<2021-03-19 Fri>

Interviewer: Suppose Lord Russell that this film were to be looked at by our descendants, like a dead sea scroll in a thousand years time. What would you think it’s worth telling that generation about the life you’ve lived and the lessons you’ve learned from it?

Russell: I should like to say two things, one intellectual and one moral.

The intellectual thing I should want to say to them, is this: When you are studying any matter, or considering any philosophy, ask yourself only what are the facts and what is the truth that the facts bear out. Never let yourself be diverted, either by what you wish to believe, or by what you think would have beneficent social effects if it were believed. But look only, and solely, at what are the facts. That is the intellectual thing that I should wish to say.

The moral thing I should wish to say to them is very simple: I should say, love is wise, hatred is foolish. In this world, which is getting more and more closely interconnected, we have to learn to tolerate each other, we have to learn to put up with the fact that some people say things that we don’t like. We can only live together in that way—and if we are to live together and not die together—we must learn a kind of charity and a kind of tolerance, which is absolutely vital to the continuation of human life on this planet.


Decision Making: the implementation phase

[B] <2021-03-16 Tue>   Philosophy

“Nothing more difficult to carry out, nor more doubtful of success, nor more dangerous to handle, than to initiate a new order of things.” - The Prince, Machiavelli 1500s

Update the title for this website

<2021-01-29 Fri>

The title is update from "The Things Engine"(物联引擎) to "Something Great" (稻盛和夫), then to "Something Good" (一点有益)


<2021-01-02 Sat>

Emacs is … and more. Emacs-icon.sh_.png

Insert screenshots into org files

<2021-02-25 Thu>

Mojave has a new screenshot capability you get with SHIFT-COMMAND-5. After typing SHIFT-COMMAND-5, select OPTIONS, then select "Clipboard". (save to desktop" and then the Dropbox saving funtionality.)

(use-package org-download
  :after org
  :defer nil
  (org-download-method 'directory)
  (org-download-image-dir "images")
  (org-download-heading-lvl nil)
  (org-download-timestamp "%Y%m%d-%H%M%S_")
  (org-image-actual-width 300)
  (org-download-screenshot-method "/usr/local/bin/pngpaste %s")
  ("C-s-y" . org-download-screenshot)
  (require 'org-download))

See the reference:

Run Elisp Script in Shell on MacOS   Emacs

<2020-11-09 Mon>   Emacs

  1. Create a emacs lisp script, HelloWorld.el

    (message "Hello Elisp World!")
  2. Run a elisp script on a MacOS from the command line

    /Applications/ --script HelloWorld.el

Most useful options for running emacs lisp as a script:

  • "–no-init-file" or "-q"
  • "–no-site-file"
  • "–batch"
  • "–load= path" or "-l path"
  • "–script path"

Two more things:

  1. What is site-start.el The site-start.el is a int file for site-wide running of emacs, a init file for all users fo the installed emacs. On MacOS, The path is "/Applications/".
  2. How to prepare your emacs lisp scrip to run in batch mode
    • self-contained
    • load all needed libraies properly
    • set the necessary load path set in the script, such as follows:

      (add-to-list 'load-path lib_path)

A motto for Git

<2020-11-04 Wed>

While exploring difference, never lose sight of sameness for it is sameness that brings us together. – John Briggs

Step by Step

<2020-03-17 Tue>

A long journey begins with the first step – Lao Tzu

API Testing

<2020-09-26 Sat>   Test

<div id="jinrishici-sentence" style="font-weight: 700;">千里之行,始于足下</div>
<script src="" charset="utf-8"></script>

Org Macros

<2020-08-09 Sun>   Emacs Orgmode

The macros in Org allow you to add text or code to an Org document that will be expanded during export: the text between the 3 pairs of accolades is expanded so that readers can see it in the exported versions of the document.

It can be used to construct complex HTML or LaTeX code.

#+MACRO: color @@html:<span style="color: $1">$2</span>@@
{{{color(blue, This text is colored in blue.)}}}
{{{color(red, This other text is in red.)}}}

This text is colored in blue. This other text is in red.

Org-bullet symbol set

<2020-08-09 Sun>   Emacs Orgmode

  • Hexagrams
    “✡” “⎈” “✽” “✲” “✱” “✻” “✼” “✽” “✾” “✿” “❀” “❁” “❂” “❃” “❄” “❅” “❆” “❇”
  • Circles
    “○” “☉” “◎” “◉” “○” “◌” “◎” “●” “◦” “◯” “⚪” “⚫” “⚬” “❍” “○” “⊙” “⊚” “⊛” “∙” “∘”
  • Special Circles
    “◐” “◑” “◒” “◓” “◴” “◵” “◶” “◷” “⚆” “⚇” “⚈” “⚉” “♁” “⊖” “⊗” “⊘”
  • Crosses
    “✙” “♱” “♰” “☥” “✞” “✟” “✝” “†” “✠” “✚” “✜” “✛” “✢” “✣” “✤” “✥”
  • Poker Sybmols
    “♠” “♣” “♥” “♦” “♤” “♧” “♡” “♢”
  • Yinyang
    “☯” “☰” “☱” “☲” “☳” “☴” “☵” “☶” “☷”
  • Special Symbols
    “☀” “♼” “☼” “☾” “☽” “☣” “§” “¶” “‡” “※” “✕” “△” “◇” “▶” “◀” “◈”
1: ;; use org-bullets-mode for utf8 symbols as org bullets
2: (require 'org-bullets)
3: ;; make available "org-bullet-face" such that I can control the font size individually
4: (setq org-bullets-face-name (quote org-bullet-face))
5: (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
6: (setq org-bullets-bullet-list '("✙" "♱" "♰" "☥" "✞" "✟" "✝" "†" "✠" "✚" "✜" "✛" "✢" "✣" "✤" "✥"))

org-ellipsis candidate symbols

  • right arrows
    “↝” “⇉” “⇝” “⇢” “⇨” “⇰” “➔” “➙” “➛” “➜” “➝” “➞”
    “➟” “➠” “➡” “➥” “➦” “➧” “➨”
    “➩” “➪” “➮” “➯” “➱” “➲”
    “➳” “➵” “➸” “➺” “➻” “➼” “➽”
  • arrow heads
    “➢” “➣” “➤” “≪”, “≫”, “«”, “»”
  • other arrows
    “↞” “↠” “↟” “↡” “↺” “↻”
  • lightening
  • other symbols
    …, ▼, ↴, , ∞, ⬎, ⤷, ⤵
1: ;; org ellipsis options, other than the default Go to Node...
2: ;; not supported in common font, but supported in Symbola (my fall-back font) ⬎, ⤷, ⤵
3: (setq org-ellipsis "⚡⚡⚡");; ⤵ ≫

Org as a spreadsheet system: using Emacs lisp as formulas

<2020-08-08 Sat>   Emacs Orgmod

It is how to use Emacs Lisp as formulas in Org tables. Example 1: manipulate cells. Here is a simple table:

First Name Last Name Email
Jone Doe
Alice Susan
Bob Wash
Even Yellow  

Now type C-c } to display the table's coordinates.

1: '(concat $1 "." $2 "")

Now copy this formula, type C-c = in the bottom right field to insert a column formula2 and copy the formula here. Hitting RET will immediately insert the result in this field ( and add the #+TBLFM line (#+TBLFM: $3='(concat $1 "." $2 "")) at the bottom of the table.

For paragraph

<2020-07-29 Wed>   Emacs Orgmod notetaking

Paragraphs are separated by at least one empty line. If you need to enforce a line break within a paragraph, use ‘\\’ at the end of a line.

To preserve the line breaks, indentation and blank lines in a region, but otherwise use normal formatting, you can use this construct, which can also be used to format poetry.

Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs


When quoting a passage from another document, it is customary to format this as a paragraph that is indented on both the left and the right margin. You can include quotations in Org documents like this:

Everything should be made as simple as possible, but not any simpler —Albert Einstein

If you would like to center some text, do it like this:

Everything should be made as simple as possible,
but not any simpler

Visual alignment Org tables for GUI Emacs

<2020-07-28 Tue>   Emacs Orgmode


This package provides visual alignment for Org and Markdown tables on GUI Emacs. It can properly align tables containing variable-pitch font, CJK characters and images. Meanwhile, the text-based alignment generated by Org mode (or Markdown mode) is left untouched.

To use this package, load it and add valign-mode to org-mode-hook or markdown-mode-hook:

1: (add-hook org-mode-hook #valign-mode)

Learning Tree

<2020-07-27 Mon>   Research


Some Practical TCP dump Examples

<2020-07-19 Sun>   NetworkSecurity

Practical tcpdump examples to lift your network troubleshooting and security testing game. Commands and tips to not only use tcpdump but master ways to know your network.

Knowing tcpdump is an essential skill that will come in handy for any system administrator, network engineer or security professional.

Markdown to Org documenting conversion

<2020-07-19 Sun>   Documenting

To simply convert one file from Markdown to Org the following command can be used:

pandoc -f markdown -t org -o original-file.markdown

The solution was to export the VoodooPad document to a folder as text (File > Export Document > Export as Text…). Then call pandoc via the find command to convert them all in one go:

$ find . -name \*.txt -type f -exec pandoc  -f markdown -t org -o {}.org {} \;
for f in `ls *.md`; do
  pandoc -f markdown -t org -o ${f}.org ${f};
(defun markdown-convert-buffer-to-org ()
   "Convert the current buffer's content from markdown to orgmode format and save it with the current buffer's file name but with .org extension."
   (shell-command-on-region (point-min) (point-max)
                            (format "pandoc -f markdown -t org -o %s"
                                    (concat (file-name-sans-extension (buffer-file-name)) ".org"))))

Linux Cron Job

<2020-05-13 Wed>   Linux

Cron job

How to generate a job just running in lipe year

For example: At 12:00am on February 29th

0 0 29 2 * root /bin/echo "Hello World"

Controlling Access to the crontab Command

You can control access to the crontab command by using two files in the /etc/cron.d directory: cron.deny and cron.allow. These files permit only specified users to perform crontab command tasks such as creating, editing, displaying, or removing their own crontab files. The cron.deny and cron.allow files consist of a list of user names, one user name per line.

These access control files work together as follows:

  • If cron.allow exists, only the users who are listed in this file can create, edit, display, or remove crontab files.
  • If cron.allow does not exist, all users can submit crontab files, except for users who are listed in cron.deny.
  • If neither cron.allow nor cron.deny exists, superuser privileges are required to run the crontab command.

Superuser privileges are required to edit or create the cron.deny and cron.allow files.


TODO [B] <2020-05-02 Sat>   Emacs Org

DEADLINE: <2020-05-09 Sat> SCHEDULED: <2020-05-02 Sat>

Plan to write an article to talk about "Tables in Emacs with Org-mode"

Tables in Emacs with Org-mode

In Emacs, the Org mode comes with a fast and intuitive table editor. Spreadsheet-like calculations are supported by using the Emacs calc package and Emacs Lisp programming language.


<2020-04-29 Wed>   Literature

By Samuel Ullman

Youth is not a time of life; it is a state of mind; it is not a matter of rosy cheeks, red lips and supple knees; it is a matter of the will, a quality of the imagination, a vigor of the emotions; it is the freshness of the deep springs of life.

Youth means a temperamental predominance of courage over timidity of the appetite, for adventure over the love of ease. This often exists in a man of sixty more than a boy of twenty. Nobody grows old merely by a number of years. We grow old by deserting our ideals.

Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul. Worry, fear, self-distrust bows the heart and turns the spirit back to dust.

Whether sixty or sixteen, there is in every human being's heart the lure of wonder, the unfailing child-like appetite of what's next, and the joy of the game of living. In the center of your heart and my heart there is a wireless station; so long as it receives messages of beauty, hope, cheer, courage and power from men and from the infinite, so long are you young.

When the aerials are down, and your spirit is covered with snows of cynicism and the ice of pessimism, then you are grown old, even at twenty, but as long as your aerials are up, to catch the waves of optimism, there is hope you may die young at eighty.

End – New Beginning

<2020-03-17 Tue>

End is a new beginning – YF Lin

Date: 2020-04-28 Tue 00:00

Author: YF Lin

Created: 2021-04-21 Wed 13:46