<?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>Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/</link>
    <description>Recent content on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Fri, 05 Sep 2025 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Encrypt/Decrypt Text Content</title>
      <link>https://www.hascode.com/tools/encrypt/</link>
      <pubDate>Sun, 02 Feb 2020 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/tools/encrypt/</guid>
      <description>&lt;!DOCTYPE html&gt;
&lt;html lang=&#34;en&#34;&gt;
&lt;head&gt;
    &lt;meta charset=&#34;UTF-8&#34;&gt;
    &lt;meta name=&#34;viewport&#34; content=&#34;width=device-width, initial-scale=1.0&#34;&gt;
    &lt;title&gt;AES Encryption Tool&lt;/title&gt;
    &lt;script src=&#34;https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js&#34;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div class=&#34;custom-tools&#34;&gt;
    &lt;h2&gt;AES Encryption Tool&lt;/h2&gt;

    &lt;label for=&#34;inputText&#34;&gt;Text to Encrypt:&lt;/label&gt;
    &lt;textarea id=&#34;inputText&#34; rows=&#34;5&#34; cols=&#34;50&#34;&gt;&lt;/textarea&gt;
    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;copyToClipboard(&#39;inputText&#39;)&#34;&gt;Copy&lt;/button&gt;
      &lt;button onclick=&#34;pasteFromClipboard(&#39;inputText&#39;)&#34;&gt;Paste&lt;/button&gt;
    &lt;/div&gt;

    &lt;label for=&#34;password&#34;&gt;Password:&lt;/label&gt;
    &lt;input type=&#34;password&#34; id=&#34;password&#34;&gt;

    &lt;label for=&#34;salt&#34;&gt;Salt:&lt;/label&gt;
    &lt;input type=&#34;password&#34; id=&#34;salt&#34;&gt;

    &lt;label for=&#34;iv&#34;&gt;IV:&lt;/label&gt;
    &lt;input type=&#34;password&#34; id=&#34;iv&#34;&gt;
    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;generateRandomIV()&#34;&gt;Generate IV&lt;/button&gt;
      &lt;button onclick=&#34;useFixedIV()&#34;&gt;Use Fixed IV&lt;/button&gt;
    &lt;/div&gt;

    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;encryptText()&#34;&gt;Encrypt&lt;/button&gt;
      &lt;button onclick=&#34;decryptText()&#34;&gt;Decrypt&lt;/button&gt;
      &lt;button onclick=&#34;resetAll()&#34;&gt;Reset All&lt;/button&gt;
    &lt;/div&gt;

    &lt;label for=&#34;outputText&#34;&gt;Decrypted Text:&lt;/label&gt;
    &lt;textarea id=&#34;outputText&#34; rows=&#34;5&#34; cols=&#34;50&#34;&gt;&lt;/textarea&gt;
    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;copyToClipboard(&#39;outputText&#39;)&#34;&gt;Copy&lt;/button&gt;
      &lt;button onclick=&#34;pasteFromClipboard(&#39;outputText&#39;)&#34;&gt;Paste&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;

    &lt;script&gt;
        function encryptText() {
            let text = document.getElementById(&#39;inputText&#39;).value;
            let password = document.getElementById(&#39;password&#39;).value;
            let salt = document.getElementById(&#39;salt&#39;).value;
            let iv = document.getElementById(&#39;iv&#39;).value;
            if (!text || !password || !salt || !iv) {
                alert(&#39;All fields are required!&#39;);
                return;
            }
            let key = CryptoJS.PBKDF2(password, CryptoJS.enc.Utf8.parse(salt), { keySize: 256 / 32, iterations: 65536 });
            let encrypted = CryptoJS.AES.encrypt(text, key, { iv: CryptoJS.enc.Utf8.parse(iv), mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
            document.getElementById(&#39;outputText&#39;).value = encrypted.toString();
        }
        
        function decryptText() {
            let encryptedText = document.getElementById(&#39;outputText&#39;).value;
            let password = document.getElementById(&#39;password&#39;).value;
            let salt = document.getElementById(&#39;salt&#39;).value;
            let iv = document.getElementById(&#39;iv&#39;).value;
            if (!encryptedText || !password || !salt || !iv) {
                alert(&#39;All fields are required!&#39;);
                return;
            }
            let key = CryptoJS.PBKDF2(password, CryptoJS.enc.Utf8.parse(salt), { keySize: 256 / 32, iterations: 65536 });
            let decrypted = CryptoJS.AES.decrypt(encryptedText, key, { iv: CryptoJS.enc.Utf8.parse(iv), mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
            document.getElementById(&#39;inputText&#39;).value = decrypted.toString(CryptoJS.enc.Utf8);
        }
        
        function generateRandomIV() {
            let randomIV = CryptoJS.lib.WordArray.random(16).toString(CryptoJS.enc.Hex);
            document.getElementById(&#39;iv&#39;).value = randomIV;
        }
        
        function useFixedIV() {
            document.getElementById(&#39;iv&#39;).value = &#34;AAAAAAAAAAAAAAAAAAAAAA==&#34;; // Fixed 16-byte IV in hex
        }
        
        function copyToClipboard(elementId) {
            let text = document.getElementById(elementId);
            text.select();
            document.execCommand(&#39;copy&#39;);
        }
        
        function pasteFromClipboard(elementId) {
            navigator.clipboard.readText().then(text =&gt; {
                document.getElementById(elementId).value = text;
            }).catch(err =&gt; {
                alert(&#39;Failed to read clipboard: &#39; + err);
            });
        }
        
        function resetAll() {
            document.getElementById(&#39;inputText&#39;).value = &#39;&#39;;
            document.getElementById(&#39;outputText&#39;).value = &#39;&#39;;
            document.getElementById(&#39;password&#39;).value = &#39;&#39;;
            document.getElementById(&#39;salt&#39;).value = &#39;&#39;;
            document.getElementById(&#39;iv&#39;).value = &#39;&#39;;
        }
    &lt;/script&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
    </item>
    <item>
      <title>UUID Generator</title>
      <link>https://www.hascode.com/tools/uuid/</link>
      <pubDate>Sun, 02 Feb 2020 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/tools/uuid/</guid>
      <description>&lt;!DOCTYPE html&gt;
&lt;html lang=&#34;en&#34;&gt;
&lt;head&gt;
    &lt;meta charset=&#34;UTF-8&#34;&gt;
    &lt;meta name=&#34;viewport&#34; content=&#34;width=device-width, initial-scale=1.0&#34;&gt;
    &lt;title&gt;UUID Generator&lt;/title&gt;
    &lt;script type=&#34;module&#34;&gt;
        import { v1 as uuidv1, v3 as uuidv3, v4 as uuidv4 } from &#34;https://cdn.jsdelivr.net/npm/uuid@9.0.0/+esm&#34;;
        window.uuidv1 = uuidv1;
        window.uuidv3 = uuidv3;
        window.uuidv4 = uuidv4;
    &lt;/script&gt;    
&lt;/head&gt;
&lt;body&gt;
  &lt;div class=&#34;custom-tools&#34;&gt;
    &lt;h2&gt;UUID Generator&lt;/h2&gt;

    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;generateUUID(&#39;v1&#39;)&#34;&gt;Generate UUID v1&lt;/button&gt;
      &lt;button onclick=&#34;generateUUID(&#39;v4&#39;)&#34;&gt;Generate UUID v4&lt;/button&gt;
    &lt;/div&gt;

    &lt;label for=&#34;uuidOutput&#34;&gt;Generated UUID:&lt;/label&gt;
    &lt;input type=&#34;text&#34; id=&#34;uuidOutput&#34; readonly&gt;

    &lt;h3&gt;UUID v3&lt;/h3&gt;

    &lt;label for=&#34;namespace&#34;&gt;Namespace UUID:&lt;/label&gt;
    &lt;input type=&#34;text&#34; id=&#34;namespace&#34; placeholder=&#34;Enter Namespace UUID&#34;&gt;

    &lt;label for=&#34;name&#34;&gt;Name:&lt;/label&gt;
    &lt;input type=&#34;text&#34; id=&#34;name&#34; placeholder=&#34;Enter Name&#34;&gt;

    &lt;div class=&#34;button-group&#34;&gt;
      &lt;button onclick=&#34;generateUUID(&#39;v3&#39;)&#34;&gt;Generate UUID v3&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;    
    &lt;script&gt;
        function isValidUUID(uuid) {
            const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
            return uuidRegex.test(uuid);
        }

        function generateUUID(version) {
            let uuid;
            if (version === &#39;v1&#39;) {
                uuid = window.uuidv1();
            } else if (version === &#39;v4&#39;) {
                uuid = window.uuidv4();
            } else if (version === &#39;v3&#39;) {
                let namespace = document.getElementById(&#39;namespace&#39;).value.trim();
                const name = document.getElementById(&#39;name&#39;).value.trim();
                if (!namespace || !isValidUUID(namespace)) {
                    alert(&#39;Invalid or missing namespace UUID. Using default namespace.&#39;);
                    namespace = &#39;6ba7b810-9dad-11d1-80b4-00c04fd430c8&#39;; // Default DNS namespace UUID
                }
                if (!name) {
                    alert(&#39;Please enter a name.&#39;);
                    return;
                }
                uuid = window.uuidv3(name, namespace);
            }
            document.getElementById(&#39;uuidOutput&#39;).value = uuid;
        }
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
    </item>
    <item>
      <title>Message-Driven Architecture Across Multiple Teams</title>
      <link>https://www.hascode.com/message-driven-architecture-across-multiple-teams/</link>
      <pubDate>Fri, 05 Sep 2025 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/message-driven-architecture-across-multiple-teams/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whenever I start planning a new message-driven architecture that spans several software teams, I quickly realize how many moving parts there are.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;To keep my head clear, I’ve put together a personal checklist of things I always try to cover.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s not meant to be a formal rulebook, but more of a practical reminder of what usually makes the difference between smooth collaboration and endless headaches.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;message-driven-architecture-conver.png&#34; alt=&#34;message driven architecture conver&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Message Driven Architecture Article Cover Image&lt;/div&gt;</description>
    </item>
    <item>
      <title>CKAD Certification Snippets</title>
      <link>https://www.hascode.com/ckad-certification-snippets/</link>
      <pubDate>Fri, 22 Aug 2025 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/ckad-certification-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Certified Kubernetes Application Developer (CKAD) exam is a hands-on, command-line-heavy challenge that tests your ability to design, build, and deploy applications in Kubernetes - all while racing the clock.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I recently took the CKAD and passed with an overall score of around &lt;strong&gt;82%&lt;/strong&gt;.
Not perfect - but let’s be honest, in a terminal-only, time-boxed environment, &lt;strong&gt;&amp;#34;running&amp;#34;&lt;/strong&gt; is the new &lt;strong&gt;&amp;#34;succeeding&amp;#34;&lt;/strong&gt; 😄.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article collects the practical &lt;strong&gt;snippets, workflows, and quick references&lt;/strong&gt; I used during my preparation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Avro Schema Compatibility and the Confluent Schema Registry</title>
      <link>https://www.hascode.com/avro-schema-compatibility-and-the-confluent-schema-registry/</link>
      <pubDate>Sun, 08 Jun 2025 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/avro-schema-compatibility-and-the-confluent-schema-registry/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_is_schema_compatibility&#34;&gt;What is Schema Compatibility?&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Schema compatibility ensures that data serialized by a producer using one schema can be deserialized by a consumer using another. The Confluent Schema Registry provides several compatibility modes to enforce these rules when updating schemas.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are two key directions of compatibility:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Backward Compatibility (Upward Compatibility)&lt;/strong&gt;: Old consumers can read data produced with a newer schema.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Forward Compatibility (Downward Compatibility)&lt;/strong&gt;: New consumers can read data produced with an older schema.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>CVE Scanning and Guided Remediation with OSV Scanner</title>
      <link>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</link>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;osv-scanner-cover.webp&#34; alt=&#34;osv scanner cover&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OSV Scanner&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Security is a critical aspect of software development, and staying ahead of vulnerabilities is essential for us application developers. Google’s OSV Scanner is a powerful tool that helps detect vulnerabilities in open-source dependencies.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article will guide us through setting up and using OSV Scanner to secure our projects, scan for invalid licenses, scan OCI images and finally how to fix findings via guided remediation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Messaging with NATS and Java</title>
      <link>https://www.hascode.com/messaging-with-nats-and-java/</link>
      <pubDate>Tue, 26 Nov 2024 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/messaging-with-nats-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;nats-messaging.svg&#34; alt=&#34;nats messaging&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. NATS Architecture Component Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;NATS is a high-performance messaging system that offers simplicity, speed, and scalability. It is particularly suited for building distributed systems and microservices.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article demonstrates how to integrate NATS with Java, showcasing the essential steps to set up, connect, and publish/subscribe to messages.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Before diving in, we should ensure to have the following installed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java Development Kit (JDK) 11 or later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven or Gradle for dependency management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Docker (optional).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Building OCI Images with Buildah</title>
      <link>https://www.hascode.com/building-oci-images-with-buildah/</link>
      <pubDate>Sun, 13 Oct 2024 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/building-oci-images-with-buildah/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;buildah-cover-image.webp&#34; alt=&#34;buildah cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Cover Image: Building OCI images with Buildah&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the world of containers, Buildah stands out as a powerful yet lightweight tool for building OCI (Open Container Initiative)-compliant container images.
Unlike traditional tools like Docker, Buildah takes a daemonless approach, making it secure, flexible, and ideal for modern development workflows.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_key_features&#34;&gt;Key Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Daemonless Architecture:&lt;/strong&gt; Buildah doesn’t rely on a background service (like Docker’s daemon). Instead, it directly manipulates images, ensuring a smaller footprint and lower resource usage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rootless and Secure:&lt;/strong&gt; You can run Buildah without root privileges, making it safer, especially in multi-user environments or CI/CD pipelines.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dockerfile-Free Flexibility:&lt;/strong&gt; While Buildah supports Dockerfiles, it also enables image creation without one. Developers can use shell commands or scripts, offering full control over the image-building process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;OCI Compliance and Versatility:&lt;/strong&gt; Buildah creates both OCI and Docker-formatted images, ensuring compatibility with tools like Podman, Docker, and Kubernetes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Lightweight and Scriptable:&lt;/strong&gt; Its minimal design makes Buildah perfect for automation and scripting, particularly in resource-constrained environments.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Pelican Blog Quickstart with Docker</title>
      <link>https://www.hascode.com/pelican-blog-quickstart-with-docker/</link>
      <pubDate>Tue, 10 Sep 2024 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/pelican-blog-quickstart-with-docker/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need to have at least Docker installed.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_blog&#34;&gt;Creating the Blog&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First we’re creating a new directory for our blog and generate the blog structure using William Jackon’s &lt;a href=&#34;https://github.com/williamjacksn/docker-pelican&#34;&gt;docker-pelican&lt;/a&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mkdir my-site
cd my-site
docker container run -it --rm --entrypoint pelican-quickstart -v ${PWD}:/pelican-site ghcr.io/williamjacksn/pelican
Welcome to pelican-quickstart v4.9.1.

This script will help you create a new Pelican-based website.

Please answer the following questions so this script can generate the files
  1 Title: My First Review
needed by Pelican.

&amp;gt; Where do you want to create your new web site? [.]
&amp;gt; What will be the title of this web site? Micha&amp;#39;s Tech Notes
&amp;gt; Who will be the author of this web site? Micha Kops
&amp;gt; What will be the default language of this web site? [C]
&amp;gt; Do you want to specify a URL prefix? e.g., https://example.com   (Y/n) Y
&amp;gt; What is your URL prefix? (see above example; no trailing slash) https
&amp;gt; Do you want to enable article pagination? (Y/n) n
&amp;gt; What is your time zone? [Europe/Rome]
&amp;gt; Do you want to generate a tasks.py/Makefile to automate generation and publishing? (Y/n)
&amp;gt; Do you want to upload your website using FTP? (y/N)
&amp;gt; Do you want to upload your website using SSH? (y/N)
&amp;gt; Do you want to upload your website using Dropbox? (y/N)
&amp;gt; Do you want to upload your website using S3? (y/N)
&amp;gt; Do you want to upload your website using Rackspace Cloud Files? (y/N)
&amp;gt; Do you want to upload your website using GitHub Pages? (y/N)
Done. Your new project is available at /pelican-site&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling Secrets with SOPS</title>
      <link>https://www.hascode.com/handling-secrets-with-sops/</link>
      <pubDate>Fri, 19 Apr 2024 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/handling-secrets-with-sops/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;sops-cover-image.webp&#34; alt=&#34;sops cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Handling Secret with SOPS&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;using homebrew&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;brew install sops&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;manual download&lt;/div&gt;
&lt;p&gt;download from GitHub &lt;a href=&#34;https://github.com/getsops/sops/releases&#34; class=&#34;bare&#34;&gt;https://github.com/getsops/sops/releases&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_sops&#34;&gt;Using SOPS&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;sops.yaml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;sops.yaml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;creation_rules:
  # encrypt stuff in .secrets
  - aws_profile: default
    kms: arn:aws:kms:eu-central-1:1234567890:key/abcdefg-0123456-abcdefg &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
    path_regex: ^./secrets/.*$ &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;We are using AWS KMS for encryption/decryption&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;All files in the directory &lt;code&gt;.secrets&lt;/code&gt; will be encrypted&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inplace Encrypt&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;sops -e -i .secrets/mysecret.yaml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inplace Decrypt&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;sops -d -i .secrets/mysecret.yaml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Shell Script Testing with Bats</title>
      <link>https://www.hascode.com/shell-script-testing-with-bats/</link>
      <pubDate>Tue, 13 Feb 2024 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/shell-script-testing-with-bats/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’ve all been there: a small shell script that starts as a quick helper suddenly becomes a critical part of your workflow.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then one day, it breaks - maybe because of a missing argument, a typo, or an unexpected input.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Debugging at 2 AM isn’t fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why adding tests to your shell scripts is a lifesaver. With Bats (Bash Automated Testing System), you can catch these issues early and make your scripts as reliable as any other piece of software.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object Audit with Java and Javers</title>
      <link>https://www.hascode.com/object-audit-with-java-and-javers/</link>
      <pubDate>Mon, 18 Sep 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-audit-with-java-and-javers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;object-audit-javers-cover-image.webp&#34; alt=&#34;object audit javers cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Object Audit with Java and Javers&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Just a quick snippet
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_integration&#34;&gt;Maven Integration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;org.javers&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;javers-core&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;${javers.version}&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_calculate_changes_in_object_graph&#34;&gt;Calculate Changes in Object Graph&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package io.hascode;

import org.javers.core.Changes;
import org.javers.core.Javers;
import org.javers.core.JaversBuilder;
import org.javers.core.diff.Diff;

public &amp;lt;T&amp;gt; Changes diff(T snapshot, T latest) {
  Javers javers = JaversBuilder.javers().build();
  Diff diff = javers.compare(snapshot, latest);
  return diff.getChanges();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_resources&#34;&gt;Resources&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://javers.org/&#34;&gt;Javers Website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Quick Kafdrop Setup with Helm Charts</title>
      <link>https://www.hascode.com/quick-kafdrop-setup-with-helm-charts/</link>
      <pubDate>Thu, 10 Aug 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/quick-kafdrop-setup-with-helm-charts/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;kafdrop-topic-view.png&#34; alt=&#34;kafdrop topic view&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Kafdrop Topic Viewer&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the ever-expanding world of data streaming and event-driven architecture, Apache Kafka has emerged as a cornerstone for reliable and scalable data processing. However, managing and monitoring Kafka clusters can often present its own set of challenges. This is where Kafdrop, a web-based Kafka consumer group and topic viewer, comes to the rescue. With its intuitive interface and insightful visualizations, Kafdrop offers developers and operators an efficient way to gain valuable insights into Kafka clusters.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Postgres with docker-compose or Docker and pg_stat_statements enabled</title>
      <link>https://www.hascode.com/postgres-with-docker-compose-or-docker-and-pg_stat_statements-enabled/</link>
      <pubDate>Wed, 29 Mar 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/postgres-with-docker-compose-or-docker-and-pg_stat_statements-enabled/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://www.postgresql.org/docs/9.3/pgstatstatements.html&#34;&gt;pg_stat_statements&lt;/a&gt; is useful to gather performance information
about queries so lets add it to our dockerized postgres database.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_docker_compose&#34;&gt;Using docker-compose&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using &lt;a href=&#34;https://docs.docker.com/compose/&#34;&gt;docker-compose&lt;/a&gt; we just need to add the following &lt;code&gt;docker-compose.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;version: &amp;#39;3.5&amp;#39;

services:
  postgres:
    container_name: postgres_container
    image: postgres
    ports:
      - &amp;#34;5432:5432&amp;#34;
    volumes:
      - /var/lib/postgresql/data
    # used for query profiling, deactivate for enhanced performance
    command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c max_connections=200
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: thepassword&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply start our Postgres database with &lt;code&gt;docker-compose&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Importing a Sitemap XML into Google Sheets</title>
      <link>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</link>
      <pubDate>Thu, 05 Jan 2023 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_goal&#34;&gt;The Goal&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short article, we want to import data from an existing sitemap XML file into a new Google Sheet document.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The sheet must pull the sitemap via HTTP protocol and extract all the URLs from the sitemap and insert them. into the sheet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_implementation&#34;&gt;Implementation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now let’s implement it .. it only takes 1 minute …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For demonstration purpose, I’m going to use the sitemap from my old blog, to be found at &lt;code&gt;&lt;a href=&#34;https://www.hascode.com/sitemap.xml&#34; class=&#34;bare&#34;&gt;https://www.hascode.com/sitemap.xml&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Modeling AWS Structures with PlantUML and AsciiDoc</title>
      <link>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</link>
      <pubDate>Tue, 08 Nov 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The AWS shapes are included in the PlantUML stdlib .. simply include them as shown here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;example.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
!include &amp;lt;awslib/AWSCommon&amp;gt;
!include &amp;lt;awslib/Analytics/ManagedStreamingforKafka&amp;gt;
!include &amp;lt;awslib/Database/RDS&amp;gt;
!include &amp;lt;awslib/General/Users&amp;gt;
!include &amp;lt;awslib/General/InternetGateway&amp;gt;

!include &amp;lt;kubernetes/k8s-sprites-labeled-25pct&amp;gt;

skinparam linetype ortho

title &amp;#34;AWS Context Diagram&amp;#34;


package &amp;#34;EKS Kubernetes Cluster&amp;#34; as eks_cluster {
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp1&amp;#34; as pod1
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp2&amp;#34; as pod2
}

ManagedStreamingforKafka(kafka_pod, &amp;#34;Amazon MSK&amp;#34;, &amp;#34;Apache Kafka&amp;#34;)

RDS(pg_rds, &amp;#34;PostgreSQL&amp;#34;, &amp;#34;Sample Schema&amp;#34;)


Users(users, &amp;#34;AppUsers&amp;#34;,&amp;#34;editors, admins&amp;#34;)

InternetGateway(igw1, &amp;#34;Customer Gateway&amp;#34;, &amp;#34;Customer access to internal services&amp;#34;)

users -&amp;gt; igw1
igw1 --&amp;gt; pod1
igw1 --&amp;gt; pod2
pod1 --&amp;gt; pg_rds
pod1 --&amp;gt; kafka_pod
pod2 --&amp;gt; pg_rds
pod2 --&amp;gt; kafka_pod

@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>C4 Modeling with PlantUML and AsciiDoc</title>
      <link>https://www.hascode.com/c4-modeling-with-plantuml-and-asciidoc/</link>
      <pubDate>Tue, 01 Nov 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/c4-modeling-with-plantuml-and-asciidoc/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;C4 models allow us to visualize software architecture by decomposition in containers and components.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Viewpoints are organized in hierarchical levels:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Context Diagrams (Level 1)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Container Diagrams (Level 2)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Component Diagrams (Level 3)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Code Diagrams (Level 4)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/plantuml-stdlib/C4-PlantUML&#34;&gt;C4-PlantUML&lt;/a&gt; offers a variety of macros and stereotypes that make modeling fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An example in &lt;a href=&#34;https://plantuml.com/&#34;&gt;PlantUML&lt;/a&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;sample.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
!include &amp;lt;c4/C4_Context.puml&amp;gt;
!include &amp;lt;c4/C4_Container.puml&amp;gt;

left to right direction

Person(user, &amp;#34;User&amp;#34;)

System_Ext(auth, &amp;#34;AuthService&amp;#34;, &amp;#34;Provides authentication and authorization via OIDC&amp;#34;)

System_Boundary(zone1, &amp;#34;Some system boundary&amp;#34;) {


    System(lb, &amp;#34;Load Balancer&amp;#34;)

    System_Boundary(az, &amp;#34;App Cluster&amp;#34;) {
        System(app, &amp;#34;App Servers&amp;#34;) {
            Container(app1, &amp;#34;App1&amp;#34;, &amp;#34;Docker&amp;#34;, &amp;#34;Does stuff&amp;#34;)
            Container(app2, &amp;#34;App1&amp;#34;, &amp;#34;Docker&amp;#34;, &amp;#34;Does stuff&amp;#34;)

            ContainerDb(dbSess, &amp;#34;Session DB&amp;#34;, &amp;#34;Redis&amp;#34;)
            ContainerDb(db1, &amp;#34;RBMS 1&amp;#34;, &amp;#34;AWS RDS Postgres&amp;#34;)
            ContainerDb(db2, &amp;#34;RBMS 2&amp;#34;, &amp;#34;AWS RDS Postgres&amp;#34;)

            &amp;#39; both app servers sync sessions via redis
            Rel(app1, dbSess, &amp;#34;Uses&amp;#34;, &amp;#34;Sync Session&amp;#34;)
            Rel(app2, dbSess, &amp;#34;Uses&amp;#34;, &amp;#34;Sync Session&amp;#34;)

            &amp;#39; both app servers persist data in RDBMS
            Rel(app1, db1, &amp;#34;Uses&amp;#34;, &amp;#34;Persist/query relational data&amp;#34;)
            Rel(app2, db2, &amp;#34;Uses&amp;#34;, &amp;#34;Persist/query relational data&amp;#34;)
        }
    }
}

Rel(user, lb, &amp;#34;call&amp;#34;)
Rel(lb, app1, &amp;#34;delegate&amp;#34;)
Rel(lb, app2, &amp;#34;delegate&amp;#34;)
Rel(app1, auth, &amp;#34;Verify&amp;#34;, &amp;#34;User auth&amp;#34;)
Rel(app2, auth, &amp;#34;Verify&amp;#34;, &amp;#34;User auth&amp;#34;)

SHOW_FLOATING_LEGEND()

@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Adding Legends to PlantUML Diagrams</title>
      <link>https://www.hascode.com/snippet-adding-legends-to-plantuml-diagrams/</link>
      <pubDate>Fri, 21 Oct 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-adding-legends-to-plantuml-diagrams/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following hack allows us to draw a diagram in a diagram in a table in a legend :D&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;example-diagram.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
skinparam legendBackgroundColor transparent
skinparam legendBorderColor transparent

actor Editor as editor
queue Queue as &amp;#34;Message\nQueue&amp;#34;
editor -&amp;gt; [Component] : call
[Component] --&amp;gt; Queue : publish


legend right
{{
   scale 0.7
   skinparam defaultFontSize 14
   skinparam BackGroundColor transparent
   skinparam defaultBackgroundColor white

   !procedure $entry($type, $label, $scale=1)
      {{\nscale $scale \nskinparam backgroundcolor transparent\nlabel &amp;#34; &amp;#34; as A\nlabel &amp;#34; &amp;#34; as B\n $type \n}} =&amp;gt; $label
   !endprocedure

   map &amp;#34;&amp;lt;b&amp;gt;Legend&amp;lt;/b&amp;gt;&amp;#34; as legend #white {
      $entry(&amp;#34;:Editor:&amp;#34;,&amp;#34;\nEditor for Data xyz&amp;#34;, 0.6)
      $entry(&amp;#34;[Component]&amp;#34;,&amp;#34;\nSome Component&amp;#34;, 0.8)
      $entry(&amp;#34;queue Queue&amp;#34;,&amp;#34;\nKafka-Topic&amp;#34;, 1)
      $entry(&amp;#34;A -&amp;gt; B&amp;#34;,&amp;#34;Data-Flow&amp;#34;)
   }
}}

endlegend
@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Forwardings Requests to static content in Spring Boot Webflux</title>
      <link>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</link>
      <pubDate>Tue, 16 Aug 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following &lt;code&gt;WebFilter&lt;/code&gt; redirects incoming requests for &lt;code&gt;/&lt;/code&gt; to a static HTML file, &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ToIndexPageRedirection.java&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

@Component
public class ToIndexPageRedirection implements WebFilter {
    @Override
    public Mono&amp;lt;Void&amp;gt; filter(ServerWebExchange exchange, WebFilterChain chain) {
        if (exchange.getRequest().getURI().getPath().equals(&amp;#34;/&amp;#34;)) {
            return chain.filter(
                exchange.mutate().request(
                    exchange.getRequest().mutate().path(&amp;#34;/index.html&amp;#34;).build()
                ).build()
            );
        }

        return chain.filter(exchange);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Ressources:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/server/WebFilter.html&#34;&gt;JavaDocs WebFilter&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Single Class Java HTTP Client with Proxy and SSL/TLS Keystore Settings</title>
      <link>https://www.hascode.com/single-class-java-http-client-with-proxy-and-ssl/tls-keystore-settings/</link>
      <pubDate>Tue, 02 Aug 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/single-class-java-http-client-with-proxy-and-ssl/tls-keystore-settings/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes this is useful for the diagnosis of configuration and network problems of ones Java application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our single-class HTTP client example without the need for external dependencies:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;HttpTest.java&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ProxySelector;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpRequest.BodyPublishers;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
import java.time.Duration;
import java.time.temporal.ChronoUnit;

public class HttpTest {
    public static void main(String[] args)
        throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException, IOException, CertificateException {
        String bodyPayload = &amp;#34;&amp;#34;&amp;#34;
            ourpayload, json, xml, ...
            &amp;#34;&amp;#34;&amp;#34;;

        String keyStorePath = &amp;#34;/opt/keystore.jks&amp;#34;;
        String keyStorePassword = &amp;#34;ABCDEFG&amp;#34;;

        String proxyHost = &amp;#34;ourproxy.proxy&amp;#34;;
        String uriString = &amp;#34;https://some-service/api&amp;#34;;
        int proxyPort = 8080;
        int timeoutInSeconds = 60;

        KeyStore keyStore = KeyStore.getInstance(&amp;#34;JKS&amp;#34;);
        keyStore.load(new FileInputStream(keyStorePath), keyStorePassword.toCharArray());

        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(&amp;#34;PKIX&amp;#34;);
        keyManagerFactory.init(keyStore, null);

        TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(&amp;#34;PKIX&amp;#34;); // using same keystore for both
        trustManagerFactory.init(keyStore);

        SSLContext sslContext = SSLContext.getInstance(&amp;#34;TLS&amp;#34;);
        sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);

        HttpClient client = HttpClient.newBuilder()
                                      .proxy(
                                          ProxySelector.of(new InetSocketAddress(proxyHost, proxyPort)))
                                      .sslContext(sslContext)
                                      .build();
        URI uri = new URI(uriString);
        HttpRequest request = HttpRequest.newBuilder(uri)
                                         .POST(BodyPublishers.ofString(bodyPayload))
                                         .timeout(Duration.of(timeoutInSeconds, ChronoUnit.SECONDS))
                                         .build();
        System.out.printf(&amp;#34;Sending POST request to %s, timeout: %ds%n&amp;#34;, uri, timeoutInSeconds);
        try {
            HttpResponse response = client.send(request, BodyHandlers.ofString());
            System.out.println(&amp;#34;Response received...&amp;#34;);
            System.out.printf(&amp;#34;\tResponse-Status: %d%n&amp;#34;, response.statusCode());
            System.out.printf(&amp;#34;\tResponse-Body: %s%n&amp;#34;, response.body());
            System.out.println(&amp;#34;-------------------------------------%n&amp;#34;);

        } catch (IOException e) {
            System.err.printf(&amp;#34;IOException caught: %s%n&amp;#34;, e.getMessage());
            e.printStackTrace(System.err);
        } catch (InterruptedException e) {
            System.err.printf(&amp;#34;IOException caught: %s%n&amp;#34;, e.getMessage());
            e.printStackTrace(System.err);
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Boot Kafka Increase Message Size Limit</title>
      <link>https://www.hascode.com/spring-boot-kafka-increase-message-size-limit/</link>
      <pubDate>Thu, 09 Jun 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/spring-boot-kafka-increase-message-size-limit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Let’s say we would like to increase the limit t 10MB …​&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_broker_configuration&#34;&gt;Broker Configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apply the new limit either by modifying the &lt;code&gt;server.properties&lt;/code&gt; like this…​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;max.message.bytes=10485760&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;olist lowerroman&#34;&gt;
&lt;ol class=&#34;lowerroman&#34; type=&#34;i&#34;&gt;
&lt;li&gt;
&lt;p&gt;or apply it to a specific topic using&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kafka-configs.sh --bootstrap-server localhost:9092 \
    --entity-type topics  \
    --entity-name thetopic \
    --alter \
    --add-config max.message.bytes=10485760&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_producer_configuration_for_spring_boot&#34;&gt;Producer Configuration for Spring Boot&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need to add the following line to our &lt;code&gt;application.properties&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;spring.kafka.producer.properties.max.request.size=spring.kafka.producer.properties.max.request.size&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following proof-of-concept demonstrates that without the property, sending a large message fails, with the property it succeeds:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Embedded Kafka for Spring Boot Testing without using Docker</title>
      <link>https://www.hascode.com/embedded-kafka-for-spring-boot-testing-without-using-docker/</link>
      <pubDate>Wed, 25 May 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/embedded-kafka-for-spring-boot-testing-without-using-docker/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes it is nice to set up an embedded Kafka broker for testing without the need to have Docker installed (e.g. for using testcontainers-lib).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following snippet shows, how to set up an embedded Kafka instance for testing for a Spring Boot project.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, this is our Spring Boot project with dependencies needed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
         xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
         xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;parent&amp;gt;
        &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
        &amp;lt;version&amp;gt;2.6.4&amp;lt;/version&amp;gt;
        &amp;lt;relativePath/&amp;gt; &amp;lt;!-- lookup parent from repository --&amp;gt;
    &amp;lt;/parent&amp;gt;

    &amp;lt;groupId&amp;gt;com.hascode.tutorial&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;kafka-testing&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;
        &amp;lt;project.reporting.outputEncoding&amp;gt;UTF-8&amp;lt;/project.reporting.outputEncoding&amp;gt;
        &amp;lt;java.version&amp;gt;17&amp;lt;/java.version&amp;gt;
        &amp;lt;maven.compiler.source&amp;gt;${java.version}&amp;lt;/maven.compiler.source&amp;gt;
        &amp;lt;maven.compiler.target&amp;gt;${java.version}&amp;lt;/maven.compiler.target&amp;gt;
        &amp;lt;kafka.version&amp;gt;3.1.0&amp;lt;/kafka.version&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.kafka&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-kafka&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-test&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.kafka&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-kafka-test&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
            &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-jupiter-api&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-jupiter-engine&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.junit.platform&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-platform-launcher&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        [..]
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Fast Link Checks using Filiph Linkchecker and Docker</title>
      <link>https://www.hascode.com/fast-link-checks-using-filiph-linkchecker-and-docker/</link>
      <pubDate>Mon, 02 May 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/fast-link-checks-using-filiph-linkchecker-and-docker/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This &lt;a href=&#34;https://github.com/filiph/linkcheck&#34;&gt;Linkchecker&lt;/a&gt; claims to be way faster than blc and wummel/linkchecker.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Docker, we may validate our site’s links in no time and without complex setup.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker run --rm tennox/linkcheck hascode.io&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/filiph/linkcheck&#34; class=&#34;bare&#34;&gt;https://github.com/filiph/linkcheck&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Bean Mapping with MapStruct</title>
      <link>https://www.hascode.com/java-bean-mapping-with-mapstruct/</link>
      <pubDate>Thu, 31 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-bean-mapping-with-mapstruct/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://mapstruct.org/&#34;&gt;MapStruct&lt;/a&gt; is a nice tool to generate mappers for converting one Java bean into another
e.g. for projections, data-transfer-objects and so on …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As long as fields in source and target beans do match, the mapper is able to generate the data setting automatically ..
else we may specify which source fields to map into which target fields or to register custom converters with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add dependencies and plugin integration to our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Configuring Spring Boot WebserviceTemplate to sign WSS SOAP Requests</title>
      <link>https://www.hascode.com/configuring-spring-boot-webservicetemplate-to-sign-wss-soap-requests/</link>
      <pubDate>Wed, 30 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/configuring-spring-boot-webservicetemplate-to-sign-wss-soap-requests/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes when accessing SOAP APIs, our SOAP client needs to sign the request.
How this can be achieved using Spring Boot’s WebserviceTemplate within a few steps is the scope of this short article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This snippet only deals with the client side not with the security configuration on the server side.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also it assumes, that you have already set up your keystore/truststore and that you’re loading these with your Spring Boot application’s startup without errors.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Quick Apache NiFi Setup with Docker</title>
      <link>https://www.hascode.com/quick-apache-nifi-setup-with-docker/</link>
      <pubDate>Tue, 08 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/quick-apache-nifi-setup-with-docker/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Pull image and run with ports exposed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker run --name &amp;#34;nifi&amp;#34; -p 8443:8443 -d apache/nifi:latest&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Fetch the generated username and password from the logs:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker logs nifi | grep -A1 &amp;#34;Generated Username&amp;#34;

Generated Username [8f6d91f7-733e-40cf-b900-059ea9dccbf2]
Generated Password [v7KGiiRYLJL2+HzhKOqz1rbgiPOaWz0B]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now we may enter the &lt;a href=&#34;https://localhost:8443/nifi/login&#34; class=&#34;bare&#34;&gt;https://localhost:8443/nifi/login&lt;/a&gt; in our browser, accept the security exemption and login
with the credentials from above, voila!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installing_additional_connectors&#34;&gt;Installing additional connectors&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have found a nice summary on the following &lt;a href=&#34;https://github.com/noharm-ai/nifi-docker&#34;&gt;GitHub repository&lt;/a&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up multiple Postgresql Instances with docker-compose</title>
      <link>https://www.hascode.com/setting-up-multiple-postgresql-instances-with-docker-compose/</link>
      <pubDate>Tue, 08 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/setting-up-multiple-postgresql-instances-with-docker-compose/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A simple setup when two Postgres databases prefilled with schema/data needed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;version: &amp;#39;3.6&amp;#39;
services:
    postgres1:
        image: postgres
        restart: always
        environment:
            - DATABASE_HOST=127.0.0.1
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=root
            - POSTGRES_DB=root
        ports:
            - &amp;#34;15432:15432&amp;#34;
        volumes:
            - ./postgres1-init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql

    postgres2:
        image: postgres
        restart: always
        environment:
            - DATABASE_HOST=127.0.0.1
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=root
            - POSTGRES_DB=root

        ports:
            - &amp;#34;25432:25432&amp;#34;
        volumes:
            - ./postgres2-init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;And our sample init scripts:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;CREATE USER tester WITH PASSWORD &amp;#39;tester&amp;#39; CREATEDB;
CREATE DATABASE testdb
    WITH
    OWNER = tester
    ENCODING = &amp;#39;UTF8&amp;#39;
    LC_COLLATE = &amp;#39;en_US.utf8&amp;#39;
    LC_CTYPE = &amp;#39;en_US.utf8&amp;#39;
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Converting XML Schema (XSD) to Protocol Buffers (Protobuf)</title>
      <link>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</link>
      <pubDate>Wed, 02 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to derive a Google Protocol Buffers schema from an XML schema .. e.g. from an Enterprise Architect Export.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Tool used here: &lt;a href=&#34;https://github.com/entur/schema2proto/&#34;&gt;schema2proto (GitLab project)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;code&gt;schema2proto-lib&lt;/code&gt; from the global Maven repository: &lt;a href=&#34;https://search.maven.org/search?q=schema2proto&#34; class=&#34;bare&#34;&gt;https://search.maven.org/search?q=schema2proto&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;Schema2Proto&lt;/code&gt; against a give XSD schema file and with a given output directory:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto --outputDirectory=src/main/protobuf input.xsd&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A yaml config file may be given instead of cli parameters:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto ----configFile=config.yaml input.xsd&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kafka Java Quickstart with Docker</title>
      <link>https://www.hascode.com/kafka-java-quickstart-with-docker/</link>
      <pubDate>Sat, 29 Jan 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kafka-java-quickstart-with-docker/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup Kafka and Zookeeper with Docker and docker-compose&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a message consumer and producer in Java&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_kafka_setup&#34;&gt;Kafka Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using &lt;code&gt;docker-compose&lt;/code&gt; to set up our message broker, zookeper and other stuff using &lt;code&gt;confluent-platform&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our &lt;code&gt;docker-compose.yaml&lt;/code&gt; config file from Confluent’s following
&lt;a href=&#34;https://github.com/confluentinc/cp-all-in-one/blob/7.0.1-post/cp-all-in-one-community/docker-compose.yml&#34;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yaml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;---
version: &amp;#39;2&amp;#39;
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:7.0.1
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - &amp;#34;2181:2181&amp;#34;
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-kafka:7.0.1
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - &amp;#34;29092:29092&amp;#34;
      - &amp;#34;9092:9092&amp;#34;
      - &amp;#34;9101:9101&amp;#34;
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: &amp;#39;zookeeper:2181&amp;#39;
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_JMX_PORT: 9101
      KAFKA_JMX_HOSTNAME: localhost

  schema-registry:
    image: confluentinc/cp-schema-registry:7.0.1
    hostname: schema-registry
    container_name: schema-registry
    depends_on:
      - broker
    ports:
      - &amp;#34;8081:8081&amp;#34;
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081

  connect:
    image: cnfldemos/kafka-connect-datagen:0.5.0-6.2.0
    hostname: connect
    container_name: connect
    depends_on:
      - broker
      - schema-registry
    ports:
      - &amp;#34;8083:8083&amp;#34;
    environment:
      CONNECT_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      CONNECT_REST_ADVERTISED_HOST_NAME: connect
      CONNECT_GROUP_ID: compose-connect-group
      CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
      CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_OFFSET_FLUSH_INTERVAL_MS: 10000
      CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
      CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
      CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
      CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
      CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
      CONNECT_PLUGIN_PATH: &amp;#34;/usr/share/java,/usr/share/confluent-hub-components&amp;#34;
      CONNECT_LOG4J_LOGGERS: org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR

  ksqldb-server:
    image: confluentinc/cp-ksqldb-server:7.0.1
    hostname: ksqldb-server
    container_name: ksqldb-server
    depends_on:
      - broker
      - connect
    ports:
      - &amp;#34;8088:8088&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      KSQL_BOOTSTRAP_SERVERS: &amp;#34;broker:29092&amp;#34;
      KSQL_HOST_NAME: ksqldb-server
      KSQL_LISTENERS: &amp;#34;http://0.0.0.0:8088&amp;#34;
      KSQL_CACHE_MAX_BYTES_BUFFERING: 0
      KSQL_KSQL_SCHEMA_REGISTRY_URL: &amp;#34;http://schema-registry:8081&amp;#34;
      KSQL_PRODUCER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor&amp;#34;
      KSQL_CONSUMER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor&amp;#34;
      KSQL_KSQL_CONNECT_URL: &amp;#34;http://connect:8083&amp;#34;
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR: 1
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: &amp;#39;true&amp;#39;
      KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: &amp;#39;true&amp;#39;

  ksqldb-cli:
    image: confluentinc/cp-ksqldb-cli:7.0.1
    container_name: ksqldb-cli
    depends_on:
      - broker
      - connect
      - ksqldb-server
    entrypoint: /bin/sh
    tty: true

  ksql-datagen:
    image: confluentinc/ksqldb-examples:7.0.1
    hostname: ksql-datagen
    container_name: ksql-datagen
    depends_on:
      - ksqldb-server
      - broker
      - schema-registry
      - connect
    command: &amp;#34;bash -c &amp;#39;echo Waiting for Kafka to be ready... &amp;amp;&amp;amp; \
                       cub kafka-ready -b broker:29092 1 40 &amp;amp;&amp;amp; \
                       echo Waiting for Confluent Schema Registry to be ready... &amp;amp;&amp;amp; \
                       cub sr-ready schema-registry 8081 40 &amp;amp;&amp;amp; \
                       echo Waiting a few seconds for topic creation to finish... &amp;amp;&amp;amp; \
                       sleep 11 &amp;amp;&amp;amp; \
                       tail -f /dev/null&amp;#39;&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      STREAMS_BOOTSTRAP_SERVERS: broker:29092
      STREAMS_SCHEMA_REGISTRY_HOST: schema-registry
      STREAMS_SCHEMA_REGISTRY_PORT: 8081

  rest-proxy:
    image: confluentinc/cp-kafka-rest:7.0.1
    depends_on:
      - broker
      - schema-registry
    ports:
      - 8082:8082
    hostname: rest-proxy
    container_name: rest-proxy
    environment:
      KAFKA_REST_HOST_NAME: rest-proxy
      KAFKA_REST_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      KAFKA_REST_LISTENERS: &amp;#34;http://0.0.0.0:8082&amp;#34;
      KAFKA_REST_SCHEMA_REGISTRY_URL: &amp;#39;http://schema-registry:8081&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Logback and Spring Boot - Change Log Level to custom format</title>
      <link>https://www.hascode.com/logback-and-spring-boot-change-log-level-to-custom-format/</link>
      <pubDate>Thu, 19 Aug 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/logback-and-spring-boot-change-log-level-to-custom-format/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_custom_converter&#34;&gt;Create a custom converter&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This class converts the well known log levels to a custom format&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;CustomLogLevelConverter.java&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode;

public class CustomLogLevelConverter extends ClassicConverter {
    @Override
    public String convert(ILoggingEvent event) {
        switch (event.getLevel().toInt()) {
            case Level.ERROR_INT:
                return &amp;#34;ERROR!!!&amp;#34;;
            case Level.WARN_INT:
                return &amp;#34;WARN!!&amp;#34;;
            case Level.INFO_INT:
                return &amp;#34;INFO!&amp;#34;;
            case Level.TRACE_INT:
                return &amp;#34;DEBUG&amp;#34;;
            default:
                return event.getLevel().toString();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_register_the_converter&#34;&gt;Register the converter&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following Logback config includes some defaults and registers our custom converter.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Factory Reset for Google Pixel-C Android Tablet</title>
      <link>https://www.hascode.com/factory-reset-for-google-pixel-c-android-tablet/</link>
      <pubDate>Sun, 13 Jun 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/factory-reset-for-google-pixel-c-android-tablet/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Reboot the system by pressing &amp;#34;Power&amp;#34; and &amp;#34;Volume down&amp;#34; simultaneously&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boot menu should appear, use &amp;#34;Volume up/down&amp;#34; to select the menu item &amp;#34;Android Recovery&amp;#34;, &amp;#34;Power&amp;#34; to confirm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;System reboots, a screen appears with a message &amp;#34;No command&amp;#34; - this is no error though it looks like one&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press &amp;#34;Power&amp;#34; and &amp;#34;Volume up&amp;#34; together and a menu &amp;#34;Android Recovery&amp;#34; appears&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &amp;#34;Volume up/down&amp;#34; to select the menu item &amp;#34;Wipe data/factory reset&amp;#34;, &amp;#34;Power&amp;#34; to confirm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User data on the device is deleted and the original meu is shown&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the menu item &amp;#34;Reboot system now&amp;#34; and confirm by pressing the &amp;#34;Power&amp;#34; Button&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The device reboots and you may configure the Android system …​&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing a React Component Test with Jest and Testing Library</title>
      <link>https://www.hascode.com/writing-a-react-component-test-with-jest-and-testing-library/</link>
      <pubDate>Fri, 04 Jun 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-a-react-component-test-with-jest-and-testing-library/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;render a React component in a test&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;mock HTTP/REST calls to the backend&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;verify results&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;achieve the above using typescript, jest and testing-library&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_application_under_test&#34;&gt;Application under Test&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our application’s shortened &lt;code&gt;package.json&lt;/code&gt;, generated by &lt;a href=&#34;https://create-react-app.dev/docs/getting-started/&#34;&gt;create-react-app&lt;/a&gt;, adding dependencies for …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;jest&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;testing-library&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;typescript&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;react&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;dom implementations (jest-dom/react-dom)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;axios (for the HTTP/REST call)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;package.json&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;{
  [..]
  &amp;#34;dependencies&amp;#34;: {
    &amp;#34;@testing-library/jest-dom&amp;#34;: &amp;#34;^5.11.4&amp;#34;,
    &amp;#34;@testing-library/react&amp;#34;: &amp;#34;^11.1.0&amp;#34;,
    &amp;#34;@testing-library/user-event&amp;#34;: &amp;#34;^12.1.10&amp;#34;,
    &amp;#34;@types/jest&amp;#34;: &amp;#34;^26.0.15&amp;#34;,
    &amp;#34;@types/node&amp;#34;: &amp;#34;^12.0.0&amp;#34;,
    &amp;#34;@types/react&amp;#34;: &amp;#34;^17.0.0&amp;#34;,
    &amp;#34;@types/react-dom&amp;#34;: &amp;#34;^17.0.0&amp;#34;,
    &amp;#34;react&amp;#34;: &amp;#34;^17.0.2&amp;#34;,
    &amp;#34;react-dom&amp;#34;: &amp;#34;^17.0.2&amp;#34;,
    &amp;#34;react-scripts&amp;#34;: &amp;#34;4.0.3&amp;#34;,
    &amp;#34;typescript&amp;#34;: &amp;#34;^4.1.2&amp;#34;,
    &amp;#34;web-vitals&amp;#34;: &amp;#34;^1.0.1&amp;#34;,
    &amp;#34;axios&amp;#34;: &amp;#34;^0.19.0&amp;#34;
  },
  [..]
  &amp;#34;eslintConfig&amp;#34;: {
    &amp;#34;extends&amp;#34;: [
      &amp;#34;react-app&amp;#34;,
      &amp;#34;react-app/jest&amp;#34;
    ]
  },
  [..]
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Configure HP Printer for Linux</title>
      <link>https://www.hascode.com/configure-hp-printer-for-linux/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/configure-hp-printer-for-linux/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to install &lt;code&gt;hplibs&lt;/code&gt; thats all ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;sudo apt install hplip hplip-gui xsane
hp-setup &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
hp-plugin&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Fastest way is to enter the printer’s IP address, for network scans
it might be necessary to disable/modify the firewall.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_resources&#34;&gt;Resources&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://developers.hp.com/hp-linux-imaging-and-printing/&#34;&gt;HP Linux Imaging and Printing&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://forums.linuxmint.com/viewtopic.php?t=279429&#34;&gt;Detailed article from Linuxmint forums&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitHub Release Pipeline for Java</title>
      <link>https://www.hascode.com/github-release-pipeline-for-java/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/github-release-pipeline-for-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Set up Maven build pipeline for a Java 11 app&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Release Maven artifact on GitHub using GitHub actions&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_maven&#34;&gt;Setup Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Assuming that we have a project named &lt;code&gt;sample-app&lt;/code&gt; released for my &lt;code&gt;hascode&lt;/code&gt; GitHub account:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding some release information to our project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;bookmark-manager
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;hasCode.com Bookmark Manager&amp;lt;/description&amp;gt;


  &amp;lt;scm&amp;gt;
    &amp;lt;developerConnection&amp;gt;scm:git:https://github.com/hascode/sample-app.git
    &amp;lt;/developerConnection&amp;gt;
  &amp;lt;/scm&amp;gt;


  &amp;lt;distributionManagement&amp;gt;
    &amp;lt;repository&amp;gt;
      &amp;lt;id&amp;gt;github&amp;lt;/id&amp;gt;
      &amp;lt;name&amp;gt;GitHub&amp;lt;/name&amp;gt;
      &amp;lt;url&amp;gt;https://maven.pkg.github.com/hascode/sample-app&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
  &amp;lt;/distributionManagement&amp;gt;


  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
    &amp;lt;project.scm.id&amp;gt;github&amp;lt;/project.scm.id&amp;gt;
  &amp;lt;/properties&amp;gt;

  [..]
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Install Docker on Linux</title>
      <link>https://www.hascode.com/install-docker-on-linux/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/install-docker-on-linux/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Installing a specific Docker version on (Debian-based) Linux&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Freeze the version to avoid automatic updates&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;

sudo add-apt-repository \ &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
   &amp;#34;deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable&amp;#34;

sudo apt-get update &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;

sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;

sudo apt-mark hold docker-ce &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Add the Docker GPG key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Add the Docker repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;3&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Update the index&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;4&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Install docker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;5&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Freeze the version to avoid unwanted automatic updates&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Install Kubernetes Components - Kubeadm, Kubectl, Kubelet</title>
      <link>https://www.hascode.com/install-kubernetes-components-kubeadm-kubectl-kubelet/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/install-kubernetes-components-kubeadm-kubectl-kubelet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Install kubeadm, kubectl and kubelet on Debian-based Linux&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Freeze their versions to avoid automatic updates&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;

cat &amp;lt;&amp;lt; EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

sudo apt-get update &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;

sudo apt-get install -y kubelet=1.15.7-00 kubeadm=1.15.7-00 kubectl=1.15.7-00 &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;

sudo apt-mark hold kubelet kubeadm kubectl &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Add the GPG key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Add the kubernetes repo to the sources list&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;3&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Update the index&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;4&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Install kubelet, kubeadm and kubectl
&lt;div class=&#34;admonitionblock warning&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-warning&#34; title=&#34;Warning&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
It’s important to use the same version for kubelet, kubeadm and kubectl.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JUnit5 Java Maven Snippet</title>
      <link>https://www.hascode.com/junit5-java-maven-snippet/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/junit5-java-maven-snippet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Use JUnit Maven BOM for version alignment&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add minimal dependencies for JUnit5 Java Projekt&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Excerpt from the &lt;a href=&#34;https://maven.apache.org&#34;&gt;Maven&lt;/a&gt; project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependencyManagement&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.junit&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;junit-bom&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;5.7.1&amp;lt;/version&amp;gt;
      &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;
      &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/dependencyManagement&amp;gt;

&amp;lt;dependencies&amp;gt;
  &amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;junit-jupiter&amp;lt;/artifactId&amp;gt;
    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
  &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit5 does not work with older versions of the Maven Compiler Plugin and the Surefire Plugin used for test execution.
Setting their versions in the &lt;code&gt;pom.xml&lt;/code&gt; is done like this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>MySQL and phpMyAdmin Setup with Docker-Compose</title>
      <link>https://www.hascode.com/mysql-and-phpmyadmin-setup-with-docker-compose/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/mysql-and-phpmyadmin-setup-with-docker-compose/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup mySQL with phpMyAdmin connected using docker-compose (for development purpose)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;docker-compose installed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;version: &amp;#39;3.2&amp;#39;

services:
   db:
      image: mysql:8.0
      container_name: mysql-container
      restart: always
      ports:
       - &amp;#39;6603:3306&amp;#39;
      environment:
        MYSQL_ROOT_PASSWORD: 12345678

   app:
      depends_on:
       - db
      image: phpmyadmin/phpmyadmin
      container_name: phpmyadmin
      restart: always
      ports:
       - &amp;#39;8080:80&amp;#39;
      environment:
        PMA_HOST: db&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_running&#34;&gt;Running&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker-compose up
Starting mysql-container ... done
Starting phpmyadmin      ... done
Attaching to mysql-container, phpmyadmin
[..]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
We may now login using the following ultra-secure credentials ;)
User: &lt;code&gt;root&lt;/code&gt;, Password: &lt;code&gt;12345678&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Package a Spring Boot App as RPM</title>
      <link>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Package a Spring Boot Service as RPM Package&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure systemd integration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add install/uninstall hooks to create users, directories etc.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_setup&#34;&gt;Maven Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;parent&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.4.2&amp;lt;/version&amp;gt;
    &amp;lt;relativePath/&amp;gt;
  &amp;lt;/parent&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;

  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
  &amp;lt;/properties&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-actuator&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;

  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
      &amp;lt;plugin&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
        &amp;lt;groupId&amp;gt;de.dentrassi.maven&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;rpm&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.5.0&amp;lt;/version&amp;gt;
        &amp;lt;executions&amp;gt;
          &amp;lt;execution&amp;gt;
            &amp;lt;goals&amp;gt;
              &amp;lt;goal&amp;gt;rpm&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
          &amp;lt;/execution&amp;gt;
        &amp;lt;/executions&amp;gt;
        &amp;lt;configuration&amp;gt;
          &amp;lt;packageName&amp;gt;sample-app&amp;lt;/packageName&amp;gt;
          &amp;lt;skipSigning&amp;gt;true&amp;lt;/skipSigning&amp;gt;
          &amp;lt;group&amp;gt;Application/Misc&amp;lt;/group&amp;gt;
          &amp;lt;requires&amp;gt;
            &amp;lt;require&amp;gt;java-11-openjdk-headless&amp;lt;/require&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
          &amp;lt;/requires&amp;gt;
          &amp;lt;entries&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0755&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/log&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;sample-app&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;sample-app&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0750&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/sample-app.jar&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.build.directory}/${project.build.finalName}.jar&amp;lt;/file&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;6&#34;&gt;&lt;/i&gt;&lt;b&gt;(6)&lt;/b&gt;
              &amp;lt;name&amp;gt;/usr/lib/systemd/system/sample-app.service&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/sample-app.service&amp;lt;/file&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
          &amp;lt;/entries&amp;gt;
          &amp;lt;beforeInstallation&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;7&#34;&gt;&lt;/i&gt;&lt;b&gt;(7)&lt;/b&gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeInstallation&amp;gt;
          &amp;lt;afterInstallation&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/postinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/afterInstallation&amp;gt;
          &amp;lt;beforeRemoval&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preuninstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeRemoval&amp;gt;
          &amp;lt;license&amp;gt;All rights reserved&amp;lt;/license&amp;gt;
        &amp;lt;/configuration&amp;gt;
      &amp;lt;/plugin&amp;gt;
    &amp;lt;/plugins&amp;gt;
  &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Prettier Code Formatter Configuration</title>
      <link>https://www.hascode.com/prettier-code-formatter-configuration/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/prettier-code-formatter-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup Prettier for different environments / IDEs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run Prettier via git hooks&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_install_prettier&#34;&gt;Install Prettier&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Install via npm&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;npm install --save-dev --save-exact prettier&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add empty configuration file&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;echo {}&amp;gt; .prettierrc.json&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Create Prettier ignore file &lt;code&gt;.prettierignore&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;# Ignore artifacts:
build
coverage&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Format all project files with Prettier:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;npx prettier --write .&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_git_hooks&#34;&gt;Git Hooks&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Adding the following lines to the project’s &lt;code&gt;package-json&lt;/code&gt; makes ESLint and Prettier run before each commit:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;{
  &amp;#34;husky&amp;#34;: {
    &amp;#34;hooks&amp;#34;: {
      &amp;#34;pre-commit&amp;#34;: &amp;#34;lint-staged&amp;#34;
    }
  },
  &amp;#34;lint-staged&amp;#34;: {
    &amp;#34;**/*&amp;#34;: &amp;#34;prettier --write --ignore-unknown&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up a Kubernetes Master Node</title>
      <link>https://www.hascode.com/setting-up-a-kubernetes-master-node/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/setting-up-a-kubernetes-master-node/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup a kubernetes master node on a Linux machine&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Initialize the cluster on the master node&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;sudo kubeadm init --pod-network-cidr=10.244.0.0/16&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This might take a few minutes …​ afterward we set up our
local kubeconfig:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_verify_the_cluster_setup&#34;&gt;Verify the Cluster Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Shows that the cluster is responding and kubectl working:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl version&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Synology NAS sync from Linux with rsync over SSH</title>
      <link>https://www.hascode.com/synology-nas-sync-from-linux-with-rsync-over-ssh/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/synology-nas-sync-from-linux-with-rsync-over-ssh/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Configure the NAS to accept SSH and Rsync connections&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable SSH with pub-Key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy pub key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Synchronize files with rsync&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We assume, that the Synology NAS basic configuration has been applied and that a shared directory is ready to be our sync target.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We will be synchronizing the directory &lt;code&gt;/tmp/samples&lt;/code&gt; to the NAS directory
&lt;code&gt;/volumes/samples&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_synology_nas_setup&#34;&gt;Synology NAS Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we need to enable some services on our NAS.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>WordPress Docker Setup</title>
      <link>https://www.hascode.com/wordpress-docker-setup/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/wordpress-docker-setup/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Run WordPress via Docker / Docker-Compose&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Increase the Upload Filesize Limit&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_docker_compose_configuration&#34;&gt;Create Docker Compose Configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Create a &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;version: &amp;#39;3.1&amp;#39;

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb
    volumes:
      - wordpress:/var/www/html

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: &amp;#39;1&amp;#39;
    volumes:
      - db:/var/lib/mysql

volumes:
  wordpress:
  db:&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_run_docker_compose_start_containers&#34;&gt;Run Docker Compose / Start Containers&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker-compose up
WARNING: Found orphan containers (wordpress-docker_phpmyadmin_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Starting wordpress-docker_db_1        ... done
Starting wordpress-docker_wordpress_1 ... done
Attaching to wordpress-docker_db_1, wordpress-docker_wordpress_1
[..]
db_1         | 2021-04-03T18:58:17.247963Z 0 [Note] mysqld: ready for connections.
db_1         | Version: &amp;#39;5.7.33&amp;#39;  socket: &amp;#39;/var/run/mysqld/mysqld.sock&amp;#39;  port: 3306  MySQL Community Server (GPL)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Python Data Science Snippets</title>
      <link>https://www.hascode.com/python-data-science-snippets/</link>
      <pubDate>Wed, 08 Jul 2020 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/python-data-science-snippets/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock caution&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-caution&#34; title=&#34;Caution&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
This article needs update!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_jupyter&#34;&gt;Jupyter&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_installation&#34;&gt;Installation&lt;/h3&gt;
&lt;div class=&#34;sect3&#34;&gt;
&lt;h4 id=&#34;_pip_in_venv&#34;&gt;pip in venv&lt;/h4&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mkdir newdir &amp;amp;&amp;amp; cd newdir
python -m venv .venv &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
source .venv/bin/activate &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
pip install jupyter numpy pandas sqlalchemy &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
pip freeze &amp;gt; requirements.txt &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
python -m jupyter lab &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
deactivate &lt;i class=&#34;conum&#34; data-value=&#34;6&#34;&gt;&lt;/i&gt;&lt;b&gt;(6)&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;create a new &lt;a href=&#34;https://docs.python.org/3/library/venv.html&#34;&gt;virtual environment&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;activate the environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;3&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;install several libraries into the activated environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;4&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;create a list with all dependencies install for sharing or reinstallation later&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;5&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;start jupyter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;6&#34;&gt;&lt;/i&gt;&lt;b&gt;6&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;having finished we might want to exit the virtual environment&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>AsciiDoc Snippets</title>
      <link>https://www.hascode.com/asciidoc-snippets/</link>
      <pubDate>Fri, 10 May 2019 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/asciidoc-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_asciidoc_syntax_and_features&#34;&gt;AsciiDoc Syntax and Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_using_asciimath&#34;&gt;Using AsciiMath&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Include stem into document header&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;:stem:&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then use inline, e.g.:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;stem:[sqrt(4) = 2]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;or as block&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;[stem]
++++
sum_(i=1)^n i^3=((n(n+1))/2)^2
++++&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://asciimath.org/#syntax&#34;&gt;AsciiMath Syntax&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_collapsible_blockssections&#34;&gt;Collapsible Blocks/Sections&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;.Click to show the content
[%collapsible]
====
Long content here...
====&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.asciidoctor.org/asciidoc/latest/blocks/collapsible/&#34;&gt;Source: Asciidoctor Docs&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_tools_and_ecosystem&#34;&gt;Tools and Ecosystem&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_docker_podman_container&#34;&gt;Docker / Podman Container&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Including stuff like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Diagram with ERD and Graphviz integration (supports plantuml and graphiz diagrams)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor PDF&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor EPUB3&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor FB2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Mathematical&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor reveal.js&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AsciiMath&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source highlighting using Rouge, CodeRay or Pygments&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Confluence&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Bibtex&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Kroki&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Reducer&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Terminal Based Progress Bar for Java Applications</title>
      <link>https://www.hascode.com/terminal-based-progress-bar-for-java-applications/</link>
      <pubDate>Sun, 31 Mar 2019 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/terminal-based-progress-bar-for-java-applications/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed to add a progress bar to a Java based terminal/console application and I used a specific library that I’d like to demonstrate in the following snippet.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;terminal-progress-bar-1024x774.png&#34; alt=&#34;Terminal based Progress Bar for Java&#34; width=&#34;614&#34; height=&#34;464&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Terminal based Progress Bar for Java&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we just need to add the following dependency:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;me.tongfei&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;progressbar&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.7.3&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_application&#34;&gt;Sample Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The application shows how to set up the progress bar and how to advance its status by-one, by a given amount or to a specific number.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Annotation based Kubernetes and Openshift Manifests for Java Applications with ap4k</title>
      <link>https://www.hascode.com/annotation-based-kubernetes-and-openshift-manifests-for-java-applications-with-ap4k/</link>
      <pubDate>Thu, 28 Feb 2019 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/annotation-based-kubernetes-and-openshift-manifests-for-java-applications-with-ap4k/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing our manifest files for Kubernetes / Openshift often forces us to edit xml, json and yml files by hand.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A new library, ap4k allows to specify metadata for these manifest files directly in our Java code using annotations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example I am going to demonstrate how to generate manifest files using Maven and ap4k.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ap4k-tutorial-logo-1024x774.png&#34; alt=&#34;ap4k Tutorial&#34; width=&#34;614&#34; height=&#34;464&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. ap4k Tutorial&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; we just need to add the following one dependency to our project’s &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Throwaway Containers for Integration Testing with Java, JUnit 5 and Testcontainers.</title>
      <link>https://www.hascode.com/using-throwaway-containers-for-integration-testing-with-java-junit-5-and-testcontainers./</link>
      <pubDate>Wed, 30 Jan 2019 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-throwaway-containers-for-integration-testing-with-java-junit-5-and-testcontainers./</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot of boilerplate code is written when developers need to test their applications with different connected systems like databases, stream platforms and other collaborators.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Docker allows to handle those dependencies but there is still some glue code required to bind the container’s lifecycle and the configuration to the concrete integration test.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Testcontainers is a testing library that offers lightweight throwaway instances of anything able to run in a Docker container, with bindings to configure the specific containers and also provides wrappers to manage our own custom containers.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Next Steps to Pattern Matching in Java with Java 12 and Switch Expressions aka JEP 325</title>
      <link>https://www.hascode.com/next-steps-to-pattern-matching-in-java-with-java-12-and-switch-expressions-aka-jep-325/</link>
      <pubDate>Sun, 30 Dec 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/next-steps-to-pattern-matching-in-java-with-java-12-and-switch-expressions-aka-jep-325/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It is interesting to see how the Java language evolves over time. One thing that I have always missed is pattern matching in a way similar to languages like Scala.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there are different JDK Enhancement Proposals (JEP) aiming at bringing us a little bit closer to pattern matching, especially JEP 325 aka Switch Expressions that are included in the current Java 12 preview or JEP 305 aka Pattern Matching for instanceof.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Implementing Reactive Client-Server Communication over TCP or Websockets with RSocket and Java</title>
      <link>https://www.hascode.com/implementing-reactive-client-server-communication-over-tcp-or-websockets-with-rsocket-and-java/</link>
      <pubDate>Sun, 25 Nov 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/implementing-reactive-client-server-communication-over-tcp-or-websockets-with-rsocket-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Reactive design or reactive architecture has an impact on how modern software systems are implemented. RSocket is a project that aims to adapt the benefits of the patterns described in the Reactive Manifesto and resulting tools like Reactive Streams or Reactive Extensions  to a formal new communication protocol.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;RSocket works with TCP, WebSockets and Aeron transport layers and offers additional features like session resumption.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’m going to demonstrate how to implement simple client-server communication over TCP and Websockets for different interaction models like request-response, request-stream, fire-and-forget and event subscription.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Whitesource Snippets</title>
      <link>https://www.hascode.com/whitesource-snippets/</link>
      <pubDate>Sun, 11 Nov 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/whitesource-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_whitesource_configuration_for_gitlab_pipeline&#34;&gt;Whitesource Configuration for GitLab Pipeline&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following configuration derives values from predefined GitLab Variables&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;whitesource.conf&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;# Providing project information from GitLab CI
wss_project_name=&amp;#34;$CI_PROJECT_NAME&amp;#34;
wss_project_version=&amp;#34;$CI_JOB_ID&amp;#34;
wss_project_tag=&amp;#34;$CI_COMMIT_TAG&amp;#34;

# Providing product information
wss_product_name=&amp;#34;The Product Name&amp;#34;
wss_product_version=&amp;#34;$POM_VERSION&amp;#34;

# Analyze the Maven POM and its transitive dependencies only, no file-system check
# Use this only if you don&amp;#39;t have any extra checked in jar-files or stuff like that!
fileSystemScan=false
includes=pom.xml

# Only scanning the Maven project
resolveAllDependencies=false
maven.resolveDependencies=true&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Analyzing Java Applications on the Fly with Arthas</title>
      <link>https://www.hascode.com/analyzing-java-applications-on-the-fly-with-arthas/</link>
      <pubDate>Wed, 31 Oct 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/analyzing-java-applications-on-the-fly-with-arthas/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Arthas created by Alibaba is a tool that allows developers to connect to running Java applications without stopping them or suspending threads for debugging the application from the console.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It offers features like monitoring invocation statistics, searching for classes and methods in the classloaders, view method invocation details (like parameters), show the stack trace of a method invocation, monitor system metrics and others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following examples I’m going to demonstrate some of these features applied to a running web application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Capacity Planning using the Universal Scalability Law with Java and usl4j</title>
      <link>https://www.hascode.com/capacity-planning-using-the-universal-scalability-law-with-java-and-usl4j/</link>
      <pubDate>Sun, 30 Sep 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/capacity-planning-using-the-universal-scalability-law-with-java-and-usl4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Capacity planning is an important task when trying to anticipate resources and scaling factors for our applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The usl4j library offers us an easy abstraction for Neil J. Gunther’s Universal Scalability Law and allows us to build up a predictive model based on the parameters throughput, latency and concurrent operations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a basic input set of two of these parameters, we are able to predict how these values change if we change one input parameter so that we can build our infrastructure or systems according to our SLAs.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing OpenAPI Swagger Schema Compliance with Java, JUnit and assertj-swagger</title>
      <link>https://www.hascode.com/testing-openapi-swagger-schema-compliance-with-java-junit-and-assertj-swagger/</link>
      <pubDate>Fri, 31 Aug 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-openapi-swagger-schema-compliance-with-java-junit-and-assertj-swagger/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OpenAPI and Swagger API description format are becoming important standards to specify API contracts for RESTful web services and the Microservices trend pushes the need for such contracts even further.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore arises the need for software architects, testers and developers to write tests to verify if an exposed API follows such a specified contract.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I will demonstrate a setup with Java, Maven, JUnit and the designated contract-testing-library, assertj-swagger that verifies the validity of such a contract exposed by a Spring Boot application against a local stored definition.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing Java Applications for Resilience by Simulating Network Problems with Toxiproxy, JUnit and the Docker Maven Plugin</title>
      <link>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</link>
      <pubDate>Sun, 29 Jul 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When implementing distributed systems, client-server architectures and simple applications with network related functionalities, everything is fine when we’re in the development or in the testing stage because the network is reliable and the communicating systems are not as stressed as they are in production.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But to sleep well we want to validate how resilient we have implemented our systems, how they behave when the network fails, the latency rises, the bandwidth is limited, connections time out and so on.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using jetstreamDB as in-memory Database for Java</title>
      <link>https://www.hascode.com/using-jetstreamdb-as-in-memory-database-for-java/</link>
      <pubDate>Sat, 30 Jun 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-jetstreamdb-as-in-memory-database-for-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JetstreamDB is a in-memory database engine for Java that claims to be built for ultra-high speed and the ability of managing complex data structures by storing real Java objects instead of serializing data structures to other database specific formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example I would like to demonstrate how to create and read items from such a database by building a small article management sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jetstreamdb-intellij.png&#34; alt=&#34;Using jetstreamDB for Java&#34; width=&#34;520&#34; height=&#34;345&#34;/&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Managing Architecture Decision Records with ADR-Tools</title>
      <link>https://www.hascode.com/managing-architecture-decision-records-with-adr-tools/</link>
      <pubDate>Sun, 27 May 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/managing-architecture-decision-records-with-adr-tools/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Every software project includes a set of architecture decisions defining boundaries and constraints for further design and implementation.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s important to document those decisions somehow or else a development team might not know which decisions where made and with which assumptions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Or they know the decision but are missing the context and the consequences and therefore decisions are blindly accepted or blindly changed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I will show how to structure architecture decisions in so called Architecture Decision Records and how to manage them with a simple tool named ADR-Tools.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Analyzing Java Problems – Tools, Snippets and Workflows</title>
      <link>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</link>
      <pubDate>Mon, 30 Apr 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When we need to investigate the cause for a dysfunctional Java application we have a plethora of tools available that on the one hand help us in gathering information, artifacts and statistics and on the other hand help us in processing this information and identifying possible problems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following list of tools, snippets, workflows and information about specific artifacts could provide a starting point for analyzing such problems and covers topics like heap-dumps, thread-dumps, heap-histograms, heap-regions, garbage-collection-logs, hotspot-compiler/codecache-logs, debugging native-memory, tools for heap-dump-analysis, JVM unified logging and more..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up Kafka Brokers for Testing with Kafka-Unit</title>
      <link>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</link>
      <pubDate>Wed, 28 Mar 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing test for applications that interact with Kafka brokers we often need to setup a decent environment including an instance of Kafka and ZooKeeper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though Kafka ships with some classes for testing, setting up a simple testing environment is quite easier with the kafka-unit library that offers JUnit test rule support or a fast programmatic setup within no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example, I’d like to show how create a simple setup using Maven, Surefire and kafka-unit.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>AWS Snippets</title>
      <link>https://www.hascode.com/aws-snippets/</link>
      <pubDate>Thu, 01 Mar 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/aws-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_aws_command_line_interface&#34;&gt;AWS Command Line Interface&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_installation&#34;&gt;Installation&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ curl &amp;#34;https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.30.zip&amp;#34; -o &amp;#34;awscliv2.zip&amp;#34;
unzip awscliv2.zip
sudo ./aws/install&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html&#34;&gt;AWS Documentation&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_rds&#34;&gt;RDS&lt;/h3&gt;
&lt;div class=&#34;sect3&#34;&gt;
&lt;h4 id=&#34;_export_database_configuration&#34;&gt;Export Database Configuration&lt;/h4&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export instance configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-db-instances --db-instance-identifier arn:aws:rds:eu-central-1:123456789:db:hascode-prd-db --no-paginate&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export parameter group configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-db-parameters --db-parameter-group-name PARAM_GROUP_NAME &amp;gt;&amp;gt; param_group_conf.json&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export option group configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-option-groups --option-group-name OPT_GROUP_NAME &amp;gt;&amp;gt; option_group_conf.json&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_generate_signed_urls_with_linux_tools&#34;&gt;Generate Signed URLs with Linux Tools&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. for accessing a website behind a CloudFront distribution using a &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html&#34;&gt;canned policy&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Write the policy file&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Implementing, Testing and Running Procedures for Neo4j</title>
      <link>https://www.hascode.com/implementing-testing-and-running-procedures-for-neo4j/</link>
      <pubDate>Tue, 27 Feb 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/implementing-testing-and-running-procedures-for-neo4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot of features are already included in the Neo4j graph database system but sometimes we want to extends its capabilities and implement functions and procedures by ourselves that we may reuse.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I will demonstrate how to implement a procedure for Neo4j, how to write and run tests using JUnit and an embedded graph database and last but not least how to setup Neo4j with Docker and our stored procedure installed in no time.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Reactive Streams – Java 9 Flow API, RxJava, Akka and Reactor Examples</title>
      <link>https://www.hascode.com/reactive-streams-java-9-flow-api-rxjava-akka-and-reactor-examples/</link>
      <pubDate>Sun, 14 Jan 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/reactive-streams-java-9-flow-api-rxjava-akka-and-reactor-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Reactive Streams is an initiative trying to standardize asynchronous stream processing with non-blocking  back-pressure. With Java 9, new classes in the &lt;em&gt;java.util.concurrent.flow&lt;/em&gt; package offer a semantically equivalent counterpart to this standard that may be adopted by other frameworks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re implementing examples for reactive streams with Java 9 and the Flow API, with RxJava2, with Akka, with Reactor and finally there is an example in RxJava1, too though it does not follow the standard.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Software Architecture Exploration and Validation with jqAssistant, Neo4j and Cypher</title>
      <link>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</link>
      <pubDate>Sun, 31 Dec 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other software system analyzing and validation tools before but today I would like to introduce a new tool named jqAssistant that supports software architects, developers and analysts in a variety of tasks like analyzing given structures, validating architectural or quality constraints and generating reports.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore jqAssistant analyzes given projects or artifacts and stores the gathered information – that is enriched by a variety of existing plugin-ins – in a Neo4j graph database.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Identity Management, One-Time-Passwords and Two-Factor-Auth with Spring Boot and Keycloak</title>
      <link>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</link>
      <pubDate>Sun, 26 Nov 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Communicating with  identity and access management systems is a common task for many web-applications exposing secured resources.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Keycloak is an open source software that provides not also such authorization services but also offers a lot of features from Single-Sign-On, Identity-Brokering, Social-Login, User-Federation, multiple client-adapters up to the administration console or support for protocols like OpenID, SAML, OAuth2, Kerberos and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate how to integrate a Spring Boot web application with Keycloak and configure an authentication flow that requires a two-factor-authentication with user credentials and also one-time-passwords.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Java Mission Control (JMC) and Flight Recorder (JFR)</title>
      <link>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</link>
      <pubDate>Wed, 11 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Java Mission Control and the Java Flight Recorder allow us to capture run-time information from our Java applications without much overhead and aggregate profiling information.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written down the commands that I’m using the most when profiling a Java application with this tool chain in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;java-mission-control-reports-1024x629.png&#34; alt=&#34;java mission control reports 1024x629&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Java Mission Control - Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_running_java_mission_control_jmc&#34;&gt;Running Java Mission Control (JMC)&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We may start the JMC user interface shown above using the &lt;em&gt;jmc&lt;/em&gt; command that is shipped with Oracle’s JRockit or Java (since Java 7 update 40).&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Detecting Vulnerable Dependencies with Maven and the OWASP Dependency Check Plugin</title>
      <link>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</link>
      <pubDate>Tue, 03 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;On the one hand adding dependencies to a project is easy, on the other hand securing a project and checking for vulnerable dependencies is way harder.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OWASP dependency check plugin for Maven allows us to scan our project’s dependencies for know vulnerabilities.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate its usage in the following short example.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;vulnerabilities-report-1024x867.png&#34; alt=&#34;vulnerabilities report 1024x867&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OWASP Vulnerability Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to add one plugin-dependency to our &lt;a href=&#34;http://maven.apache.org&#34;&gt;Mavenized&lt;/a&gt; project’s &lt;em&gt;pom.xml&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Microbenchmarks with JMH / Java Microbenchmark Harness</title>
      <link>https://www.hascode.com/microbenchmarks-with-jmh-/-java-microbenchmark-harness/</link>
      <pubDate>Mon, 02 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/microbenchmarks-with-jmh-/-java-microbenchmark-harness/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing microbenchmarks for parts of our applications is not always easy – especially when the internals of the virtual machine, the just-in-time-compiler and such things are coming into effect.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java Microbenchmark Harness is a tool that takes care of creating JVM warmup-cycles, handling benchmark-input-parameters and running benchmarks as isolated processes etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now following a few short examples for writing microbenchmarks with JMH.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;java-jmh-microbenchmark-in-intellij.png&#34; alt=&#34;java jmh microbenchmark in intellij&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Java JMH Microbenchmarks running in IntelliJ&lt;/div&gt;</description>
    </item>
    <item>
      <title>Downloading Maven Artifacts from a POM file programmatically with Eclipse Aether</title>
      <link>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</link>
      <pubDate>Fri, 08 Sep 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes I need to resolve Maven dependencies programmatically. Eclipse Aether is a library for working with artifact repositories and I’ll be using it in the following example to read dependency trees from a given POM descriptor file and download each dependency from a remote Maven repository to a local directory.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;using-eclipse-aether.png&#34; alt=&#34;using eclipse aether&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Using Eclipse Aether.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding a bunch of dependencies to our project’s &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
    &amp;lt;aetherVersion&amp;gt;1.1.0&amp;lt;/aetherVersion&amp;gt;
    &amp;lt;mavenVersion&amp;gt;3.2.1&amp;lt;/mavenVersion&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using JUnit 5 Parameterized Tests, Argument Sources and Converters</title>
      <link>https://www.hascode.com/using-junit-5-parameterized-tests-argument-sources-and-converters/</link>
      <pubDate>Sat, 19 Aug 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-junit-5-parameterized-tests-argument-sources-and-converters/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With JUnit 5 the possibilities to write parameterized tests have changed and improved a lot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short overview covers all new types of possible parameter sources for JUnit 5 tests as well as the new conversion API for test arguments.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we’re showing how parameterized tests were written in JUnit 4.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;running-junit5-in-intellij-1024x721.png&#34; alt=&#34;Running JUnit5 in IntelliJ&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Running JUnit5 in IntelliJ&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_about&#34;&gt;About&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We will be covering all available types of parameter sources in the following sections – all that you need as a prerequisite is Java ™, &lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven&lt;/a&gt; and a few minutes of your time.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Assuring Architectural Rules with ArchUnit</title>
      <link>https://www.hascode.com/assuring-architectural-rules-with-archunit/</link>
      <pubDate>Mon, 03 Jul 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/assuring-architectural-rules-with-archunit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Maintaining architecture rules and constraints for a specific software project or an application is not easy as textual documentation is easily forgotten after a while and hard to verify.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ArchUnit is a testing library that allows developers and software architects to write down such rules as executable tests that may be run by the development teams and the integration servers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article I will demonstrate the basic features of this library by applying rules and constraints to an existing application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Template Driven Test POJO Generation with Fixture Factory and Java</title>
      <link>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</link>
      <pubDate>Tue, 20 Jun 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In our tests we often need to create a bunch of test-objects that are populated with random-data. This data needs to follow specific rules as identifiers need to be unique or must be incremented, string-properties must follow special conventions and so on. In the following short tutorial I will demonstrate how to generate such test data using the Fixture Factory library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;fixture-factory-running-with-junit-in-intellij-1024x752.png&#34; alt=&#34;fixture factory running with junit in intellij 1024x752&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Fixture Factory and JUnit&lt;/div&gt;</description>
    </item>
    <item>
      <title>Distributed Authorization and Contextual Caveats for Java with Macaroons and jmacaroons</title>
      <link>https://www.hascode.com/distributed-authorization-and-contextual-caveats-for-java-with-macaroons-and-jmacaroons/</link>
      <pubDate>Wed, 31 May 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/distributed-authorization-and-contextual-caveats-for-java-with-macaroons-and-jmacaroons/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Google’s Macaroons are a mechanism to establish distributed authorization. The distinction to the classical bearer-token is their ability that they may be used to perform an action under certain restrictions and may then be used to create a new macaroon with stricter restrictions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short tutorial demonstrates how to create macaroons, serialize and deserialize them, add first- and third-party caveats and finally to verify them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jmacarons-in-intellij-1024x748.png&#34; alt=&#34;jmacarons in intellij 1024x748&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. jmacaroons example&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Java 9 Modules and JPMS</title>
      <link>https://www.hascode.com/snippet-java-9-modules-and-jpms/</link>
      <pubDate>Mon, 17 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-9-modules-and-jpms/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Playing around with the new module system in Java 9 I simply wanted to write down how to achieve the most basic tasks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore I created the following module how-to based upon a simple demonstration project consisting of two dependant modules.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;component-diagram.png&#34; alt=&#34;component diagram&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Modules Component-Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites_and_setup&#34;&gt;Prerequisites and Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need an early access build of the Java ™ 9 JDK, available for download &lt;a href=&#34;https://jdk9.java.net/download/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we should make sure, that our environment variable &lt;em&gt;JAVA_HOME&lt;/em&gt; is set to the corresponding directory and calling &lt;em&gt;java -version&lt;/em&gt; returns something similar to this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing BDD-Style Webservice Tests with Karate and Java</title>
      <link>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</link>
      <pubDate>Thu, 06 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is a new testing framework out there called Karate that is build on top of the popular Cucumber framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Karate makes it easy to script interactions with out web-services under test and verify the results. In addition it offers us a lot of useful features like parallelization, script/feature re-use, data-tables, JsonPath and XPath support, gherkin syntax, switchable staging-configurations and many others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’ll be writing different scenarios and features for a real-world RESTful web-service to demonstrate some of its features.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Integrating the Drools Business Rules Management System in 5 Minutes</title>
      <link>https://www.hascode.com/snippet-integrating-the-drools-business-rules-management-system-in-5-minutes/</link>
      <pubDate>Thu, 30 Mar 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-integrating-the-drools-business-rules-management-system-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Drools is a slim Business Rules Management System (BRMS) solution with different integrations and tools available.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short snippet I’d like to demonstrate how to integrate a simple rule engine into an application using this library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;example-drools-app-in-eclipse-ide-1024x792.png&#34; alt=&#34;example drools app in eclipse ide 1024x792&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Drools Example running in Eclipse IDE&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using &lt;a href=&#34;https://gradle.org/&#34;&gt;Gradle&lt;/a&gt; here we only need to add one dependency for &lt;em&gt;drools-compiler&lt;/em&gt; to our project’s &lt;em&gt;build.gradle&lt;/em&gt;. In addition, we’re adding a task to execute our application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Resilient Architecture in Practice – Circuit Breakers for Java: Failsafe, Javaslang, Hystrix and Vert.x</title>
      <link>https://www.hascode.com/resilient-architecture-in-practice-circuit-breakers-for-java-failsafe-javaslang-hystrix-and-vert.x/</link>
      <pubDate>Tue, 14 Feb 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/resilient-architecture-in-practice-circuit-breakers-for-java-failsafe-javaslang-hystrix-and-vert.x/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When dealing with remote services or APIs there is always the risk of latency issues, failures or connection losses. The worst thing to happen is when the remote service is down and our application hangs until the underlying protocol’s (e.g. TCP) connection timeout is reached and we’re receiving an exception. Until this moment is reached, our application might hang, memory is allocated for threads or bound objects and at last, our continuous requests might prevent the remote system from recovering.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Transforming JSON Structures with Java and JOLT</title>
      <link>https://www.hascode.com/transforming-json-structures-with-java-and-jolt/</link>
      <pubDate>Sun, 29 Jan 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/transforming-json-structures-with-java-and-jolt/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to web-services (especially RESTful web-services), configuration files or other data-descriptors, the JavaScript Object Notation, short: JSON is often used as format of choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As the task arises to transform these JSON structures, I have seen a variety of different approaches from converting JSON into XML using JAX-B, applying XSLT,  transforming into JSON again on the one hand to loading JSON structures into Hash-maps of Hash-maps (..) and manually removing single elements from these collections on the other hand.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling System Properties, Environment Variables, STDOUT/STDERR in JUnit Tests with System Rules</title>
      <link>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</link>
      <pubDate>Mon, 19 Dec 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When important data is written to STDIN/STDOUT and an application relies on specific system properties or environment variables, writing tests is getting more complicated.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;System Rules is a collection of JUnit rules that helps us writing Java tests for everything that deals with java.lang.System.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate how to deal with system properties, environment variables, STDOUT and STDERR and capturing both for testing e.g. for some golden master refactoring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Dependency Injection for Go with facebookgo-inject</title>
      <link>https://www.hascode.com/dependency-injection-for-go-with-facebookgo-inject/</link>
      <pubDate>Wed, 09 Nov 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/dependency-injection-for-go-with-facebookgo-inject/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Setting up a larger application using dependency injection always requires us developers to set up our application’s object graph.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Programming in Go there is a library that eases this task for us, offering a reflect based injector to set up the graph in a few steps, named facebookgo-inject.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article I’d like to demonstrate dependency injection using this library for a small sample application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;facebookgo-inject-tutorial-1024x740.png&#34; alt=&#34;facebookgo inject tutorial 1024x740&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Go dependency injection with facebookgo&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing a Websocket Chat in Go</title>
      <link>https://www.hascode.com/writing-a-websocket-chat-in-go/</link>
      <pubDate>Sat, 29 Oct 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-a-websocket-chat-in-go/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Learning the Go programming language,  I wanted to implement an application that I had written with other languages and frameworks before to get a grip on this language.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I tried to implement a really simple websocket chat server in Go and described my approach in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Go Websocket Chat Implementation&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;go-websocket-chat-server-1024x629.png&#34; alt=&#34;go websocket chat server 1024x629&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_writing_the_chat_server&#34;&gt;Writing the Chat Server&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Websocket Chat in Action&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;go-websocket-chat-in-action.png&#34; alt=&#34;go websocket chat in action&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Microservices with Bootique</title>
      <link>https://www.hascode.com/creating-microservices-with-bootique/</link>
      <pubDate>Sun, 18 Sep 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-microservices-with-bootique/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to writing microservices in Java, plenty of tools and frameworks exist. In the following tutorial, I’d like to demonstrate another minimalistic framework called Bootique by implementing a simple microservice exposing its functions either as a RESTful web-service or as a runnable command executed using the command line.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Bootique Command Line&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;bootique-command-line.png&#34; alt=&#34;bootique command line&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we’re adding the following elements to our project’s &lt;em&gt;pom.xml:&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Bootiques Bill of Materials as dependency management: &lt;em&gt;bootique-bom&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Jersey for our REST service: &lt;em&gt;bootique-jersey&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Logback for logging: &lt;em&gt;bootique-logback&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://maven.apache.org/plugins/maven-shade-plugin/&#34;&gt;Maven Shade Plugin&lt;/a&gt; to assemble our fat-jar&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Elasticsearch Integration Testing with Java</title>
      <link>https://www.hascode.com/elasticsearch-integration-testing-with-java/</link>
      <pubDate>Tue, 23 Aug 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/elasticsearch-integration-testing-with-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When building up search engines, indexing tons of data into a schema-less, distributed data store, Elasticsearch has always been a favourite tool of mine.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition to its core features, it also offers tools and documentation for us developers when we need to write integration tests for our Elasticsearch powered Java applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to implement a small sample application using Elasticsearch under the hood and how to write integration-tests with these tools for this application afterwards.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object Graph Mapping by Example with Neo4j OGM and Java</title>
      <link>https://www.hascode.com/object-graph-mapping-by-example-with-neo4j-ogm-and-java/</link>
      <pubDate>Mon, 18 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-graph-mapping-by-example-with-neo4j-ogm-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When integrating a Neo4j database into a Java application a developer often needs to map nodes and edges of the graph to corresponding Java classes of the domain model.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Neo4j OGM eases this work and allows us to map our domain objects to the graph database using simple annotations – similar to the Java Persistence API (JPA) for relational database management systems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to use Neo4j OGM to build a simple train timetable planner and a permission system mapping between graph, nodes, edges and POJOs.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>LDAP Testing with Java: ApacheDS vs Embedded-LDAP-JUnit</title>
      <link>https://www.hascode.com/ldap-testing-with-java-apacheds-vs-embedded-ldap-junit/</link>
      <pubDate>Mon, 04 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/ldap-testing-with-java-apacheds-vs-embedded-ldap-junit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing applications that interchange information with LDAP directory services there is always the need to write integration tests for these components and services.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore we need a the possibility to start-up an embedded LDAP server, fill it with test-data and control its life-cycle during the test-phases.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate two candidates that fulfil this purpose, the ApacheDS test integrations and a small library named embedded-ldap-junit.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Continuous Delivery with GitHub Cloud and GitHub Pipelines</title>
      <link>https://www.hascode.com/continuous-delivery-with-github-cloud-and-github-pipelines/</link>
      <pubDate>Fri, 01 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/continuous-delivery-with-github-cloud-and-github-pipelines/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Atlassian has added a continuous integration service as a new feature to their GitHub Cloud product. It’s called GitHub Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on GitHub.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with MQTT and Java with Moquette and Eclipse Paho</title>
      <link>https://www.hascode.com/playing-around-with-mqtt-and-java-with-moquette-and-eclipse-paho/</link>
      <pubDate>Wed, 01 Jun 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-mqtt-and-java-with-moquette-and-eclipse-paho/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The MQ Telemetry Transport Protocol (MQTT) is a lightweight publish/subscribe messaging protocol developed in 1999 that experiences a growing popularity due to trends like the Internet-of-Things and the need to exchange information between low powered devices with aspects as CPU and bandwidth usage in mind.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to set-up a broker for this protocol with the help of the Moquette library and how to create a client and publish messages for a specific topic using this broker and Eclipse Paho as client library.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Layout Testing with Galen, JUnit and Maven</title>
      <link>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</link>
      <pubDate>Mon, 16 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing tests not only to verify the behaviour of a web site but also the correctness of its layout especially for responsive websites is not always easy.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Luckily the Galen Framework eases the task of writing layout tests for us, offering a specialized domain-specific-language to write layout-specifications, it integrates well with Selenium Grid, Sauce Labs or BrowserStack, it offers an easy way to deal with different browser sizes and responsive designs and it generates nice, detailed test reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Load Testing Web Applications with Gatling and Maven</title>
      <link>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</link>
      <pubDate>Fri, 06 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other performance testing tools for web applications before. Nevertheless I’d like to demonstrate a library for load testing web applications named Gatling in combination with the build tool Maven.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Gatling offers a nice Scala DSL, high performance using Akka, Netty and asynchronous IO and plug-ins for all modern build tools.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’m going to show how to record simulations using an HTTP proxy, rewriting simulations in Scala and running and reporting simulations with Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Dynamic Configuration Management with Netflix Archaius and Apache ZooKeeper, Property-Files, JMX</title>
      <link>https://www.hascode.com/dynamic-configuration-management-with-netflix-archaius-and-apache-zookeeper-property-files-jmx/</link>
      <pubDate>Wed, 13 Apr 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/dynamic-configuration-management-with-netflix-archaius-and-apache-zookeeper-property-files-jmx/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though having written about other configuration management libraries for Java before, I would like to demonstrate another one today: Netflix Archaius.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Archaius offers some nice features like dynamic typed properties, thread-safe operations, an event system for property changes/updates, a JMX MBean to read and update properties and adaptors for a variety of dynamic configuration sources like Amazon DynamoDB, JDBC, URLs and Apache ZooKeeper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to read and update application configuration properties with Archaius and data sources like property-files, system-properties, JMX and Apache ZooKeeper.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up an OAuth2 Authorization Server and Resource Provider with Spring Boot</title>
      <link>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</link>
      <pubDate>Sun, 13 Mar 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;OAuth2 is a frequently used standard for authorization and with Spring Boot it is easy to set up authorization and resource server in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to set up an OAuth2 authorization server as well as a connected and secured resource server within a few minutes using Java, Maven and Spring Boot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;springboot-and-oauth2-in-action-1024x346.png&#34; alt=&#34;springboot and oauth2 in action 1024x346&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OAuth2 Flow with Spring Boot in Action&lt;/div&gt;</description>
    </item>
    <item>
      <title>Generating JUnit Tests with Java, EvoSuite and Maven</title>
      <link>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</link>
      <pubDate>Sun, 28 Feb 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Generating test suites for existing code allows us to verify the behaviour of an application before we’re making changes to its code base or for regression testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to derive test suites from an existing Java application using EvoSuite and the EvoSuite Maven plug-in.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;EvoSuite offers some nice features like running in a sandbox to avoid dangerous operations, virtual file-system and network and optimizing of different coverage criteria.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking HTTP Interaction with Java, JUnit and MockServer</title>
      <link>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</link>
      <pubDate>Tue, 05 Jan 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing tests for our software components sometimes we need to mock external services based on the HTTP protocol, might it be a RESTful web-service, an XML-RPC call or a simple GET request to some web-server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to create a mock HTTP server for testing and how to bootstrap and bind it to the life-cycle of a classical build-management tool like Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Reactive Programming: Handling Service Timeouts and Retries with Retry4j</title>
      <link>https://www.hascode.com/reactive-programming-handling-service-timeouts-and-retries-with-retry4j/</link>
      <pubDate>Wed, 02 Dec 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/reactive-programming-handling-service-timeouts-and-retries-with-retry4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Reactive Manifesto specifies responsive, resilient, elastic and message-driven as attributes for a reactive application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When implementing specific mechanisms to achieve this requirements, we often need to deal with timeout and retry-operations in our application and depending on our setup and environment, different tools and libraries exist to help us here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to handle exceptions and operation retries on service boundaries with a lesser know, slim library named Retry4j.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Quick Mobile Application Prototyping with Ionic Creator</title>
      <link>https://www.hascode.com/quick-mobile-application-prototyping-with-ionic-creator/</link>
      <pubDate>Tue, 17 Nov 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/quick-mobile-application-prototyping-with-ionic-creator/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to the field of hybrid mobile application development, Ionic and its tool-stack is often an attractive choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there is Ionic Creator to speed up the development process offering an in-browser editor to create user interfaces via drag and drop and supporting basic templates for mobile applications like tabbed layouts etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition, a project created with this tool may be downloaded and started with easy and that’s what I’d like to show in the following short example.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Unix-like data pipelines with Java 8 Streams and UStream</title>
      <link>https://www.hascode.com/unix-like-data-pipelines-with-java-8-streams-and-ustream/</link>
      <pubDate>Sun, 08 Nov 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/unix-like-data-pipelines-with-java-8-streams-and-ustream/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We all love the simplicity when chaining commands and pipes in an Unix derivative environment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;UStream takes this approach and extends Java 8′s stream API to mimic some of the well known commands and apply them on streams.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, I’d like to share some slim examples for using UStream.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ustream-java8-tutorial.png&#34; alt=&#34;ustream java8 tutorial&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Data pipelines with UStream&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need to add one dependency to our &lt;em&gt;pom.xml&lt;/em&gt; (using Maven): &lt;em&gt;io.github.benas:ustream:0.2&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating REST Clients for JAX-RS based Webservices with Netflix Feign</title>
      <link>https://www.hascode.com/creating-rest-clients-for-jax-rs-based-webservices-with-netflix-feign/</link>
      <pubDate>Thu, 22 Oct 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-rest-clients-for-jax-rs-based-webservices-with-netflix-feign/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For us developers there plenty of libraries exist helping us in deriving and generating clients for existing RESTful web-services and I have already covered some of the in this blog (e.g. the JAX-RS Client API). Nevertheless, I’d like to share my experience with another interesting lightweight library here: Netflix Feign.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Feign offers a nice fluent-builder API, a rich integration for  common libraries and APIs like JAX-RS, Jackson, GSON, SAX, JAX-B, OkHttp, Ribbon, Hystrix, SLF4J and more and last bot not least, it is setup easy and the service contracts are specified using interfaces and annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Deferred Objects and Promises with Java 8 and JDeferred</title>
      <link>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</link>
      <pubDate>Sun, 27 Sep 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jdeferred-example-running-in-eclipse-ide-1024x754.png&#34; alt=&#34;jdeferred example running in eclipse ide 1024x754&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. JDeferred examples running in Eclipse IDE.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we simply need to add one dependency for &lt;em&gt;jdeferred-core&lt;/em&gt; to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing Asynchronous Applications with Java and Awaitility</title>
      <link>https://www.hascode.com/testing-asynchronous-applications-with-java-and-awaitility/</link>
      <pubDate>Sun, 23 Aug 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-asynchronous-applications-with-java-and-awaitility/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing tests for asynchronous applications has never been much fun as we’re always struggling with the problem how to determine state changes, handle process terminations, dealing with timeouts or failures and stuff like this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Awaitility eases this process for us offering a nice DSL, rich support for languages like Scala or Groovy and an easy-to-use syntax that’s even more fun when using it with Java 8′s lambda expressions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short introduction I’d like to demonstrate writing some tests different scenarios.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating and Providing HipChat Integrations with Atlassian Connect, Nodejs and Express</title>
      <link>https://www.hascode.com/creating-and-providing-hipchat-integrations-with-atlassian-connect-nodejs-and-express/</link>
      <pubDate>Tue, 18 Aug 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-and-providing-hipchat-integrations-with-atlassian-connect-nodejs-and-express/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;HipChat is Atlassian’s alternative to Slack and its solution to team collaboration chats. Atlassian Connect offers developer tools to bootstrap applications, connect to Atlassian’s cloud products with easy and in combination with HipChat’s REST APIs allows us to write integrations for such a chat server in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to show how to write an integration within a few steps using Atlassian Connect, Node.js and Express and how to connect the integration to a HipChat server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Creating secure Password Hashes in Java with Heimdall</title>
      <link>https://www.hascode.com/snippet-creating-secure-password-hashes-in-java-with-heimdall/</link>
      <pubDate>Sun, 12 Jul 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-creating-secure-password-hashes-in-java-with-heimdall/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;These days where a cheap GPU for about 100 € is capable to create 3 billion of MD5 Hashes per second, we need not only need to use salts the right way but we also need to choose a strong, non-reversible and slow hashing schemes when storing passwords in our application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Heimdall is a library that implements a secure and upgradable password hashing mechanism and uses at the time of writing this article PBKDF2 SHA-1 HMAC with 20000 iterations and a 192 bit (24 byte) salt per default.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integrating Swagger into a Spring Boot RESTful Webservice with Springfox</title>
      <link>https://www.hascode.com/integrating-swagger-into-a-spring-boot-restful-webservice-with-springfox/</link>
      <pubDate>Wed, 01 Jul 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integrating-swagger-into-a-spring-boot-restful-webservice-with-springfox/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Spring Boot allows us to create RESTful web-services with ease, Swagger specifies a format to describe the capabilities and operations of these services and with Swagger UI it is possible to explore our REST API with a nice graphical user interface in our browser.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Springfox is a project that aims at creating automated JSON API documentation for API’s built with Spring and is used in the following tutorial to integrate Swagger into a sample application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer</title>
      <link>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</link>
      <pubDate>Tue, 16 Jun 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mutation Testing with Pitest and Maven</title>
      <link>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</link>
      <pubDate>Sun, 10 May 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Mutation testing makes an interesting addition to the classical test coverage metrics.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;They seed mutations (errors) into the code, run the project’s tests afterwards and if the tests fail, the mutation is killed – otherwise it lived and we have a possible indication of an issue with our tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial. I’d like to demonstrate how to setup mutation tests with the PIT/Pitest library and Maven and generate reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a hybrid mobile Application with Ionic, Cordova and AngularJS</title>
      <link>https://www.hascode.com/creating-a-hybrid-mobile-application-with-ionic-cordova-and-angularjs/</link>
      <pubDate>Sun, 03 May 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-hybrid-mobile-application-with-ionic-cordova-and-angularjs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Nowadays in the realm of hybrid mobile application development there is a variety of available frameworks worth having a look at.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate the development life-cycle for a complete mobile application using Ionic, Cordova and AngularJS (and others) covering every step from the initial project setup, creating Angular Controllers, Directives, adding Cordova Plug-Ins, running and testing the application in the browser and emulator up to finally running the application on an Android device and assembling files for a release.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Immutables 2.0 for sexy Immutable Object Creation and more</title>
      <link>https://www.hascode.com/immutables-2.0-for-sexy-immutable-object-creation-and-more/</link>
      <pubDate>Sun, 26 Apr 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/immutables-2.0-for-sexy-immutable-object-creation-and-more/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using immutable objects in Java (and other programming languages as well) is a good thing because immutable objects may be shared safely, are thread-safe and reduce the risk of side effects in your applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Nowadays multiple frameworks exist to reduce the need of writing boilerplate code here but there is one special framework whose features I’d like to demonstrate in the following short tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It hooks into your application using annotation processing and generates type-safe builders, toString, hashCode, equals methods for you, supports lazy attributes, singleton instances, serialization into data-formats like JSON and a lot of other features,too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating In-Memory File Systems with Google’s Jimfs</title>
      <link>https://www.hascode.com/creating-in-memory-file-systems-with-googles-jimfs/</link>
      <pubDate>Wed, 18 Mar 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-in-memory-file-systems-with-googles-jimfs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes when writing an application we might consider using an in-memory file system to speed up data access or to create some kind of cache.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are different libraries to help us here but one looks especially promising for me because it supports almost every functionality of the Java NIO File APIs added in Java 7 – from creating, reading, deleting files and directory to handling symbolic and hard links or watching directory changes with a WatchService.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Generating Java Source Files with JavaPoet</title>
      <link>https://www.hascode.com/generating-java-source-files-with-javapoet/</link>
      <pubDate>Sat, 28 Feb 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/generating-java-source-files-with-javapoet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the most of us developers, generating Java source files is an occasionally happening task and we’re dealing with it e.g. when writing annotation processors, writing tools or interacting with meta-data files.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JavaPoet is a nice library to simplify such tasks, offering an intuitive fluent-builder API to generate source files in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to share a few examples by writing code generators with the help of this library.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A short Overview of Neo4j Indexing Strategies</title>
      <link>https://www.hascode.com/a-short-overview-of-neo4j-indexing-strategies/</link>
      <pubDate>Sun, 25 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/a-short-overview-of-neo4j-indexing-strategies/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to indexing in a Neo4j graph database, different options exist for a developer to create and maintain the index.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate different possibilities for index management.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;domain-model.png&#34; alt=&#34;domain model&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Simple Domain Model&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Only one dependency is needed to run the following examples and start an embedded neo4j server – I’m using Gradle here to manage my dependencies but Maven, Ivy, SBT should work without a problem, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Performance Testing a Multiuser Web Application with JMeter and Maven</title>
      <link>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</link>
      <pubDate>Sun, 18 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Marrying Java EE and BDD with Cucumber, Arquillian and Cukespace</title>
      <link>https://www.hascode.com/marrying-java-ee-and-bdd-with-cucumber-arquillian-and-cukespace/</link>
      <pubDate>Wed, 07 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/marrying-java-ee-and-bdd-with-cucumber-arquillian-and-cukespace/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written about the basics of using Cucumber in a Java project in my last blog article, I now would like to demonstrate how to use a similar setup in a Java EE web project with Arquillian and the Cukespace library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a full Java EE web application and add BDD-style tests to the project so that we’re able to test our business layer on the one hand and the user interface on the other hand using Arquillian Drone and Selenium.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>BDD Testing with Cucumber, Java and JUnit</title>
      <link>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</link>
      <pubDate>Sun, 28 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whether behaviour-driven-development, specification by example or acceptance test driven development is the goal, the Cucumber framework eases our life when we need to  establish a link between the non-technical, textual description for a new feature and the tests that prove that the application fulfils these requirements.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to add Cucumber to a Java project and how to write feature descriptions and test-cases for each step of these descriptions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Setting up and Testing Form-Based JDBC Authentication with Arquillian and Maven</title>
      <link>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</link>
      <pubDate>Sun, 21 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Especially when it comes to testing, setting up a decent environment for a secured Java EE web application isn’t always an easy thing to do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to create a secured web application using form-based authentication and a JDBC realm to fetch users and roles and how to run the application in an embedded container for testing and development.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Additionally I’d like to show how to write and run integration tests to verify the security setup using a setup of Maven, Embedded GlassFish, Arquillian, jUnit and rest-assured.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating different Websocket Chat Clients in Java</title>
      <link>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</link>
      <pubDate>Sun, 09 Nov 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written two articles about different websocket based chat server implementations in Java, I was recently asked how an implementation of the client side would look like in Java.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I added this article to demonstrate how to create a websocket chat client applications within a few steps with the Java API for Websocket.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a text-based chat client for the console first and afterwards we’re going to program a chat client with a graphical user interface, implemented in JavaFX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a XMPP Chat Bot with Apache Camel</title>
      <link>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</link>
      <pubDate>Sun, 12 Oct 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Camel not only is one of my favourite frameworks ever but it also allows the humble developer to create a full blown chat bot within a few lines of code and using the Camel XMPP component.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to create a simple chat bot and since Atlassian’s HipChat basic plan is now free for unlimited users, we’re using HipChat as our play- and testing ground for the bot.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Modifying Excel Files, Adding Formulas with Apache POI</title>
      <link>https://www.hascode.com/snippet-modifying-excel-files-adding-formulas-with-apache-poi/</link>
      <pubDate>Mon, 29 Sep 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-modifying-excel-files-adding-formulas-with-apache-poi/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed to modify some excel files and to add some aggregated formula fields to a sheet and the following snippet did the work for me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;generated-excel-file-1024x416.png&#34; alt=&#34;generated excel file 1024x416&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Modified Excel File with Formulas&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just two dependencies needed  here: One for Apache POI and one for the Office Open XML Documents API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;org.apache.poi&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;poi&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;3.10.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;org.apache.poi&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;poi-ooxml&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;3.10.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_excel_file&#34;&gt;Sample Excel File&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our sample excel file is quite empty just some empty customer information and a chart that is bound to the data grid.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JAX-RS Server API Snippets</title>
      <link>https://www.hascode.com/jax-rs-server-api-snippets/</link>
      <pubDate>Sun, 28 Sep 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/jax-rs-server-api-snippets/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Because a lot of my current projects are using JAX-RS in different versions I’d like to write down and share some frequently used snippets for implementing RESTful web-services with the JAX-RS specification here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_regex_in_path_expressions&#34;&gt;Using RegEx in Path Expressions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to extract multiple parameters from a path expression e.g. in the following example where year, month and day are fragments if the path.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@GET
@Path(&amp;#34;/orders/{year:\\d{4}}-{month:\\d{2}}-{day:\\d{2}}&amp;#34;)
@Produces(MediaType.TEXT_PLAIN)
public Response getOrders(@PathParam(&amp;#34;year&amp;#34;) final int year, @PathParam(&amp;#34;month&amp;#34;) final int month, @PathParam(&amp;#34;day&amp;#34;) final int day) {
	return Response.ok(&amp;#34;Year: &amp;#34; + year + &amp;#34;, month: &amp;#34; + month + &amp;#34;, day: &amp;#34; + day).build();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 7 JMX Reports with Yammer Metrics</title>
      <link>https://www.hascode.com/java-ee-7-jmx-reports-with-yammer-metrics/</link>
      <pubDate>Tue, 26 Aug 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-7-jmx-reports-with-yammer-metrics/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are several ways to aggregate and report application performance indicators in a Java application. One common way here is to use Java Management Extensions (JMX) and MBeans.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Yammer Metrics Library eases this task for us and simplifies the aggregation of different reports.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to set up a full Java EE 7 web application by the help of Maven archetypes and we’re running the application on WildFly application server that is downloaded and configured completely by the WildFly Maven Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 7 Database Migrations with Liquibase and WildFly</title>
      <link>https://www.hascode.com/java-ee-7-database-migrations-with-liquibase-and-wildfly/</link>
      <pubDate>Thu, 31 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-7-database-migrations-with-liquibase-and-wildfly/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other database migration frameworks before but in this article I’d like to cover the Liquibase framework in combination with WildFly as Java EE 7 compatible application server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a full Java EE 7 book store application with a few steps and with Liquibase on board to create the database structure and insert example data into the database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Thanks to the WildFly Maven Plug-in we even do not need to download and configure the application server but let Maven and the plug-in do the work for us.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>XMLBeam: Snippets and Examples</title>
      <link>https://www.hascode.com/xmlbeam-snippets-and-examples/</link>
      <pubDate>Tue, 22 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/xmlbeam-snippets-and-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;XMLBeam is an interesting library using an approach of projecting parts of an XML DOM tree into Java using some simple interfaces, annotations and XPath expressions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article, I’d like to share three experiments of mine with this library for reading, writing XML and parsing a live RSS feed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;RSS Feed Projection Interface&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;rss-projection-interface.png&#34; alt=&#34;rss projection interface&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add only one dependency to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene by Example: Specifying Analyzers on a per-field-basis and writing a custom Analyzer/Tokenizer</title>
      <link>https://www.hascode.com/lucene-by-example-specifying-analyzers-on-a-per-field-basis-and-writing-a-custom-analyzer/tokenizer/</link>
      <pubDate>Sun, 06 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-by-example-specifying-analyzers-on-a-per-field-basis-and-writing-a-custom-analyzer/tokenizer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Lucene is my favourite search engine library and the more often I use it in my projects the more features or functionality I find that were unknown to me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Two of those features I’d like to share in the following tutorial is one the one hand the possibility to specify different analyzers on a per-field basis and on the other hand the API to create a simple character based tokenizer and analyzer within a few steps.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using jOOQ and Build Helper Plugin to Generate Database Metamodels with Maven</title>
      <link>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</link>
      <pubDate>Tue, 10 Jun 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When you need to derive meta-models from existing databases and want to create type-safe queries with an elegant, fluent-API, jOOQ definitely is a tool to consider here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to integrate the jOOQ meta-model generator into a Maven build using the jOOQ Maven Plug-in, the Build Helper Maven Plug-in and Maven profiles to finally create a running application to query an existing RDBMS using such a generated meta-model.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Logging User Interaction the Aspect-Oriented Way using Interceptors</title>
      <link>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</link>
      <pubDate>Mon, 26 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using dependency injection and aspect-oriented mechanisms like interceptors allow us to separate cross-cutting-concerns in our Java enterprise application, to control global aspects of our application and to avoid boilerplate code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re going to create an aspect-oriented logger to protocol the initiating user, class and method called and the parameters passed to the method and finally we’re adding this interceptor to a sample RESTful web-service by adding a simple annotation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Java Config-Builder to assemble your Application Configuration</title>
      <link>https://www.hascode.com/using-java-config-builder-to-assemble-your-application-configuration/</link>
      <pubDate>Tue, 20 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-java-config-builder-to-assemble-your-application-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There’s a variety of configuration frameworks to use in our Java applications. Java Config Builder is one of them and it offers some nice features that I would like to demonstrate in the following short examples as are:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Loading values from different sources like property-files, environment variables, command-line-arguments or system properties, specifying default values, mapping arbitrary types or collections, merging configurations and using the Java Bean Validation standard aka JSR-303.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Allocating available random Ports in a Maven Build</title>
      <link>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</link>
      <pubDate>Wed, 07 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently in a project I encountered the following problem: The development team used Git with a branch-per-feature-like workflow and the integration server, Bamboo in this case, was configured not only to run the integration-tests for the master-branch but also for every change in a feature branch.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As the team developed a Java EE web application ports like 8080 occasionally were already bound and builds failed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I knew a plug-in for Jenkins CI I to search for available ports and assign them to a build variable but I wanted to control such information directly within the Maven build life-cycle so I searched and finally found Sonatype’s Port Allocator Plug-in for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running JavaScript Tests with Maven, Jasmine and PhantomJS</title>
      <link>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</link>
      <pubDate>Sun, 04 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a project there is the need to run tests for your client-side code, written in JavaScript from a Maven build.&lt;br/&gt;
One reason might be that Maven manages a complex build life-cycle in your project and you need a close integration for your JavaScript tests, another one might be that you’re in an environment where it is complicated to install and manage additional software like an integration- or build-server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Persistence API: Controlling the Second-Level-Cache</title>
      <link>https://www.hascode.com/java-persistence-api-controlling-the-second-level-cache/</link>
      <pubDate>Mon, 21 Apr 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-persistence-api-controlling-the-second-level-cache/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the Java Persistence API and a decent persistence provider allows us to configure and fine-tune when and how the second level cache is used in our application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples, we’re going to demonstrate those features written as JUnit test cases and running on a H2 in-memory database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;persistence-configuration.png&#34; alt=&#34;persistence configuration&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Persistence Unit Configuration&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we need some basic setup to run the following examples .. we need to select a JPA persistence provider and database, create a persistence-unit configuration and an environment to run tests on an in-memory database.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Apache Avro with Java and Maven</title>
      <link>https://www.hascode.com/using-apache-avro-with-java-and-maven/</link>
      <pubDate>Sat, 08 Mar 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-apache-avro-with-java-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Avro is a serialization framework similar to Google’s Protocol Buffers or Apache Thrift and offering features like rich data structures, a compact binary format, simple integration with dynamic languages and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short five minute tutorial, we’re going to specify a schema to serialize books in a JSON format, we’re using the Avro Maven plugin to generate the stub classes and finally we’re serializing the data into a single file.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating elegant, typesafe Queries for JPA, mongoDB Morphia and Lucene using Querydsl</title>
      <link>https://www.hascode.com/creating-elegant-typesafe-queries-for-jpa-mongodb-morphia-and-lucene-using-querydsl/</link>
      <pubDate>Thu, 13 Feb 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-elegant-typesafe-queries-for-jpa-mongodb-morphia-and-lucene-using-querydsl/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Querydsl is a framework that allows us to create elegant, type-safe queries for a variety of different data-sources like Java Persistence API (JPA) entities, Java Data Objects (JDO), mongoDB with Morphia, SQL, Hibernate Search up to Lucene.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re implementing example queries for different environments – Java Persistence API compared with a JPQL and a criteria API query, mongoDB with Morphia and last but not least for Lucene.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Grammar Parsers in Java and Scala with Parboiled</title>
      <link>https://www.hascode.com/creating-grammar-parsers-in-java-and-scala-with-parboiled/</link>
      <pubDate>Sun, 26 Jan 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-grammar-parsers-in-java-and-scala-with-parboiled/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Parboiled is a modern. lightweight and easy to use library to parse expression grammars in Java or Scala and in my humble opinion it is perfect for use cases where you need something between regular expressions and a complex parser generator like ANTLR.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple grammar to specify a task list and write an implementation of a parser also as unit tests for each grammar rule in Java.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JAX-RS 2.0 REST Client Features by Example</title>
      <link>https://www.hascode.com/jax-rs-2.0-rest-client-features-by-example/</link>
      <pubDate>Mon, 30 Dec 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/jax-rs-2.0-rest-client-features-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JAX-RS 2.0 aka JSR 339 not also specifies the API to build up a RESTful webservice but also enhances the client side API to ease up the process of writing a client for a REST service.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re building up a client for a ready-to-play REST service and explore the different new options e.g. how to handle requests in a synchronous or asynchronous way, how to add callback handlers for a request, how to specify invocation targets to build up requests for a later execution or how to filter the client-server communication using client request filters and client response filters.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Websocket Chat Application with Vert.x and Java</title>
      <link>https://www.hascode.com/creating-a-websocket-chat-application-with-vert.x-and-java/</link>
      <pubDate>Wed, 13 Nov 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-websocket-chat-application-with-vert.x-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Vert.x is a modern, lightweight framework to build high performance applications running on the Java Virtual Machine. The framework is polyglot so that you’re able to write your application in Java, Groovy, Ruby, Python or even JavaScript.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it offers a nice component system, an actor-like concurrency model a distributed event bus and an elegant API to create scalable applications in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to build a websocket chat by creating a HTTP server and the websocket server using Vert.x, Java and Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing Java Integration Tests for MongoDB</title>
      <link>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</link>
      <pubDate>Wed, 16 Oct 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;MongoDB is matured, document-oriented, cross-platform NoSQL database system with drivers available for a bunch of different programming languages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’m going to write some integration tests for MongoDB using the MongoDB Java driver and the Flapdoodle library to create an embedded MongoDB instance for testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to write tests for a simple persist-and-query scenarion and for a map-reduce function and in addition I’m going to show how to bind the start and stop of a MongoDB instance to a Maven goal using the embedmongo-maven-plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing with Java 8 Lambda Expressions</title>
      <link>https://www.hascode.com/playing-with-java-8-lambda-expressions/</link>
      <pubDate>Sun, 22 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-with-java-8-lambda-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Many articles have been written about JSR 335 aka &lt;em&gt;Lambda Expressions for the Java&lt;sup&gt;TM&lt;/sup&gt; Programming Language&lt;/em&gt; but I like to try new things out for myself and that’s why I’d like to share my snippets here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;netbeans-java8-976x1024.png&#34; alt=&#34;netbeans java8 976x1024&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Lambda Hacking using the NetBeans Developer Version&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_jdk_and_ide&#34;&gt;Setup JDK and IDE&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It takes just some short steps to setup your environment …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://jdk8.java.net/lambda/&#34;&gt;Download&lt;/a&gt; and install the Java 8 JDK with lambda support&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://bits.netbeans.org/download/trunk/nightly/latest/&#34;&gt;Download&lt;/a&gt; and install the NetBeans IDE Development version&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure NetBeans to use the Java 8 JDK (&amp;gt; Manage Platforms…)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Business Process Modeling with Activiti and BPMN 2.0</title>
      <link>https://www.hascode.com/business-process-modeling-with-activiti-and-bpmn-2.0/</link>
      <pubDate>Sun, 15 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/business-process-modeling-with-activiti-and-bpmn-2.0/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having tried a bunch of workflow engines and business processing management platforms I now have given the Activiti framework a try.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I immediately liked the good test support using annotations and jUnit test rules, a straight API and the good Eclipse IDE integration as well as I liked the Activiti Explorer and the Activiti REST Application and the feeling to achieve quick results with less effort when using this framework.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Filtering Source Files using the Templating Maven Plugin</title>
      <link>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</link>
      <pubDate>Tue, 03 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Templating Maven Plugin looks useful if one needs to copy and to filter source files in a project e.g. to add property values from the build environment to a class.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For a short demonstration I’ve added the following short snippet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Only one dependency needed .. simply add the following snippet to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;build&amp;gt;
  &amp;lt;plugins&amp;gt;
    &amp;lt;plugin&amp;gt;
      &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;templating-maven-plugin&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.0-alpha-3&amp;lt;/version&amp;gt;
      &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
          &amp;lt;id&amp;gt;filter-src&amp;lt;/id&amp;gt;
          &amp;lt;goals&amp;gt;
            &amp;lt;goal&amp;gt;filter-sources&amp;lt;/goal&amp;gt;
          &amp;lt;/goals&amp;gt;
        &amp;lt;/execution&amp;gt;
      &amp;lt;/executions&amp;gt;
    &amp;lt;/plugin&amp;gt;
  &amp;lt;/plugins&amp;gt;
&amp;lt;/build&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Chat Application using Java EE 7, Websockets and GlassFish 4</title>
      <link>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</link>
      <pubDate>Tue, 13 Aug 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 7 is out now and so I was curious to play around with the new specifications and APIs from in this technology stack.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I didn’t hesitate to add yet another websocket-chat tutorial to the existing ones on the internet in favour of gathering some experience with this technology and a possible integration using a GlassFish 4 server, the new Java API for JSON Processing for data serialization combined with custom websocket encoders/decoders and finally adding some Bootstrap and jQuery on the client side.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Embedding Jetty or Tomcat in your Java Application</title>
      <link>https://www.hascode.com/embedding-jetty-or-tomcat-in-your-java-application/</link>
      <pubDate>Tue, 09 Jul 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/embedding-jetty-or-tomcat-in-your-java-application/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed to control an embedded web container from a Java application and I wanted to see how this could be achieved using an embedded instance of either Tomcat or Jetty here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I would like to show how to embed both servers in an application in no time using Gradle or Maven as build tool.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to add the web container libraries to our project here .. I’ve added the build config for Gradle and Maven here…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling Feature Flags in a Java EE Application using Togglz</title>
      <link>https://www.hascode.com/handling-feature-flags-in-a-java-ee-application-using-togglz/</link>
      <pubDate>Wed, 26 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/handling-feature-flags-in-a-java-ee-application-using-togglz/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Feature flags are a common technique, often combined with continuous deployment and delivery and they allow us to rollback a specific feature, to create A/B tests or to rollout a specific feature for a specific test group, a specific amount of users or dedicated systems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like you to demonstrate how easy it is to implement feature flags with the Togglz framework with a few steps in a Java EE environment.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating and Packaging a Game in Java FX 2.2</title>
      <link>https://www.hascode.com/creating-and-packaging-a-game-in-java-fx-2.2/</link>
      <pubDate>Sun, 23 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-and-packaging-a-game-in-java-fx-2.2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s been a long way for Java FX from the days of the F3 project the current release 2.2. Today there are many options how to create a Java FX application .. you may be using Java, Scala, Groovy or Visage, you may create your application in a programmatic way using the comfortable integrated builders or you may create your views using XML layouts and easy data-bindings with a few annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Arquillian Transaction Extension: Transaction Rollback for your Java EE Integration Tests</title>
      <link>https://www.hascode.com/arquillian-transaction-extension-transaction-rollback-for-your-java-ee-integration-tests/</link>
      <pubDate>Sun, 16 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/arquillian-transaction-extension-transaction-rollback-for-your-java-ee-integration-tests/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I really love Arquillian to run integration tests for my Java EE applications – especially when running on different containers – and I also love the Arquillian tool stack from Arquillian Drone to the Arquillian Persistence Extensions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today I’d like to share a short snippet how to achieve transaction rollbacks when testing an EJB in combination with Arquillian and the Arquillian Transaction Extension…&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_arquillian_basics&#34;&gt;Arquillian Basics&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you’ve never heard of the Arquillian framework before, please feel free to have a look at the &lt;a href=&#34;http://arquillian.org/&#34;&gt;Arquillian documentation&lt;/a&gt; or an article of mine: &lt;a href=&#34;../arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/&#34;&gt;Arquillian Tutorial: Writing Java EE 6 Integration Tests and more..&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Continuous Deployment using GlassFish, Jenkins, Maven and Git</title>
      <link>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</link>
      <pubDate>Wed, 29 May 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed a quick solution to deploy a Java EE 6 web application on a GlassFish instance automatically and subsequent to a successful build of the project on the integration server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It took only a few steps using Jenkins, Maven and the Cargo plugin and I’d like to share this quick solution with you here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need the following software installed and configured:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://git-scm.com/&#34;&gt;Git&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://jenkins-ci.org/&#34;&gt;Jenkins&lt;/a&gt; / &lt;a href=&#34;http://hudson-ci.org/&#34;&gt;Hudson&lt;/a&gt; + Git Plugin installed&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://glassfish.java.net/&#34;&gt;GlassFish 3.1&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://jdk7.java.net/&#34;&gt;JDK 7&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Rich Clients with Apache Pivot</title>
      <link>https://www.hascode.com/creating-rich-clients-with-apache-pivot/</link>
      <pubDate>Sun, 19 May 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-rich-clients-with-apache-pivot/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Pivot is a modern framework to create rich clients as desktop applications or to run in a web browser.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It offers nice GUI elements, supports XML/WTKX templates, data bindings, JVM scripting languages and much more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’m going to create a desktop application to open a file browser, select a file and output the selected file’s name, first using a programmatic approach to create the user interface, and afterwards using XML/WTKX templates.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Easy Database Migrations using Flyway, Java EE 6 and GlassFish</title>
      <link>https://www.hascode.com/easy-database-migrations-using-flyway-java-ee-6-and-glassfish/</link>
      <pubDate>Sun, 28 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/easy-database-migrations-using-flyway-java-ee-6-and-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Database migrations often are a necessity in the application development and maintenance life-cycle.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whenever we need to apply changes to the database structure, insert new data fragments and in doing so want to be sure that this all happens with some control and versioning.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following tutorial shows how implement this for a simple Java EE 6 web application to be run on a GlassFish application server in a few quick steps using the Flyway framework, an eager initialized Singleton EJB and some Maven wiring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating slim Database Projections using JPA2 Constructor Expressions</title>
      <link>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One common question that you may encounter one day when using object-relational-mapping in your application is how to slim down data that you’re retrieving from the persistence layer down to a specific subset for your use-case in an efficient manner and without using complex additional mapping frameworks. In some situations you might declare lazy loaded fields but another approach that I’d like to share with you here are JPA2 constructor expressions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Blueprint or Content-Creator Plugin for Confluence</title>
      <link>https://www.hascode.com/creating-a-blueprint-or-content-creator-plugin-for-confluence/</link>
      <pubDate>Sun, 17 Mar 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-blueprint-or-content-creator-plugin-for-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Blueprint is a new API in Confluence 5 that allows developers to create new content elements and to hook into the Confluence “create” dialogue – not to be confused with OSGi blueprints, the CSS blueprint framework or Tinkerpop Blueprints here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Content may be added using simple XHTML templates, dynamic templates enriched with data from context providers or even customized JavaScript dialogues.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Another feature is, that pages of a specific blueprint type may be aggregated in a collector view that displays all pages created with the specific blueprint&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Micro Benchmarking your Tests using JUnit and JUnitBenchmarks</title>
      <link>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</link>
      <pubDate>Sun, 10 Mar 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I recently stumbled upon a nice framework that allows to convert simple JUnit tests into micro benchmarks named JUnitBenchmarks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It allows to set basic benchmark options and and to generate charts by adding some simple annotations and a test rule to your tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One might argue if it is wise to mix the aspects, testing and benchmarking and I’d agree for sure – nevertheless I think this framework can be handy sometimes so let’s create some benchmarks using JUnit and JUnitBenchmarks..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Adding multiple EntityListeners to an Entity in JPA 2</title>
      <link>https://www.hascode.com/adding-multiple-entitylisteners-to-an-entity-in-jpa-2/</link>
      <pubDate>Mon, 25 Feb 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/adding-multiple-entitylisteners-to-an-entity-in-jpa-2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The ability to attach lifecycle events to an entity using simple annotations sometimes is a neat feature in the Java Persistence API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short snippets demonstrate how to bind and trigger the different available lifecycle events using an embedded derby database and a bunch of annotations.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I’m using Hibernate as persistence manager here and Derby as an easy to setup database. In the last step we’ll be writing a test that’s why we’ve added JUnit and Hamcrest.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Apache Camel with Scala and the Camel Scala DSL</title>
      <link>https://www.hascode.com/using-apache-camel-with-scala-and-the-camel-scala-dsl/</link>
      <pubDate>Wed, 13 Feb 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-apache-camel-with-scala-and-the-camel-scala-dsl/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whenever I encounter a situation where I have to mix a blend of different services and endpoints and apply one or more of the traditional enterprise integration patterns then Apache Camel often is my weapon of choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I simply love how easy it is to set up some datasources, add some routing magic, data transformers, load balancers, content enrichers and enjoy the result.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Another thing that I’m beginning to love is Scala and so this is the perfect time to write an article about using Scala and Apache Camel together.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using the Android Daydream API</title>
      <link>https://www.hascode.com/using-the-android-daydream-api/</link>
      <pubDate>Tue, 22 Jan 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-the-android-daydream-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Daydream is the new interactive screensaver mode that was added in the Android 4.2 / Jelly Beans release. Such “dreams” may be activated when the device is in idle mode or inserted into a dock.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple daydream that starts a simple animation and in addition we’ll be adding a configuration screen to alter the behaviour of this daydream.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_new_android_application&#34;&gt;Create a new Android Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we need a new android project. I am using Eclipse and the ADT plugin here but any other solution like using a specific Maven archetype and the Jayway Maven plugin or using SBT should work, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A short Introduction to ScalaTest</title>
      <link>https://www.hascode.com/a-short-introduction-to-scalatest/</link>
      <pubDate>Sun, 13 Jan 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/a-short-introduction-to-scalatest/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ScalaTest is an excellent framework to write concise, readable tests for your Scala or Java code with less effort.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it integrates well with a variety of frameworks like JUnit, TestNG, Ant, Maven, sbt, ScalaCheck, JMock, EasyMock, Mockito, ScalaMock, Selenium, Eclipse, NetBeans, and IntelliJ.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re going to write some tests using ScalaTest exploring features like rich matchers, BDD syntax support or web tests using Selenium/Webdriver.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: XML-Pull-Parser with XPP3</title>
      <link>https://www.hascode.com/snippet-xml-pull-parser-with-xpp3/</link>
      <pubDate>Fri, 28 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-xml-pull-parser-with-xpp3/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When there is XML to be parsed sometimes we’re chosing a DOM parser, sometimes a SAX parser and sometimes we’re using an XML pull parser, especially on Android.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short snippet shows how to use the xpp3 xml pull parse to fetch some information in xml format from a public issue tracker and to extract issue details.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_dependencies&#34;&gt;Adding Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one dependency needed here: &lt;em&gt;xpp3&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_sbt&#34;&gt;SBT&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simply use the following &lt;em&gt;build.sbt&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Pre-Commit-Hooks in Git and Mercurial: Prefix Commit Messages for Feature/Story Branches</title>
      <link>https://www.hascode.com/creating-pre-commit-hooks-in-git-and-mercurial-prefix-commit-messages-for-feature/story-branches/</link>
      <pubDate>Sun, 16 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-pre-commit-hooks-in-git-and-mercurial-prefix-commit-messages-for-feature/story-branches/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Managing my projects’ source code I am using Git also as Mercurial. Therefore I often encounter the situation where I am creating a special branch to implement a specific user story or feature request.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now when working on such a story branch I often enter the issue-key or a short title as a prefix for each commit message. Doing this by manually is a waste of time and error-prone and luckily for us, each of both DVCS offers us an easy API to add custom hooks to the different life-cycle events.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running categorized Tests using JUnit, Maven and Annotated-Test Suites</title>
      <link>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</link>
      <pubDate>Thu, 06 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to classify the tests in a project and a possible solution to achieve this goal is to assign different categories to the tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often we’re doing this to separate the execution of fast-running and long-running tests or to run a specific set of tests that is only applicable in special situations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;To run a specific set of categorized tests there are different options and in the following tutorial we’ll be covering two of them: by configuring the Maven Surefire Plug-in or by using a JUnit Test Suite and the JUnit annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Content Detection, Metadata and Content Extraction with Apache Tika</title>
      <link>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</link>
      <pubDate>Sun, 02 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Encountering the situation that you want to extract meta-data or content from a file – might it be an office document, a spreadsheet or even a mp3 or an image – or you’d like to detect the content type for a given file then Apache Tika might be a helpful tool for you.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Tika supports a variety of document formats and has a nice, extendable parser and detection API with a lot of built-in parsers available.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>New features in JUnit 4.11</title>
      <link>https://www.hascode.com/new-features-in-junit-4.11/</link>
      <pubDate>Sun, 18 Nov 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/new-features-in-junit-4.11/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit is one of the most popular testing frameworks out there. Version 4.11 has just been released and offers some nice improvements that you shouldn’t miss.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In older versions of JUnit there were two dependencies .. &lt;em&gt;junit:junit&lt;/em&gt; contained an old version of hamcrest and could cause some nasty trouble .. &lt;em&gt;junit:junit-dep&lt;/em&gt; just referenced hamcrest the maven way.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now with version 4.11 there is just &lt;em&gt;junit:junit&lt;/em&gt; with clean references to hamcrest and &lt;em&gt;junit:junit-dep&lt;/em&gt; is relocated to &lt;em&gt;junit:junit&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating an offline Rich-Client-Application using HTML, CSS and Java with SWT</title>
      <link>https://www.hascode.com/creating-an-offline-rich-client-application-using-html-css-and-java-with-swt/</link>
      <pubDate>Mon, 12 Nov 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-an-offline-rich-client-application-using-html-css-and-java-with-swt/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are a lot of frameworks out there to create offline applications and rich clients in Java.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One exotic alternative is to use the HTML, CSS and Javascript for this purpose and render the application in a Java frame using SWT and SWT’s browser component.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_new_project&#34;&gt;Creating a new Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using maven here for our project but you shouldn’t have a problem to use SBT, Gradle or Ivy instead…&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_adding_maven_dependencies&#34;&gt;Adding Maven Dependencies&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need two things .. first comes a repository for the swt dependencies …&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Make your Tests more readable with custom Hamcrest Matchers</title>
      <link>https://www.hascode.com/make-your-tests-more-readable-with-custom-hamcrest-matchers/</link>
      <pubDate>Sun, 28 Oct 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/make-your-tests-more-readable-with-custom-hamcrest-matchers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Everyday we’re writing tests for our software and sometimes we’re in a situation where we’re testing a specific type or object very often.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Luckily Hamcrest allows us to create custom matchers by subclassing from a given variety of available matchers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_junit_and_hamcrest&#34;&gt;Adding jUnit and Hamcrest&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First add the dependencies for &lt;em&gt;JUniti&lt;/em&gt; and &lt;em&gt;Hamcrest&lt;/em&gt; to your project’s &lt;em&gt;pom.xml&lt;/em&gt; or alternative build system.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;4.10&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;org.hamcrest&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;hamcrest-all&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.3&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>HTML5 Server Send Events using Node.js or Jetty</title>
      <link>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</link>
      <pubDate>Sun, 21 Oct 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The HTML5 working draft describes different techniques to push information from a server to the client and the one described in this tutorial are Server-Send Events (SSE).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Server-Send-Events eliminates the need to poll a server periodically for information using AJAX and is really easy to implement because of the simple specification and the fact that nearly all modern browsers already implement this specification.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_client_side&#34;&gt;The Client Side&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Registering for Server Send Events (SSE) is quite easy .. simply create a new &lt;em&gt;EventSource&lt;/em&gt; object that is bound to the URL where the events are propagated.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene Snippets: Index Stats</title>
      <link>https://www.hascode.com/lucene-snippets-index-stats/</link>
      <pubDate>Sat, 08 Sep 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-snippets-index-stats/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In Lucene 4.x there is an API to fetch index statistics for specific document’s fields.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following examples shows how to create an index with some random documents and fetch some statistics for a field afterwards ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_lucene_dependencies&#34;&gt;Lucene Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one dependency needed here .. &lt;em&gt;lucene-core&lt;/em&gt;. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to create your build file either..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene Snippets: Faceting Search</title>
      <link>https://www.hascode.com/lucene-snippets-faceting-search/</link>
      <pubDate>Tue, 28 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-snippets-faceting-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_lucene_dependencies&#34;&gt;Lucene Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need two dependencies here .. &lt;em&gt;lucene-core&lt;/em&gt; of course and in addition the &lt;em&gt;lucene-facet&lt;/em&gt; library .. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to transfer the information needed ;)&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>New Plugin released: Quick Subtasks for JIRA</title>
      <link>https://www.hascode.com/new-plugin-released-quick-subtasks-for-jira/</link>
      <pubDate>Tue, 21 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/new-plugin-released-quick-subtasks-for-jira/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently after a long sprint planning meeting I had the pleasure to spend some time writing down the results of the team’s task breakdown in JIRA.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In our process, each user story is documented as a JIRA issue and each task from the breakdown is saved as a subtask for the parent issue.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Because I am too lazy in this situation I wrote the following plugin that allowed me to quickly create multiple subtasks for a selected JIRA issue.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Jeah we’ve won the Atlassian Codegeist 2012 Competition – or – The return of the Pirate Ninja Unicorn</title>
      <link>https://www.hascode.com/jeah-weve-won-the-atlassian-codegeist-2012-competition-or-the-return-of-the-pirate-ninja-unicorn/</link>
      <pubDate>Sun, 12 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/jeah-weve-won-the-atlassian-codegeist-2012-competition-or-the-return-of-the-pirate-ninja-unicorn/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;pnu-codegeist.png&#34; alt=&#34;pnu codegeist&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Pirate-Ninja-Unicorn Logo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Happy news for us, Theresa and I we’ve won the &lt;a href=&#34;http://blogs.atlassian.com/2012/07/announcing-the-codegeist-2012-winners/&#34;&gt;Atlassian Codegeist Competition 2012&lt;/a&gt; with our &lt;a href=&#34;https://marketplace.atlassian.com/plugins/com.pirateninjaunicorn.stash.readme-parser&#34;&gt;Stash Readme Parser Plugin&lt;/a&gt; in the category: &lt;strong&gt;Best Stash Plugin&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://marketplace.atlassian.com/plugins/com.pirateninjaunicorn.stash.readme-parser&#34;&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;ca1dfd42-b108-46ed-b2a2-7658de1e9f77.png&#34; alt=&#34;Stash Readme Parser Plugin&#34; width=&#34;644&#34; height=&#34;315&#34;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We had two other plugins in the game, the &lt;a href=&#34;https://marketplace.atlassian.com/plugins/com.hascode.plugin.stash-qrcode-plugin&#34;&gt;Stash QR Code Plugin&lt;/a&gt; and the &lt;a href=&#34;https://marketplace.atlassian.com/plugins/com.hascode.jira.httprequest-workflow-function&#34;&gt;HTTP Request Workflow Function for Jira&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you’re interested please take a look at the plugins in the Atlassian Marketplace our funny looking &lt;a href=&#34;http://www.pirate-ninja-unicorn.com%20&#34;&gt;Pirate Ninja Unicorn Website&lt;/a&gt; or the &lt;a href=&#34;https://www.hascode.com/projects/&#34;&gt;project’s overview in my blog&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Windows Executable from a Jar using Maven</title>
      <link>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</link>
      <pubDate>Tue, 07 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in the life of a developer there is the need to create a windows executable for a Java application that is build and packaged in a Jar file.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short example shows how to create an executable Jar first and a windows executable containing vendor information, a nice icon and other stuff afterwards by using a combination of the Maven Shade Plugin and the launch4j Plugin for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Video Manipulation using HTML 5 and Javascript</title>
      <link>https://www.hascode.com/video-manipulation-using-html-5-and-javascript/</link>
      <pubDate>Sun, 05 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/video-manipulation-using-html-5-and-javascript/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Some funny stuff can be done using HTML 5, canvas elements and the video events API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example we’re using these techniques to apply graphic effects to a video embedded in a HTML page..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_goal&#34;&gt;The Goal&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Please take a look at the following &lt;a href=&#34;http://www.youtube.com/v/ng9bWUgj0UQ&#34;&gt;screencast on YouTube&lt;/a&gt; to get an idea of what the final example looks like or just take a look at the &lt;a href=&#34;http://app.hascode.com/html5-video-manipulation/index.html&#34;&gt;demo page&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As you can see a video is rendered and a clone is displayed with a strange swirl effect applied.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integration Testing IMAP, SMTP and POP3 with GreenMail</title>
      <link>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</link>
      <pubDate>Mon, 30 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written some e-mail handling, sending or receiving library you’d like to run some integration tests against a real mail server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then GreenMail might help you out here .. the framework is not quite new on the market but it is really easy to setup IMAP,SMTP or POP3 services with it and it comes with some helpful libraries making your life a bit easier here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I’ve come to the idea to share some examples for setting up different server instances, creating user accounts and – at last – fetching and validating e-mails…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Aspects of Functional Programming in Java</title>
      <link>https://www.hascode.com/aspects-of-functional-programming-in-java/</link>
      <pubDate>Mon, 16 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/aspects-of-functional-programming-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others …&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Task Scheduling in Java EE 6 on GlassFish using the Timer Service</title>
      <link>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</link>
      <pubDate>Fri, 22 Jun 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating cronjobs or scheduled service executions is made really easy in Java EE 6. Scheduled tasks may be created in a programmatic style or simply by adding some annotations to an EJB.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re creating some simple scheduled tasks and let them run on an embedded GlassFish instance using the Maven Embedded GlassFish plugin..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_java_ee_6_maven_project_from_archetype&#34;&gt;Java EE 6 Maven Project from Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we’re creating a new maven-ized project using one of the appropriate jee6 Maven archetypes&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating updatable Java Applications using Getdown and the Getdown Maven Plugin</title>
      <link>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</link>
      <pubDate>Sun, 27 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Many programmers have suffered when trying to setup an environment to handle updates for their application without much effort. Some tried Java Web Start for this purpose and many encountered difficulties with this approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there is getdown that aims to replace Java Web Start by offering a simple architecture to handle updates that is fast, realiable and the only thing you need is a normal http server. Though getdown lets us handle our updates really easy it is possible to make this process even easier with the getdown maven plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Compiling CoffeeScript with Maven</title>
      <link>https://www.hascode.com/compiling-coffeescript-with-maven/</link>
      <pubDate>Fri, 18 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/compiling-coffeescript-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is a neat language that is transcompiled into JavaScript but is more predictable and allows to write the same code with 1/3 fewer lines and of course with a (imho) nicer syntax.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is nice but a vivid integration into our application build lifecycle with Maven is better and that is what the following example is all about.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies&#34;&gt;Maven Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though there are some alternatives, we’re using &lt;strong&gt;brew&lt;/strong&gt; here so please add the following dependency to your Maven project:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Arquillian Tutorial: Writing Java EE 6 Integration Tests and more</title>
      <link>https://www.hascode.com/arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/</link>
      <pubDate>Thu, 26 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now that the long awaited stable version of the Arquillian framework is released I wanted to demonstrate some interesting features of this framework that really eases writing and running of integration tests for Java EE 6 applications in many different ways.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we are going to create some real-world examples using Enterprise JavaBeans, Contexts and Dependency Injection, the Java Persistence API and we’re finally running Drone/Selenium tests against a JEE Web Application that is using Java Server Faces.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Wiring made easy using OSGi Blueprint and Apache Karaf</title>
      <link>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</link>
      <pubDate>Mon, 16 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code.&lt;br/&gt;
In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Hibernate Search Faceting: Discrete and Range Faceting by Example</title>
      <link>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</link>
      <pubDate>Mon, 26 Mar 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s tutorial we’re exploring the world of faceted searches like the one we’re used to see when we’re searching for an item on Amazon.com or other websites. We’re using Hibernate Search here that offers an API to perform discrete as well as range faceted searches on our persisted data.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies_needed&#34;&gt;Maven Dependencies Needed&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For simplicity’s sake am I going to use an HSQL database for persistence, in addition the dependencies for &lt;em&gt;hibernate-entitymanager&lt;/em&gt; and &lt;em&gt;hibernate-search&lt;/em&gt; (of course) should be added to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Mixing Scala, Java in a Maven Project</title>
      <link>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</link>
      <pubDate>Fri, 23 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setting_up_the_maven_project&#34;&gt;Setting up the Maven Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First create a new Maven project in your IDE or by running &lt;em&gt;mvn archetype:generate.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the next step, add the dependency for &lt;em&gt;scala-library&lt;/em&gt; and the scala maven repositories to your &lt;em&gt;pom.xml&lt;/em&gt; and hook the &lt;em&gt;maven-scala-plugin&lt;/em&gt; to Maven’s lifecycle. My &lt;em&gt;pom.xml&lt;/em&gt; finally looks like this one:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using the Android Fragment API in a Tablet App</title>
      <link>https://www.hascode.com/using-the-android-fragment-api-in-a-tablet-app/</link>
      <pubDate>Sun, 18 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-the-android-fragment-api-in-a-tablet-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since I got a new tablet running Android 4.0 aka ice cream sandwich I wanted to play around a bit with the fragments API and creating an application for a tablet.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to build an application that renders several articles from a popular tech blog (just kidding) in a web view.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_to_build&#34;&gt;What to build&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to build an application that is able to display web links in the left section of the screen and when clicked, displaying the corresponding website content in the right section of the application screen.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Selenium WebDriver, Selenium Server and PageObjects by Example</title>
      <link>https://www.hascode.com/selenium-webdriver-selenium-server-and-pageobjects-by-example/</link>
      <pubDate>Tue, 06 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/selenium-webdriver-selenium-server-and-pageobjects-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot has changed since Selenium RC and WebDriver has given us a new syntax to write tests for our web pages. PageObjects add an abstraction to the pages under test and finally we’re able to programmatically start Selenium server instances and use them to run the tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re writing some tests using PageObjects, WebDriver, Selenium Server and finally we’re even taking some screenshots of our tested web pages..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Ordering your JUnit Rules using a RuleChain</title>
      <link>https://www.hascode.com/ordering-your-junit-rules-using-a-rulechain/</link>
      <pubDate>Tue, 21 Feb 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/ordering-your-junit-rules-using-a-rulechain/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit Rules are a handy solution if one needs to alter test methods or wants to share common functionality between several test cases. JUnit 4.10 introduced a new class to order several rules according to our needs using a so called rule-chain.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example, we’re going to create a simple custom rule and afterwards bind several instances of it in a specified order to a test method.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_junit&#34;&gt;Adding JUnit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one Maven dependency needed here – JUnit 4.10&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JPA Persistence and Lucene Indexing combined in Hibernate Search</title>
      <link>https://www.hascode.com/jpa-persistence-and-lucene-indexing-combined-in-hibernate-search/</link>
      <pubDate>Sun, 05 Feb 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/jpa-persistence-and-lucene-indexing-combined-in-hibernate-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often we’re writing an application that has to handle entities that – on the one side need to be persisted in a relational database using standards like the Java Persistence API (JPA) and using frameworks like Hibernate ORM or EclipseLink.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;On the other side those entities and their fields are often stored in a highspeed indexer like Lucene. From this situation arises a bunch of common problems .. to synchronize both data sources, to handle special data mapped in an entity like an office document and so on..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Neo4j Graph Database Tutorial: How to build a Route Planner and other Examples</title>
      <link>https://www.hascode.com/neo4j-graph-database-tutorial-how-to-build-a-route-planner-and-other-examples/</link>
      <pubDate>Fri, 20 Jan 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/neo4j-graph-database-tutorial-how-to-build-a-route-planner-and-other-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in the life of developer’s life there is a scenario where using a relational database tends to get complicated or sometimes even slow – especially when there are fragments with multiple relationships or multiple connections present. This often leads to complex database queries or desperate software engineers trying to handle those problems with their ORM framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A possible solution might be to switch from a relational database to a graph database – and – neo4j is our tool of choice here. In the following tutorial we’re going to implement several examples to demonstrate the strengths of a graph database .. from a route planner to a social graph.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create Mobile Websites using Java Server Faces and PrimeFaces Mobile</title>
      <link>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</link>
      <pubDate>Sun, 08 Jan 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The more smartphones and tablets are sold the bigger the need for a mobile version of a modern website. PrimeFaces Mobile helps us developers here and allows us to quickly create mobile websites that display well on an iPhone, Android, Palm, Blackberry, Windows Mobile and others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a web application that is using Java Server Faces 2.1, PrimeFaces 3.1 and PrimeFaces Mobile 1.0 and runs on a simple web container like Tomcat or Jetty.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing Styles and Themes on Android</title>
      <link>https://www.hascode.com/writing-styles-and-themes-on-android/</link>
      <pubDate>Sat, 03 Dec 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/writing-styles-and-themes-on-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using reusable styles and themes to modify an Android application’s look is really easy and helps to not violate thy DRY (don’t repeat yourself) principle by typing styles in every single UI element again and again.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to write and apply some simple styles and a finally theme to a simple Android application.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following environment is needed to follow this tutorial …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html&#34;&gt;Android SDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html#AddingComponents&#34;&gt;An AVM with at least Android 2.2 / API Version 8&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I recommend using &lt;a href=&#34;http://eclipse.org/&#34;&gt;Eclipse&lt;/a&gt; with the &lt;a href=&#34;http://developer.android.com/sdk/eclipse-adt.html&#34;&gt;ADT Plugin&lt;/a&gt; installed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Managing Background Tasks on Android using the Alarm Manager</title>
      <link>https://www.hascode.com/managing-background-tasks-on-android-using-the-alarm-manager/</link>
      <pubDate>Sun, 27 Nov 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/managing-background-tasks-on-android-using-the-alarm-manager/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s tutorial we’re going to take a look on how to handle periodically scheduled tasks on our Android device by using BroadcastReceivers, Services and the AlarmManager.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following environment is needed to follow this tutorial …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html&#34;&gt;Android SDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html#AddingComponents&#34;&gt;An AVM with at least Android 2.2 / API Version 8&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I recommend using &lt;a href=&#34;http://eclipse.org/&#34;&gt;Eclipse&lt;/a&gt; with the &lt;a href=&#34;http://developer.android.com/sdk/eclipse-adt.html&#34;&gt;ADT Plugin&lt;/a&gt; installed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_concept&#34;&gt;The Concept&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to create a first broadcast receiver that gets initiated at boot time. This component then should make use of Android’s AlarmManager API and schedule a cyclic task using an explicit intent.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Finding Memory Leaks using Eclipse and the MemoryAnalyzer Plugin</title>
      <link>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</link>
      <pubDate>Wed, 02 Nov 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The MemoryAnalyzer Plugin for Eclipse allows us to quickly analyze heap dumps from a virtual machine and search for memory leaks. In the following tutorial we’re going to create and run a small application that is going to cause an OutOfMemoryException during its runtime.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition, we’re forcing the virtual machine to save a heap dump and finally analyzing this data using Eclipse and the MemoryAnalyzer plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1&#34;&gt;Eclipse Indigo&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing RESTful Web Services made easy using the REST-assured Framework</title>
      <link>https://www.hascode.com/testing-restful-web-services-made-easy-using-the-rest-assured-framework/</link>
      <pubDate>Sun, 23 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-restful-web-services-made-easy-using-the-rest-assured-framework/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;rest-service-testing-logo1.png&#34; alt=&#34;REST-assured Integration Test Tutorial Logo&#34; width=&#34;413&#34; height=&#34;265&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. REST-assured Integration Test Tutorial Logo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are many frameworks out there to facilitate testing RESTful
webservices but there is one framework I’d like to acquaint you with is my
favourite framework named REST-assured.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;REST-assured offers a bunch of nice features like a DSL-like syntax,
XPath-Validation, Specification Reuse, easy file uploads and those
features we’re going to explore in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a few lines of code and Jersey I have written a RESTful web service
that allows us to explore the features of the REST-assured framework and
to run tests against this service.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Tomcat Plugin: Adding Authentication to an Embedded Tomcat</title>
      <link>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</link>
      <pubDate>Wed, 12 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Tomcat Maven Plugin not only allows us to deploy our mavenized application to an existing Tomcat server but also to run our web application with an embedded instance from our project’s directory. Recently I needed to add basic authentication to such an instance and wanted to share the steps necessary here&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need Maven and a JDK …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit &amp;gt;= 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;I am using the &lt;em&gt;webapp&lt;/em&gt; archetype here&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We’re adding the following configuration for the Tomcat plugin to your &lt;em&gt;pom.xml&lt;/em&gt; – my final descriptor is this one&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;</description>
    </item>
    <item>
      <title>Android Widget Tutorial: Creating a screen-lock Widget in a few steps</title>
      <link>https://www.hascode.com/android-widget-tutorial-creating-a-screen-lock-widget-in-a-few-steps/</link>
      <pubDate>Thu, 06 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/android-widget-tutorial-creating-a-screen-lock-widget-in-a-few-steps/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s Android tutorial we’re going to take a look at Android’s Widget API and how to make a widget interact with a service using intents.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;widget-tutorial-logo2.png&#34; alt=&#34;widget tutorial logo2&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. hasCode Android Widget Tutorial Logo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to create a fully functional application that allows us to enable or disable our smartphone’s screen lock settings using a widget that can be placed on our home screen.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally, I am going to show how to use a smartphone to test and debug our application and connect it to the IDE.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 6 Development using the Maven Embedded GlassFish Plugin</title>
      <link>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</link>
      <pubDate>Tue, 20 Sep 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Maven Embedded GlassFish Plugin and how it allows us quick creation of GlassFish server instances in no time and Java EE 6 application deployment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. GlassFish + Maven&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a few lines of configuration in your Maven’s pom.xml we’ve got a running GlassFish instance and are able to redeploy our application fast by pressing enter in our console.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to build a Java EE 6 Web Application with a stateless session bean and a web servlet and finally deploy – and redeploy the application using the Maven GlassFish Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>REST-assured vs Jersey-Test-Framework: Testing your RESTful Web-Services</title>
      <link>https://www.hascode.com/rest-assured-vs-jersey-test-framework-testing-your-restful-web-services/</link>
      <pubDate>Mon, 05 Sep 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/rest-assured-vs-jersey-test-framework-testing-your-restful-web-services/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at two specific frameworks that enables you to efficiently test your REST-ful services: On the one side there is the framework &lt;strong&gt;REST-assured&lt;/strong&gt; that offers a nice DSL-like syntax to create well readable tests – on the other side there is the &lt;strong&gt;Jersey-Test-Framework&lt;/strong&gt; that offers a nice execution environment and is built upon the JAX-RS reference implementation, Jersey.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;rest-service-testing-logo.png&#34; alt=&#34;rest service testing logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple REST service first and then implement integration tests for this service using both frameworks.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Screenscraping made easy using jsoup and Maven</title>
      <link>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</link>
      <pubDate>Tue, 30 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo2.png&#34; alt=&#34;logo2&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a developer’s life there is no clean API available to gather information from a web application .. no SOAP, no XML-RPC and no REST .. just a website hiding the information we’re looking for somewhere in its DOM hierarchy – so the only solution is screenscraping.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Screenscraping always leaves me with a bad feeling – but luckily there is a tool that makes this job at least a bit easier for a developer .. jsoup to the rescue!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Contract-First Web-Services using JAX-WS, JAX-B, Maven and Eclipse</title>
      <link>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</link>
      <pubDate>Tue, 23 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the contract-first approach to define a web service offers some advantages in contrast to the code-first approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to take a look at some details of this approach and we’re going to implement a real SOAP service using JAX-WS, Maven and the Eclipse IDE.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re going to run our service implementation on an embedded Jetty instance and we’re going to take a look at soapUI and how to test our service using this neat tool.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 6, GlassFish and the Interceptor API</title>
      <link>https://www.hascode.com/java-ee-6-glassfish-and-the-interceptor-api/</link>
      <pubDate>Wed, 17 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-6-glassfish-and-the-interceptor-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Aspect oriented programming and the definition of cross-cutting-concerns is made easy in Java EE 6 using interceptors.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to take a look at the different possibilities to apply interceptors to your EJBs at class or method level and how to setup a GlassFish instance to run the examples.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;interceptors.png&#34; alt=&#34;interceptors&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We don’t need much for the following tutorial – just a JDK, Maven and GlassFish…&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://glassfish.java.net/&#34;&gt;GlassFish 3.1&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Portlets using Java Server Faces 2 and Liferay</title>
      <link>https://www.hascode.com/creating-portlets-using-java-server-faces-2-and-liferay/</link>
      <pubDate>Tue, 19 Jul 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-portlets-using-java-server-faces-2-and-liferay/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Portlets are a common technology to create plug&amp;amp;play components for modern web applications and are specified by the Java Community Process in several specification requests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;portlet-logo.png&#34; alt=&#34;portlet logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to learn how to create custom portlets and how to deploy and embed them in Liferay, the popular open-source enterprise portal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we’re taking a look at inter-portlet-communication and how to create portlets using annotations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re building a portlet-state-aware Java-Server-Faces portlet using the jsf-portlet-bridge mechanism.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integrating Groovy in your Maven builds using GMaven</title>
      <link>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</link>
      <pubDate>Tue, 12 Jul 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image left&#34;&gt;&lt;img src=&#34;gmaven.png&#34; alt=&#34;gmaven&#34;/&gt;&lt;/span&gt; Often ant tasks are used in Maven builds but wouldn’t it be more attractive to integrate the Groovy language into our build process?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;GMaven is the answers to this problem and brings together Maven and Groovy. It allows us to execute Groovy scripts inline from our Maven configuration, from a local script or even from a remote location. In the following short examples I am going to show how to configure Maven to execute Groovy scripts from different locations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence User Profile Mobile vCard Plugin released</title>
      <link>https://www.hascode.com/confluence-user-profile-mobile-vcard-plugin-released/</link>
      <pubDate>Sat, 18 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/confluence-user-profile-mobile-vcard-plugin-released/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image left&#34;&gt;&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;&lt;/span&gt; I’ve released a new plugin for the popular Confluence Wiki that extends the user profile with new tab that displays the user’s vcard as a QR code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This allows an easy import of address data from Confluence to your smartphone.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_features&#34;&gt;Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Display of a Confluence user’s contact data as a QR code in a separate tab in the user profile&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;More to be implemented ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Just download the plugin from &lt;a href=&#34;https://plugins.atlassian.com/plugin/details/341175&#34;&gt;Atlassian’s Plugin Exchange&lt;/a&gt; and install it using the Universal Plugin Manager in your Confluence’s administration area&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;That’s all .. nothing to configure here ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a LDAP server for your development environment in 5 minutes</title>
      <link>https://www.hascode.com/creating-a-ldap-server-for-your-development-environment-in-5-minutes/</link>
      <pubDate>Mon, 13 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-ldap-server-for-your-development-environment-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I am currently working on a plugin that needs to receive some information from an LDAP/Active Directory using JNDI. That’s why I needed to set up a directory server in a short time and I didn’t want to waste much effort for here.
Luckily for me the Apache Directory Studio saved my day and allowed me to set up everything I needed in a few minutes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ldap-tutorial-teaser.png&#34; alt=&#34;ldap tutorial teaser&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Short and sweet: In this tutorial I’m going to show you how to configure everything you need in your Eclipse IDE and finally how to query the created LDAP server with a tiny java client using JNDI.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Message Driven Beans in Java EE 6</title>
      <link>https://www.hascode.com/message-driven-beans-in-java-ee-6/</link>
      <pubDate>Sun, 05 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/message-driven-beans-in-java-ee-6/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Message Driven Beans are no new concept due to the fact that they exist since EJB 2.0 but in Java EE 6 and the EJB 3.0 specification it is even more fun to use them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;mdb-tagcloud.png&#34; alt=&#34;mdb tagcloud&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to take a look at the specification and create an example application that transfers some objects via the Java Message Service to a Message-Driven Bean deployed on a GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Oh JBehave, Baby! Behaviour Driven Development using JBehave</title>
      <link>https://www.hascode.com/oh-jbehave-baby-behaviour-driven-development-using-jbehave/</link>
      <pubDate>Tue, 31 May 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/oh-jbehave-baby-behaviour-driven-development-using-jbehave/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Behaviour Driven Development is the keyword when we’re talking about test scenarios written in an ubiquitous language, strong interaction with stakeholders, product owners or testers and well described, common understandable test scenarios.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The popular JBehave framework is our tool of choice here and allows us to decouple our test stories from the test classes, offers an integration for web tests using Selenium and finally there’s a helpful Maven plugin for JBehave, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence Social Comments Plugin</title>
      <link>https://www.hascode.com/confluence-social-comments-plugin/</link>
      <pubDate>Mon, 30 May 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/confluence-social-comments-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have created a new, free plugin for Confluence, the popular enterprise wiki.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The plugin allows you to notify users of ongoing discussions in comments on a confluence page by posting a specific token including the user’s name like this: “@username:”&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_features&#34;&gt;Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configurable notification settings in the administration area&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Several placeholders to be used in the e-mail template for the notifications&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User filtering to avoid sending duplicate e-mails&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For more detailed information take a look at the Maven generated &lt;a href=&#34;http://app.hascode.com/social-comments-plugin&#34;&gt;project website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>SCJP/OCPJP Exam Preparation: Pitfalls to avoid</title>
      <link>https://www.hascode.com/scjp/ocpjp-exam-preparation-pitfalls-to-avoid/</link>
      <pubDate>Mon, 25 Apr 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/scjp/ocpjp-exam-preparation-pitfalls-to-avoid/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Last year I passed the exam for the “Oracle Certified Professional Java Programmer”successfully and wanted to share my exam preparation notes about common problems and pitfalls to be aware of.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I have added some code and examples for my top 25 challenges below.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ocpjp1.png&#34; alt=&#34;image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. ocpjp&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_exam_preparation&#34;&gt;Exam Preparation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I won’t cover how to prepare yourself for the exam, how the exam is structured or what is the best way to process the exam’s questions – these questions are very well covered by the SCJP study guide, JavaRanch.com or other resources of choice – I have listed a few at the and of this article in the resources section.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking, Stubbing and Test Spying using the Mockito Framework and PowerMock</title>
      <link>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</link>
      <pubDate>Sun, 27 Mar 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;mockito-tutorial.png&#34; alt=&#34;mockito tutorial&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Mockito framework that not only does sound like my favourite summer cocktail but also offers nice testing, mocking/stubbing, test-spying features and mock injections.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;After that we’re going to take a look on how to mock static or final classes by extending Mockito’s capabilities with PowerMock.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We don’t need much for the following samples .. Java of course, Maven dependency management and that’s all ..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a sample Java EE 6 Blog Application with JPA, EJB, CDI, JSF and Primefaces on GlassFish</title>
      <link>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</link>
      <pubDate>Tue, 08 Feb 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 6 is out and it indeed offers an interesting stack of technologies. So in today’s tutorial we are going to build a small sample web application that builds on this stack using Enterprise JavaBeans, Java Persistence API, Bean Validation, CDI and finally Java Server Faces and PrimeFaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The application we’re going to develop is a simple blog app that allows us to create new articles, list them and – finally delete them. We’re also covering some additional topics like JSF navigation, i18n, Ajax-enabled components and the deployment on the GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Enterprise Java Bean EJB 3.1 Testing using Maven and embedded Glassfish</title>
      <link>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</link>
      <pubDate>Sat, 01 Jan 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Are you playing around with the shiny new 3.1 EJB API?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven for your Java projects?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;EJB_3.1_Embedded_Application_Server_Components.png&#34; alt=&#34;EJB 3.1 Embedded Application Server Components&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the following tutorial we’re going to need an installation of &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; and of course – the &lt;a href=&#34;http://www.oracle.com/technetwork/java/index.html&#34;&gt;Java Development Kit&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Bean Validation with JSR-303 and Hibernate Validator</title>
      <link>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</link>
      <pubDate>Tue, 14 Dec 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You want to add some validation logic to your Java beans? You want to achieve this with some shiny extendable annotations? Then give the Java Bean Validation standard aka &lt;a href=&#34;http://jcp.org/en/jsr/summary?id=303&#34;&gt;JSR-303&lt;/a&gt; a try..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to use the reference implementation for bean validation, &lt;a href=&#34;http://www.hibernate.org/subprojects/validator.html&#34;&gt;Hibernate Validator&lt;/a&gt; in this tutorial but there are also links to other alternatives like &lt;a href=&#34;http://oval.sourceforge.net/&#34;&gt;Oval&lt;/a&gt; or &lt;a href=&#34;http://incubator.apache.org/bval/cwiki/index.html&#34;&gt;Apache Bean Validation&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s begin and validate some stuff ..&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK &amp;gt;=6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven &amp;gt;=2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An IDE or text editor of choice&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a REST Client Step-by-Step using JAX-RS, JAX-B and Jersey</title>
      <link>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</link>
      <pubDate>Thu, 25 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in a developer’s life there is a REST service to deal with and nowadays one wants a fast and clean solution to create a client for such a service.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following tutorial shows a quick approach using JAX-RS with its reference implementation, Jersey in combination with JAX-B for annotation driven marshalling between XML or JSON structures and our Java-Beans.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following stuff is needed to run the following examples and code samples&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using PrimeFaces to pimp up existing Java Server Faces / JSF 2 Applications</title>
      <link>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</link>
      <pubDate>Sun, 14 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to modify an existing Java Server Faces / JSF 2 web application by adding rich UI components to the existing layout.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our tool of choice here is the PrimeFaces framework. It offers a wide range of interesting, customizable and (several) Ajax-enabled components that blend very well with JSF1+2 and also a solid documentation that allows a quick integration into existing projects.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For this tutorial we’re going to reuse the web application from my JSF2 Tutorial “&lt;a href=&#34;../java-server-facesjsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/&#34;&gt;Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet&lt;/a&gt;” – the source code is available at &lt;a href=&#34;https://github.com/hascode/hascode-tutorials/src/tip/jsf2-tutorial-part1/&#34;&gt;GitHub.org&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Confluence SOAP Component in 5 Minutes</title>
      <link>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</link>
      <pubDate>Sun, 24 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You’re using the popular Confluence wiki? You’re using its RPC/SOAP API and missing a function you really need? Just extend the  capabilities of the Confluence RPC API by programming a custom web service component – it is really easy and also &lt;a href=&#34;http://confluence.atlassian.com/display/CONFDEV/RPC+Module&#34;&gt;well documented&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to take a look on how to quickly implement a SOAP service, securing it and putting its methods in a transactional context.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven&lt;/a&gt; &amp;gt;=2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK&lt;/a&gt; &amp;gt;= 5&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.atlassian.com/software/confluence/&#34;&gt;Confluence Wiki&lt;/a&gt; &amp;gt;= 3.0 (for a quick installation guide take a look at &lt;a href=&#34;https://www.hascode.com/2010/03/confluence-developer-instance-quick-setup/&#34;&gt;this article&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.soapui.org/&#34;&gt;SoapUI&lt;/a&gt; for Testing&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object-relational Mapping using Java Persistence API JPA 2</title>
      <link>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</link>
      <pubDate>Mon, 11 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the world of object-relational Mapping and how it is done using the Java Persistence API by creating some basic examples, mapping some relations and querying objects using JPQL or the Criteria API..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java 6 JDK&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven &amp;gt;= 2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you’d like to take a look behind the scenes e.g. how entities are mapped in your database you could install a RDBMS of your choice .. or just use Derby/JavaDB that is bundled with the JDK 6&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with the Android Animation Framework</title>
      <link>https://www.hascode.com/playing-around-with-the-android-animation-framework/</link>
      <pubDate>Mon, 27 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-the-android-animation-framework/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Animations add some spice to our Android applications and the offered animation framework makes it easy to create custom animations and tweens.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets dance around and create some animations ;) ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_about&#34;&gt;About&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are two ways to create animations – via XML declaration or in a Java class. We’re going to focus on XML declaration – if you’re interested in java based declaration – take a look at the Android &lt;a href=&#34;http://developer.android.com/reference/android/view/animation/Animation.html&#34;&gt;JavaDocs&lt;/a&gt; and the subclasses of &lt;em&gt;android.view.animation.Animation&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a SOAP Service using JAX-WS Annotations</title>
      <link>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</link>
      <pubDate>Thu, 23 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It is possible to create SOAP webservices with only a few lines of code using the JAX-WS annotations. In a productivity environment you might prefer using &lt;em&gt;contract-first&lt;/em&gt; instead of &lt;em&gt;code-first&lt;/em&gt; to create your webservice but for now we’re going to use the fast method and that means &lt;em&gt;code-first&lt;/em&gt; and annotations olé!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_soap_service&#34;&gt;Creating the SOAP Service&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a class &lt;em&gt;SampleService&lt;/em&gt; with two public methods&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Annotate this class with &lt;em&gt;@WebService&lt;/em&gt; (&lt;em&gt;javax.jws.WebService) –&lt;/em&gt; now all public methods of this class are exported for our SOAP service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To change the name of an exported method, annotate the method with &lt;em&gt;@WebMethod(operationName = “theDesiredName”)&lt;/em&gt; (&lt;em&gt;javax.jws.WebMethod&lt;/em&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally the service class could look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial.soap;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService public class SampleService {
 @WebMethod(operationName = &amp;#34;getInfo&amp;#34;) public String getInformation() {
 return &amp;#34;hasCode.com&amp;#34;;
 }

 public String doubleString(String inString) {
 return inString + inString;
 }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple Messaging Application using RabbitMQ 2 and Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</link>
      <pubDate>Sun, 05 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having read an interesting &lt;a href=&#34;http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes#RabbitMQ&#34;&gt;comparison by Lindenlabs&lt;/a&gt; evaluating modern message broker systems like ActiveMQ, ApacheQpid and amongst others – RabbitMQ – I wanted to take a quick look at the last one and built a small application producing and consuming some sample messages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some lecture on getting started with RabbitMQ or the key concepts of messaging I strongly recommend reading this &lt;a href=&#34;http://www.rabbitmq.com/how.html&#34;&gt;list of introductional articles&lt;/a&gt; from the RabbitMQ homepage.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring 3, Maven and Annotation Based Configuration</title>
      <link>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</link>
      <pubDate>Sun, 22 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is still the urban myth that using Spring IoC container without thousands lines of XML code isn’t possible – so today we’re taking a look at annotation based configuration with Spring 3 and of course we’re using Maven..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_your_project&#34;&gt;Setup your project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple Maven project using&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate // or
mvn archetype:create&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a lot of dependencies and reference them to the Spring version defined as a property in your &lt;em&gt;pom.xml.&lt;/em&gt; A good reference on Spring 3 and Maven artifacts can be found at &lt;a href=&#34;http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/&#34;&gt;Springsource.com&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
     &amp;lt;org.springframework.version&amp;gt;3.0.0.RELEASE&amp;lt;/org.springframework.version&amp;gt;
 &amp;lt;/properties&amp;gt;
 &amp;lt;dependencies&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-core&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-expression&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;

     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-beans&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-aop&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context-support&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.aspectj&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;com.springsource.org.aspectj.runtime&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;1.6.8.RELEASE&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
 &amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create an Android App using Google’s App Inventor</title>
      <link>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</link>
      <pubDate>Wed, 04 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at Google’s App Inventor feature that offers programming-novices a nice possibility to enter the fabulous world of Android App programming without deeper knowledge of the API or complex SDK installations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets build some stuff ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://java.oracle.com&#34;&gt;Java 6 JDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://appinventor.googlelabs.com/learn/setup/index.html&#34;&gt;App Inventors Extras Software&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Google App Inventor Beta Account – request one &lt;a href=&#34;https://services.google.com/fb/forms/appinventorinterest/&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_we_are_going_to_build&#34;&gt;What we are going to build&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We are building a simple GUI with a Textbox and a button&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A click on the button starts an event that queries the acceleration sensor for coordinates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the sensor is active and enabled then the coordinates are displayed in the text box&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple OSGi Web Application using Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</link>
      <pubDate>Sun, 25 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets develop some bundles ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You are going to need a &lt;a href=&#34;http://java.sun.com/javase/downloads/index.jsp&#34;&gt;JDK&lt;/a&gt; (&amp;gt;=5), &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven2&lt;/a&gt;, the &lt;a href=&#34;http://felix.apache.org&#34;&gt;Apache Felix OSGi implementation&lt;/a&gt; and and text editor/http://eclipse.org/[IDE] of your choice.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Template Bundle Plugin in Confluence</title>
      <link>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</link>
      <pubDate>Mon, 12 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since Confluence 3.2. there is a new plugin module type that allows you to deploy templates in a bundle via the plugin API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it is possible to assign these templates to specific spaces and preview available templates in the Confluence administration area.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s build some sample templates..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_template_bundle_plugin&#34;&gt;Creating a Template Bundle Plugin&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating a template bundle is easy – just create a class implementing &lt;em&gt;TemplatePackage&lt;/em&gt; – there are two methods: one returns a list of bundled &lt;em&gt;PageTemplate&lt;/em&gt; Objects the other the name for the template bundle.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Google’s Protocol Buffers</title>
      <link>https://www.hascode.com/a-look-at-googles-protocol-buffers/</link>
      <pubDate>Tue, 06 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-googles-protocol-buffers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Protocol Buffers are a serialization format developed by Google- you might ask if another IDL is really needed here – is Google barking at the wrong tree?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But protocol buffers offer some advantages over data serialization via XML or JSON – Google says they (compared to XML)..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;are 3 to 10 times smaller&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;are 20 to 100 times faster&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide generated data access classes for programmatic use&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide backward compatibility&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet</title>
      <link>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</link>
      <pubDate>Sat, 05 Jun 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we are going to build a Java Server Faces Web-Application using JSF2.0, Facelets, Maven and Hibernate as ORM Mapper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goals for this first step are: Setting up the project structure using Maven, defining a frame template/decorator and a registration facelet, creating a managed bean and mapping it’s values to the facelet, adding some basic validation, displaying validation errors and finally adding a navigation structure.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In step2 of this tutorial we are going to add persistence using Hibernate, add some security, create a custom UI component and add some AJAX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Location Based Services and GPS for Android</title>
      <link>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</link>
      <pubDate>Sun, 30 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Android SDK offers a nice API to receive information about available providers for location based services and get the current location and coordinates.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we’re going to build a small activity that displays a list of available location providers and shows the current position using GPS services.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_example_application&#34;&gt;Example Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new Android Project using ADT and your IDE with a package named &lt;em&gt;com.hascode.android.location_app&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the permissions needed to the &lt;em&gt;AndroidManifest.xml&lt;/em&gt; – it should look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;manifest xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
	package=&amp;#34;com.hascode.android.location_app&amp;#34; android:versionCode=&amp;#34;1&amp;#34;
	android:versionName=&amp;#34;1.0&amp;#34;&amp;gt;
	&amp;lt;application android:icon=&amp;#34;@drawable/icon&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
		&amp;lt;activity android:name=&amp;#34;.LocationActivity&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
			&amp;lt;intent-filter&amp;gt;
				&amp;lt;action android:name=&amp;#34;android.intent.action.MAIN&amp;#34; /&amp;gt;
				&amp;lt;category android:name=&amp;#34;android.intent.category.LAUNCHER&amp;#34; /&amp;gt;
			&amp;lt;/intent-filter&amp;gt;
		&amp;lt;/activity&amp;gt;

	&amp;lt;/application&amp;gt;
	&amp;lt;uses-sdk android:minSdkVersion=&amp;#34;7&amp;#34; /&amp;gt;

	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_COARSE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_FINE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_MOCK_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
&amp;lt;/manifest&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Review: SCJP Sun Certified Programmer for Java 6 Study Guide</title>
      <link>https://www.hascode.com/review-scjp-sun-certified-programmer-for-java-6-study-guide/</link>
      <pubDate>Mon, 24 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/review-scjp-sun-certified-programmer-for-java-6-study-guide/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Short Facts:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;About 850 pages – &lt;a href=&#34;http://en.wikipedia.org/wiki/Sixteen_Tons&#34;&gt;heavy weight&lt;/a&gt; – use it for self defence! ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Preparation material for the Sun Exam 310-065 (Sun Certified Java Programmer for Java SE 6)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CD-Rom with a nice exam simulator included&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authors: &lt;a href=&#34;http://en.wikipedia.org/wiki/Kathy_Sierra&#34;&gt;Kathy Sierry&lt;/a&gt; and &lt;a href=&#34;http://www.oreillynet.com/pub/au/1085&#34;&gt;Bert Bates&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ISBN: &lt;a href=&#34;http://www.amazon.com/SCJP-Certified-Programmer-Java-310-065/dp/0071591060/&#34;&gt;978-0071591065&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;My two cents:&lt;/strong&gt;&lt;br/&gt;
My favorite author team strikes back – this time with a book for the certification exam to become  a glorious “http://in.sun.com/training/certification/java/scjp.xml[Sun Certified Java Programmer]” for Java SE 6. I’ve read some other books from both authors before – especially from the “http://headfirstlabs.com/[Head First]” series from O’Reilly as they are “Head First Design Patterns”, “Head First Servlets and JSP” and last and least “Head First EJB”. Perhaps I am going to write a review for one of those, too – who knows..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Dependency management in Grails 1.2</title>
      <link>https://www.hascode.com/dependency-management-in-grails-1.2/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/dependency-management-in-grails-1.2/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes I get the impression that there are many Maven haters in the Groovy/Grails community – now with version 1.2 of the Grails framework they are able to abandon the evil satanic &lt;a href=&#34;http://grails.org/Maven+Integration&#34;&gt;Grails Maven Plugin&lt;/a&gt; and embrace the neverending joys of a slim, nice, sexy dependency resolution dsl .. here we go .. lets define some dependencies wheee …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Our dependency configuration is defined in &lt;em&gt;grails-app/config/BuildConfig.groovy&lt;/em&gt; as a property named &lt;em&gt;grails.project.dependency.resolution:&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-groovy&#34; data-lang=&#34;groovy&#34;&gt;grails.project.dependency.resolution = {
// here will be some dependencies
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Extending the Confluence Search Index</title>
      <link>https://www.hascode.com/extending-the-confluence-search-index/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/extending-the-confluence-search-index/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Developing plugins for the Confluence Wiki a developer sometimes needs to save additional metadata to a page object using Bandana or the ContentPropertyManager. Wouldn’t it be nice if this metadata was available in the built-in Lucene index?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That is were the Confluence Extractor Module comes into play..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_overview&#34;&gt;Overview&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An extractor allows the developer to add new fields to the lucene search index. Creating a new extractor is quite simple – just implement the interface &lt;em&gt;com.atlassian.bonnie.search.Extractor&lt;/em&gt; or &lt;em&gt;bucket.search.lucene.extractor.BaseAttachmentContentExtractor&lt;/em&gt; if you want to build a new file extractor.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Maven 3 alpha</title>
      <link>https://www.hascode.com/a-look-at-maven-3-alpha/</link>
      <pubDate>Sat, 22 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-maven-3-alpha/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We are all waiting for a stable release of Maven3 with following updates ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;faster, more performant .. save us time building our software and some precious memory ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;improved artifact resolution api and plugin api&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;better osgi integration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;a few bugfixes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;no mixing of application dependencies and tooling dependencies&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;though it does not matter that much to me: polyglot features .. e.g.: &lt;a href=&#34;http://www.wakaleo.com/blog/236-writing-your-pom-files-in-groovy-a-sneek-preview-of-maven-3s-polyglot-features&#34;&gt;“Writing your pom files in Groovy”&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;version-less parent elements for multi-module or multi-pom projects, no need to define the parent version in every submodule&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;better artifact resolution, which dependency or pom supplied which artifact to the outcome .. got that information from: &lt;a href=&#34;http://javasplitter.blogspot.com/2009/11/whats-new-in-maven-3.html&#34;&gt;“Splitter from the world of Java”&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Android Gestures</title>
      <link>https://www.hascode.com/android-gestures/</link>
      <pubDate>Fri, 21 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/android-gestures/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since version 1.6 Android offers a library for recognition and handling of new gestures using a touch display. With the gesture builder it is possible to capture new gestures in the emulator. Gestures can be integrated into an activity like that.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;GestureLibrary gLib = GestureLibraries.fromRawResource(this, R.raw.spells);
if (!gLib.load()) {
  finish();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Furthermore we need a gesture overlay in the UI:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt; &amp;lt;android.gesture.GestureOverlayView
    android:id=&amp;#34;@+id/gestures&amp;#34;
    android:layout_width=&amp;#34;fill_parent&amp;#34;
    android:layout_height=&amp;#34;0dip&amp;#34;
    android:layout_weight=&amp;#34;1.0&amp;#34; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the next step we implement an event handler for the gesture (Source: &lt;a href=&#34;http://developer.android.com/resources/articles/gestures.html&#34; class=&#34;bare&#34;&gt;http://developer.android.com/resources/articles/gestures.html&lt;/a&gt;):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
gestures.addOnGesturePerformedListener(this);

public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
 ArrayList&amp;lt;prediction&amp;gt; predictions = mLibrary.recognize(gesture);

   if (predictions.size() &amp;gt; 0) {
     Prediction prediction = predictions.get(0);
     if (prediction.score &amp;gt; 1.0) {
       Toast.makeText(this, prediction.name, Toast.LENGTH_SHORT).show();
     }
   }
 }&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a simple Gesture App with Android</title>
      <link>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</link>
      <pubDate>Fri, 14 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The integration of gestures into your android app adds some nice functionality and is made very easy using Google’s GestureBuilder application and the integrated GestureLibrary and Gesture Overlay API – so let’s build a sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some basic information regarding gestures on android first – take a look at &lt;a href=&#34;../android-gestures/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_gesture_library&#34;&gt;Creating a gesture library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First you need to define the gestures that should be captured in the application later. For this reason there’s the &lt;em&gt;GestureBuilder&lt;/em&gt; delivered with the Android SDK. You can find the app in the samples directory of your android sdk – e.g. &lt;em&gt;&amp;lt;installation-directory&amp;gt;/android-sdk-linux_86/platforms/android-2.1/samples/GestureBuilder&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with QR Codes</title>
      <link>https://www.hascode.com/playing-around-with-qr-codes/</link>
      <pubDate>Tue, 11 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-qr-codes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes QR codes are a nice way to distribute information like calendar events, contact information, e-mail, geo-locations or internet addresses.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article we’re going to encode information to QR code images using the ZXing library and afterwards decode information from a given QR code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re taking a look on online QR code generators and how to integrate the ZXing library in a Maven project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;qr-code-article.png&#34; alt=&#34;qr code article&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_zxing_library&#34;&gt;The ZXing Library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download the ZXing Libraries from &lt;a href=&#34;http://code.google.com/p/zxing/downloads/list&#34; class=&#34;bare&#34;&gt;http://code.google.com/p/zxing/downloads/list&lt;/a&gt; – the file name is &lt;em&gt;ZXing-&amp;lt;version&amp;gt;.zip&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unpack the downloaded archive somewhere&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change to the extracted directory and run &lt;em&gt;ant&lt;/em&gt;. If you don’t have JavaME installed – and you don’t have to for the samples below – run &lt;em&gt;ant buildwithoutj2me&lt;/em&gt; – that will do the job&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Having compiled the libraries you’re now free to include the &lt;em&gt;core.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/core/&lt;/em&gt; and the &lt;em&gt;javase.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/javase&lt;/em&gt; as dependency in your project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippets: Getting License Information from the Confluence API</title>
      <link>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</link>
      <pubDate>Thu, 06 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;quoteblock&#34;&gt;
&lt;blockquote&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Note: This article is outdated since the Atlassian Marketplace was launched and a shiny new licensing API was added. Until this article is updated I strongly recommend to take a closer look at the detailed information that Atlassian is providing in the &lt;a href=&#34;https://developer.atlassian.com/display/UPM/How+to+Add+Licensing+Support+to+Your+Add-on&#34;&gt;Developer Documentation&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Creating a simple audio recorder/player</title>
      <link>https://www.hascode.com/sensor-fun-creating-a-simple-audio-recorder/player/</link>
      <pubDate>Sun, 02 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-creating-a-simple-audio-recorder/player/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sound recording and playback is really simple using the MediaRecorder and MediaPlayer classes .. see the example below ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_app&#34;&gt;Sample App&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;First some layout .. a button to start/stop recording and a button to play the recorded stuff (&lt;em&gt;main.xml&lt;/em&gt;):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;LinearLayout xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    android:orientation=&amp;#34;vertical&amp;#34;
    android:layout_width=&amp;#34;fill_parent&amp;#34;
    android:layout_height=&amp;#34;fill_parent&amp;#34;
    &amp;gt;
&amp;lt;TextView
	android:id=&amp;#34;@+id/output&amp;#34;
    android:layout_width=&amp;#34;fill_parent&amp;#34;
    android:layout_height=&amp;#34;wrap_content&amp;#34;
    android:text=&amp;#34;&amp;#34;
    /&amp;gt;
&amp;lt;Button android:text=&amp;#34;@+string/record&amp;#34; android:id=&amp;#34;@+id/btRecord&amp;#34; android:layout_width=&amp;#34;wrap_content&amp;#34; android:layout_height=&amp;#34;wrap_content&amp;#34;&amp;gt;&amp;lt;/Button&amp;gt;
&amp;lt;Button android:text=&amp;#34;@+string/play&amp;#34; android:id=&amp;#34;@+id/btPlay&amp;#34; android:layout_width=&amp;#34;wrap_content&amp;#34; android:layout_height=&amp;#34;wrap_content&amp;#34;&amp;gt;&amp;lt;/Button&amp;gt;
&amp;lt;/LinearLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adjusting the externalized strings in the &lt;em&gt;strings.xml&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;resources&amp;gt;
    &amp;lt;string name=&amp;#34;app_name&amp;#34;&amp;gt;Soundrecorder Tutorial&amp;lt;/string&amp;gt;
	&amp;lt;string name=&amp;#34;record&amp;#34;&amp;gt;Record!&amp;lt;/string&amp;gt;
	&amp;lt;string name=&amp;#34;play&amp;#34;&amp;gt;Play&amp;lt;/string&amp;gt;
&amp;lt;/resources&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Using the accelerometer on Android</title>
      <link>https://www.hascode.com/sensor-fun-using-the-accelerometer-on-android/</link>
      <pubDate>Tue, 27 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-using-the-accelerometer-on-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Here is an example on how to use the accelerometer in your Android application. If you want to simulate the acceleration on the emulator I highly recommend the &lt;em&gt;Sensor Simulator&lt;/em&gt; on the &lt;a href=&#34;http://code.google.com/p/openintents/wiki/SensorSimulator&#34;&gt;OpenIntents website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following example app displays the coordinates received by the sensor.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_acceleration_app&#34;&gt;The Acceleration App&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The activity – &lt;em&gt;AccelerationActivity.java&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.android;

import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.widget.TextView;

public class AccellerationActivity extends Activity {
	private TextView result;
	private SensorManager sensorManager;
	private Sensor sensor;
	private float x, y, z;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
		sensor = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER).get(0);

		result = (TextView) findViewById(R.id.result);
		result.setText(&amp;#34;No result yet&amp;#34;);
	}

	private void refreshDisplay() {
		String output = String
				.format(&amp;#34;x is: %f / y is: %f / z is: %f&amp;#34;, x, y, z);
		result.setText(output);
	}

	@Override
	protected void onResume() {
		super.onResume();
		sensorManager.registerListener(accelerationListener, sensor,
				SensorManager.SENSOR_DELAY_GAME);
	}

	@Override
	protected void onStop() {
		sensorManager.unregisterListener(accelerationListener);
		super.onStop();
	}

	private SensorEventListener accelerationListener = new SensorEventListener() {
		@Override
		public void onAccuracyChanged(Sensor sensor, int acc) {
		}

		@Override
		public void onSensorChanged(SensorEvent event) {
			x = event.values[0];
			y = event.values[1];
			z = event.values[2];
			refreshDisplay();
		}

	};
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>First steps on Android: Creating a simple Todo App</title>
      <link>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</link>
      <pubDate>Mon, 26 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a simple todo app that is able to store simple todos in a database. The user is able to add new todos or delete old ones by clicking on a todo. For this tutorial we won’t use maven to keep it simple – if maven integration is desired – take a look at &lt;a href=&#34;https://www.hascode.com/../how-to-integrate-android-development-tools-and-maven/&#34;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new android project using the &lt;a href=&#34;http://developer.android.com/sdk/index.html&#34;&gt;Android SDK&lt;/a&gt; and your IDE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create some packages &lt;em&gt;com.hascode.android.activity&lt;/em&gt; and &lt;em&gt;com.hascode.android.persistence&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the layout in &lt;em&gt;res/layout/main.xml&lt;/em&gt; – the main elements: a listview for the todos-list, a textbox and a button to enter new data.&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
    &amp;lt;RelativeLayout
        android:id=&amp;#34;@+id/widget31&amp;#34;
        android:layout_width=&amp;#34;fill_parent&amp;#34;
        android:layout_height=&amp;#34;fill_parent&amp;#34;
        xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    &amp;gt;
        &amp;lt;TableRow
            android:id=&amp;#34;@+id/row&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:orientation=&amp;#34;horizontal&amp;#34;
            android:layout_below=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
            &amp;lt;EditText
                android:id=&amp;#34;@+id/etNewTask&amp;#34;
                android:layout_width=&amp;#34;200px&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;&amp;#34;
                android:textSize=&amp;#34;18sp&amp;#34;
            &amp;gt;
            &amp;lt;/EditText&amp;gt;
            &amp;lt;Button
                android:id=&amp;#34;@+id/btNewTask&amp;#34;
                android:layout_width=&amp;#34;wrap_content&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;@+string/add_button_name&amp;#34;
            &amp;gt;
            &amp;lt;/Button&amp;gt;
        &amp;lt;/TableRow&amp;gt;
        &amp;lt;ListView
            android:id=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:layout_alignParentTop=&amp;#34;true&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
        &amp;lt;/ListView&amp;gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Signing APK with the Maven-Jar-Signer Plugin</title>
      <link>https://www.hascode.com/signing-apk-with-the-maven-jar-signer-plugin/</link>
      <pubDate>Sat, 17 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/signing-apk-with-the-maven-jar-signer-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is a nice Maven plugin helping you signing your Android app – the &lt;em&gt;Maven Jar Signer Plugin&lt;/em&gt;. If you want to learn more about Maven integration in an android project take a look at &lt;a href=&#34;https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_profile_setup&#34;&gt;Maven Profile Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add the following code to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;
&amp;lt;profiles&amp;gt;
    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;sign&amp;lt;/id&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-jarsigner-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;
                    &amp;lt;executions&amp;gt;
                        &amp;lt;execution&amp;gt;
                            &amp;lt;id&amp;gt;signing&amp;lt;/id&amp;gt;
                            &amp;lt;goals&amp;gt;
                                &amp;lt;goal&amp;gt;sign&amp;lt;/goal&amp;gt;
                            &amp;lt;/goals&amp;gt;
                            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                            &amp;lt;inherited&amp;gt;true&amp;lt;/inherited&amp;gt;
                            &amp;lt;configuration&amp;gt;
                                &amp;lt;archiveDirectory/&amp;gt;
                                &amp;lt;includes&amp;gt;
                                    &amp;lt;include&amp;gt;target/*.apk&amp;lt;/include&amp;gt;
                                &amp;lt;/includes&amp;gt;
                                &amp;lt;keystore&amp;gt;path/to/keystore&amp;lt;/keystore&amp;gt;
                                &amp;lt;storepass&amp;gt;storepasword&amp;lt;/storepass&amp;gt;
                                &amp;lt;keypass&amp;gt;keypassword&amp;lt;/keypass&amp;gt;
                                &amp;lt;alias&amp;gt;key-alias&amp;lt;/alias&amp;gt;
                            &amp;lt;/configuration&amp;gt;
                        &amp;lt;/execution&amp;gt;
                    &amp;lt;/executions&amp;gt;
                &amp;lt;/plugin&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;com.jayway.maven.plugins.android.generation2&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-android-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;inherited&amp;gt;true&amp;lt;/inherited&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;sign&amp;gt;
                            &amp;lt;debug&amp;gt;false&amp;lt;/debug&amp;gt;
                        &amp;lt;/sign&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;
&amp;lt;/profiles&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Coding Katas with Maven</title>
      <link>https://www.hascode.com/coding-katas-with-maven/</link>
      <pubDate>Thu, 15 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/coding-katas-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Searching for nice coding kata sites I found this one – codingkata.org – I really liked because of the quick start and nice maven integration.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just head over to the &lt;a href=&#34;http://codingkata.org/katas/&#34;&gt;kata overview&lt;/a&gt; select the kata you wish to try out, copy the generated maven command line option and run it in the console – heres the code for the &lt;em&gt;hello-world&lt;/em&gt; sample:&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_coding_katas_from_maven_archetype&#34;&gt;Coding Katas from Maven Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate -DinteractiveMode=false -DarchetypeRepository=http://www.codingkata.org/repo/release -DarchetypeGroupId=org.codingkata.template -DarchetypeArtifactId=solv-java-archetype -DarchetypeVersion=1.04 -DgroupId=org.codingkata.unit -DartifactId=hello-world-solv-java -DkataId=hello-world -DkataVersion=1.02 -DlangVersion=1.6 -DlibVersion=1.3.2 -Dversion=1271358&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a Confluence Macro Plugin</title>
      <link>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</link>
      <pubDate>Tue, 13 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goal is to build a small macro plugin deployable via the Confluence plugin API rendering some spaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Please note that I am going to build the plugin using just Maven and not the Atlassian Maven Wrapper called the “&lt;em&gt;Atlassian Plugin SDK&lt;/em&gt;” – more information about that is available at the &lt;a href=&#34;http://confluence.atlassian.com/display/DEVNET/Developing+your+Plugin+using+the+Atlassian+Plugin+SDK&#34;&gt;Atlassian website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The macro output will be rendered using a Velocity template and all messages are stored for &lt;em&gt;i18n&lt;/em&gt; in properties files bundled with the plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create a SOAP client using the JAX-WS Maven Plugin</title>
      <link>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</link>
      <pubDate>Thu, 08 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written the article “&lt;a href=&#34;https://www.hascode.com/2010/03/how-to-build-a-confluence-soap-client-in-5-minutes/&#34;&gt;How to build a Confluence SOAP client in 5 minutes&lt;/a&gt;” some readers asked me for some more information and help using the JAX-WS plugin that I mentioned in the article instead of the Axis plugin – so here we go ;)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple maven project first using &lt;em&gt;archetype:create&lt;/em&gt; or &lt;em&gt;archetype:generate&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.jaxws -DartifactId=soap-tutorial&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We get a &lt;em&gt;pom.xml&lt;/em&gt; like this:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.jaxws&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;soap-tutorial&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.1&amp;lt;/version&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Named Queries in Grails 1.2</title>
      <link>https://www.hascode.com/named-queries-in-grails-1.2/</link>
      <pubDate>Tue, 06 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/named-queries-in-grails-1.2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;They built a nice new feature in Grails 1.2 called “&lt;em&gt;named queries&lt;/em&gt;“. Named queries can be defined in a domain class as static properties and support the &lt;a href=&#34;http://grails.org/doc/latest/guide/single.html#5.4.2%20Criteria&#34;&gt;criteria builder&lt;/a&gt; syntax.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_examples&#34;&gt;Examples&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-groovy&#34; data-lang=&#34;groovy&#34;&gt;package testapp

class User {
	String name
	int iq
	int age

	static namedQueries = {
		dumbUsers {
			int referenceIq = 60
			lt &amp;#39;iq&amp;#39; , referenceIq
		}

		nameStartsWith { letter -&amp;gt;
			like &amp;#39;name&amp;#39;, &amp;#39;${letter}%&amp;#39;
		}

		midAges {
			between(&amp;#39;age&amp;#39;, 20, 40)
		}

	}
}

// count dumb users
println User.dumbUsers.count()

// print amount of users, usernames starting with an &amp;#39;a&amp;#39;
User.nameStartsWith(&amp;#39;a&amp;#39;).count()&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Manage dependencies with the Maven Dependency Plugin</title>
      <link>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</link>
      <pubDate>Sun, 04 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In a maven project there are lots of dependencies to handle – often one wants to know which version of a software comes from.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The solution to this problem is the &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/&#34;&gt;Maven Dependency Plugin&lt;/a&gt; which helps you to find used/unused/declared/undeclared dependencies in your project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition the plugin allows you to copy or unpack artifacts.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_goals&#34;&gt;Maven Goals&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:copy&lt;/em&gt; – copies artifacts defined in the config to a specified location – details available &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:resolve&lt;/em&gt; – resolves all dependencies and shows the versions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:go-offline&lt;/em&gt; – resolves everything the project needs like dependencies, plugins and reports&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze&lt;/em&gt; - parses the dependencies and shows if they are used/declared/unused/undeclared ..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze-dep-gmt&lt;/em&gt; - finds mismatches between resolved dependencies and those listed in the dependencyManagement section&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:tree&lt;/em&gt; – shows a nice dependency tree for the maven project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Simple One-Minute IMAP Client</title>
      <link>https://www.hascode.com/snippet-simple-one-minute-imap-client/</link>
      <pubDate>Sat, 03 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-simple-one-minute-imap-client/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Building a simple IMAP Client that displays the subject of the messages in the &lt;em&gt;“inbox&lt;/em&gt;” Folder using Maven (I just like Maven).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup_maven&#34;&gt;Project Setup / Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a new Maven project&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.imap -DartifactId=imap-client&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;em&gt;pom.xml&lt;/em&gt; and add some dependencies&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.imap&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;imap-client&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
     &amp;lt;dependencies&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;4.8.1&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;javax.mail&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;mail&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;1.4.2&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_e_mail_client&#34;&gt;Creating the E-Mail Client&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a package .. something like &lt;em&gt;com.hascode.imap.client&lt;/em&gt; ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a simple mail client using &lt;em&gt;javax.mail&lt;/em&gt; in a class named &lt;em&gt;ImapClient&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.imap.client;

import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;

public class ImapClient {
    private Session session = null;
    private Store store = null;
    private String host = null;
    private String userName = null;
    private String password = null;

    public ImapClient(String host, String userName, String password){
        this.host = host;
        this.userName = userName;
        this.password = password;
    }

    public boolean getMail() throws MessagingException {
        session = Session.getDefaultInstance(System.getProperties(),null);
        //        session.setDebug(true);
        System.out.println(&amp;#34;get store..&amp;#34;);
        store = session.getStore(&amp;#34;imaps&amp;#34;);
        System.out.println(&amp;#34;connect..&amp;#34;);
        store.connect(this.host, this.userName, this.password);
        System.out.println(&amp;#34;get default folder ..&amp;#34;);
        Folder folder = store.getDefaultFolder();
        folder = folder.getFolder(&amp;#34;inbox&amp;#34;);
        folder.open(Folder.READ_ONLY);
        System.out.println(&amp;#34;reading messages..&amp;#34;);
        Message[] messages = folder.getMessages();
        for(Message m:messages){
          System.out.println(m.getSubject());
        }
        return false;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to integrate Android Development Tools and Maven</title>
      <link>https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/</link>
      <pubDate>Fri, 02 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With the Maven Android Plugin it is possible to build and deploy/undeploy your android app and start/stop the emulator – if you’re used to maven you won’t be going without it ;)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you’re interested in signing your apk using maven – take a look at &lt;a href=&#34;signing-apk-with-the-maven-jar-signer-plugin/&#34;&gt;this article&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create an android project using the &lt;a href=&#34;http://developer.android.com/guide/developing/other-ide.html#CreatingAProject&#34;&gt;android tool&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We need some dependencies – so create a &lt;em&gt;pom.xml&lt;/em&gt; in the project’s root directory – I took this from the &lt;a href=&#34;http://code.google.com/p/maven-android-plugin/wiki/Samples&#34;&gt;plugin samples&lt;/a&gt; and modified it:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;!--
 Copyright (C) 2009 Jayway AB

 Licensed under the Apache License, Version 2.0 (the &amp;#34;License&amp;#34;);
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an &amp;#34;AS IS&amp;#34; BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
--&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.android.app&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;demo&amp;lt;/artifactId&amp;gt;
     &amp;lt;packaging&amp;gt;apk&amp;lt;/packaging&amp;gt;
     &amp;lt;name&amp;gt;hasCode.com - Sample Android App using the Maven Android Plugin&amp;lt;/name&amp;gt;
     &amp;lt;version&amp;gt;0.1&amp;lt;/version&amp;gt;
     &amp;lt;dependencies&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;android&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;android&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;
             &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
         &amp;lt;/dependency&amp;gt;

         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;4.8.1&amp;lt;/version&amp;gt;
             &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
         &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;

     &amp;lt;build&amp;gt;
         &amp;lt;!--&amp;lt;finalName&amp;gt;${artifactId}&amp;lt;/finalName&amp;gt;--&amp;gt;
         &amp;lt;plugins&amp;gt;
             &amp;lt;plugin&amp;gt;
                 &amp;lt;groupId&amp;gt;com.jayway.maven.plugins.android.generation2&amp;lt;/groupId&amp;gt;
                 &amp;lt;artifactId&amp;gt;maven-android-plugin&amp;lt;/artifactId&amp;gt;
                 &amp;lt;configuration&amp;gt;
                     &amp;lt;sdk&amp;gt;
                         &amp;lt;path&amp;gt;${env.ANDROID_HOME}&amp;lt;/path&amp;gt;
                         &amp;lt;platform&amp;gt;3&amp;lt;/platform&amp;gt;
                     &amp;lt;/sdk&amp;gt;
                     &amp;lt;deleteConflictingFiles&amp;gt;true&amp;lt;/deleteConflictingFiles&amp;gt;
                 &amp;lt;/configuration&amp;gt;
                 &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
             &amp;lt;/plugin&amp;gt;

             &amp;lt;plugin&amp;gt;
                 &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                 &amp;lt;configuration&amp;gt;
                 &amp;lt;source&amp;gt;1.5&amp;lt;/source&amp;gt;
                 &amp;lt;target&amp;gt;1.5&amp;lt;/target&amp;gt;
                 &amp;lt;/configuration&amp;gt;
             &amp;lt;/plugin&amp;gt;

         &amp;lt;/plugins&amp;gt;
     &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a Confluence SOAP client in 5 minutes</title>
      <link>https://www.hascode.com/how-to-build-a-confluence-soap-client-in-5-minutes/</link>
      <pubDate>Sun, 28 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-confluence-soap-client-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a SOAP client for the popular Confluence Wiki in about five minutes. The client is going to receive rendered HTML Markup from a specified Confluence Page.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A running Confluence Installation with SOAP API enabled – if you don’t already have one  take a look at &lt;a href=&#34;https://www.hascode.com/2010/03/confluence-developer-instance-quick-setup/&#34;&gt;this article&lt;/a&gt; or if you’ve got the &lt;a href=&#34;https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project&#34;&gt;Atlassian Plugin SDK&lt;/a&gt; installed .. start a standalone instance using &lt;em&gt;atlas-run-standalone&lt;/em&gt; ..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; – never go without it ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Five minutes of your life time ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence Developer Instance Quick Setup</title>
      <link>https://www.hascode.com/confluence-developer-instance-quick-setup/</link>
      <pubDate>Fri, 26 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/confluence-developer-instance-quick-setup/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This short tutorial shows how to set-up a developer instance of the popular &lt;a href=&#34;http://www.atlassian.com/software/confluence/&#34;&gt;Confluence Wiki&lt;/a&gt; from &lt;a href=&#34;http://www.atlassian.com/&#34;&gt;Atlassian&lt;/a&gt; in a few minutes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s a prerequisite for a few following tutorials regarding the Confluence API and plug-in development for this system.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We want a quick install so we are going to run Confluence with the embedded servlet container and HSQL database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; Meanwhile it is way much easier to use &lt;a href=&#34;http://developer.atlassian.com&#34;&gt;Atlassian’s Plugin SDK&lt;/a&gt; using &lt;em&gt;atlas-mvn run&lt;/em&gt; or &lt;em&gt;atlas-mvn-run-standalone –product confluence –version x.x.x&lt;/em&gt; but if you need to setup an independant instance, this article still might be useful.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a quick Lucene Search</title>
      <link>https://www.hascode.com/how-to-build-a-quick-lucene-search/</link>
      <pubDate>Thu, 25 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-quick-lucene-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helo – today I wanted to post a small tutorial for a small index and search operation using the &lt;a href=&#34;http://lucene.apache.org/&#34;&gt;Lucene&lt;/a&gt; indexer and Maven for the project setup.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create an empty Maven sample project using the &lt;a href=&#34;http://m2eclipse.sonatype.org/&#34;&gt;Eclipse Maven Plugin&lt;/a&gt; or use the following console command:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.demo.search -DartifactId=lucene-sample&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Here is my &lt;em&gt;pom.xml&lt;/em&gt; there are some dependencies for Lucene defined:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode.demo.search&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;lucene-sample&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;My Lucene Search Sample&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;Lucene Search Sample&amp;lt;/description&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.apache.lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene-core&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;2.4.1&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.4.3&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to add a local lib directory to Maven</title>
      <link>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</link>
      <pubDate>Thu, 18 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes there is a dependency not available at a remote repository and one is too lazy to set up a local maven repository – that’s when one adds a directory in the project structure and wants maven to find dependencies there.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory called “&lt;strong&gt;lib&lt;/strong&gt;” in the project root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following markup to the &lt;em&gt;pom.xml&lt;/em&gt; inside the &amp;lt;repositories&amp;gt;-Tag (create if it does not exist):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;lib&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;lib&amp;lt;/name&amp;gt;
    &amp;lt;releases&amp;gt;
        &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
        &amp;lt;checksumPolicy&amp;gt;ignore&amp;lt;/checksumPolicy&amp;gt;
    &amp;lt;/releases&amp;gt;
    &amp;lt;snapshots&amp;gt;
        &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;
    &amp;lt;/snapshots&amp;gt;
    &amp;lt;url&amp;gt;file://${project.basedir}/lib&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>AMQP and RabbitMQ Snippets</title>
      <link>https://www.hascode.com/amqp-and-rabbitmq-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/amqp-and-rabbitmq-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_rabbitmqctl&#34;&gt;rabbitmqctl&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_create_admin_user_with_full_host_permissions&#34;&gt;Create admin user with full host permissions&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;# create new user named &amp;#39;theadmin&amp;#39;
rabbitmqctl add_user theadmin thepassword

# make &amp;#39;theadmin&amp;#39; admin
rabbitmqctl set_user_tags theadmin administrator

# give &amp;#39;theadmin&amp;#39; permissions for all hosts
rabbitmqctl set_permissions -p / theadmin &amp;#34;.*&amp;#34; &amp;#34;.*&amp;#34; &amp;#34;.*&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_amqp_exchange_types&#34;&gt;AMQP Exchange Types&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_1_fanout_exchange&#34;&gt;1. Fanout Exchange&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; A fanout exchange routes messages to all of the queues that are bound to it. It doesn’t take the routing key into consideration. Instead, it simply broadcasts the message to all bound queues.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Apache Webserver Snippets</title>
      <link>https://www.hascode.com/apache-webserver-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/apache-webserver-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_deny_all_methods_excepting_post_and_get&#34;&gt;Deny all methods excepting POST and GET&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)
RewriteRule .* - [F]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_rewrite_all_aliases_for_a_domain_to_a_single_domain&#34;&gt;Rewrite all aliases for a domain to a single domain&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain1\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain2\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain3\.com [NC,OR]
RewriteRule (.*) http://mydomain.com/$1 [R=301,L]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Atlassian Snippets</title>
      <link>https://www.hascode.com/atlassian-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/atlassian-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_disable_yui_compressor&#34;&gt;Disable YUI compressor&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.atlassian.maven.plugins&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-jira-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;${amps.version}&amp;lt;/version&amp;gt;
    &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;compressResources&amp;gt;false&amp;lt;/compressResources&amp;gt;
        [..]
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_favourites_by_user&#34;&gt;Confluence – Get favourites by user&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the label manager.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;List getFavouriteSpaces(String username)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_determine_the_base_url&#34;&gt;Confluence – Determine the base URL&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the SettingsManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String baseUrl = settingsManager.getGlobalSettings().getBaseUrl();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_the_context_path&#34;&gt;Confluence – Get the context path&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the BootstrapManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String contextPath = bootstrapManager.getWebAppContextPath();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_using_velocity_template_for_a_macro&#34;&gt;Confluence – Using Velocity Template for a Macro&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext());

contextMap.put(&amp;#34;key&amp;#34;, obj); // references obj as variable named $key in the velocity template

VelocityUtils.getRenderedTemplate(&amp;#34;path/to/template.vm&amp;#34;, contextMap);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>CSS Snippets</title>
      <link>https://www.hascode.com/css-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/css-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_calculations&#34;&gt;Calculations&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;see also &lt;a href=&#34;http://www.w3.org/TR/css3-values/#calc&#34;&gt;W3C draft&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;.container {
    width: calc(100% - 80px);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Docker Snippets</title>
      <link>https://www.hascode.com/docker-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/docker-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_restrict_network&#34;&gt;Restrict Network&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Can be useful when using a third-party image that we do not trust
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_run_with_no_network&#34;&gt;Run with no network&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker run --network none &amp;lt;image&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_run_with_private_isolated_network&#34;&gt;Run with private isolated network&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;At least containers attached to this network can talk with another&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker network create --internal my_isolated_network
docker run --network my_isolated_network &amp;lt;image&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_block_using_firewall&#34;&gt;Block using firewall&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. using &lt;code&gt;iptables&lt;/code&gt; or &lt;code&gt;ipfw&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;# Get container&amp;#39;s IP
docker inspect -f &amp;#39;{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}&amp;#39; &amp;lt;container_name&amp;gt;

# Block all outbound connections from that IP
sudo iptables -I DOCKER-USER -s &amp;lt;container_ip&amp;gt; -j DROP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Eclipse Snippets</title>
      <link>https://www.hascode.com/eclipse-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/eclipse-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_favorites&#34;&gt;Favorites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Spare my time when using static imports ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;code&gt;Window &amp;gt; Preferences &amp;gt; Java &amp;gt; Editor &amp;gt; Content  Assist &amp;gt; Favorites&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;com.google.common.collect.Lists
com.jayway.restassured.matcher.RestAssuredMatchers
com.jayway.restassured.RestAssured
io.restassured.matcher.RestAssuredMatchers
io.restassured.RestAssured
org.hamcrest.MatcherAssert
org.hamcrest.Matchers
org.mockito.Mockito
javaslang.API
javaslang.Predicates&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_template_to_insert_a_static_logger_instance&#34;&gt;Template to insert a static logger instance&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Go &lt;code&gt;Windows &amp;gt; Preferences &amp;gt; Java &amp;gt; Editor &amp;gt; Templates &amp;gt; New&lt;/code&gt; …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Enter logger as name and as template:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)}
private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Afterwards you’re able to type logger in your code and ctrl+space gives the option to insert the logger&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Firefox Snippets</title>
      <link>https://www.hascode.com/firefox-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/firefox-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_configure_address_bar_to_return_search_results&#34;&gt;Configure address bar to return search results&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enter &lt;code&gt;about:config&lt;/code&gt; in the address bar&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Search for the key &lt;code&gt;keyword.url&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modify the value for your search engine of choice .. e.g. for the google search: &lt;a href=&#34;http://www.google.com/search?q=&#34; class=&#34;bare&#34;&gt;http://www.google.com/search?q=&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Git Snippets</title>
      <link>https://www.hascode.com/git-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/git-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_show_commits_from_another_branch_not_contained_in_current_branch&#34;&gt;Show commits from another branch not contained in current branch&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git cherry -v otherbranch
+ f7d6a569bb6912aac97fce9ac92c4302863fb0d9 thecommit&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_empty_commit&#34;&gt;Create empty commit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;sometimes necessary for build/deploy pipelines …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git commit --allow-empty -m &amp;#34;Empty-Commit&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_cherry_pick_without_commit&#34;&gt;Cherry pick without commit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git cherry-pick -n HASH&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_vimdiff_for_diff&#34;&gt;Using vimdiff for diff&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;set it via git config&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git config --global diff.tool vimdiff
git config --global merge.tool vimdiff&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;set it via ~/.gitconfig&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;[diff]
    tool = vimdiff
[merge]
    tool = vimdiff&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_vscode_as_diff_and_mergetool&#34;&gt;Using vscode as diff and mergetool&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
You need to have the shell integration installed (code binary in PATH)
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitHub Snippets</title>
      <link>https://www.hascode.com/github-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/github-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_github_actions&#34;&gt;GitHub Actions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_step_to_check_variables_and_redistribute_as_env&#34;&gt;Step to check variables and redistribute as env&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following step does ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;check of given variables are set, if not, exit with an error that is visible in the action’s log&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide the given input as environment variable in &lt;code&gt;GITHUB_ENV&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;- name: configuration
      env:
        VAR1: ${{ needs.configure.outputs.something }}
        VAR2: ${{ vars.SOMETHING_OTHER }}/
        VAR3: &amp;#34;something_other_other&amp;#34;
      run: |
        for var in VAR1 VAR2 VAR3; do [ -n &amp;#34;${!var}&amp;#34; ] || { echo &amp;#34;$var is missing&amp;#34;; exit 1; }; echo &amp;#34;$var=${!var}&amp;#34; &amp;gt;&amp;gt; &amp;#34;$GITHUB_ENV&amp;#34;; done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitLab Snippets</title>
      <link>https://www.hascode.com/gitlab-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/gitlab-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_generate_asciidoc_documentation_and_publish_it_with_gitlab_pages&#34;&gt;Generate AsciiDoc Documentation and Publish it with GitLab Pages&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We setup a repository and add a directory named &lt;code&gt;docs&lt;/code&gt; there .. this is the home of our AsciiDoc files.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using &lt;a href=&#34;https://hub.docker.com/r/asciidoctor/docker-asciidoctor&#34;&gt;asciidoctor/docker-asciidoctor&lt;/a&gt; as Docker image for tool provisioning&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is the &lt;code&gt;.gitlab-ci.yml&lt;/code&gt;, we’re running the stage only when something in the &lt;code&gt;docs&lt;/code&gt; directory has changed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;stages:
  - &amp;#34;Build docs&amp;#34;

# The name of the job activates the GitLab pages publication
pages:
  image: asciidoctor/docker-asciidoctor
  stage: &amp;#34;Build docs&amp;#34;
  tags:
    - build
  script:
    - sh ./gen_docs.sh
    - mv output public
  only:
    refs:
      - master
    changes:
      - /docs/*
  artifacts:
    paths:
      - public
    expose_as: &amp;#39;Documentation Archive&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Google Docs Snippets</title>
      <link>https://www.hascode.com/google-docs-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/google-docs-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_importing_xml_data_in_google_sheets&#34;&gt;Importing XML Data in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use the &lt;a href=&#34;https://support.google.com/docs/answer/3093342?hl=en&#34;&gt;XMLIMPORT&lt;/a&gt; function&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The syntax is &lt;code&gt;XMLIMPORT(&amp;#34;url&amp;#34;, &amp;#34;xpath&amp;#34;)&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. for importing an XML sitemap&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=IMPORTXML(&amp;#34;https://www.hascode.com/sitemap.xml&amp;#34;, &amp;#34;//\*[local-name()=&amp;#39;url&amp;#39;]/*[local-name()=&amp;#39;loc&amp;#39;]&amp;#34;)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_select_the_preceding_cell_in_google_sheets&#34;&gt;Select the preceding cell in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=INDIRECT(ADDRESS(ROW()-1,COLUMN())&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_todo_list_counter_in_google_sheets&#34;&gt;Create a Todo List Counter in Google Sheets&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Each empty cell is a todo, each filled cell is done.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That allows us the following output, that counts all preceding cells of each type:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;=&amp;#34;Done: &amp;#34;&amp;amp;(COUNTA(B3:INDIRECT(ADDRESS(ROW()-1,COLUMN())))&amp;amp;&amp;#34; Todo: &amp;#34; &amp;amp;COUNTIF(B3:INDIRECT(ADDRESS(ROW()-1,COLUMN())),&amp;#34;&amp;#34;))&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This outputs a label like &amp;#34;Done: 35 Todo: 142&amp;#34;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Helm Snippets</title>
      <link>https://www.hascode.com/helm-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/helm-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_common_operations&#34;&gt;Common operations&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_add_helm_repository&#34;&gt;Add Helm Repository&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm repo add NAME URL&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. for the Bitnami repository:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm repo add bitnami https://charts.bitnami.com/bitnami                                                                                                                                                         1 ↵
&amp;#34;bitnami&amp;#34; has been added to your repositories&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_list_repositories&#34;&gt;List Repositories&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm repo list                                                                                                                                                                                                 130 ↵
NAME    URL
bitnami https://charts.bitnami.com/bitnami&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_searching_in_a_helm_repository&#34;&gt;Searching in a Helm Repository&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm search repo wordpress
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
bitnami/wordpress       15.2.30         6.1.1           WordPress is the world&amp;#39;s most popular blogging ...
bitnami/wordpress-intel 2.1.31          6.1.1           DEPRECATED WordPress for Intel is the most popu...&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>IntelliJ Snippets</title>
      <link>https://www.hascode.com/intellij-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/intellij-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_live_templates&#34;&gt;Live Templates&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_junit_5_test&#34;&gt;JUnit 5 Test&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;@org.junit.jupiter.api.Test

@org.junit.jupiter.api.DisplayName(&amp;#34;$NAME$&amp;#34;)

void $METHOD$() throws Exception {

    $END$

}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;intellij-junit5-template.png&#34; alt=&#34;intellij junit5 template&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. IntelliJ Live Template Editor&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Edit Variables:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NAME&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;METHOD: &lt;em&gt;default-value camelCase(NAME)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;intellij-junit5-variables.png&#34; alt=&#34;intellij junit5 variables&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 2. Editing template variables&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_slf4j_logger_template&#34;&gt;SLF4J Logger Template&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger( $CLASS$.class );&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Edit variables:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CLASS: &lt;em&gt;expression: className()&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_favorite_shortcuts&#34;&gt;Favorite Shortcuts&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_select_whole_block_in_editor&#34;&gt;Select whole block in Editor&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Cmd&lt;/kbd&gt;+&lt;kbd&gt;Tab&lt;/kbd&gt;+&lt;kbd&gt;Down&lt;/kbd&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_select_similar_blocks_in_editor&#34;&gt;Select similar blocks in editor&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;G&lt;/kbd&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_copy_the_absolute_path_of_the_current_file_into_clipboard&#34;&gt;Copy the absolute Path of the current File into Clipboard&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Cmd&lt;/kbd&gt;+&lt;kbd&gt;Shift&lt;/kbd&gt;+&lt;kbd&gt;C&lt;/kbd&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Snippets</title>
      <link>https://www.hascode.com/java-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_remote_debug_a_pods_java_process&#34;&gt;Remote Debug a Pod’s Java Process&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simple steps for remote debugging a Java process running on a k8 pod:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Edit deployment and add the following parameters to the Java start line: &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also add the following port mapping at the section &lt;code&gt;container → ports&lt;/code&gt; in the deployment:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;- containerPort: 5005
  protocol: TCP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safe, wait for the new pods and then add a port forward for port 5005 for this pod:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward podname 5005&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JavaScript Snippets</title>
      <link>https://www.hascode.com/javascript-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/javascript-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_nodejs_module&#34;&gt;Creating a Nodejs Module&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_1_create_a_package_json_using_npm_init&#34;&gt;1) Create a package.json using npm init&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ npm init&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This utility will walk you through creating a &lt;code&gt;package.json&lt;/code&gt; file.
It only covers the most common items, and tries to guess sane defaults.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;See &lt;code&gt;npm help json&lt;/code&gt; for definitive documentation on these fields
and exactly what they do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use &lt;code&gt;npm install &amp;lt;pkg&amp;gt; --save&lt;/code&gt; afterwards to install a package and
save it as a dependency in the package.json file.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>jq Snippets</title>
      <link>https://www.hascode.com/jq-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/jq-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_json_file&#34;&gt;Sample JSON File&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sample JSON File containing well known programmers that we use for the following examples&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;coders.json&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;[
  {
    &amp;#34;name&amp;#34;: &amp;#34;Bjarne Stroustrup&amp;#34;,
    &amp;#34;languages&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;C++&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1983
      }
    ],
    &amp;#34;details&amp;#34;: {
      &amp;#34;nationality&amp;#34;: &amp;#34;Danish&amp;#34;,
      &amp;#34;awards&amp;#34;: [&amp;#34;IEEE Computer Society Computer Pioneer Award&amp;#34;, &amp;#34;Charles Stark Draper Prize&amp;#34;]
    }
  },
  {
    &amp;#34;name&amp;#34;: &amp;#34;Guido van Rossum&amp;#34;,
    &amp;#34;languages&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;Python&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1991
      }
    ],
    &amp;#34;details&amp;#34;: {
      &amp;#34;nationality&amp;#34;: &amp;#34;Dutch&amp;#34;,
      &amp;#34;awards&amp;#34;: [&amp;#34;Free Software Foundation Award for the Advancement of Free Software&amp;#34;, &amp;#34;NLUUG Award&amp;#34;]
    }
  },
  {
    &amp;#34;name&amp;#34;: &amp;#34;James Gosling&amp;#34;,
    &amp;#34;languages&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;Java&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1995
      }
    ],
    &amp;#34;details&amp;#34;: {
      &amp;#34;nationality&amp;#34;: &amp;#34;Canadian&amp;#34;,
      &amp;#34;awards&amp;#34;: [&amp;#34;Order of Canada&amp;#34;, &amp;#34;The Economist Innovation Award&amp;#34;]
    }
  },
  {
    &amp;#34;name&amp;#34;: &amp;#34;Dennis Ritchie&amp;#34;,
    &amp;#34;languages&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;C&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1972
      },
      {
        &amp;#34;name&amp;#34;: &amp;#34;Unix&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1969
      }
    ],
    &amp;#34;details&amp;#34;: {
      &amp;#34;nationality&amp;#34;: &amp;#34;American&amp;#34;,
      &amp;#34;awards&amp;#34;: [&amp;#34;Turing Award&amp;#34;, &amp;#34;National Medal of Technology&amp;#34;]
    }
  },
  {
    &amp;#34;name&amp;#34;: &amp;#34;Brendan Eich&amp;#34;,
    &amp;#34;languages&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;JavaScript&amp;#34;,
        &amp;#34;year_created&amp;#34;: 1995
      }
    ],
    &amp;#34;details&amp;#34;: {
      &amp;#34;nationality&amp;#34;: &amp;#34;American&amp;#34;,
      &amp;#34;awards&amp;#34;: [&amp;#34;Webby Award&amp;#34;]
    }
  }
]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kafka Snippets</title>
      <link>https://www.hascode.com/kafka-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kafka-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_start_an_image_with_kcat_kafka_cat_for_debugging&#34;&gt;Start an Image with kcat / kafka-cat for Debugging&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl -n NAMESPACE run &amp;#34;$(whoami)-debug&amp;#34; -it --rm \
    --image=confluentinc/cp-kafkacat:6.1.9 \
    --restart=Never \
    -- bash&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dockerfile_for_kafka_analysis_container_with_different_tools&#34;&gt;Dockerfile for Kafka Analysis Container with different Tools&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With jq, kafka console tools, schema registry tools and kafkacat installed …​.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Dockerfile&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;FROM confluentinc/cp-kafka:6.2.1 as cp-kafka
FROM confluentinc/cp-schema-registry:6.2.1 as cp-schema-registry

FROM debian:10-slim
ARG DEBIAN_FRONTEND=noninteractive

# Install necessary tools
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    curl \
    jq \
    yq \
    &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*

# Install kafkacat binary
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y kafkacat &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*

# Copy Kafka binaries
COPY --from=cp-kafka /usr/bin/kafka-* /usr/bin/
COPY --from=cp-schema-registry /usr/bin/schema-registry* /usr/bin/

# Copy entrypoint script
COPY entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh

ENTRYPOINT [&amp;#34;/usr/bin/entrypoint.sh&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kotlin Snippets</title>
      <link>https://www.hascode.com/kotlin-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kotlin-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_checks_exit_conditions&#34;&gt;Checks / Exit Conditions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Instead of writing something like &lt;code&gt;if !condition throw …​&lt;/code&gt; we may use &lt;code&gt;require&lt;/code&gt; and &lt;code&gt;check&lt;/code&gt; for quick exit conditions:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;val num = 1;

require(num &amp;gt; 1){
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;val num = 1;

require(num &amp;gt; 1){
    // ..
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_pluralize_strings&#34;&gt;Pluralize Strings&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Adding pluralization as extension function&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;fun String.pluralize(count:Int):String {
    return if (count &amp;gt; 1){
        this + &amp;#39;s&amp;#39;
    } else {
        this
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use it like this&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kubernetes Snippets</title>
      <link>https://www.hascode.com/kubernetes-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kubernetes-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_rerun_existing_completed_job&#34;&gt;Rerun existing completed Job&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock caution&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-caution&#34; title=&#34;Caution&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Replace an existing Job with itself&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl get job JOBNAME -o yaml | kubectl replace --force -f -&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Sometimes there are errors importing the job template due to auto-generated labels or selectors .. a quick and dirty hack is to filter them out using jq
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Linux Snippets</title>
      <link>https://www.hascode.com/linux-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/linux-snippets/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;These are not only linux snippets but also bash snippets and snippets using tools that run under Linux, *nix or sometimes even MacOSX, I should reorder this article someday ;)&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_settings_for_more_reliable_bash_scripts&#34;&gt;Settings for more reliable bash scripts&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;set -euo pipefail&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;this gives us …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;-e: exit script if a single command fails&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;-u: exit script if an unset variable is used&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;-o pipefail: return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Liquibase Snippets</title>
      <link>https://www.hascode.com/liquibase-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/liquibase-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_precondition_postgres_schema_exists&#34;&gt;Precondition: Postgres Schema exists&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using this precondition should run a migration only if the schema &lt;code&gt;my_schema&lt;/code&gt; exists.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;preConditions onFail=&amp;#34;CONTINUE&amp;#34;&amp;gt;
    &amp;lt;sqlCheck expectedResult=&amp;#34;1&amp;#34;&amp;gt;
        SELECT COUNT(1) FROM information_schema.schemata WHERE schema_name = &amp;#39;my_schema&amp;#39;;
    &amp;lt;/sqlCheck&amp;gt;
&amp;lt;/preConditions&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.liquibase.com/concepts/changelogs/preconditions.html&#34; class=&#34;bare&#34;&gt;https://docs.liquibase.com/concepts/changelogs/preconditions.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mac Snippets</title>
      <link>https://www.hascode.com/mac-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mac-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_permanently_add_ssh_key_password_to_the_keychain&#34;&gt;Permanently add SSH Key Password to the Keychain&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;ssh-add --apple-use-keychain ~/.ssh/THEPRIVATEKEY&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_tool_for_window_management&#34;&gt;Tool for Window Management&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_install_rectangle&#34;&gt;Install rectangle&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Install with brew&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;brew install rectangle&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_useful_shortcuts&#34;&gt;Useful Shortcuts&lt;/h3&gt;
&lt;div class=&#34;sect3&#34;&gt;
&lt;h4 id=&#34;_move_current_app_to_previous_or_next_display&#34;&gt;Move current app to previous or next display&lt;/h4&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;Opt&lt;/kbd&gt;+&lt;kbd&gt;Cmd&lt;/kbd&gt;+&lt;kbd&gt;LEFT&lt;/kbd&gt;&lt;/span&gt; or &lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;Opt&lt;/kbd&gt;+&lt;kbd&gt;Cmd&lt;/kbd&gt;+&lt;kbd&gt;RIGHT&lt;/kbd&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect3&#34;&gt;
&lt;h4 id=&#34;_maximize_window&#34;&gt;Maximize window&lt;/h4&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;Opt&lt;/kbd&gt;+&lt;kbd&gt;ENTER&lt;/kbd&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_beginners_list_of_shortcuts&#34;&gt;Beginners List of Shortcuts&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist lowerroman&#34;&gt;
&lt;ol class=&#34;lowerroman&#34; type=&#34;i&#34;&gt;
&lt;li&gt;
&lt;p&gt;coming from Linux …​&lt;/p&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Finder&lt;/p&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Show hidden files in Finder: cmd + shift + .&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open Finder: Option + Cmd + Space&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open Location: Shift + Cmd + G&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change to parent dir in Finder: super + UP&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Snippets</title>
      <link>https://www.hascode.com/maven-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/maven-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_extract_coordinates_from_the_pom&#34;&gt;Extract Coordinates from the POM&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helpful for build and integration environments, pipelines etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Exctract the Project version from the pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_override_a_property_via_local_configuration&#34;&gt;Override a Property via local configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. to override the property &lt;code&gt;xxx&lt;/code&gt; from your project’s &lt;code&gt;pom.xml&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory &lt;code&gt;.mvn&lt;/code&gt; in your project directory root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a file named &lt;code&gt;maven.config&lt;/code&gt; in this directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert &lt;code&gt;-Dxxx=newvalue&lt;/code&gt; into the file to override this property&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Don’t forget to add &lt;code&gt;.mvn&lt;/code&gt; to your .gitignore!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Misc Snippets</title>
      <link>https://www.hascode.com/misc-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/misc-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_data_normalizing&#34;&gt;Data Normalizing&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Formula&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;newVal = (oldVal-min) / (max-min)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Ugly Scala Example&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-scala&#34; data-lang=&#34;scala&#34;&gt;package com.hascode
import scala.collection.mutable.LinkedList

object NormalizerExample extends App {
    val dataSet = LinkedList(1., 6.5, 3., 6.2, 20., 31.2, 50.2, 12., 0.24, 1.224, 2.2, 3.)
    for ((num, index) &amp;lt;- dataSet.zipWithIndex) {
        dataSet(index) = (num - dataSet.min) / (dataSet.max - dataSet.min)
    }
    println(&amp;#34;Normalized: &amp;#34; + dataSet)
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;Normalized: LinkedList(0.01521216973578863, 0.12921819759798853, 0.05947594797769014, 0.12324029048767723, 0.3982240175619966, 0.6213992163469515, 1.0, 1.0, 0.07531115879828326, 0.40498283261802576, 0.7319742489270387, 1.0)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>MyBatis Snippets</title>
      <link>https://www.hascode.com/mybatis-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mybatis-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_use_list_of_parameters_in_annotation_based_query&#34;&gt;Use List of Parameters in Annotation-based Query&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Possible using MyBatis &lt;a href=&#34;https://mybatis.org/mybatis-3/dynamic-sql.html&#34;&gt;Dynamic SQL feature&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.example.mybatis;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SampleMapper {

    @Select({&amp;#34;&amp;lt;script&amp;gt;&amp;#34;,
             &amp;#34;SELECT sample.bar&amp;#34;,
             &amp;#34;FROM sampletable sample&amp;#34;,
             &amp;#34;WHERE sample.id IN&amp;#34;,
            &amp;#34;&amp;lt;foreach item=&amp;#39;item&amp;#39; index=&amp;#39;index&amp;#39; collection=&amp;#39;ids&amp;#39;&amp;#34;,
            &amp;#34;open=&amp;#39;(&amp;#39; separator=&amp;#39;,&amp;#39; close=&amp;#39;)&amp;#39;&amp;gt;&amp;#34;,
            &amp;#34;#{item}&amp;#34;,
            &amp;#34;&amp;lt;/foreach&amp;gt;&amp;#34;,
            &amp;#34;&amp;lt;/script&amp;gt;&amp;#34;})
    List&amp;lt;Foo&amp;gt; getSamplesMatchingIds(@Param(&amp;#34;ids&amp;#34;) List&amp;lt;String&amp;gt; ids);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The mapper may now be used with a list of parameter objects:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;var samples = sampleMapper.getSamplesMatchingIds(List.of(&amp;#34;24059e5b-aa07-424d-855e-50f499b8f697&amp;#34;, &amp;#34;65140fc0-fc9f-42d2-9531-5e5d6caeba30&amp;#34;));&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_call_a_procedure&#34;&gt;Call a Procedure&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.example.mybatis;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.StatementType;

@Mapper
public interface SampleMapper {

    @Select(&amp;#34;CALL SCHEMA.CL.setScope(#{scope})&amp;#34;)
    @Options(statementType = StatementType.CALLABLE)
    void setScope(int scope);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Neo4j Snippets</title>
      <link>https://www.hascode.com/neo4j-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/neo4j-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_aggregate_existing_labels&#34;&gt;Aggregate existing Labels&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-cypher&#34; data-lang=&#34;cypher&#34;&gt;MATCH (n) RETURN DISTINCT labels(n)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Or unwinding label pairs&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-cypher&#34; data-lang=&#34;cypher&#34;&gt;MATCH (n)
WITH DISTINCT labels(n) AS labels
UNWIND labels AS label
RETURN DISTINCT label
ORDER BY label&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Observability Snippets</title>
      <link>https://www.hascode.com/observability-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/observability-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_use_methodology&#34;&gt;The USE Methodology&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;USE&lt;/strong&gt; stands for &lt;strong&gt;Utilization&lt;/strong&gt;, &lt;strong&gt;Saturation&lt;/strong&gt;, and &lt;strong&gt;Errors&lt;/strong&gt;. Developed by Brendan Gregg, it’s a low-level diagnostic tool for infrastructure and system resources.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Utilization&lt;/strong&gt; – How much of a resource is used? (e.g., 70% CPU)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Saturation&lt;/strong&gt; – Is the system over capacity? (e.g., CPU run queue)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Errors&lt;/strong&gt; – Are there hardware or system faults? (e.g., disk errors)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;: Bottleneck analysis on servers, network, disk, memory&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Source: &lt;a href=&#34;https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/best-practices/&#34; class=&#34;bare&#34;&gt;https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/best-practices/&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_red_methodology&#34;&gt;The RED Methodology&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;RED&lt;/strong&gt; focuses on service-level performance and is tailored for microservices and HTTP-based systems.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>PHP Snippets</title>
      <link>https://www.hascode.com/php-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/php-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_wordpress_anonymize_ip_in_comments&#34;&gt;WordPress anonymize IP in comments&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add as last line in theme’s &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;function wpb_remove_commentsip($comment_author_ip) {
  return &amp;#39;127.0.0.1&amp;#39;;
}
add_filter(&amp;#39;pre_comment_user_ip&amp;#39;,&amp;#39;wpb_remove_commentsip&amp;#39;);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_wordpress_remove_version_info&#34;&gt;WordPress remove version info&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add as last line in theme’s &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;function remove_version_info() {
  return &amp;#39;&amp;#39;;
}
add_filter(&amp;#39;the_generator&amp;#39;, &amp;#39;remove_version_info&amp;#39;);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/forklor/wordpress-hooks&#34;&gt;List of all WordPress Hooks&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Postgres Snippets</title>
      <link>https://www.hascode.com/postgres-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/postgres-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_get_size_of_a_table&#34;&gt;Get size of a table&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT pg_size_pretty(pg_total_relation_size(&amp;#39;schemaname.tablename&amp;#39;));&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_select_unique_combination_of_fields_tuples&#34;&gt;Select unique combination of fields / tuples&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT DISTINCT ON(field1, field2) field1, field2
FROM thetable&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_select_rows_where_a_combination_of_fields_is_not_unique&#34;&gt;Select rows where a combination of fields is not unique&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT columnA, columnB, count(*) AS count
FROM thetable
GROUP BY columnA, columnB
HAVING count(*) &amp;gt; 1&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_search_for_rows_with_array_containing_value&#34;&gt;Search for rows with array containing value&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Assuming, the field &lt;code&gt;appointments&lt;/code&gt; has the type &lt;code&gt;date[]&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT *
FROM mtable
WHERE appointments @&amp;gt; ARRAY[&amp;#39;2023-09-19&amp;#39;::date]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Python Snippets</title>
      <link>https://www.hascode.com/python-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/python-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_virtual_environments&#34;&gt;Virtual Environments&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Create and activate a venv&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;python -m venv /path/to/new-env &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
source /path/to/new-env/bin/activate &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Creates a new virtual environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Activate the new virtual environment&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Deactivate venv&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;deactivate&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Save used dependencies to a file&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;pip freeze &amp;gt; dependencies.txt&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Install dependencies from file&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;pip install -r dependencies.txt&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_storing_and_fetching_credentials_from_the_system_keyring&#34;&gt;Storing and fetching Credentials from the System Keyring&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I am using &lt;a href=&#34;https://github.com/jaraco/keyring&#34;&gt;jaraco/keyring&lt;/a&gt; here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip install keyring&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;import keyring

keyring.set_password(&amp;#34;system&amp;#34;, &amp;#34;db.sample.password&amp;#34;, &amp;#34;xoxo&amp;#34;)

print(keyring.get_password(&amp;#34;system&amp;#34;, &amp;#34;db.sample.password&amp;#34;))&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Rust Snippets</title>
      <link>https://www.hascode.com/rust-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/rust-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Installing &lt;code&gt;rustup&lt;/code&gt; first…​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;install rustup via shell script&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;curl --proto &amp;#39;=https&amp;#39; --tlsv1.2 https://sh.rustup.rs -sSf | sh&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;install rustup via brew&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;brew install rustup-init &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
rustup-init &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;

Welcome to Rust!

[...]

Current installation options:


   default host triple: aarch64-apple-darwin
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;colist arabic&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;install &lt;code&gt;rustup&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;install rust binaries and add them to paths etc…​&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Scala Snippets</title>
      <link>https://www.hascode.com/scala-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/scala-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sbt_eclipse_plugin&#34;&gt;SBT – Eclipse Plugin&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add to your &lt;code&gt;~/.sbt/plugins/plugins.sbt&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-scala&#34; data-lang=&#34;scala&#34;&gt;addSbtPlugin(&amp;#34;com.typesafe.sbteclipse&amp;#34; % &amp;#34;sbteclipse-plugin&amp;#34; % &amp;#34;2.1.1&amp;#34;)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Boot Snippets</title>
      <link>https://www.hascode.com/spring-boot-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/spring-boot-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_define_and_configure_log_groups&#34;&gt;Define and Configure Log Groups&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
This allows to configure a group of loggers at the same time
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Define a log group named &lt;code&gt;myaspect&lt;/code&gt; with two packages&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.group.myaspect=com.hascode.package1,com.hascode.package2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the log group and set all loggers to level &lt;code&gt;TRACE&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.level.myaspect=TRACE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is also possible as parameter on startup&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -Dlogging.level.myaspect=TRACE myapp.jar&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_use_junit_5_with_spring_boot&#34;&gt;Use JUnit 5 with Spring Boot&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use newer versions of Surefire and Failsafe plugins:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
[..]
  &amp;lt;maven-failsafe-plugin.version&amp;gt;2.22.0&amp;lt;/maven-failsafe-plugin.version&amp;gt;
  &amp;lt;maven-surefire-plugin.version&amp;gt;2.22.0&amp;lt;/maven-surefire-plugin.version&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>SQL Snippets</title>
      <link>https://www.hascode.com/sql-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/sql-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_count_unique_all_values&#34;&gt;Count unique / all values&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT COUNT(DISTINCT &amp;lt;FIELDNAME&amp;gt;), COUNT(ALL &amp;lt;FIELDNAME&amp;gt;) FROM &amp;lt;TABLE&amp;gt;;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_partially_anonymize_e_mail_addresses&#34;&gt;Partially anonymize e-mail addresses&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;UPDATE &amp;lt;TABLE_NAME&amp;gt;
SET &amp;lt;EMAIL_FIELD&amp;gt;=
INSERT(
&amp;lt;EMAIL_FIELD&amp;gt;,
POSITION(&amp;#39;@&amp;#39; IN &amp;lt;EMAIL_FIELD&amp;gt;),
100,
CONCAT(FLOOR(1 + (RAND() * 100)),&amp;#39;@hascode.com&amp;#39;))
WHERE
POSITION(&amp;#39;@&amp;#39; IN &amp;lt;EMAIL_FIELD&amp;gt;)&amp;gt;0;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_find_duplicate_entries&#34;&gt;Find duplicate entries&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;SELECT COUNT(*), &amp;lt;FIELDNAME&amp;gt; FROM &amp;lt;TABLENAME&amp;gt;
GROUP BY &amp;lt;FIELDNAME&amp;gt;
HAVING COUNT(*)&amp;gt;1;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_mysql_fix_zero_dates_for_data_imports&#34;&gt;MySQL Fix Zero Dates for Data Imports&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;quoteblock&#34;&gt;
&lt;blockquote&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Error: ERROR 1067 (42000) at line 1234: Invalid default value for ‘datefield’&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In newer MySQL Versions zero in date or zero dates are forbidden .. check this with:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Vim Snippets</title>
      <link>https://www.hascode.com/vim-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/vim-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_vim_plugin_manager&#34;&gt;Vim Plugin Manager&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_installation&#34;&gt;Installation&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Download it from its &lt;a href=&#34;https://github.com/junegunn/vim-plug&#34;&gt;GitHub repository&lt;/a&gt; or the risky but easy way using curl:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_adding_plugins&#34;&gt;Adding Plugins&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add a plugin section to the &lt;code&gt;.vimrc&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;.vimrc&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;call plug#begin()
&amp;#34; The default plugin directory will be as follows:
&amp;#34;   - Vim (Linux/macOS): &amp;#39;~/.vim/plugged&amp;#39;
&amp;#34;   - Vim (Windows): &amp;#39;~/vimfiles/plugged&amp;#39;
&amp;#34;   - Neovim (Linux/macOS/Windows): stdpath(&amp;#39;data&amp;#39;) . &amp;#39;/plugged&amp;#39;
&amp;#34; You can specify a custom plugin directory by passing it as the argument
&amp;#34;   - e.g. `call plug#begin(&amp;#39;~/.vim/plugged&amp;#39;)`
&amp;#34;   - Avoid using standard Vim directory names like &amp;#39;plugin&amp;#39;

&amp;#34; Make sure you use single quotes

&amp;#34; Gruvbox Theme
Plug &amp;#39;sainnhe/gruvbox-material&amp;#39;

&amp;#34; Initialize plugin system
&amp;#34; - Automatically executes `filetype plugin indent on` and `syntax enable`.
call plug#end()
&amp;#34; You can revert the settings after the call like so:
&amp;#34;   filetype indent off   &amp;#34; Disable file-type-specific indentation
&amp;#34;   syntax off            &amp;#34; Disable syntax highlighting&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Windows Snippets</title>
      <link>https://www.hascode.com/windows-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/windows-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_autostart_verzeichnis_aufrufen&#34;&gt;Autostart Verzeichnis aufrufen&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Run from the command line (&lt;span class=&#34;keyseq&#34;&gt;&lt;kbd&gt;⊞&lt;/kbd&gt;+&lt;kbd&gt;R&lt;/kbd&gt;&lt;/span&gt;)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;shell:startup&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_list_processes_on_the_command_line&#34;&gt;List Processes on the Command Line&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;tasklist | more&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Find by name&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;tasklist /FI &amp;#34;IMAGENAME eq notepad.exe&amp;#34;

Abbildname                     PID Sitzungsname       Sitz.-Nr. Speichernutzung
========================= ======== ================ =========== ===============
notepad.exe                  23496 Console                    3        14.516 K&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_kill_processes_by_pid_or_name_on_the_command_line&#34;&gt;Kill Processes by PID or Name on the Command Line&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Kill by PID&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;taskkill /F /PID PID_NUMBER&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Kill by Name&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;taskkill /IM &amp;#34;notepad.exe&amp;#34; /F&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_find_process_by_port_used&#34;&gt;Find Process by Port used&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;E.g. finding processes using port 9000.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>XML Snippets</title>
      <link>https://www.hascode.com/xml-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/xml-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_ignore_namespaces_in_xpath_query&#34;&gt;Ignore Namespaces in XPath Query&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. Query for all &lt;code&gt;xxx&lt;/code&gt; nodes ignoring their namespace:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;xmllint --xpath &amp;#39;//*[local-name()=&amp;#34;xxx&amp;#34;]&amp;#39; input.xml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An example parsing URLs from a sitemap XML.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The URLs are located in //url/loc where all nodes are bound to the namespace &lt;code&gt;&lt;a href=&#34;http://www.sitemaps.org/schemas/sitemap/0.9&#34; class=&#34;bare&#34;&gt;http://www.sitemaps.org/schemas/sitemap/0.9&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following query ignores the namespace&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;xmllint --xpath &amp;#39;//*[local-name()=&amp;#34;url&amp;#34;]/*[local-name()=&amp;#34;loc&amp;#34;]&amp;#39; sitemap.xml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_pretty_print_xml_in_the_console_using_xmllint&#34;&gt;Pretty Print XML in the Console using xmllint&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;echo &amp;#39;&amp;lt;blogs&amp;gt;&amp;lt;blog url=&amp;#34;https://www.hascode.com/&amp;#34;&amp;gt;hasCode.com&amp;lt;/blog&amp;gt;&amp;lt;/blogs&amp;gt;&amp;#39; | xmllint --format -
&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;
&amp;lt;blogs&amp;gt;
    &amp;lt;blog url=&amp;#34;https://www.hascode.com/&amp;#34;&amp;gt;hasCode.com&amp;lt;/blog&amp;gt;
&amp;lt;/blogs&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>https://www.hascode.com/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.hascode.com/about/</guid>
      <description>about</description>
    </item>
    <item>
      <title>Imprint &amp; Data Privacy</title>
      <link>https://www.hascode.com/imprint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.hascode.com/imprint/</guid>
      <description>Imprint &amp;amp; Data Privacy</description>
    </item>
  </channel>
</rss>
