Posts in category “Tips”




在老年痴呆症的早期,特别是对于素食主义者,检查他们血液中的维生素B12的水平,若发现大幅低于正常范围, 注射维生素B12看看效果。若有效果可适当加大剂量并定期补充维生素B12,有病例从痴呆状态复原,智力恢复正常,又健康的活了好几年。

Power shell: Start-Transcript and Stop-Transcript help you log a session.

How to show space and tabs with git-diff

git config diff.wsErrorHighlight all


Quoting string literals in PL/SQL

We sometimes need to include a single quote in an SQL statement, I believe you already know the normal way, use two single quote characters to express one single quote. However, if you are using oracle 10g or a more recent version, the following way could be better:

This is a new feature of 10g that enables us to embed single-quotes in literal strings without having to resort to double, triple or sometimes quadruple quote characters. This is particularly useful for building dynamic SQL statements that contain quoted literals.

The mechanism is invoked with a simple "q" in PL/SQL only. The syntax is q'[...]', where the "[" and "]" characters can be any of the following as long as they do not already appear in the string.

  • !
  • [ ]
  • { }
  • ( )

Note that at the time of writing, the quoting mechanism only appears to work with 10g clients/OCI. If used with any software that uses an older Oracle client it fails with ORA-01756: quoted string not properly terminated (confirmed with sqlplus, TOAD and PL/SQL Developer).

If you want samples, see Reference

Obsidian + GitHub private Repo solution on All platforms

I have heard that Obsidian is a powerful note-taking application that can serve as "your second brain." However, when I tried it previously, I did not find its user experience to be satisfactory. Nevertheless, I decided to give it another try. Although this solution is free, it spent me at least a few hours before I get it. TLDR; here's the steps:

  1. Create a private repository obsidian_notes on to store your notes.
  2. Create a classic personal access token on for the obsidian git plugin as it dosn't support the git protocol on Mobile devices.
  3. Install Obsidian and Obsidian Git plugin on every platform you want to use
  4. Install iSH application on your iPhone/iPad, and run the following command in the iSH shell
    1. apk add git
    2. adduser -h /home/david david (Surely you can choose your preferred name)
    3. su - david
    4. git clone (you will need the personal access token at this step)
  5. Open the Obsidian app on your iPhone/iPad, create a new Vault with any name. (no worries, we will remove it shortly)
  6. Open the Files app and find yourNotesRepo directory, copy it to the clipboard,
    1. Find your Obsidian directory which holds your newly created vault and paste yourNotesRepo directory here
    2. Remove the newly created vault directory

Yes. That's it. If you meet any problems when you follow my steps, feel free to leave a comment here, or contact me at