Sunday, 4 August 2024

Docker Сheatsheet

1. Get inside a container: docker exec -it <mattermost_container_name> /bin/bash

2. <comes later>

Thursday, 1 August 2024

XWiki render MathJax without extensions

Go to https://WIKI.YOURSITE.COM/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Presentation and add the following to "HTTP META INFO" header at the beginning:

<script type="text/javascript">
  MathJax = {
    tex: {
      inlineMath: [['$', '$'], ['\\(', '\\)']],
      displayMath: [['$$', '$$'], ['\\[', '\\]']]
    },
    options: {
      skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
    },
    startup: {
      ready: function() {
        MathJax.startup.defaultReady();
        MathJax.typesetPromise();
      }
    }
  };
</script>
<script async="" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript">
</script>

Sunday, 21 July 2024

Git fix all "missing" renames

To continue the previous epopee: we shall interactively detect all the occurrences of the missed renames in a given git repo, and let user choose if he wants to make a potential rename into real rename.

Wednesday, 17 July 2024

Git fix the "missed" rename

In git, there are no renames. It uses "heuristics" to detect files been deleted-and-added that are "actually" renamed. The "good practice" is to never mix these "renames" with file modifications, else git will loose the track of "renames" and thus history navigation for these files will become a serious pain. But sometimes you "forget" about these "great" practices. The script to fix an accidental loss of real rename below is to the resque.