Category: Text

How-tos, software recommendations, code snippets, my opinion on stuff.


  • How to list subdirectories recursively with total size

    Just a note to myself, as I always have a hard time understanding the find manpages. To list the directories and subdirectories up to a certain depth, “simply” enter: Option maxdepth states how deep the subdirectories should be listed, option type restricts output to directories (d). If a directory listing including size is required, this…

  • How to remap the Win button on a Microsoft Sculpt Comfort mouse

    If you use the Microsoft Sculpt Comfort Desktop with its gorgeously sculpted keyboard and the round pebblestone mouse, you might not need the brightly branded “Windows” button on the mouse. Program AutoHotkey to the rescue! Simply remap the Right Windows key (that conveniently does not exist on most keyboards anyway) to any other convenient key…

  • The definitive full-frame graphic command for beamer in LaTeX

    The definitive full-frame graphic command for beamer in LaTeX

    2018-06-02: This content has been superseded by this newer post: Finally the definitive full-frame graphic commands for beamer in LaTeX. Look there for an updated version. After my previous post on the same topic, I have improved upon the command considerably. This time, it is based on Matthew Leingang’s answer on the question Image on…

  • “Laudato Si’” word cloud

    I wanted to get a glimpse on the language employed in the latest encyclica Laudato Si’, so here it is. If it weren’t for god, the cloud could also come from an sustainable development manifest:

  • How to add subcategories to templates in WordPress

    How to add subcategories to templates in WordPress

    This is the snippet I have added to my category template in my blog’s child theme. I paste the following snippet usually after the taxonomy-description paragraph. This is how it looks (the two paragraphs Parents and Subcategories): This is the code: And then in the (child) theme’s stylesheet, add suitable specification. In my case, I…

  • How to horizontally align beamer columns with surrounding text

    How to horizontally align beamer columns with surrounding text

    If you (like me) assumed that placing two columns width 50% textwidth next to each other would align with preceding or following text on a beamer slide, then you are mistaken (like me). Fortunately, a discussion on Bug #262: Provide more usable columns environment showed a viable solution in form of the optional argument onlytextwidth.…

  • My Python setup

    My Python setup

    In this post, I summarise my custom settings for my IPython, Matplotlib and IPython Notebook for my Windows machine at work. IPython First some aesthetic preferences: [code lang=”python” title=”.ipython/profile_default/ipython_config.py”] # select qt backend for plotting from terminal from IPython.terminal.ipapp import TerminalIPythonApp TerminalIPythonApp.matplotlib=’qt’ c = get_config() # bigger plots in IPython notebooks c.InlineBackend.rc = {‘figure.figsize’: (16.0,…

  • Full-frame graphics on a LaTeX beamer presentation

    2018-06-02: This content has been superseded by this newer post: Finally the definitive full-frame graphic commands for beamer in LaTeX. Look there for an updated version. This snippet defines the custom command \fullframegraphic. Paste it into the document preamble (header) of your presentation: Then, you can create a full-frame graphic slide anywhere (outside a frame)…

  • How to git push to multiple remotes with one command

    There are multiple questions with even more answers on this exact question at Stack Overflow. The simplest answer, which I failed to find again, looks like this. Add the following lines to your repo’s .git/config: [code lang=”bash”] [alias] pushall = !git push origin master && git push github master && git push remote3 master [/code]…

  • How to use TikZ for inline polygons

    How to use TikZ for inline polygons

    The trick is to define inner sep=0pt when beginning the tikzpicture environment, as I learned from pgf bug report #172 minimum size in regular polygon fails for small length from last year. Here is a minimum working example, adapted to my use case of inline polygon symbols with roughly text height, i.e. 2ex in my…

  • How to change the default matplotlib font

    The default fonts for matplotlib are set in file matplotlibrc in the folder $USER_HOME/.matplotlib. You can find them here, depending on your operating system: Windows: C:\Users\YourName\.matplotlib\matplotlibrc Linux: /home/YourName/.matplotlib/matplotlibrc Within the file, search for the font section, and uncomment (remove the hash symbol # at beginning of line) or add the following settings as desired. In…

  • How to autoreload packages while using them in IPython

    I use IPython to interactively use and debug code that I edit in a text editor at the same time. Unfortunately, Python does not automatically reload packages and functions after an initial import foo, simply for performance reasons. Fortunately, there is a solution: the IPython extension autoreload does what its name says: either all (how…

  • How to use custom colours in LaTeX

    How to use custom colours in LaTeX

    I will post short minimum working examples (MWEs) of minimal LaTeX documents, showing a certain feature in action. Though the well-maintained LaTeX Wikibook is a much more extensive resource than a collection of such examples could ever be, they show directly compilable examples compared to isolated snippets. I start simple: custom text colours, using different…

  • How to list size of directories in current folder

    Note to self, it’s deceptively simple, once one manages to read the manpages properly: [code lang=”bash” gutter=”false”]du -hd 1 /path/to/directory[/code] If directory is the current folder, this shortens to: [code lang=”bash” gutter=”false”]du -hd 1[/code]

  • Stikked – a self-hosted open source alternative to Pastebin

    Stikked – a self-hosted open source alternative to Pastebin

    Ever wanted to share or loosely collaborate on a document, but did not feel save enough to put it on a public text hosting service like Pastebin? Thanks to Ben McRedmond and Claude Hole, there is Stikked. It is a small text pasting script. It needs a webserver with PHP 5 and a MySQL database.…