<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manuel Hutter on Medium]]></title>
        <description><![CDATA[Stories by Manuel Hutter on Medium]]></description>
        <link>https://medium.com/@mhutter?source=rss-3cd77d04fa11------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3HGo1vc0rCRnK6Sw5eESow.png</url>
            <title>Stories by Manuel Hutter on Medium</title>
            <link>https://medium.com/@mhutter?source=rss-3cd77d04fa11------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:03:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mhutter/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Working with Git Submodules]]></title>
            <link>https://medium.com/@mhutter/working-with-git-submodules-4512c9ae0916?source=rss-3cd77d04fa11------2</link>
            <guid isPermaLink="false">https://medium.com/p/4512c9ae0916</guid>
            <category><![CDATA[submodules]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Manuel Hutter]]></dc:creator>
            <pubDate>Thu, 11 Aug 2016 18:57:42 GMT</pubDate>
            <atom:updated>2016-08-18T08:54:15.139Z</atom:updated>
            <content:encoded><![CDATA[<p>I often struggle when working with Git Submodules, so here’s a quick primer with all the important information you need!</p><h3>Adding Submodules to your project</h3><pre><strong>git submodule add </strong><em>repo_url</em> [<em>directory</em>]<br><strong>git commit</strong> -m &#39;added xyz as a dependency&#39;</pre><p>`git submodule add` works like `git clone`, so the directory name can be ommited. The changes will automatically be added to the index, so you can commit them right away!</p><h3>Cloning a repository with Submodules</h3><pre><strong>git clone</strong> <em>repo_url </em><strong>--recursive</strong></pre><p>This will first clone the repo, and then initialize and update (read on) all submodules.</p><p>If you forget the `--recursive` flag when cloning, or when pulling in commits that add a Submodule, you have to do two steps: initialize, update:</p><pre><strong>git submodule init<br>git submodule update</strong></pre><p>This will create the required directories and then pull in the other repos.</p><h3>Update Submodules</h3><p>Easy:</p><pre><strong>git submodule update --remote<br>git add</strong> <em>submodule_dir</em><br><strong>git commit</strong> ...</pre><p>That’s it!</p><p>For more in-depth information on Git Submodules, read the official documentation:</p><p><a href="https://git-scm.com/book/en/v2/Git-Tools-Submodules">Git - Submodules</a></p><p><em>(first published on </em><a href="https://hutter.io/2016/08/11/working-with-git-submodules/"><em>hutter.io</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4512c9ae0916" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crontab Syntax]]></title>
            <link>https://medium.com/@mhutter/crontab-syntax-be37d8f7bad?source=rss-3cd77d04fa11------2</link>
            <guid isPermaLink="false">https://medium.com/p/be37d8f7bad</guid>
            <category><![CDATA[cron]]></category>
            <dc:creator><![CDATA[Manuel Hutter]]></dc:creator>
            <pubDate>Tue, 16 Feb 2016 23:00:00 GMT</pubDate>
            <atom:updated>2016-08-16T14:42:15.645Z</atom:updated>
            <content:encoded><![CDATA[<p>One thing I still cannot remember after YEARS of usage is the scheduling syntax for cronjobs. To help with this I usually paste the following into each crontab:</p><pre># m h dom mon dow cmd</pre><ul><li>m: minute</li><li>h: hour</li><li>dom: day of month</li><li>mon: month</li><li>dow: day of week</li><li>cmd: command to execute</li></ul><h4>Expressions</h4><p>Instead of fixed numbers, you can also use expressions. You probably already know the <strong>asterisk</strong> (*) to match <em>every value</em>, but there are more:</p><ul><li>use <strong>commas</strong> to specify a <em>list of values</em>, eg. 2,5,7</li><li>use <strong>hyphens</strong> to specify a <em>range of values</em>, eg. 5–9</li><li>use <strong>slashes</strong> to specify <em>steps</em>, eg. */2 in the minute field to execute a command every other minute. (note: */2 in the minute field means <em>execute command on every minute divisible by 2</em>)</li></ul><p><em>(first published on </em><a href="https://hutter.io/2016/02/17/crontab-syntax/"><em>hutter.io</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be37d8f7bad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java: Create self-signed SSL certificates for Tomcat]]></title>
            <link>https://medium.com/@mhutter/java-create-self-signed-ssl-certificates-for-tomcat-61288bcc736f?source=rss-3cd77d04fa11------2</link>
            <guid isPermaLink="false">https://medium.com/p/61288bcc736f</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[tomcat]]></category>
            <dc:creator><![CDATA[Manuel Hutter]]></dc:creator>
            <pubDate>Mon, 08 Feb 2016 23:00:00 GMT</pubDate>
            <atom:updated>2016-08-16T14:40:18.932Z</atom:updated>
            <content:encoded><![CDATA[<p>To use an SSL certificate with Tomcat, you need to store it in a Java keystore File. You can generate both the keystore and the certificate using the Java command keytool.</p><h4>Step 0: Find your keytool</h4><p>Make sure you have Java and keytool command (ships with Java) installed. If you installed the JDK or JRE yourself it may not be in your $PATH.</p><p>For example, my keytool is in ./jdk1.8/bin/.</p><h4>Step 1: Generate the keystore and the certificate</h4><p>Before we begin, a note about the “alias” and the “common name” of the certificate:</p><ul><li>The <strong>alias</strong> is simply a “label” used by Java to identify a specific certificate in the keystore (a keystore can hold multiple certificates). It has nothing to do with the server name, or the domain name of the Tomcat service.</li><li>The <strong>common name</strong> (CN) is an attribute of the SSL certificate. Your browser will usually complain if the CN of the certificate and the domain in the URI do not match (but since you’re using a self-signed certificate, your browser will probably complain anyway…). HOWEVER, when generating the certificate, the keytool will ask for “your first and last name” when asking for the CN, so keep that in mind. The rest of the attributes are not really that important</li></ul><p>So let’s generate a strong 4096-bit certificate that is valid for 2 years.</p><p># adjust the path to `keytool`, ALIAS and the path to the keystore accordingly ./jdk1.8/bin/keytool -genkey -keystore /srv/jakarta/.keystore -alias ALIAS \ -keyalg RSA -keysize 4096 -validity 720 Enter keystore password: # well, enter something Re-enter new password: # same as above What is your first and last name? [Unknown]: example.com # !!! IMPORTANT this is the domain name, NOT YOUR name What is the name of your organizational unit? [Unknown]: # enter something or leave empty What is the name of your organization? [Unknown]: # enter something or leave empty What is the name of your City or Locality? [Unknown]: # enter something or leave empty What is the name of your State or Province? [Unknown]: # enter something or leave empty What is the two-letter country code for this unit? [Unknown]: # enter something or leave empty Is CN=example com, OU=Foo, O=Bar, L=City, ST=AA, C=FB correct? [no]: yes Enter key password for &lt;lea-prod&gt; (RETURN if same as keystore password): # Press RETURN</p><p>Great, now the keystore has been created (if it didn’t exist already) and your self-signed certificate has been added to it.</p><h4>Step 2: Configure Tomcat</h4><p>To use the new certificate, configure your Tomcat accordingly:</p><p>Activate the HTTPS-Connector in your conf/server.xml. Adjust keyAlias, keystoreFile and keystorePass accordingly:</p><p>&lt;Connector port=”8443&quot; protocol=”org.apache.coyote.http11.Http11NioProtocol” maxThreads=”150&quot; SSLEnabled=”true” scheme=”https” secure=”true” clientAuth=”false” sslProtocol=”TLS” keyAlias=”ALIAS” keystoreFile=”/srv/jakarta/.keystore” keystorePass=”PW from step 1&quot; /&gt;</p><p>And that’s it! Restart Tomcat and you’re ready!</p><p><em>(first published on </em><a href="https://hutter.io/2016/02/09/java-create-self-signed-ssl-certificates-for-tomcat/"><em>hutter.io</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61288bcc736f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make all *.dev domains resolve to localhost]]></title>
            <link>https://medium.com/@mhutter/make-all-dev-domains-resolve-to-localhost-28c8a58293eb?source=rss-3cd77d04fa11------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c8a58293eb</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[wildcard]]></category>
            <category><![CDATA[dev]]></category>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[dnsmasq]]></category>
            <dc:creator><![CDATA[Manuel Hutter]]></dc:creator>
            <pubDate>Mon, 01 Feb 2016 23:00:00 GMT</pubDate>
            <atom:updated>2016-08-16T14:40:16.036Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s time for my yearly blog post, so let’s get started!</p><p>Some development environments use *.dev-domains which point to localhost. Creating a hosts-entry for every single domain is not an elegant solution, so let’s do something easier: let’s use dnsmasq to resolve ALL .dev-domains to localhost!</p><p><em>Tested on CentOS 7, but should work similarly for other Linuxes.</em></p><p>All commands assume you have root privileges. If you are not logged in as root, prepend sudo to all commands.</p><p>First, make sure <strong>dnsmasq</strong> is installed:</p><p>yum install dnsmasq</p><p>Ok, now we have to tell dnsmasq to listen for queries. Add the following line to /etc/dnsmasq.conf:</p><pre>listen-address=127.0.0.1</pre><p>Next, create a “zone file” for .dev. Create a file /etc/dnsmasq.d/dev and add the following:</p><pre>address=/dev/127.0.0.1</pre><p>This tells dnsmasq to resolve queries to *.dev to 127.0.0.1.</p><p>Now, start up dnsmasq. Also enable “autostart”:</p><p>systemctl restart dnsmasq systemctl enable dnsmasq</p><p>Ok, now that we set up a local DNS server, let’s tell our DHCP client to actually use it. Add the following line to /etc/dhcp/dhclient.conf:</p><pre>prepend domain-name-servers=127.0.0.1;</pre><p>Last step: let the DHCP client apply the new settings:</p><p>dhclient</p><p>And that’s it! Let’s make a quick test:</p><pre>$ grep -i dev /etc/hosts<br>$ ping foo.dev<br>PING foo.dev (127.0.0.1) 56(84) bytes of data.<br>64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms<br>64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.068 ms<br># ...</pre><p>Success!</p><p><em>(first published on </em><a href="https://hutter.io/2016/02/02/make-all-dev-domains-resolve-to-localhost/"><em>hutter.io</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c8a58293eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>