Sekai 🌐 πŸ—Ί

Sekai is the kanji for δΈ–η•Œ, meaning “the world”. That’s a great word because of the scale it designates.

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 GitLab.com. 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 https://staticman-frama.herokuapp.com. (Edit: typo edited, please see my comment below.) The default GitLab base URL is set to “https://gitlab.com". To provide Staticman support for a self-hosted GitLab service, another Staticman API server has to be set up. [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]
Linux 

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]
Linux 

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/libstdc++.so.6: no version information available (required by hugo) hugo: /usr/lib/libstdc++.so.6: 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 git.io

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 "https://github.com" by GitHub's URL Shortener A counterexample of GitHub's URL Shortener Compare these two URLs. https://github.com https://git. [Read More]
GitHub 

Staticman Invitation is Case Sensitive

A recent invitation error under Staticman v3

HTML and URL links are case insensitive. For example, GOOGLE.COM and google.com give the same address. As a result, after creating my fork of Beautiful Jekyll, I invited @staticmanlab to join my GitHub repo by firing the URL https://staticman3.herokuapp.com/v3/connect/github/vincenttam/beautiful-jekyll but I got Failed Staticman invitation The case for GitHub user name doens't match Successful Staticman invitation The case for GitHub user name match [Read More]

SCSS to SASS Converter

Background While porting Minimal Mistakes and Beautiful Hugo’s Staticman support to Introduction, I searched for “SCSS to SASS” on DuckDuckGo. The search engine returned results on “CSS to SASS/SCSS” or vice versa. The first theme has Staticman code in SCSS. That would fit into the third theme’s directory structure, which puts SASS files under assets/sass. However, SASS doesn’t have curly braces {}. I feared that after hours of tedious manual replacement, the code would fail to run. [Read More]
SASS  SCSS 

Weak LLN Practice

My intended answer to a weak LLN problem on Math.SE. Problem: Suppose $(X_n)$ is a sequence of r.v's satisfying $P(X_n=\pm\ln (n))=\frac{1}{2}$ for each $n=1,2\dots$. I am trying to show that $(X_n)$ satisfies the weak LLN. The idea is to show that $P(\overline{X_n}>\varepsilon)$ tends to 0, but I am unsure how to do so. My solution: As in the accepted answer in OP's previous question https://math.stackexchange.com/q/3021650/290189, I'll assume the independence of $(X_n)$. [Read More]