<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Jürgen Gmach</title><link>https://jugmac00.github.io/</link><description>Recent content on Jürgen Gmach</description><generator>Hugo -- 0.127.0</generator><language>en-us</language><lastBuildDate>Thu, 13 Jun 2024 20:21:24 +0200</lastBuildDate><atom:link href="https://jugmac00.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Detach Sessions From a Terminal</title><link>https://jugmac00.github.io/til/how-to-detach-sessions-from-a-terminal/</link><pubDate>Thu, 13 Jun 2024 20:21:24 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-detach-sessions-from-a-terminal/</guid><description>When we do production deployments at my team at Canonical, we log into a bastion server and execute a long running command from there.
Long running as of 30 minutes. The script goes through all our servers and deploys the latest changes.
Needless to say that it would not be optimal when e.g. the connection dies during the deployment, as this would stop the deployment right in the middle.
Hello terminal multiplexer Most engineers probably heard of tmux and screen before.</description></item><item><title>Anonymous Hyperlinks</title><link>https://jugmac00.github.io/til/anonymous-hyperlinks/</link><pubDate>Mon, 10 Jul 2023 18:10:41 +0200</pubDate><guid>https://jugmac00.github.io/til/anonymous-hyperlinks/</guid><description>Today, I looked something up in our documentation, and noticed an unformatted link.
`launchpad-mojo-specs &amp;lt;https://code.launchpad.net/launchpad-mojo-specs&amp;gt;` This is reStructuredText - a file format for structured data. While many people have switched to MarkDown, which is unarguably easier to read and write, I still like reStructuredText as it is very powerful.
The above link does not get rendered as a hyperlink, as it misses a trailing underscore.
I was about to add it, and directly commit, but luckily I tried to render it first.</description></item><item><title>Multiline Commit Messages With `git commit -m</title><link>https://jugmac00.github.io/til/multiline-commit-messages-with-git-commit-m/</link><pubDate>Sun, 12 Feb 2023 10:38:09 +0100</pubDate><guid>https://jugmac00.github.io/til/multiline-commit-messages-with-git-commit-m/</guid><description>When you execute git commit on the command line, your specified editor opens and you can create an expressive title and a longer description.
That is probably nothing new.
You are probably also aware of the shortcut git commit -m &amp;lt;message&amp;gt;, which skips the step with the editor.
But there is only room for the title, right?
Nope, this is not true.
one way It turns out you can use -m multiple times.</description></item><item><title>A Special Tool for Special Occasions: The Git Worktree Command</title><link>https://jugmac00.github.io/blog/the-git-worktree-command/</link><pubDate>Thu, 19 Jan 2023 07:16:27 +0100</pubDate><guid>https://jugmac00.github.io/blog/the-git-worktree-command/</guid><description>What is the issue? Working with branches is fine, as long as you are able to work on one only, or at least have the time to wrap up your work and commit some self-contained and complete state before switching to the next branch.
If you cannot complete your work, it gets messy.
Now, you can either
use git stash create a work-in-progress(WIP) commit just keep the modified or new files, and try to work around them and to not commit them by accident git clone your repository into another directory I have done all of them, and they all have their downsides.</description></item><item><title>Your First Contribution to CPython</title><link>https://jugmac00.github.io/blog/your-first-contribution-to-cpython/</link><pubDate>Wed, 18 Jan 2023 15:35:10 +0100</pubDate><guid>https://jugmac00.github.io/blog/your-first-contribution-to-cpython/</guid><description>Do you love Python?
I certainly do.
Have you ever thought how cool it would be to contribute to it?
Sounds scary? It is not!
Python, or more specifically CPython as the reference implementation of the Python programming language is called, is an open source project like any other - nothing magical.
Other resources While there are many great resources out there to prepare you for the first contribution, such as</description></item><item><title>How to Update Cargo</title><link>https://jugmac00.github.io/til/how-to-update-cargo/</link><pubDate>Mon, 24 Oct 2022 15:30:42 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-update-cargo/</guid><description>Today I saw a Tweet by Marius Gedminas, who wrote about lfs, a replacement for df.
It is one of the many tools, implemented in Rust, which offer some more features compared to their bash alternatives.
What about no When I tried to install it, I just saw the following error message:
❯ cargo install lfs Updating crates.io index Downloaded lfs v2.6.0 error: failed to parse manifest at `/home/jugmac00/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.6.0/Cargo.toml` Caused by: feature `strip` is required The package requires the Cargo feature called `strip`, but that feature is not stabilized in this version of Cargo (1.</description></item><item><title>How to Apply Git Log and Git Grep Only for a Specific File Type</title><link>https://jugmac00.github.io/til/how-to-apply-git-log-and-git-grep-only-for-a-specific-file-type/</link><pubDate>Fri, 30 Sep 2022 08:13:24 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-apply-git-log-and-git-grep-only-for-a-specific-file-type/</guid><description>Today I wanted to check how the UPDATE statement was used in already deleted SQL patch files.
Usually I do a git log -p and then use the interactive search in less via /, but in this case there were too many hits from Python files, so I wanted to restrict my search to SQL files only.
Turns out you can pass in the file type via &amp;hellip;
git log -p -- &amp;#39;*sql&amp;#39; And then use the interactive search.</description></item><item><title>Just Enough Bazaar to Be Dangerous</title><link>https://jugmac00.github.io/blog/just-enough-bazaar-to-be-dangerous/</link><pubDate>Mon, 18 Jul 2022 12:52:38 +0200</pubDate><guid>https://jugmac00.github.io/blog/just-enough-bazaar-to-be-dangerous/</guid><description>Last year I wrote a blog post about how to migrate away from Bazaar, a distributed version control system, originally developed by Canonical, to git.
While I still think this is the only way forward, here, at Canonical, working in the Launchpad team, we still have a couple of Bazaar repositories around, which cannot be easily migrated, as they are both integrated into deployment processes, and used by other teams.</description></item><item><title>How f-strings Handle Double Curly Braces</title><link>https://jugmac00.github.io/til/how-fstrings-handle-double-curly-braces/</link><pubDate>Tue, 05 Jul 2022 20:03:01 +0200</pubDate><guid>https://jugmac00.github.io/til/how-fstrings-handle-double-curly-braces/</guid><description>Today I was about setting up a test case for parsing a YAML file which is templated with Jinja variables.
Something like this&amp;hellip;
f&amp;#34;&amp;#34;&amp;#34; pipeline: - test jobs: test: package-repositories: - type: apt url: &amp;#34;https://{{auth}}@example.org&amp;#34; &amp;#34;&amp;#34;&amp;#34; My test case failed&amp;hellip;
My Pydantic model, which uses yaml.safe_load under the hood to load the above configuration, returned the URL, even before the value got replaced, as https://{auth}@example.org.
One pair of the double curly braces was stripped away!</description></item><item><title>Ubuntu Versions Cheat Sheet</title><link>https://jugmac00.github.io/blog/ubuntu-versions-cheat-sheet/</link><pubDate>Mon, 27 Jun 2022 11:14:52 +0200</pubDate><guid>https://jugmac00.github.io/blog/ubuntu-versions-cheat-sheet/</guid><description>about versions, names, even more versions and dates
version code name python go debhelper end of standard support eol 16.04 xenial xerus 3.5 ? 9 04/2021 04/2026 18.04 bionic beaver 3.6 ? 11 04/2023 04/2028 20.04 focal fossa 3.8 1.13 + 1.14 12 04/2025 04/2030 22.04 jammy jellyfish 3.10 ? 13 04/2027 04/2032 24.04 noble numbat 3.12 ? 13 04/2029 ?</description></item><item><title>Oh Open Source Supply Chain Security, Where Art Thou?</title><link>https://jugmac00.github.io/blog/oh-open-source-supply-chain-security-where-art-thou/</link><pubDate>Wed, 01 Jun 2022 20:38:46 +0200</pubDate><guid>https://jugmac00.github.io/blog/oh-open-source-supply-chain-security-where-art-thou/</guid><description>&amp;ldquo;This is horrifying. But also not surprising.&amp;rdquo;
These are the words of a friend of mine, a security specialist, when I told him what I found out today.
But first&amp;hellip;
What is Open Source Supply Chain? Most applications nowadays use open source libraries, especially for common functionality like e.g. sending web requests, so it is not necessary to re-invent the wheel all the time.
This is great! This saves a lot of work, time and money, and usually when a library is widely used, it is rock stable.</description></item><item><title>Conda, Miniconda and 2x Anaconda</title><link>https://jugmac00.github.io/blog/conda-miniconda-and-2x-anaconda/</link><pubDate>Mon, 23 May 2022 15:43:35 +0200</pubDate><guid>https://jugmac00.github.io/blog/conda-miniconda-and-2x-anaconda/</guid><description>While I certainly heard of Conda, Miniconda, and Anaconda before, I only had a vague idea of these terms and what is behind them.
So, let&amp;rsquo;s get the terminology straight.
Conda&amp;hellip; what? Conda Conda is a CLI application which does package, dependency and environment management, not only for Python, but also for other languages.
Anaconda Anaconda is an open-source Python distribution platform.
This is the all-in-one package, containing not only the Conda application, but already many packages which you usually need for a data science project.</description></item><item><title>Choosing Singular or Plural for Argument Names in Argparse</title><link>https://jugmac00.github.io/til/choosing-singular-or-plural-for-argument-names-in-argparse/</link><pubDate>Wed, 18 May 2022 15:16:32 +0200</pubDate><guid>https://jugmac00.github.io/til/choosing-singular-or-plural-for-argument-names-in-argparse/</guid><description>Naming is hard, right?
Today I was extending an argparse based CLI application.
I wanted to add an optional argument so that I can pass in environment variables.
For this argparse has a special &amp;ldquo;action&amp;rdquo;, called append.
From the argparse documentation:
&amp;gt;&amp;gt;&amp;gt; parser = argparse.ArgumentParser() &amp;gt;&amp;gt;&amp;gt; parser.add_argument(&amp;#39;--foo&amp;#39;, action=&amp;#39;append&amp;#39;) &amp;gt;&amp;gt;&amp;gt; parser.parse_args(&amp;#39;--foo 1 --foo 2&amp;#39;.split()) Namespace(foo=[&amp;#39;1&amp;#39;, &amp;#39;2&amp;#39;]) Awesome!
Now I can access all the provided values as foo.
Wait a moment Wait! This does not match.</description></item><item><title>How to Delete Documentation Hosted on pythonhosted.org</title><link>https://jugmac00.github.io/til/how-to-delete-documentation-hosted-on-pythonhosted-dot-org/</link><pubDate>Tue, 10 May 2022 16:29:54 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-delete-documentation-hosted-on-pythonhosted-dot-org/</guid><description>Today, I needed to lookup something in the documentation of lazr.config, which - you guessed it - is a configuration system, using an ini-like configuration file format.
The number one search result on Google is still https://pythonhosted.org/lazr.config/.
For projects on available on PyPI both wheels and packages are hosted on pythonhosted.org, and as it looks, at least before &amp;ldquo;my time&amp;rdquo; and before there was Read the Docs, also documentation was hosted on pythonhosted.</description></item><item><title>How to Render a Single ReStructuredText Document</title><link>https://jugmac00.github.io/til/how-to-render-a-single-restructuredtext-document/</link><pubDate>Sat, 07 May 2022 14:35:22 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-render-a-single-restructuredtext-document/</guid><description>Today I came across ubuntu-archive-tools which is a great set of scripts to help administer the Ubuntu archive.
The project consists of Python scripts only, is not packaged, and the repository comes with no setup documentation.
After I have figured out which dependencies the project needs, I wanted to add a minimal documentation, so the next user has an easier start.
So, I created a README.rst, added some information&amp;hellip; and huh, how would I render the file locally to make sure I have not messed up the syntax?</description></item><item><title>How to Combine PDF Files on the Command Line</title><link>https://jugmac00.github.io/til/how-to-combine-pdf-files-on-the-command-line/</link><pubDate>Sun, 24 Apr 2022 21:44:43 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-combine-pdf-files-on-the-command-line/</guid><description>Without further ado&amp;hellip;
pdfunite in-file-1.pdf in-file-2.pdf outfile.pdf Simple as that.
How to get pdfunite? I had it already installed as a dependency when I installed calibre, but you can also install it via&amp;hellip;
sudo apt install poppler-utils poppler-utils is a collection of PDF utils.</description></item><item><title>How to Cargo Install a Package With Additional Features</title><link>https://jugmac00.github.io/til/how-to-cargo-install-a-package-with-additional-features/</link><pubDate>Fri, 22 Apr 2022 08:04:54 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-cargo-install-a-package-with-additional-features/</guid><description>Meanwhile you may have heard that there are a couple of new CLI apps out there written in Rust - blazing fast and with additional features.
While I rarely use them, as I do not want to get used to tools, which are not available on all Linux machines I work on, I do use ripgrep regularly, as it really makes a difference, especially in speed.
Yesterday, I wanted to use ripgrep with PCRE2 (Perl Compatible Regular Expressions), but when I tried it, I got this error message:</description></item><item><title>getattr() Considered Harmful</title><link>https://jugmac00.github.io/blog/getattr-considered-harmful/</link><pubDate>Sat, 16 Apr 2022 15:40:58 +0200</pubDate><guid>https://jugmac00.github.io/blog/getattr-considered-harmful/</guid><description>While Hynek already considered &amp;ldquo;Considered Harmful&amp;rdquo; was getting old in 2016, and so he named this blog post hasattr() – A Dangerous Misnomer, instead of hasattr() considered harmful, meanwhile it is 2022 and I still like that phrase.
So here we go&amp;hellip;
getattr() considered harmful The setting is a CLI application with 100% test coverage, and even branch coverage is activated.
coverage 101 I assume you know what coverage is. 100% test coverage means that the test suite covers all lines of code of your library or application.</description></item><item><title>Highlight All Matches in Firefox</title><link>https://jugmac00.github.io/til/highlight-all-matches-in-firefox/</link><pubDate>Thu, 14 Apr 2022 19:49:01 +0200</pubDate><guid>https://jugmac00.github.io/til/highlight-all-matches-in-firefox/</guid><description>Modern browsers are pretty similar, so switching from Chrome to Firefox was no big issue&amp;hellip;
&amp;hellip; except that when I searched something on a page with STRG + F / Ctrl + F, only the first match was highlighted.
This was a major annoyance.
Was? Yep. Turns out there are two ways to enable highlighting for all matches.
Via Keyboard Shortcut In search mode you just need to hit Alt + A.</description></item><item><title>add-apt-repository Does Not Support Private PPAs</title><link>https://jugmac00.github.io/til/add-apt-repository-does-not-support-private-ppas/</link><pubDate>Wed, 30 Mar 2022 10:50:54 +0200</pubDate><guid>https://jugmac00.github.io/til/add-apt-repository-does-not-support-private-ppas/</guid><description>When you are a regular user of Ubuntu, you are probably familiar with the term PPA: Personal Package Archive
Interlude Ubuntu offers packages via different package repositories ( Main, Universe, Restricted, Multiverse).
Whenever you enter e.g. apt install &amp;lt;package&amp;gt; the mentioned repositories are queried.
Though, while Ubuntu offers many packages, not all are available via apt. Also, for a given version of Ubuntu the packages usually only get security and bug fixes, but no version updates.</description></item><item><title>How to Update a Force Pushed Remote Branch</title><link>https://jugmac00.github.io/til/how-to-update-a-force-pushed-remote-branch/</link><pubDate>Thu, 10 Mar 2022 16:53:57 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-update-a-force-pushed-remote-branch/</guid><description>Imagine your colleague works on a new feature, and you have checked out their branch for a local review, and after an initial round of feedback and fixes, your colleague performs a git push --force to the remote branch.
When you just do a git pull, you&amp;rsquo;ll end up in a mess like this&amp;hellip;
$ git pull remote: Enumerating objects: 19, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (11/11), done.</description></item><item><title>How to Gracefully Rename a Command Line Argument in an Argparse Application</title><link>https://jugmac00.github.io/til/how-to-gracefully-rename-a-command-line-argument-in-an-argparse-application/</link><pubDate>Mon, 07 Feb 2022 16:45:34 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-gracefully-rename-a-command-line-argument-in-an-argparse-application/</guid><description>The CI runner I am currently working on can be used as follows:
lpcraft run --output Now, what is output? A boolean? In the sense of &amp;ldquo;do create output&amp;rdquo;? A path to a directory? Something else?
disambiguate --output can be used to specify a directory for the build artifacts.
So, let&amp;rsquo;s rename it to --output-directory - problem solved.
Yes, but what about all the users out there&amp;hellip;
argparse magic to the rescue We all know argparse is magic, and sometimes that even helps.</description></item><item><title>How to Create a Host Dependent Bash Configuration</title><link>https://jugmac00.github.io/til/how-to-create-a-host-dependent-bash-configuration/</link><pubDate>Mon, 07 Feb 2022 15:36:44 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-create-a-host-dependent-bash-configuration/</guid><description>I use LXD containers to develop locally.
To ease development, I share my home directory with the containers.
This is convenient, but brings along a couple of issues on its own, especially for .bashrc modifications, which only apply to the host.
e.g. activating bash completion for pipx.
eval &amp;#34;$(register-python-argcomplete pipx)&amp;#34; This certainly only works on my host, where the binary is on the path, but not in my development containers.</description></item><item><title>How to Grep in PDF Documents</title><link>https://jugmac00.github.io/til/how-to-grep-in-pdf-documents/</link><pubDate>Mon, 27 Dec 2021 16:34:42 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-grep-in-pdf-documents/</guid><description>The end of the year usually also means having some fun with the tax declaration.
One of the tedious tasks is to match payments for insurances with bank statements.
As all my bank statements are PDF documents, I wondered how to search/grep in them.
pdfgrep for the rescue Turns out there is pdfgrep, which you might need to install via sudo apt install pdfgrep or similar, depending on your operating system.</description></item><item><title>Testing Argparse Applications - the Better Way</title><link>https://jugmac00.github.io/blog/testing-argparse-applications-the-better-way/</link><pubDate>Tue, 30 Nov 2021 17:07:22 +0100</pubDate><guid>https://jugmac00.github.io/blog/testing-argparse-applications-the-better-way/</guid><description>When you are creating command line applications in Python, you probably heard of argparse, which is a great library for exactly doing this, and it is even included in Python&amp;rsquo;s standard library.
Imagine you have created the following argparse application:
&amp;lt;main.py&amp;gt;
import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument(&amp;#39;--name&amp;#39;, required=True) args = parser.parse_args() print(f&amp;#39;Hello {args.name}&amp;#39;) if __name__ == &amp;#39;__main__&amp;#39;: sys.exit(main()) Looks straightforward, works great, but at one point, you certainly want to add tests for it, right?</description></item><item><title>Combine Coverage for Different Python Versions</title><link>https://jugmac00.github.io/blog/combine-coverage-for-different-python-versions/</link><pubDate>Sun, 21 Nov 2021 15:34:38 +0100</pubDate><guid>https://jugmac00.github.io/blog/combine-coverage-for-different-python-versions/</guid><description>Is it enough to run code coverage for a single Python version?
Probably, but not necessarily.
Especially when you still need to support Python 2.7 (sigh), there could be quite some different code paths for Python 2 and Python 3.
A simple example&amp;hellip;
try: import Queue # Python 2 except ImportError: import queue as Queue # Python 3 But also the different Python 3 versions may require that you not only test your code for each interpreter, but also you need to assess code coverage for the different versions, and certainly you want to make sure you got all paths covered.</description></item><item><title>How to Create an Ubuntu USB Install Medium</title><link>https://jugmac00.github.io/til/how-to-create-an-ubuntu-usb-install-medium/</link><pubDate>Sun, 14 Nov 2021 08:03:30 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-create-an-ubuntu-usb-install-medium/</guid><description>In Germany the corona numbers go through the roof, many school classes are already under quarantine, so there is no more time to waste and I need to setup a laptop for my son.
I still own a 2012 Samsung 900X4D A02DE, which after upgrading RAM and SSD still works decently.
As the laptop has no CD drive, I need to setup a USB stick to install a new operating system.</description></item><item><title>Why Do We Get Different Results From Mypy</title><link>https://jugmac00.github.io/til/why-do-we-get-different-results-from-mypy/</link><pubDate>Fri, 12 Nov 2021 16:12:43 +0100</pubDate><guid>https://jugmac00.github.io/til/why-do-we-get-different-results-from-mypy/</guid><description>My colleague added mypy as a test environment for our tox setup.
When I checked out his branch and ran it on my machine, it failed.
The error does not matter, but fwiw it was about that one upstream package has forgotten to include a py.typed file, a topic which I dedicated a whole blog post.
The interesting part was&amp;hellip; why did it work on his machine, but not on mine?</description></item><item><title>How to Properly Configure Isort and Black</title><link>https://jugmac00.github.io/til/how-to-properly-configure-isort-and-black/</link><pubDate>Wed, 10 Nov 2021 17:32:30 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-properly-configure-isort-and-black/</guid><description>When you both use black and isort, which you probably should, you will notice that they both touch the import statements.
When you now use both tools e.g. via pre-commit, it could happen that both tools play ping-pong with each other, as both tools modify the source code, and then report a failure.
This is especially &amp;ldquo;funny&amp;rdquo;, when both tools report modified source and a failure, but basically at the end you have a git repository with no modifications, as the one tools fixes the other&amp;rsquo;s changes.</description></item><item><title>Bye-Bye python-memcached, hello pymemcache</title><link>https://jugmac00.github.io/blog/bye-bye-python-memcached-hello-pymemcache/</link><pubDate>Tue, 09 Nov 2021 11:40:26 +0100</pubDate><guid>https://jugmac00.github.io/blog/bye-bye-python-memcached-hello-pymemcache/</guid><description>For one app that I help maintaining I noticed that python-memcached was used, which has not been updated in several years.
There were some efforts to transfer python-memcached to a new maintainer, but at the end that did not work out.
So, the project is dead.
While an unmaintained project may currently work, there are several things to consider:
there may be bugs which do not get fixed there may be security issues which do not get fixed it may stop working for e.</description></item><item><title>Migrate a Repository From Bazaar to Git</title><link>https://jugmac00.github.io/blog/migrate-a-repository-from-bazaar-to-git/</link><pubDate>Fri, 05 Nov 2021 00:05:09 +0200</pubDate><guid>https://jugmac00.github.io/blog/migrate-a-repository-from-bazaar-to-git/</guid><description>Bazaar is a distributed version control system (VCS), developed by Canonical.
For a long time, Bazaar was the only supported VCS on Launchpad.
Launchpad is a code hosting platform, similar to the now prevalent GitHub, and while open to the public, nowadays it is mostly used by Canonical itself and many other individuals and companies to manage the whole lifecycle of creating packages for Ubuntu and its distributions.
Since quite some time also git is a supported VCS on Launchpad.</description></item><item><title>How to Add a Menu to the Sidebar With Sphinx</title><link>https://jugmac00.github.io/til/how-to-add-a-menu-to-the-sidebar-with-sphinx/</link><pubDate>Thu, 04 Nov 2021 11:13:10 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-add-a-menu-to-the-sidebar-with-sphinx/</guid><description>Currently I am publishing the documentation on https://readthedocs.org/ for a lot of projects.
I was asked that the menu, which is shown at the bottom of the main page, should be also listed in the sidebar.
You need to know that menus are tocs in the Sphinx world, short for table of content.
initial sitution one long document with code examples (index.rst) menu at the bottom (keyword: toctree), referencing CONTRIBUTING.rst and NEWS.</description></item><item><title>How to Compare Two Directories on Linux</title><link>https://jugmac00.github.io/til/how-to-compare-two-directories-on-linux/</link><pubDate>Wed, 03 Nov 2021 16:24:37 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-compare-two-directories-on-linux/</guid><description>While migrating a couple of Bazaar repositories to git, I experienced some problems with one Bazaar repository, or let&amp;rsquo;s say the exporter did not work properly on one of its commit.
In order to find out what exactly happened, I needed to compare both the tip of the git and the Bazaar repository.
Turns out, diff can not only compare files, but also directories&amp;hellip; recursively!
$ diff -qr bzr/wadllib/ git/wadllib/ Only in bzr/wadllib/: .</description></item><item><title>How to Set a New Git Default Branch Name</title><link>https://jugmac00.github.io/til/how-to-set-a-new-git-default-branch-name/</link><pubDate>Tue, 02 Nov 2021 19:08:34 +0100</pubDate><guid>https://jugmac00.github.io/til/how-to-set-a-new-git-default-branch-name/</guid><description>While GitHub&amp;rsquo;s default branch name for newly-created repositories is main since the end of October 2020, what about when you create a new git repository locally?
first things first git made the default branch name configurable in version 2.28 and higher.
So, when you run e.g. Ubuntu 20.04 like me, you may have an older version installed.
Usually, you can&amp;rsquo;t install a newer version without updating the distribution.
But there is hope, you can install a newer git version via a PPA (personal package archive):</description></item><item><title>How to Quickly Shuffle Some Names</title><link>https://jugmac00.github.io/til/how-to-quickly-shuffle-some-names/</link><pubDate>Tue, 26 Oct 2021 14:47:22 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-quickly-shuffle-some-names/</guid><description>For the daily standup, we have a random order who starts, who follows next, and so on.
How to shuffle a couple of names? Well, obviously, you could fire up a Python repl and use the random library, e.g.
&amp;gt;&amp;gt;&amp;gt; from random import shuffle &amp;gt;&amp;gt;&amp;gt; members = [&amp;#34;Me&amp;#34;, &amp;#34;TeamMate1&amp;#34;, &amp;#34;TeamMate2&amp;#34;, &amp;#34;TeamMate3&amp;#34;, &amp;#34;TeamMate4&amp;#34;] &amp;gt;&amp;gt;&amp;gt; shuffle(members) &amp;gt;&amp;gt;&amp;gt; members [&amp;#39;TeamMate3&amp;#39;, &amp;#39;TeamMate4&amp;#39;, &amp;#39;TeamMate1&amp;#39;, &amp;#39;TeamMate2&amp;#39;, &amp;#39;Me&amp;#39;] While this works, it is a lot of typing, and a lot of quotes :-)</description></item><item><title>How to Debug SSH Issues</title><link>https://jugmac00.github.io/til/how-to-debug-ssh-issues/</link><pubDate>Tue, 05 Oct 2021 15:23:38 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-debug-ssh-issues/</guid><description>In order to set up a development environment for Launchpad, I needed to install and run lxd.
After launching my first container, I wanted to ssh into it, but was not successful.
Basically, now you have two ways to find out what is going on.
Run the ssh command again with -v, so you see more output.
ssh -v user@host The other choice is to go into the container and start the ssh server in debug mode.</description></item><item><title>How to Fix Caching Issues With MoinMoin wiki</title><link>https://jugmac00.github.io/til/how-to-fix-caching-issues-with-moinmoin/</link><pubDate>Tue, 05 Oct 2021 08:00:41 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-fix-caching-issues-with-moinmoin/</guid><description>After making two changes to a MoinMoin powered page, the first change showed up immediately, the second one did not show up at all.
Though the changes were visible both in the edit view, and in the history.
Turns out this was a server-side caching issue which could be solved by choosing &amp;ldquo;More Actions&amp;rdquo; and then &amp;ldquo;Delete Cache&amp;rdquo; from the page&amp;rsquo;s menu.</description></item><item><title>How to Surround Highlighted Text With a Custom Snippet</title><link>https://jugmac00.github.io/til/how-to-surround-highligted-text-with-a-custom-snippet/</link><pubDate>Wed, 11 Aug 2021 13:17:09 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-surround-highligted-text-with-a-custom-snippet/</guid><description>In order to mark strings as &amp;ldquo;translatable&amp;rdquo; in Flask via Flask-WTF, you need to apply a special syntax.
This means, e.g. in a Jinja template a string like Conference has to be transformed into {{ _('Conference') }}.
This is a very tedious work, so I created a shortcut for it.
Add the following lines to your keybindings.json:
&amp;quot;key&amp;quot;: &amp;quot;ctrl+shift+alt+0&amp;quot;, &amp;quot;command&amp;quot;: &amp;quot;editor.action.insertSnippet&amp;quot;, &amp;quot;when&amp;quot;: &amp;quot;editorHasSelection || editorHasMultipleSelections&amp;quot;, &amp;quot;args&amp;quot;: { &amp;quot;snippet&amp;quot;: &amp;quot;{{ _('${TM_SELECTED_TEXT}') }}&amp;quot; } I used &amp;ldquo;ctrl+shift+alt+0&amp;rdquo; as on keyboard with a German layout the closing curly brace is on the same key as the 0.</description></item><item><title>How to Make Subversion Repositories Read Only</title><link>https://jugmac00.github.io/til/how-to-make-subversion-repositories-read-only/</link><pubDate>Thu, 05 Aug 2021 10:25:15 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-make-subversion-repositories-read-only/</guid><description>Finally, at work all other teams gave up Subversion and migrated to git.
The migration went pretty smooth thanks to git svn and a couple of bash scripts, which made sure tags and branches were transferred correctly.
After the migration had been finished, I wanted to shutdown the inherited Subversion server for good - but, I was told to keep it running in read-only mode - for reasons.
Ok, can&amp;rsquo;t be too hard, right?</description></item><item><title>How to Make a Traceback Less Verbose in Jupyter Notebooks</title><link>https://jugmac00.github.io/til/how-to-make-a-traceback-less-verbose-in-jupyter-notebooks/</link><pubDate>Mon, 02 Aug 2021 14:51:04 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-make-a-traceback-less-verbose-in-jupyter-notebooks/</guid><description>For a project I wanted to try out something new - using Jupyter Notebook to document its XML-RPC API, so documentation and specification cannot drift apart.
This worked out great.
Except - as the API also has to handle invalid input, Jupyter Notebook shows - correctly - the traceback.
The traceback is super verbose.
request server.get_licenses(&amp;#34;not-existing-id&amp;#34;) current print out in Jupyter Notebook --------------------------------------------------------------------------- Fault Traceback (most recent call last) &amp;lt;ipython-input-5-366cceb6869e&amp;gt; in &amp;lt;module&amp;gt; ----&amp;gt; 1 server.</description></item><item><title>How to Setup a Cronjob for a Tool Installed via pipx</title><link>https://jugmac00.github.io/til/how-to-setup-a-cronjob-for-a-tool-installed-via-pipx/</link><pubDate>Mon, 02 Aug 2021 10:54:16 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-setup-a-cronjob-for-a-tool-installed-via-pipx/</guid><description>The company I work for finally says good-bye to Subversion, and while migrating to git, we also decided to move to GitHub and no longer host the repositories inhouse.
While I think GitHub should be pretty reliable, data loss still could happen, so I decided we need some backup.
I use all-repos to manage open source repositories on a daily basis. Its all-repos-clone command looks like a great fit to backup the repositories to a local virtual machine.</description></item><item><title>How to Find Out Which Files Changed Most Often in a Git Repository</title><link>https://jugmac00.github.io/til/how-to-find-out-which-files-changed-most-often-in-a-git-repository/</link><pubDate>Sat, 31 Jul 2021 14:34:02 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-find-out-which-files-changed-most-often-in-a-git-repository/</guid><description>I found this helpful command while cleaning up my Desktop - I cannot recall where I got it from :-/
git log --since 6.months.ago --numstat | awk &amp;#39;/^[0-9-]+/{ print $NF}&amp;#39; | sort | uniq -c | sort -nr | head This will list the top 10 most often changed files in your git repository.
Why would you want to know this?
Well, several things come to my mind:
you get a quick overview what was changed in the last couple of months this could indicate problems such as a god class, when a file shows up you did not expect What do you think?</description></item><item><title>GPG - All I Need to Know</title><link>https://jugmac00.github.io/blog/gpg-all-i-need-to-know/</link><pubDate>Thu, 22 Jul 2021 16:40:59 +0200</pubDate><guid>https://jugmac00.github.io/blog/gpg-all-i-need-to-know/</guid><description>While I need to use GPG pretty regularly, I always have to look up the commands - they just don&amp;rsquo;t stick :-)
Over the last couple of months I collected every command I had to use. Enjoy!
create a key gpg --quick-generate-key user-id # or gpg --generate-key # or gpg --full-generate-key delete a private key gpg --delete-secret-keys key-id delete a public key gpg --delete-key key-id encrypt a file gpg --encrypt --recipient someone@example.</description></item><item><title>How to Find the Reverse Dependency of a Package</title><link>https://jugmac00.github.io/til/how-to-find-the-reverse-dependency-of-a-package/</link><pubDate>Wed, 14 Jul 2021 15:59:27 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-find-the-reverse-dependency-of-a-package/</guid><description>Today, there was a nice little discussion on vacdec&amp;rsquo;s GitHub project about what needs to be installed to make the barcode scanner pyzbar work on Ubuntu and MacOS.
The original poster proposed to install zbar on both operating systems.
zbar for Ubuntu comes with a ton of dependencies.
So I had a look at my installed packages&amp;hellip;
❯ apt list --installed | grep zbar libzbar0/bionic,now 0.10+doc-10.1build2 amd64 [installed] &amp;hellip; which only revealed the libzbar0 library.</description></item><item><title>How to Debug Network Issues</title><link>https://jugmac00.github.io/til/how-to-debug-network-issues/</link><pubDate>Tue, 06 Jul 2021 15:05:06 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-debug-network-issues/</guid><description>Unlike I stated earlier today&amp;hellip;
It’s not DNS
There’s no way it’s DNS
It was DNS
&amp;hellip; this time it was not DNS. But let&amp;rsquo;s start from the beginning.
two lonely OpenSUSE virtual machines I inherited two OpenSUSE VMs from a departing colleague.
After changing passwords and cataloging what services are installed, I tried to update the VMs&amp;hellip; and got the following errors&amp;hellip;
# zypper refresh Problem retrieving files from &amp;#39;Haupt-Repository (NON-OSS)&amp;#39;.</description></item><item><title>How to Patch Java 7 Certificate Store to Support Let's Encrypt</title><link>https://jugmac00.github.io/til/how-to-patch-java-7-certificate-store-to-support-lets-encrypt/</link><pubDate>Tue, 06 Jul 2021 09:58:39 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-patch-java-7-certificate-store-to-support-lets-encrypt/</guid><description>Do you have to support a very old Java application?
Old as in only runs on 1.7.0_21-b11?
And this application needs to access websites on servers using Let&amp;rsquo;s Encrypt?
Especially after September 2021, when the widespread DST Root CA X3 certificate will expire?
There is help.
keytool to the rescue Oracle kindly provides keytool.
With keytool you can view and manipulate the contents of the Java certificate store, which usually can be found at /lib/security/cacerts within in your Java runtime.</description></item><item><title>How to Check Configuration for Bind</title><link>https://jugmac00.github.io/til/how-to-check-configuration-for-bind/</link><pubDate>Tue, 06 Jul 2021 07:46:26 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-check-configuration-for-bind/</guid><description>You probably heard of the three steps on how to debug networking issues&amp;hellip;
It&amp;rsquo;s not DNS There&amp;rsquo;s no way it&amp;rsquo;s DNS It was DNS While this is not only funny, but also true, you can do your part to prevent such issues.
When you change the configuration for BIND, you should make sure it is still working.
check bind configuration $ named-checkconf /path/to/named.conf The path depends on your distribution. For Ubuntu 20.</description></item><item><title>How to Generate Quick Git Stats</title><link>https://jugmac00.github.io/til/how-to-generate-quick-git-stats/</link><pubDate>Mon, 21 Jun 2021 14:15:50 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-generate-quick-git-stats/</guid><description>Ever wondered how many lines of code you have added or deleted, within a day or a week?
Here we go&amp;hellip;
❯ git diff --shortstat &amp;#34;@{1 day ago}&amp;#34; 36 files changed, 35 insertions(+), 1263 deletions(-) ❯ git diff --shortstat &amp;#34;@{1 week ago}&amp;#34; 40 files changed, 821 insertions(+), 1270 deletions(-) How do you generate stats from git?
Drop me a line on Twitter or via e-mail.</description></item><item><title>How to Bring Color Back Into tox4 and pytest</title><link>https://jugmac00.github.io/til/how-to-bring-color-back-into-tox-and-pytest/</link><pubDate>Fri, 11 Jun 2021 15:48:12 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-bring-color-back-into-tox-and-pytest/</guid><description>When I first tried the pre-release of the upcoming tox rewrite, I noticed tox itself has funky new colors - which I like a lot&amp;hellip;
But what happened with the green dots for pytest'soutput?
You may recall, running the old tox or pytest directly, the dots would be green&amp;hellip;
why has this changed Honestly, I am not 100% sure.
But I know how to get the colors back.
All you need to do is changing this line commands = pytest {posargs} in your tox.</description></item><item><title>What Is the True Order of Files in a Directory</title><link>https://jugmac00.github.io/til/what-is-the-true-order-of-files-in-a-directory/</link><pubDate>Wed, 09 Jun 2021 21:54:08 +0200</pubDate><guid>https://jugmac00.github.io/til/what-is-the-true-order-of-files-in-a-directory/</guid><description>This week I faced a very odd bug at work.
A build process failed - on one machine, but not on the other.
Identical setup - of course :-/
The build script consists of a bash script, which wraps a call to the C binary.
The bash script was innocent.
When I had a closer look at the C source code, it turned out there were about 30 lines of code, just dealing with traversing directories and copying files and folders.</description></item><item><title>How to Delete Anonymous Docker Volumes on Tear Down</title><link>https://jugmac00.github.io/til/how-to-delete-anonymous-docker-volumes-on-tear-down/</link><pubDate>Fri, 28 May 2021 13:10:08 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-delete-anonymous-docker-volumes-on-tear-down/</guid><description>On one of our servers, there is a demo application installed for our customers.
The application, which consists of two docker images, is managed by a docker-compose.yml file.
As the customers are able to change the data, the containers and the attached volume are torn down every night, and then rebuilt.
Monitoring made me aware, that we are running low on disk space.
Turns out the volumes do not get deleted with the current cronjob:</description></item><item><title>Variable Scope and List Comprehensions</title><link>https://jugmac00.github.io/til/variable-scope-and-list-comprehensions/</link><pubDate>Sat, 22 May 2021 14:02:09 +0200</pubDate><guid>https://jugmac00.github.io/til/variable-scope-and-list-comprehensions/</guid><description>Python 2 In Python 2 the temporary variable was not so temporary at all&amp;hellip;
❯ python2 Python 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0] on linux2 Type &amp;#34;help&amp;#34;, &amp;#34;copyright&amp;#34;, &amp;#34;credits&amp;#34; or &amp;#34;license&amp;#34; for more information. &amp;gt;&amp;gt;&amp;gt; s = &amp;#34;abc&amp;#34; &amp;gt;&amp;gt;&amp;gt; [x for x in s] [&amp;#39;a&amp;#39;, &amp;#39;b&amp;#39;, &amp;#39;c&amp;#39;] &amp;gt;&amp;gt;&amp;gt; x &amp;#39;c&amp;#39; As you can see, x leaks outside the scope the list comprehension.
Python 3 This has been changed in Python 3.</description></item><item><title>Enrich Test Coverage With Contexts</title><link>https://jugmac00.github.io/blog/enrich-test-coverage-with-contexts/</link><pubDate>Thu, 20 May 2021 14:22:51 +0200</pubDate><guid>https://jugmac00.github.io/blog/enrich-test-coverage-with-contexts/</guid><description>Hold on tight, now I expect a lot of us:
We all
test our code use coverage strive for 100% test coverage So, what&amp;rsquo;s missing?
I miss some context 100% test coverage is great, but sometimes we need more information.
e.g. which test covers line XXX?
In sufficiently complex code bases, with mixed unit and integration tests, this is no longer easy to find out.
Sure, you can set a breakpoint and run your tests and wait until the breakpoint has been hit.</description></item><item><title>Hugo and GitHub Pages - Welcome in the Land of Confusion</title><link>https://jugmac00.github.io/blog/hugo-and-github-pages-welcome-in-the-land-of-confusion/</link><pubDate>Wed, 12 May 2021 10:31:30 +0200</pubDate><guid>https://jugmac00.github.io/blog/hugo-and-github-pages-welcome-in-the-land-of-confusion/</guid><description>Yesterday, I migrated my blog to Hugo.
GitHub Pages While the migration was straight forward, I was a bit puzzled with the deployment process to GitHub.
For those who don&amp;rsquo;t know yet, GitHub enables all users to have an own website, called GitHub Pages, with a URL like https://your-user-name.github.io.
Previously I used Lektor. The source code for my site lived in https://github.com/jugmac00/jugmac00.github.io.source, and was deployed by Lektor to https://github.com/jugmac00/jugmac00.github.io.
Easy enough.</description></item><item><title>How to Create an Empty Git Branch</title><link>https://jugmac00.github.io/til/how-to-create-an-empty-git-branch/</link><pubDate>Wed, 12 May 2021 08:05:30 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-create-an-empty-git-branch/</guid><description>What do I mean by an empty branch?
Simply, a branch with no commits.
Why on earth&amp;hellip; Why would one even need an empty branch?
There are not many reasons which come to my mind, but imagine you start a rewrite of an existing project, and you want to start from scratch, but you want to keep the rewrite in the same repository.
For example tox does this:
the current main version is on master the upcoming version 4, which is a complete rewrite, is on the rewrite branch.</description></item><item><title>Bite My Shiny Type Annotated Library</title><link>https://jugmac00.github.io/blog/bite-my-shiny-type-annotated-library/</link><pubDate>Sun, 09 May 2021 15:40:11 +0200</pubDate><guid>https://jugmac00.github.io/blog/bite-my-shiny-type-annotated-library/</guid><description>How do you make type annotations available to the users of your library?
Well, you just type annotate your library, right?
No!
But let&amp;rsquo;s step back for a moment.
Flask 2.0 goes full type annotations This morning I read David Lord&amp;rsquo;s announcement that Flask, Jinja, Click, Werkzeug, MarkupSafe, and ItsDangerous are now fully type annotated, and new releases will be available next week.
Ok, as I typed Flask-Reuploaded almost a year ago, I certainly noticed that Flask was not typed back then, but external type information was provided via typeshed, which I remember lively, as I had to add a missing type annotation for Werkzeug.</description></item><item><title>How Can You Reclaim Some Disk Space From Docker</title><link>https://jugmac00.github.io/til/how-can-you-reclaim-some-disk-space-from-docker/</link><pubDate>Wed, 05 May 2021 22:00:13 +0200</pubDate><guid>https://jugmac00.github.io/til/how-can-you-reclaim-some-disk-space-from-docker/</guid><description>If you use Docker containers, and who doesn&amp;rsquo;t these times, you need to take care that Docker does not accumulate a lot of cruft.
remains of docker run If you start a container via docker run, and without the highly recommended option --rm, the exited Docker container will still leave some remains on your system.
In my case oO&amp;hellip;
❯ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c14c0bd0d850 jetbrains/youtrack:2020.</description></item><item><title>What Is the Meaning of Dollar Dollar in Bash</title><link>https://jugmac00.github.io/til/what-is-the-meaning-of-dollar-dollar-in-bash/</link><pubDate>Fri, 30 Apr 2021 18:58:07 +0200</pubDate><guid>https://jugmac00.github.io/til/what-is-the-meaning-of-dollar-dollar-in-bash/</guid><description>I stumbled upon a colleague&amp;rsquo;s bash script which contained the following line, which in isolation, made not much sense to me.
WRKDIR=~/app/work$$ But after some googling and having a look at the complete scope of the script, I finally got it.
... WRKDIR=~/app/work$$ ... mkdir $WRKDIR ... ... ... ... rmdir $WRKDIR $$ is a reference to the PID (process id) it was used to create a unique temporary file All good?</description></item><item><title>How to Run a Bash Script in a Sane Way</title><link>https://jugmac00.github.io/til/how-to-run-a-bash-script-in-a-sane-way/</link><pubDate>Thu, 29 Apr 2021 18:48:26 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-run-a-bash-script-in-a-sane-way/</guid><description>When you never had problems with running/debugging a bash script, you might wonder what I am talking about.
Instead of introducing the possible problems, and then the way to counter them, let&amp;rsquo;s start with the solution.
All your bash scripts should probably start with&amp;hellip;
#!/usr/bin/env bash &amp;hellip; wait&amp;hellip; it goes on&amp;hellip;
set -euxo pipefail Wat? Ok, let&amp;rsquo;s go through the options, one by one.
set -e This makes a bash script to stop on error immediately, and exit.</description></item><item><title>How to Configure a Webserver to Be Less Secure</title><link>https://jugmac00.github.io/til/how-to-configure-a-webserver-to-be-less-secure/</link><pubDate>Thu, 29 Apr 2021 11:43:48 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-configure-a-webserver-to-be-less-secure/</guid><description>This question sounds odd. Why would you want a less secure web server?
Well, maybe you have to support older clients.
e.g. IE 11 on Windows 8.1 or Java 7 (cough) cannot connect to a web server, which only uses modern and secure ciphers.
From a Java application, which cannot be updated, but has to work, I got the following exception:
Exception in thread &amp;#34;main&amp;#34; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.</description></item><item><title>How to Globally Gitignore Configuration Files</title><link>https://jugmac00.github.io/til/how-to-globally-gitignore-configuration-files/</link><pubDate>Tue, 27 Apr 2021 08:51:48 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-globally-gitignore-configuration-files/</guid><description>Until today, I did not make up my mind about what to do with configuration files, created by e.g. VS Code.
Certainly, I do not want to commit them, but putting it into every&amp;rsquo;s repository .gitignore file is also cumbersome - and sometimes it is not possible.
I always do a git add -u to avoid accidentally adding a venv or similar, so it did not really matter.
Except&amp;hellip;
❯ .</description></item><item><title>How to Test Log Output With zope.testrunner</title><link>https://jugmac00.github.io/til/how-to-test-log-output-with-zope-testrunner/</link><pubDate>Sat, 24 Apr 2021 13:42:58 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-test-log-output-with-zope-testrunner/</guid><description>How to test log output with zope.testrunner? While pytest makes it very easy to work with log files via the caplog fixture, I was not aware how to test them with zope.testrunner, which is used for almost all Zope repositories.
When I asked during yesterday&amp;rsquo;s Zope sprint, I got no answer.
But coincidentally, I stumbled upon a broken doctest which&amp;hellip; tests the log output of a function!
So&amp;hellip; thanks for failing&amp;hellip; I guess :-)</description></item><item><title>How Many Zope Repositories Are Compatible With Pypy?</title><link>https://jugmac00.github.io/til/how-many-zope-repositories-are-compatible-with-pypy/</link><pubDate>Mon, 19 Apr 2021 11:38:06 +0200</pubDate><guid>https://jugmac00.github.io/til/how-many-zope-repositories-are-compatible-with-pypy/</guid><description>Today, Johannes Raggam asked on the Plone/Zope community forum whether Zope is able to run on PyPy.
While I am not entirely sure, and I have some vague memories about potential problems with RestrictedPython, I can certainly grep the almost 300 Zope repositories for signs of PyPy support.
The best sign of PyPy support is IMHO that we run tests for it :-)
In order to grep in all repositories I use all-repos written by Anthony Sottile.</description></item><item><title>How to List All Open Pull Requests for One GitHub Organization</title><link>https://jugmac00.github.io/til/how-to-list-all-open-pull-requests-for-one-github-organization/</link><pubDate>Mon, 19 Apr 2021 09:03:29 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-list-all-open-pull-requests-for-one-github-organization/</guid><description>While most developers probably know, that you can list all your open pull requests on GitHub via https://github.com/pulls, how can you list all open pull requests for one GitHub organization?
I was on holiday for two weeks, and I want to get up to speed which pull requests need to be reviewed in my company&amp;hellip;
Luckily, there is no need to do a complicate query or work with GitHub&amp;rsquo;s GraphQL API&amp;hellip;</description></item><item><title>How to Capitalize Headings</title><link>https://jugmac00.github.io/til/how-to-capitalize-headings/</link><pubDate>Sat, 17 Apr 2021 11:23:37 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-capitalize-headings/</guid><description>Especially in English texts&amp;hellip;
I am no native English speaker, and there are so many subtleties in the English language, so when I was about to prepare my lightning talk submissions for both PyOhio and PyCon US, I was super happy that my friend Miroslav Šedivý sent me the following link:
https://capitalizemytitle.com/
At this site you can just paste your heading&amp;rsquo;s text, and you receive it properly capitalized, even in different styles, e.</description></item><item><title>How to Replace an URL in All Repositories</title><link>https://jugmac00.github.io/til/how-to-replace-url-in-all-repositories/</link><pubDate>Tue, 06 Apr 2021 11:22:11 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-replace-url-in-all-repositories/</guid><description>Recently Anthony Sottile, one of the maintainers of Flake8, announced on Twitter that the source code repository of Flake8 was moved from GitLab to GitHub.
Those of us, who also use Anthony&amp;rsquo;s pre-commit, now should update their .pre-commit-config.yaml file.
Though there is no hurry, as the repository on GitLab will stay as a mirror.
For one of my repos the .pre-config-config.yaml looks like this:
repos: ... - repo: https://gitlab.com/pycqa/flake8 rev: 3.</description></item><item><title>How to Restrict All Repos Grep to Specific Files</title><link>https://jugmac00.github.io/til/how-to-restrict-all-repos-grep-to-specific-files/</link><pubDate>Mon, 29 Mar 2021 18:42:46 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-restrict-all-repos-grep-to-specific-files/</guid><description>Back at the end of 2020, when Travis announced you need to move your open source projects from https://travis-ci.org to https://travis-ci.com, I wanted to know in which README files I used the link to the org-site - of the many, many repositories I manage.
That is a textbook example what you can do with all-repos.
A naive way would be to grep in all repositories like &amp;hellip;
all-repos-grep travis-ci.org Instead of grepping in all files, it is a better idea to restrict the search to only README files.</description></item><item><title>How to Avoid Vscode From Causing High Cpu Load When You Have Directories With Many Files</title><link>https://jugmac00.github.io/til/how-to-avoid-vscode-from-causing-high-cpu-load-when-you-have-directories-with-many-files/</link><pubDate>Fri, 26 Mar 2021 13:07:25 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-avoid-vscode-from-causing-high-cpu-load-when-you-have-directories-with-many-files/</guid><description>Once I opened this one project, CPU load went through the roof and just did not stop.
There is not much source code in the repository, but a lot of build artifacts get generated by it.
I am using VS Code now for quite a while, and especially for this one repository, and I never noticed problems, until recently.
As most of the time extensions are the cause for problems, the VS Code team even provides a kind of bisecting mechanism to help find faulty plugins.</description></item><item><title>How to Find Duplicate Words</title><link>https://jugmac00.github.io/til/how-to-find-duplicate-words/</link><pubDate>Wed, 24 Mar 2021 11:05:58 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-find-duplicate-words/</guid><description>When contributing to a new open source project, from time to time I searched the codebase for occurrences of the the.
This is a common mistake in comments in English codebases.
My friend Miroslav came up with an even better way:
Use a regex to find duplicate words!
rg --pcre2 &amp;#34;\b(\w+)\s+\1\b&amp;#34; rg stands for ripgrep, which is a blazing fast implementation of a regex command line tool, written in Rust.</description></item><item><title>How to Fix a Broken Rollback on Nixos, caused by mixed Python Environments</title><link>https://jugmac00.github.io/til/how-to-fix-broken-rollback-on-nixos/</link><pubDate>Tue, 23 Mar 2021 19:14:44 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-fix-broken-rollback-on-nixos/</guid><description>Today I tried to update a Nixos channel to 20.09.xxx, but the virtual machine was still running on 15.09, and seemingly the nix-version was pinned.
I got an error saying something like the nix version is too low.
I then tried to do a rollback, but then I got another following error:
ERROR: ./batou --help Return code: 1 STDOUT Running unclean installation from requirements.txt Ensuring unclean install ... .batou/unclean/bin/python -m pip install -r requirements.</description></item><item><title>How to Find All Repositories in a GitHub Organization Which Do Not Follow the Src Layout?</title><link>https://jugmac00.github.io/til/how-to-find-all-repositories-which-do-not-follow-src-layout/</link><pubDate>Fri, 05 Mar 2021 10:49:56 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-find-all-repositories-which-do-not-follow-src-layout/</guid><description>Let&amp;rsquo;s say, while not everybody is convinced, that the so-called src layout is a great idea, at least it is a trend in the Python eco system.
And, e.g. Hynek has written about good reasons to use the src layout.
While my personal and work repositories (mostly) follow the src layout, what about the almost 300 Zope repositories?
all-repos to the rescue I really love to play with all-repos, an awesome tool to manage and manipulate a large amount of git repositories.</description></item><item><title>Testing the tox 4 Pre-Release at Scale</title><link>https://jugmac00.github.io/blog/testing-the-tox-4-pre-release-at-scale/</link><pubDate>Mon, 01 Mar 2021 15:31:06 +0200</pubDate><guid>https://jugmac00.github.io/blog/testing-the-tox-4-pre-release-at-scale/</guid><description>Every once in a while, you may read that one of your favorite used packages announces a new version.
Sometimes even a so-called alpha version is announced.
The maintainers then politely ask you, the user, to test the package, and give feedback if anything is broken.
When the upcoming pytest version 6 had been announced, I wrote a short instruction on how to install pre-releases.
This time, tox, the virtualenv management and test tool, announced a new version 4, but it is not just a new version, it is a complete rewrite by Bernát Gábor!</description></item><item><title>How to Restrict All Repos to One Github Organization</title><link>https://jugmac00.github.io/til/how-to-restrict-all-repos-to-one-github-organization/</link><pubDate>Thu, 25 Feb 2021 16:36:50 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-restrict-all-repos-to-one-github-organization/</guid><description>Especially, when maintaining many, many git repositories at once, Anthony Sottile&amp;rsquo;s all-repos is a bliss.
You can easily grep for text or find files in, or even apply patches to hundreds or thousands of repositories at once, which I already described in a blog post.
all-repos has a configuration option, which allows you to clone and manage all of your GitHub repositories at once.
Mine looks like&amp;hellip;
{ &amp;#34;output_dir&amp;#34;: &amp;#34;output&amp;#34;, &amp;#34;source&amp;#34;: &amp;#34;all_repos.</description></item><item><title>How to Check the Expiry Date of an SSL/TLS Certificate</title><link>https://jugmac00.github.io/til/how-to-check-the-expiry-date-of-ssl-certificate/</link><pubDate>Mon, 22 Feb 2021 11:37:24 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-check-the-expiry-date-of-ssl-certificate/</guid><description>For a couple of years now, I use the fantastic (and free*) service by Let&amp;rsquo;s Encrypt in order to generate SSL/TLS certificates.
One of the main differences to paid certs is that the ones of Let&amp;rsquo;s Encrypt are only valid 90 days.
This sounds bad at first, but actually this is a good thing from a security perspective, and anyway, you do not create / renew certs manually, but one of the many clients do this for you automatically.</description></item><item><title>How to Update All Installed Rust Packages</title><link>https://jugmac00.github.io/til/how-to-update-all-installed-rust-packages/</link><pubDate>Mon, 22 Feb 2021 11:10:14 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-update-all-installed-rust-packages/</guid><description>Rust is not only known for its memory safety, but also for being (almost) on par with C, speed-wise.
In the last couple of years quite some interesting tools were created, which may replace common Linux command line tools, e.g. bat instead of cat, ripgrep instead of grep, &amp;hellip;
I installed a handful of them via cargo, Rust&amp;rsquo;s package manager.
I can list all packages with cargo install --list &amp;hellip;</description></item><item><title>What Is the Difference Between Transaction Abort and Transaction Doom</title><link>https://jugmac00.github.io/til/what-is-the-difference-between-transaction-abort-and-transaction-doom/</link><pubDate>Mon, 15 Feb 2021 13:59:42 +0200</pubDate><guid>https://jugmac00.github.io/til/what-is-the-difference-between-transaction-abort-and-transaction-doom/</guid><description>Zope is using the transaction package to manage - you guess - transactions.
More specifically, a transaction starts when Zope receives a request, and the transaction succeeds when the action triggered by the request works out.
When the action causes an exception, the transaction will be rolled back.
This means, usually you very rarely have to interfere with the transaction management manually.
Last week I was implementing a new XML-RPC API, which basically looks like the following code:</description></item><item><title>How to Count Number of Selected Lines in Vscode</title><link>https://jugmac00.github.io/til/how-to-count-number-of-selected-lines-in-vscode/</link><pubDate>Fri, 29 Jan 2021 13:10:48 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-count-number-of-selected-lines-in-vscode/</guid><description>Today I wrote a CSV export with many, many columns, where in my Python code each column was calculated on a single line.
So, in order to get the number of columns, I selected all related lines and in the status bar I saw the number of all selected chars! wat?
solutions After some searching on Google and StackOverflow I came to the conclusion&amp;hellip;
Either
a) you have to install an outdated plugin</description></item><item><title>How Can You Convert an Adobe Illustrator File (AI) to an Encapsulated Postscript File (eps)</title><link>https://jugmac00.github.io/til/how-can-you-convert-an-adobe-illustrator-file-to-an-encapsulated-postscript-file/</link><pubDate>Tue, 19 Jan 2021 22:23:23 +0200</pubDate><guid>https://jugmac00.github.io/til/how-can-you-convert-an-adobe-illustrator-file-to-an-encapsulated-postscript-file/</guid><description>One of my web applications is using RML to render PDFs.
For one PDF document template I received a new logo file which was produced with Adobe Illustrator (file extension .ai).
The RML library cannot handle ai-files, but eps-files.
In order to convert the file I used Ghostscript as following:
gs -dNOPAUSE -dBATCH -sDEVICE=eps2write -sOutputFile=out.eps input.ai where
-dNOPAUSE means &amp;ldquo;no pause after page&amp;rdquo; -dBATCH means &amp;ldquo;exit after last file&amp;rdquo; -sDEVICE selects the device -sOutputFile is the name of the - you can guess it - output file P.</description></item><item><title>Which Image Formats Are Supported by ReportLab's PDF Library</title><link>https://jugmac00.github.io/til/which-image-formats-are-supported-by-reportlabs-pdf-library/</link><pubDate>Tue, 19 Jan 2021 11:00:45 +0200</pubDate><guid>https://jugmac00.github.io/til/which-image-formats-are-supported-by-reportlabs-pdf-library/</guid><description>ReportLab is an open source library for generating PDFs, written in Python.
While ReportLab is absolutely battle tested, even Wikipedia uses it for PDF generation, documentation lacks a bit.
I could not find a reliable source for supported image formats.
Also, there is both an open source and a commercial license for ReportLab, with different feature sets. The latter one is supposed to be able to treat PDFs as image files, which then can be embedded.</description></item><item><title>How to Install a Python Package Directly From a Git Branch From GitHub</title><link>https://jugmac00.github.io/til/how-to-install-a-python-package-directly-from-a-git-branch-from-github/</link><pubDate>Mon, 11 Jan 2021 08:55:54 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-install-a-python-package-directly-from-a-git-branch-from-github/</guid><description>Bernát Gábor is currently working on a complete rewrite for tox.
I alpha-tested the latest release (4.0.0a2), and reported a couple of problems.
Within a day Bernát published some fixes on the rewrite branch, and asked me to test it.
That means there is no new package on PyPI, yet.
So, I had to install tox directly from GitHub, to be exact, from the rewrite branch:
pip install git+https://github.com/tox-dev/tox@rewrite or more general</description></item><item><title>How to Check Support Status for Installed Packages</title><link>https://jugmac00.github.io/til/how-to-check-support-status-for-installed-packages/</link><pubDate>Fri, 04 Dec 2020 12:00:13 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-check-support-status-for-installed-packages/</guid><description>When you install a package from the package repository on Ubuntu LTS, the package will be maintained for 5 years, right?
No!
At least, not necessarily.
Basically, you need to understand that there are different repository types for Ubuntu:
type maintained by canonical floss guaranteed support in years main yes yes 5 restricted yes no ? universe no yes ? multiverse no no ? (There are more than those listed (e.</description></item><item><title>What Is the Difference Between Invoking `pytest` and `python -m pytest`</title><link>https://jugmac00.github.io/til/what-is-the-difference-between-invoking-pytest-and-python-m-pytest/</link><pubDate>Thu, 03 Dec 2020 09:16:51 +0200</pubDate><guid>https://jugmac00.github.io/til/what-is-the-difference-between-invoking-pytest-and-python-m-pytest/</guid><description>Yesterday, I was recommended to have a look at Shopyo - Open inventory management and Point of sales.
As I am passionate about testing and CI, I always have a look at configuration files for newly discovered projects.
After I cloned the repository, I tried to run the tests.
So, without having a look into the documentation ( :-/ ), I
created a virtual env installed the dependencies ran pytest from the root of the project &amp;hellip; and got a ModuleNotFoundError The friendly maintainers of the projects pointed me in the right direction on how to run tests for this project:</description></item><item><title>How to Delete Complete Lines With Search Replace</title><link>https://jugmac00.github.io/til/how-to-delete-complete-lines-with-search-replace/</link><pubDate>Wed, 18 Nov 2020 13:21:11 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-delete-complete-lines-with-search-replace/</guid><description>For many years now, I had been using Jetbrain&amp;rsquo;s IntelliJ Idea Ultimate happily also for my Python development.
Due to &amp;ldquo;legacy issues&amp;rdquo;, I had to apply many # noinspection annotations to my source code.
Now, that I switched to VS Code, I want to get rid of actually 821 # noinspection annotations :-)
A simple search for # noinspection.* and a replacement with basically nothing would work, but that would leave behind many blank lines.</description></item><item><title>How to Configure Git for Testing</title><link>https://jugmac00.github.io/til/how-to-configure-git-for-testing/</link><pubDate>Mon, 16 Nov 2020 07:01:19 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-configure-git-for-testing/</guid><description>batou is a configuration management and deployment tool, comparable to Ansible.
With batou you can deploy applications, also from git repositories.
For this batou uses the git binary - so this has to be tested somehow.
One test looks like this&amp;hellip;
def test_git_remote_init_pull(tmpdir): source = tmpdir.mkdir(&amp;#34;source&amp;#34;) dest = tmpdir.mkdir(&amp;#34;dest&amp;#34;) with source.as_cwd(): remote_core.cmd(&amp;#34;git init&amp;#34;) source.join(&amp;#34;foo.txt&amp;#34;).write(&amp;#34;bar&amp;#34;) remote_core.cmd(&amp;#34;git add foo.txt&amp;#34;) remote_core.cmd(&amp;#34;git commit -m bar&amp;#34;) remote_core.ensure_repository(str(dest), &amp;#34;git-bundle&amp;#34;) remote_core.git_pull_code(str(source), &amp;#34;master&amp;#34;) remote_core.git_update_working_copy(&amp;#34;master&amp;#34;) assert &amp;#34;bar&amp;#34; == dest.join(&amp;#34;foo.txt&amp;#34;).read() &amp;hellip; and worked in some environments, even on Travis, but failed on my Ubuntu box, and later also on GH Actions:</description></item><item><title>How to Group Data Easily With SimpleNamespace</title><link>https://jugmac00.github.io/til/how-to-group-data-easily-with-simplenamespace/</link><pubDate>Fri, 13 Nov 2020 09:24:27 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-group-data-easily-with-simplenamespace/</guid><description>While you could use the usual suspects, like a dictionary, a NamedTuple, a dataclass, or even an &amp;ldquo;empty&amp;rdquo; class, there is yet another way: SimpleNamespace.
&amp;gt;&amp;gt;&amp;gt; from types import SimpleNamespace &amp;gt;&amp;gt;&amp;gt; simple_ns = SimpleNamespace(a=1, b=&amp;#34;two&amp;#34;) &amp;gt;&amp;gt;&amp;gt; simple_ns namespace(a=1, b=&amp;#39;two&amp;#39;) &amp;gt;&amp;gt;&amp;gt; simple_ns.a 1 &amp;gt;&amp;gt;&amp;gt; simple_ns.b &amp;#39;two&amp;#39; &amp;gt;&amp;gt;&amp;gt; implementation This builtin is implemented in C, but the Python docs show how it would look like in Python:
class SimpleNamespace: def __init__(self, /, **kwargs): self.</description></item><item><title>Convincing an Enterprisy App to Work Behind nginx as Reverse Proxy</title><link>https://jugmac00.github.io/blog/convincing-an-enterprisy-app-to-work-behind-nginx-as-reverse-proxy/</link><pubDate>Fri, 30 Oct 2020 15:26:14 +0200</pubDate><guid>https://jugmac00.github.io/blog/convincing-an-enterprisy-app-to-work-behind-nginx-as-reverse-proxy/</guid><description>For simplicity, let&amp;rsquo;s the call the app Dated HR, a tool to &amp;ldquo;Simplify your HR work&amp;rdquo;, which offers support for time tracking, holiday, payroll&amp;hellip;
So far so good, and even better, as it is an enterprisy Windows software, which needs to be configured with IIS and a MSSQL database, a colleague of mine installed it on an internal Windows server.
The app makes a web GUI available under http://nemesis.company.local, which would work like a charm - for our colleagues at site, but not for the colleagues from the other sites.</description></item><item><title>How to Fix Broken Tests on Travis for PyPy</title><link>https://jugmac00.github.io/til/how-to-fix-broken-tests-on-travis-for-pypy/</link><pubDate>Fri, 30 Oct 2020 11:57:42 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-fix-broken-tests-on-travis-for-pypy/</guid><description>The xenial build of pypy on Travis CI links against OpenSSL 1.0.2, which causes pip install cryptography to fail with
RuntimeError: You are linking against OpenSSL 1.0.2, which is no longer supported by the OpenSSL project. To use this version of cryptography you need to upgrade to a newer version of OpenSSL. For this version only you can also set the environment variable CRYPTOGRAPHY_ALLOW_OPENSSL_102 to allow OpenSSL 1.0.2. Marius found the solution, see https://github.</description></item><item><title>What Is the Difference Between Docker Create, Docker Start and Docker Run</title><link>https://jugmac00.github.io/til/what-is-the-difference-between-docker-create-docker-start-and-docker-run/</link><pubDate>Thu, 29 Oct 2020 21:56:22 +0200</pubDate><guid>https://jugmac00.github.io/til/what-is-the-difference-between-docker-create-docker-start-and-docker-run/</guid><description>In order to be able to answer this question, you have to know that there are
Docker images Docker containers Docker images are blueprints or templates.
Docker containers are the instances, created from the images.
docker create creates a container from an image
docker start starts a container
docker run creates a container and starts it
note Trying to use the run command twice results in something like&amp;hellip;
docker: Error response from daemon: Conflict.</description></item><item><title>How to Run a Dockerized Service via systemd</title><link>https://jugmac00.github.io/blog/how-to-run-a-dockerized-service-via-systemd/</link><pubDate>Thu, 29 Oct 2020 15:18:40 +0200</pubDate><guid>https://jugmac00.github.io/blog/how-to-run-a-dockerized-service-via-systemd/</guid><description>Until recently, I saw no good reason to use Docker, as my deployment tool of choice produces approximately identical builds, locally on my Ubuntu laptop, on staging and on production.
But time does not stand still and especially as I have to deploy a Java application, it was time to rethink my strategy, as I do not want to play the which Java runtime environment plays nicely together with which app version game.</description></item><item><title>How to Create Hundreds of Pull Requests With a Single Command</title><link>https://jugmac00.github.io/blog/how-to-create-hundreds-of-pull-requests-with-a-single-command/</link><pubDate>Wed, 28 Oct 2020 15:02:44 +0200</pubDate><guid>https://jugmac00.github.io/blog/how-to-create-hundreds-of-pull-requests-with-a-single-command/</guid><description>.. or &amp;ldquo;How to win #hacktoberfest&amp;rdquo;?
Seriously&amp;hellip;
#hacktoberfest is no longer cool ( Hacktoberfest is Hurting Open Source ) you cannot win it anyway the mass pull requests I created (see below) went all to repositories, which do not take part at #hacktoberfest note If you are not interested in the story behind, I also created a concise &amp;ldquo;today-I-learned&amp;rdquo; post.
prologue The company I work for has been using Zope, the grand-daddy of Python web application servers, for more than 15 years.</description></item><item><title>How to Update All Zope Repositories at Once</title><link>https://jugmac00.github.io/til/how-to-update-all-zope-repositories-at-once/</link><pubDate>Wed, 28 Oct 2020 13:46:51 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-update-all-zope-repositories-at-once/</guid><description>Most or even all zopefoundation repositories use Travis for CI (As of May 2021, this is no longer true: we use GitHub Actions now).
While Travis offered Python 3.9 as a dev version (3.9-dev) for quite some time, support for 3.9 final took a while.
That&amp;rsquo;s why we decided to run Travis with Python 3.9-dev.
Meanwhile Travis finally offers support for Python 3.9 final, so we have to update all repositories, which would be super tedious by hand.</description></item><item><title>How to Access via WebDav</title><link>https://jugmac00.github.io/til/how-to-access-via-webdav/</link><pubDate>Fri, 09 Oct 2020 13:26:36 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-access-via-webdav/</guid><description>WebDav is a protocol, based on top of HTTP, that allows clients remote content authoring, such as creating, editing and deleting content.
The protocol itself is pretty old, dating back to the late 90ies.
While not really popular, even modern systems like NextCloud, OwnCloud, and also the widely-used NAS systems by Synology do support this standard - and also Zope!
How to activate WebDav support in Zope? The WebDav support in Zope had been temporarily removed, as Zope switched from the legacy ZServer to the standard WSGI approach, and WebDav was coupled to the ZServer, for no obvious reasons.</description></item><item><title>How to Develop Dependencies With Buildout</title><link>https://jugmac00.github.io/til/how-to-develop-dependencies-with-buildout/</link><pubDate>Mon, 05 Oct 2020 13:33:57 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-develop-dependencies-with-buildout/</guid><description>Given you have a decent sized project, with some dependencies&amp;hellip;
How can you develop and test a dependency against your main project, when it is not yet published on PyPi?
Well, until recently, I relied on a strong test suite and mostly developed &amp;ldquo;blindly&amp;rdquo;.
When I wanted to see the result, I used Vim to directly edit the dependency in my virtual env.
There must be a better way And actually, there is and has been for more than a decade.</description></item><item><title>How to Setup Zope in Dev Mode</title><link>https://jugmac00.github.io/til/how-to-setup-zope-in-dev-mode/</link><pubDate>Tue, 29 Sep 2020 13:40:28 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-setup-zope-in-dev-mode/</guid><description>How to setup Zope in development mode? git clone git@github.com:zopefoundation/Zope.git cd Zope python3.8 -m venv .venv . .venv/bin/activate pip install -U pip pip install -e .[wsgi] -c https://zopefoundation.github.io/Zope/releases/master/constraints.txt &amp;hellip; where
-e means editable, ie. developer mode the dot in .[wsgi] means here (similar to cd .. in bash) and [wsgi] means install the wsgi extras, which turns out to be Paste -c adds a constraints file, ie the versions of dependencies get pinned there After the installation, you need to configure Zope before you can run it, cf https://zope.</description></item><item><title>How to Run a Single Test</title><link>https://jugmac00.github.io/til/how-to-run-a-single-test/</link><pubDate>Mon, 28 Sep 2020 13:37:16 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-run-a-single-test/</guid><description>While this seems to be no Zope specific question, as we all know how to narrow down the test selection with pytest (e.g. pytest -k pattern), Zope does not use pytest, but zope.testrunner.
Similar to pytest, also zope.testrunner offers some command line options, see https://zopetestrunner.readthedocs.io/en/latest/getting-started.html#some-useful-command-line-options-to-get-you-started
This means, in order to run a specific test, you can use the -t flag, which takes one or more regex expressions as input, e.g. -t some_test.</description></item><item><title>How to Use the Output of One Bash Command as the Argument of Another</title><link>https://jugmac00.github.io/til/how-to-use-the-output-of-one-bash-command-as-the-argument-of-another/</link><pubDate>Mon, 07 Sep 2020 18:52:25 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-use-the-output-of-one-bash-command-as-the-argument-of-another/</guid><description>TIL my TIL is not secure There is a security issue with the following description - at least when you handle sensitive data.
see here https://github.com/jugmac00/til/commit/7ea93202cecf97070c8931bbe5a1f64c78d41dcb#commitcomment-42050997
Thanks to Anthony Sottile for reporting!
Please see https://unix.stackexchange.com/questions/205180/how-to-pass-password-to-mysql-command-line for a better way to create a login one-liner.
How do you use the output of one bash command as an argument of another command? For the virtual machines at my web hosting company, the mysql root password is stored in a config file.</description></item><item><title>How Long Does Flask Keep User Generated Data</title><link>https://jugmac00.github.io/til/how-long-does-flask-keep-user-generated-data/</link><pubDate>Fri, 04 Sep 2020 22:06:32 +0200</pubDate><guid>https://jugmac00.github.io/til/how-long-does-flask-keep-user-generated-data/</guid><description>Easy!
Either Flask persists the data into a database or a file, or it does not.
Wait, not so fast. There is also
session scoped data (e.g. storing data in a cookie or similar) app scoped data (e.g. store data on the app object) The caveats
session scoped data is only available for one client, and as long the session lasts app scoped data is only available within a single app - usually, e.</description></item><item><title>How to Sort Files and Folders in Nautilus So Folders Are Shown First</title><link>https://jugmac00.github.io/til/how-to-sort-files-and-folders-in-nautilus-so-folders-are-shown-first/</link><pubDate>Tue, 25 Aug 2020 09:07:30 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-sort-files-and-folders-in-nautilus-so-folders-are-shown-first/</guid><description>update settings gsettings set org.gtk.Settings.FileChooser sort-directories-first true check settings gsettings get org.gtk.Settings.FileChooser sort-directories-first via https://askubuntu.com/questions/1064482/</description></item><item><title>How Can You Translate the Login Message of Flask-Login</title><link>https://jugmac00.github.io/til/how-can-you-translate-the-login-message-of-flask-login/</link><pubDate>Fri, 14 Aug 2020 22:19:22 +0200</pubDate><guid>https://jugmac00.github.io/til/how-can-you-translate-the-login-message-of-flask-login/</guid><description>When you use Flask-Login, the default login message comes from the plugin.
This means - you do no set it, you cannot translate it.
solution Set the very same (or a different) message!
login = LoginManager(app) login.login_view = &amp;#39;login&amp;#39; login.login_message = _l(&amp;#39;Please log in to access this page.&amp;#39;) via https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xiii-i18n-and-l10n</description></item><item><title>How Can You Inject the Language as String Into a Jinja Template</title><link>https://jugmac00.github.io/til/how-can-you-inject-the-language-as-string-into-a-jinja-template/</link><pubDate>Thu, 13 Aug 2020 22:15:25 +0200</pubDate><guid>https://jugmac00.github.io/til/how-can-you-inject-the-language-as-string-into-a-jinja-template/</guid><description>I created a multilingual project using Flask with the help of Flask-Babel.
While the translation mechanism via GNU gettext itself is pretty straightforward, I did not know how to inject the actual language into the Jinja template, so I can use it to set &amp;lt;html lang=&amp;quot;xxx&amp;quot;&amp;gt;.
While it is odd that this is not mentioned in the documentation, once again StackOverflow offered solutions.
solution one Just translate the language!
&amp;lt;html lang=&amp;#34;{{ _(&amp;#39;en&amp;#39;) }}&amp;#34;&amp;gt; That was too simple to think of :-)</description></item><item><title>How to View Log Entries Using Systemd</title><link>https://jugmac00.github.io/til/how-to-view-log-entries-using-systemd/</link><pubDate>Mon, 10 Aug 2020 11:54:07 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-view-log-entries-using-systemd/</guid><description>Until very recently I was lucky enough to have real log files, but now I have to use systemd&amp;rsquo;s way to view logs.
show all log entries journalctl show nginx&amp;rsquo; log entries journalctl -u nginx directly jump to the latest entries journalctl -e -u nginx</description></item><item><title>How to Remove a File From a Git Repository but Keep It Locally</title><link>https://jugmac00.github.io/til/how-to-remove-a-file-from-a-git-repository-but-keep-it-locally/</link><pubDate>Mon, 10 Aug 2020 09:00:14 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-remove-a-file-from-a-git-repository-but-keep-it-locally/</guid><description>For a video project, I have a video folder with videos and subtitle files.
Obviously, I do not want to have hundreds of megabytes in my git repository, so I git ignored them - but I committed the subtitles.
Now, the videos and the subtitles will be served by nginx from a media directory, outside of the project.
In order to delete the subtitles from the git repository, but keep them locally, I have to&amp;hellip;</description></item><item><title>How to Fix an Old Git Commit</title><link>https://jugmac00.github.io/til/how-to-fix-an-old-git-commit/</link><pubDate>Mon, 10 Aug 2020 08:03:11 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-fix-an-old-git-commit/</guid><description>&amp;hellip; which you do not have pushed to a remote repository.
git add &amp;lt;my fixed files&amp;gt; git commit --fixup=OLDCOMMIT git rebase --interactive --autosquash OLDCOMMIT^ via https://twitter.com/nnja/status/796876898005417984?s=03 via https://stackoverflow.com/questions/2719579/how-to-add-a-changed-file-to-an-older-not-last-commit-in-git/27721031#27721031</description></item><item><title>Why Is Setuptools a Runtime Dependency</title><link>https://jugmac00.github.io/til/why-is-setuptools-a-runtime-dependency/</link><pubDate>Thu, 23 Jul 2020 14:03:32 +0200</pubDate><guid>https://jugmac00.github.io/til/why-is-setuptools-a-runtime-dependency/</guid><description>&amp;hellip; or in other words&amp;hellip;
Why is this snippet part of setup.py in all Zope projects?
install_requires = &amp;#39;setuptools&amp;#39;, This sounds weird at first, but there is good reason.
setuptools provides pkg_resources, and the latter is used in __init__.py, in order to declare a namespace package.
__import__(&amp;#39;pkg_resources&amp;#39;).declare_namespace(__name__) Still confused?
While pkg_resources-style namespace packages are no longer recommended for new projects, this approach was used to split large packages, and retrieve the contents from more than one location.</description></item><item><title>How to Audit and Harden an SSH Client</title><link>https://jugmac00.github.io/til/how-to-audit-and-harden-an-ssh-client/</link><pubDate>Wed, 22 Jul 2020 11:30:28 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-audit-and-harden-an-ssh-client/</guid><description>You probably know how to harden an SSH server, or at least heard of it.
e.g. do not offer weak ciphers, or do not allow root login&amp;hellip;
But did you know you can and also should harden your SSH client?
step 1 - auditing your SSH client terminal 1 git clone https://github.com/jtesta/ssh-audit cd ssh-audit python3.8 ssh-audit.py -c # c = client audit; this starts a ssh server on port 2222 terminal 2 ssh localhost -p 2222 Now, switch back to terminal 1 and have a look at the output - it all should be green - but it won&amp;rsquo;t.</description></item><item><title>How to Find Nginx Config File on a Nixos Vm</title><link>https://jugmac00.github.io/til/how-to-find-nginx-config-file-on-a-nixos-vm/</link><pubDate>Wed, 15 Jul 2020 09:09:41 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-find-nginx-config-file-on-a-nixos-vm/</guid><description>Nixos&amp;hellip; hm, a dream for my web hosting company, but a nightmare as a casual user :-D
Compared to other Linux distributions, there are so many differences.
For a start&amp;hellip; where the heck is my nginx.conf? Hint - it is not in /etc/nginx/nginx.conf
systemctl cat nginx ... X-CheckConfigCmd=/nix/store/xxx-nginx-1.14.2/bin/nginx -t -c /nix/store/xxx-nginx.conf -p /var/spool/nginx X-ConfigFile=/nix/store/xxx-nginx.conf In order to show the configuration, FlyingCircus (my hosting company) created a custom command
nginx-show-config | less .</description></item><item><title>How to Access Name Based Servers in Development Setup</title><link>https://jugmac00.github.io/til/how-to-access-name-based-servers-in-development-setup/</link><pubDate>Mon, 13 Jul 2020 19:19:18 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-access-name-based-servers-in-development-setup/</guid><description>The problem You run a web application via nginx and you dispatch the requests based on the server name.
And maybe the server name header only gets set via a proxy or an URL, which is currently or permanent not available in your dev setup.
The solution curl -- header &amp;#34;Host: example.com&amp;#34; http://localhost Further information Blog post by the maintainer of curl:
https://daniel.haxx.se/blog/2018/04/05/curl-another-host/</description></item><item><title>How to List Packages Which Can Be Upgraded</title><link>https://jugmac00.github.io/til/how-to-list-packages-which-can-be-upgraded/</link><pubDate>Mon, 13 Jul 2020 13:04:41 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-list-packages-which-can-be-upgraded/</guid><description>Have you ever logged into your Ubuntu machine and you get greeted with xxx packages can be updated?
Do you want to know which packages can be updated before running apt upgrade?
This is for you (and me):
apt list --upgradable</description></item><item><title>How to Install Release Candidates</title><link>https://jugmac00.github.io/til/how-to-install-release-candidates/</link><pubDate>Fri, 10 Jul 2020 09:29:55 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-install-release-candidates/</guid><description>How to install release candidates Today on Twitter, one of the core maintainers of pytest announced the release of pytest 6.0.0rc1, and also asked to install and run it, and report if there are any problems. https://twitter.com/nicoddemus/status/1281385522422784005
Ok, but how do you install a release candidate?
If you just do a pip install pytest, the current latest release gets installed, which is 5.4.3 as the time of writing.
Turns out, there are a couple of options&amp;hellip;</description></item><item><title>Flask Reuploaded</title><link>https://jugmac00.github.io/blog/flask-reuploaded/</link><pubDate>Sun, 28 Jun 2020 14:27:13 +0200</pubDate><guid>https://jugmac00.github.io/blog/flask-reuploaded/</guid><description>It all started with this error message:
File &amp;#34;/Projects/xxx/venv/lib/python3.7/site-packages/flask_uploads.py&amp;#34;, line 26, in &amp;lt;module&amp;gt; from werkzeug import secure_filename, FileStorage ImportError: cannot import name &amp;#39;secure_filename&amp;#39; from &amp;#39;werkzeug&amp;#39;&amp;#39; Trying to build my Flask application, the above error message was generated, as Werkzeug, a very important library in the Flask ecosystem, changed its API in version 1.0, back in February 2020.
This broke a lot of plugins.
Twitter thread
As my app relies on Flask-Uploads, I had a look at the problem and finally provided a pull request to the Flask-Uploads repository on GitHub.</description></item><item><title>How to Deactivate Auto Import in Pylance</title><link>https://jugmac00.github.io/til/how-to-deactivate-auto-import-in-pylance/</link><pubDate>Sat, 06 Jun 2020 09:14:02 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-deactivate-auto-import-in-pylance/</guid><description>Unfortunately, the auto-import feature in PyLance surprised me with random imports.
e.g. with from unittest.case import expectedFailure just when I typed assert result == expected.
Luckily, the developers listened to the users, and with version 2020.8.0 this &amp;ldquo;feature&amp;rdquo; is optional.
In order to deactivate it, set the following option to false:
python.analysis.autoImportCompletions Thank you, Savannah!</description></item><item><title>How to Replace the Old With the New Decorator Syntax for Zope's Security Declarations</title><link>https://jugmac00.github.io/til/how-to-replace-the-old-with-the-new-decorator-syntax-for-zopes-security-declarations/</link><pubDate>Sat, 11 Apr 2020 13:52:33 +0200</pubDate><guid>https://jugmac00.github.io/til/how-to-replace-the-old-with-the-new-decorator-syntax-for-zopes-security-declarations/</guid><description>Zope&amp;rsquo;s security architecture is built upon security declarations, which scope can be either a method, several methods or even a complete class.
Until recently you usually declared the security for a method like this&amp;hellip;
from AccessControl import getSecurityManager class Suggestions(SomeBaseClass): security = ClassSecurityInfo() security.declareProtected(&amp;#34;View&amp;#34;, &amp;#34;all_suggestions&amp;#34;) def all_suggestions(): ... Then, when accessing this method, e.g. the logged in user&amp;rsquo;s role or group was checked against the security declaration.
One big disadvantage was that you could easily introduce typos.</description></item><item><title>Log Rotation for Python Applications - Without killing them softly</title><link>https://jugmac00.github.io/blog/log-rotation-for-python-applications/</link><pubDate>Wed, 08 Apr 2020 14:20:11 +0200</pubDate><guid>https://jugmac00.github.io/blog/log-rotation-for-python-applications/</guid><description>A couple of days after a successful deployment of my Zope 4 application, I noticed something worrisome.
Zope gets killed every night, shortly after midnight.
I use Supervisor, which monitors the process and restarts it, so that&amp;rsquo;s not the problem.
But there are two problems:
I did not trigger this on purpose. The cache of my app is cold, that means that my colleagues get slow response times for the first queries in the morning.</description></item><item><title>isort and pre-commit - a friendship with obstacles</title><link>https://jugmac00.github.io/blog/isort-and-pre-commit-a-friendship-with-obstacles/</link><pubDate>Sun, 23 Feb 2020 14:06:45 +0200</pubDate><guid>https://jugmac00.github.io/blog/isort-and-pre-commit-a-friendship-with-obstacles/</guid><description>Note This post is not intended to be an exhaustive introduction to pre-commit and its hooks. Please visit pre-commit.com for a complete documentation.
In a nutshell&amp;hellip;
pre-commit From its website:
A framework for managing and maintaining multi-language pre-commit hooks.
Very simplified this means, whenever you try to commit changes in your project (e.g. entering git commit), pre-commit runs all configured tools (e.g. linter, formatter, &amp;hellip;), and only if they run successfully, your commit will be executed - otherwise your commit will fail.</description></item><item><title>Three Ways to Get Into Trouble or Welcome Back PageTemplateEngine</title><link>https://jugmac00.github.io/blog/three-ways-to-get-into-trouble-or-welcome-back-pagetemplateengine/</link><pubDate>Tue, 26 Nov 2019 13:58:44 +0200</pubDate><guid>https://jugmac00.github.io/blog/three-ways-to-get-into-trouble-or-welcome-back-pagetemplateengine/</guid><description>The web application server Zope has a very long history which dates back to the late &amp;rsquo;90s.
Quoting Martijn Faassen:
Zope must be one of the oldest Python codebases in the world that is still used outside the standard library.
During its many years of existence the way a view gets rendered has changed.
Basically there are two supported template mechanisms:
Document Template Markup Language (DTML) Zope Page Templates (ZPT) DTML is pretty much outdated for more than a decade, but still in use for the Zope Management Interface.</description></item><item><title>Am I Famous</title><link>https://jugmac00.github.io/blog/am-i-famous/</link><pubDate>Wed, 29 May 2019 13:45:09 +0200</pubDate><guid>https://jugmac00.github.io/blog/am-i-famous/</guid><description>A couple of months ago, Brett Cannon, one of the better known Python core developers, announced on Twitter that he contributed to over 100 open source projects.
first reaction Woohah! Congratulations!
second reaction How did he know?
Every time I get a PR merged I record the repo&amp;rsquo;s URL for a tool I created to analyze my contributions to OSS.
Ah&amp;hellip; k. I did not do that.
third reaction To how many open source projects did I contribute?</description></item><item><title>PyConWeb 2019: Came for the talks, stayed for the raffles</title><link>https://jugmac00.github.io/blog/pyconweb-2019/</link><pubDate>Mon, 27 May 2019 13:39:09 +0200</pubDate><guid>https://jugmac00.github.io/blog/pyconweb-2019/</guid><description>summary of pyconweb 2019 F&amp;hellip; awesome!
talks and workshops I tried to collect all slides from Twitter and Telegram - in case I missed some, please drop me a line @jugmac00.
Saturday, 25 May 2019 Building robust APIs Tornado Web Services on AsyncIO Bocadillo, or how I built an open source async web framework slides@Dropbox | slides@Github Introduction to GraphQL and Graphene source Hello to the World in 8 Web Frameworks slides and video @aaronbassett Life without passwords The dos and don&amp;rsquo;ts of task queues An introduction to D3.</description></item><item><title>Chrome No Longer Shows Saved Passwords</title><link>https://jugmac00.github.io/blog/chrome-no-longer-shows-saved-passwords/</link><pubDate>Fri, 10 May 2019 13:35:01 +0200</pubDate><guid>https://jugmac00.github.io/blog/chrome-no-longer-shows-saved-passwords/</guid><description>Concerning security and privacy, you either can get stalled because you can&amp;rsquo;t get it perfect right from the beginning, or you improve over time.
I prefer the latter one. And concerning password security I go with Troy Hunt: Password managers don&amp;rsquo;t have to be perfect, they just have to be better than not having one.
And actually the password manager of a browser is already a password manager. I would not use it for very important passwords, but it is absolutely fine for those dozens of dozens forum logins and so on.</description></item><item><title>Recap Day Three and Wrap Up of Zope Spring Cleaning</title><link>https://jugmac00.github.io/blog/recap-day-three-and-wrap-up-of-zope-spring-cleaning/</link><pubDate>Fri, 10 May 2019 13:27:31 +0200</pubDate><guid>https://jugmac00.github.io/blog/recap-day-three-and-wrap-up-of-zope-spring-cleaning/</guid><description>This blog post is work in progress&amp;hellip; much more to come - but the train is only 10 minutes late (uncommon in Germany :-) ), so I am not able finish the blog post now (narrator: he never has updated and never will update this blog post).
tl/dr - what a ride! today there was the final release of Zope 4! see blog post @gocept Michael / @gocept announced the roadmap for Zope 2.</description></item><item><title>Recap Day Two of Zope Spring Cleaning</title><link>https://jugmac00.github.io/blog/recap-day-two-of-zope-spring-cleaning/</link><pubDate>Fri, 10 May 2019 13:22:15 +0200</pubDate><guid>https://jugmac00.github.io/blog/recap-day-two-of-zope-spring-cleaning/</guid><description>Very brief recap, as I want to spend the remaining time with some more documentation updates.
progress Jens Hinghaus Fix bug in ZMI search improve tempstorage fix Steffen finished the documentation for the Nonsensical path issue had some fun with getting AppVeyor up and running for Zope Daniel fixed a bug in ZCatalog (sorting did not work); migrated a DTML template to zpt Jeremy continued his work on zc.recipe.testrunner Jens Klein with Martin released zodbupdate released zodbverify opened a pull request for the ZODB migration story Michael prepared a blog post for the Zope roadmap prepared a blog post for the final release of Zope 4 released some more packages is about preparing the final release of Zope 4!</description></item><item><title>Recap day one of "Zope spring cleaning"</title><link>https://jugmac00.github.io/blog/recap-of-the-first-day-of-saltlabs-sprint-zope-spring-cleaning/</link><pubDate>Thu, 09 May 2019 13:14:12 +0200</pubDate><guid>https://jugmac00.github.io/blog/recap-of-the-first-day-of-saltlabs-sprint-zope-spring-cleaning/</guid><description>More infos about the sprint
10 local sprinters 2 remote sprinters (Jens Vagelpohl and Dieter Maurer) progress Steffen had lots of fun with Nonsensical Path Infos had a look at some of the open documentation tickets Jens Klein / Martin Häcker created a pull request to improve the zodpupdate script created / extracted plone/zodbverify which can be used to check ZODB before the Python 2 -&amp;gt; 3 migration Jeremy worked on porting recipe.</description></item><item><title>Face to face with "Earl Zope and his henchmen"</title><link>https://jugmac00.github.io/blog/face-to-face-with-earl-zope/</link><pubDate>Fri, 03 May 2019 12:48:11 +0200</pubDate><guid>https://jugmac00.github.io/blog/face-to-face-with-earl-zope/</guid><description>This blog post tries to ease beginning and keeping up with the development of the open source web application server Zope and its universe.
what makes it hard to start contributing Zope is a very mature product, as it was launched already back in 1999 Zope underwent some major architectural changes (keyword ZCA) Zope itself is relatively complex there is also a complex development ecosystem around it Buildout TravisCI (as of 2021, Travis is no longer used, but GHA) GitHub.</description></item><item><title>it's never too late to join the party!</title><link>https://jugmac00.github.io/blog/it-is-never-too-late-too-join-the-party/</link><pubDate>Thu, 02 May 2019 11:50:14 +0200</pubDate><guid>https://jugmac00.github.io/blog/it-is-never-too-late-too-join-the-party/</guid><description>Although I started writing code already at the age of 13 (generation C64), and I am a professional web and backend developer since 2007, I only started contributing to open source software quite recently - apart from the occasional bug report.
what is open source software? Quote from Wikipedia:
Open-source software (OSS) is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to anyone and for any purpose.</description></item><item><title>ignore requests for apple touch icons</title><link>https://jugmac00.github.io/blog/ignore-requests-for-apple-touch-icons/</link><pubDate>Sat, 28 Jul 2018 11:38:38 +0200</pubDate><guid>https://jugmac00.github.io/blog/ignore-requests-for-apple-touch-icons/</guid><description>the problem My application&amp;rsquo;s error log is polluted with tracebacks of notFoundErrors from Apple browsers requesting apple-touch-icon.pngs.
For those, who do not know&amp;hellip; Touch icons are to Apple&amp;rsquo;s mobile devices what favicons are to (desktop) web browsers.
According to ComputerHope:
When someone bookmarks your web page or adds your web page to their home screen, this icon is used.
So, when you run a public website, no question, you want to put some effort into making some great icons, so your website looks great on your users&amp;rsquo; home screen and bookmark section.</description></item><item><title>sudo dnf install beautiful-problems</title><link>https://jugmac00.github.io/blog/sudo-dnf-install-beautiful-problems/</link><pubDate>Wed, 04 Jul 2018 11:16:23 +0200</pubDate><guid>https://jugmac00.github.io/blog/sudo-dnf-install-beautiful-problems/</guid><description>There is something I immediately disliked when using Fedora the first time - the bash prompt.
For many years I&amp;rsquo;ve been using a fixed prompt at work for all my machines, a beauty in green and yellow&amp;hellip;
And when I first started bash after installing Fedora on my home laptop, I encountered this grey monotony&amp;hellip;
[jugmac00@localhost ~]$ I did not try to recreate the prompt I have at work, but I wanted to try something new - and oh my zsh, ah, oh my god, zsh did not come to my mind - yuck!</description></item><item><title>getting back ctrl over ctrl+alt+arrow in gnome</title><link>https://jugmac00.github.io/blog/getting-back-ctrl-over-ctrlaltarrow-keys/</link><pubDate>Sun, 01 Jul 2018 10:47:28 +0200</pubDate><guid>https://jugmac00.github.io/blog/getting-back-ctrl-over-ctrlaltarrow-keys/</guid><description>the task Deactivating Gnome&amp;rsquo;s keyboard shortcuts for ctrl+alt+left / ctrl+alt+right to make those combinations available for another application.
In my case I tried to use these shortcuts in Jetbrain&amp;rsquo;s PyCharm for code navigation.
the obvious (and wrong) way Go to Settings Devices Keyboard Keyboard Shortcuts Change or reset the values for the shortcuts Although both shortcuts are obviously blocked by Gnome, they are not listed.
one way $ gsettings set org.</description></item><item><title/><link>https://jugmac00.github.io/hiring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jugmac00.github.io/hiring/</guid><description>We are Hiring Do you want to work
on exciting open source projects, e.g. the build farm for Ubuntu? from remote? with some awesome colleagues from around the world? with lots and lots of Python involved? I am looking for a new team mate!
I am also looking for a manager!
My DMs on Mastodon and Twitter are open!
Or directly browse all open positions at Canonical!</description></item><item><title>About Me</title><link>https://jugmac00.github.io/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jugmac00.github.io/about/</guid><description>I am a software developer with a passion for
Python Linux Open Source I spend a good amount of my spare time
as a maintainer of Flask-Reuploaded as an admirer of tox as a preserver of Morepath as an apprentice of Zope Additionally, I have also contributed to meanwhile more than 300 other open source projects.</description></item><item><title>Talks</title><link>https://jugmac00.github.io/talks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jugmac00.github.io/talks/</guid><description>Since 2018, I have given many talks at many occasions. I especially enjoy giving lightning and thunder talks.
I want to thank both the Google Developer Group in Regensburg and Python Ireland for giving me a chance to become a more experienced speaker.
July 2025 EuroPython 2025 in Prague - In &amp;ldquo;Your Very First Contribution to Open Source&amp;rdquo; I show that everybody can contribute to open source, regardless of experience, professional status, &amp;hellip; and especially age.</description></item></channel></rss>