Sekai 🌐 🗺

Sekai is the kanji for 世界, meaning “the world”. That’s a great word because of the scale it designates.

Borel Cantelli Exercise 2019

I intend to post this for a Borel-Cantelli lemma exercise on Math.SE.

The target event is ${\exists i_0 \in \Bbb{N} : \forall i \ge i_0, X_i = 1}$, whose complement is $${\forall i_0 \in \Bbb{N} : \exists i \ge i_0, X_i = 0} = \limsup_i {X_i = 0}.$$

To apply Borel-Cantelli, one has to determine whether $\sum_i P(X_i = 0)<+\infty$.

Mise à jour du template de lettre

Template de lettre en Xe$\LaTeX$

Contexte J’ai publié mon template de lettre en Xe$\LaTeX$ sur mon ancien blog (hébergé sur GitHub Pages) il y a trois ans. Problème et solution Après le changement de l’ordi portable, il me faut l’installation du pacquetage “texlive-lang-french” sur la nouvelle version d’Ubuntu. Sinon, une erreur du pacquetage Babel se surviendra. ! Package babel Error: Unknown option `frenchb'. Either you misspelled it (babel) or the language definition file frenchb.ldf was not foun d. [Read More]

Staticman Failure on Tsalikis' Site

Use Alternative Staticman API server

After reading Hugo Comments with Staticman on Kostas Tsalikis’ web site, I tried to leave the following comment. As far as I know, Staticman can be used only with GitHub, since it works as a GitHub bot. Obviously, not all static sites are saved in GitHub, and this may be a showstopper for someone using another service. Thanks to eduardoboucas/staticman#219, Staticman now supports GitLab. You may view my demo Hugo site on Framagit at https://staticman-gitlab-pages. [Read More]

Staticman Repo Setup Errors

Common Staticman Config Erorrs in Git repos

Background Idem to Staticman on Framagit. Besides, the build time for my Staticman + Beautiful Hugo demo on Framagit is half of that for the same project on Problem After the setup, it’s possible that the theme shows “Sorry! There’s an error during submission.” To get an insight into this error, one has to open Web Developer Tools → Network and select the row corresponding to the POST request sent to the Staticman API. [Read More]

Staticman's Encryption Mechanism

Verify encrypted content

Background Staticman’s documentation gives a link to the public key for the public Staticman instance. I’ve set up my own Staticman instance for testing Staticman’s native GitLab support. It’s a coincidence that the public Staticman instance has been hitting it’s API limit, as reported in Staticman issue 227. To help others, I’ve published the URL of my own Staticman instance, which is associated with the GitHub/GitLab user staticmanlab. As Node.js’s RSA library has been used in Staticman, I have the responsibility to publish the public RSA key for my Staticman instance. [Read More]

Staticman on Framagit

It’s a pity that some GitLab users have removed Staticman from their repo. I saw demand for Staticman from Framagit users. Therefore, after two days of testing, another API instance for Framagit has been created at The default GitLab base URL is set to “". To provide Staticman support for a self-hosted GitLab service, another Staticman API server has to be set up. I tried applying for OpenShift, but it’s been reported on Reddit that it takes about 10–20 days to get started. [Read More]

Detect Missing EOF

While editing files on GitHub/Gitlab, missing an empty line at the bottom of a file in the buffer will result in no newline at the end of file. In the case of regular text files, this isn’t consistent with the POSIX standards. for file in `git ls-files`; do grep -Iq . $file && if ! newline_at_eof $file; then; else echo $file; fi done Fred has provided a shell script for detecting EOF on Stack Overflow. [Read More]

Find Files for Rename

Background Three years ago, I wrote Used More Bash Utilities for batch renaming files. One of my Facebook friends has pointed out that it fails for file names containing whitespace. Problem Recently, I would like to remove the extension name .sh of all shell scripts in ~/bin, so that which {script} will work without .sh. Method A for loop over $(ls) is a basic solution, but find is more correct since it’s possible that a file name contains a space character. [Read More]

Comparaison of Two Docker Images for Hugo

Having importing the repo for the Hugo theme Introduction from GitHub to GitLab, I added the automatically generated GitLab CI config file and I ran job #135854407. $ cd exampleSite $ hugo --themesDir=../.. -d ../public hugo: /usr/lib/ no version information available (required by hugo) hugo: /usr/lib/ no version information available (required by hugo) The build succeeded with the above message. To suppress it, a switch to another CI runner will do. [Read More]

Git URL Shortener Exception

A URL lengthened by

Due to limitations on the number of characters imposed by the site owner, URL shorteners are useful for shortening comments containing URL(s). Nonetheless, while commenting on my recent PR for Introduction, I found that GitHub’s URL shortener had lengthened the URL for GitHub’s home page. Output of "" by GitHub's URL Shortener A counterexample of GitHub's URL Shortener Compare these two URLs. https://git. [Read More]