<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://vianneyfaivre.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vianneyfaivre.com/" rel="alternate" type="text/html" /><updated>2026-03-01T10:38:47+00:00</updated><id>https://vianneyfaivre.com/feed.xml</id><title type="html">Vianney FAIVRE</title><author><name>Vianney FAIVRE</name></author><entry><title type="html">curl - How to get time spent details</title><link href="https://vianneyfaivre.com/tech/curl-time-spent-network-backend" rel="alternate" type="text/html" title="curl - How to get time spent details" /><published>2024-06-12T00:00:00+00:00</published><updated>2024-06-12T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/curl-time-spent-network-backend</id><content type="html" xml:base="https://vianneyfaivre.com/tech/curl-time-spent-network-backend"><![CDATA[<p>Here is how you can get some metrics when making a http request:</p>
<ul>
  <li>time spent establishing the http connection</li>
  <li>time spent by the server (TTFB: Time to First Byte)</li>
</ul>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl \
  --verbose  \
  --location  \
  --output /dev/null  \
  --silent  \
  --write-out 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n'  \
  'https://vianneyfaivre.com'
</code></pre></div></div>

<p>That command will print out some tech details like what was required to establish the http connection or the size of the http response.</p>

<p>Timings will be printed out:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Establish Connection: 0.036697s
TTFB: 0.091912s
Total: 0.094491s
</code></pre></div></div>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is how you can get some metrics when making a http request: time spent establishing the http connection time spent by the server (TTFB: Time to First Byte) curl \ --verbose \ --location \ --output /dev/null \ --silent \ --write-out 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' \ 'https://vianneyfaivre.com' That command will print out some tech details like what was required to establish the http connection or the size of the http response. Timings will be printed out: Establish Connection: 0.036697s TTFB: 0.091912s Total: 0.094491s]]></summary></entry><entry><title type="html">dig - How to get DNS config of a hostname</title><link href="https://vianneyfaivre.com/tech/get-dns-ips" rel="alternate" type="text/html" title="dig - How to get DNS config of a hostname" /><published>2024-06-12T00:00:00+00:00</published><updated>2024-06-12T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/get-dns-ips</id><content type="html" xml:base="https://vianneyfaivre.com/tech/get-dns-ips"><![CDATA[<p>Here is how you can see the IP Addresses that are assigned to a given hostname:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dig +short vianneyfaivre.com
</code></pre></div></div>

<p>Results:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>185.199.110.153
185.199.109.153
185.199.108.153
185.199.111.153
</code></pre></div></div>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is how you can see the IP Addresses that are assigned to a given hostname: dig +short vianneyfaivre.com Results: 185.199.110.153 185.199.109.153 185.199.108.153 185.199.111.153]]></summary></entry><entry><title type="html">Java - How to parse milliseconds</title><link href="https://vianneyfaivre.com/tech/java-parse-millis" rel="alternate" type="text/html" title="Java - How to parse milliseconds" /><published>2024-01-23T00:00:00+00:00</published><updated>2024-01-23T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/java-parse-millis</id><content type="html" xml:base="https://vianneyfaivre.com/tech/java-parse-millis"><![CDATA[<p>Here is how you can parse milliseconds of a date-time with java.</p>

<figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="nc">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>

    <span class="kt">var</span> <span class="n">pattern</span> <span class="o">=</span> <span class="s">"yyyy-MM-dd'T'HH:mm:ss[.SSS][.SS][.S]"</span><span class="o">;</span>
    <span class="kt">var</span> <span class="n">formatter</span> <span class="o">=</span> <span class="nc">DateTimeFormatter</span><span class="o">.</span><span class="na">ofPattern</span><span class="o">(</span><span class="n">pattern</span><span class="o">);</span>

    <span class="kt">var</span> <span class="n">dateWith0S</span> <span class="o">=</span> <span class="n">formatter</span><span class="o">.</span><span class="na">parse</span><span class="o">(</span><span class="s">"2024-01-21T16:42:33"</span><span class="o">);</span>
    <span class="kt">var</span> <span class="n">dateWith1S</span> <span class="o">=</span> <span class="n">formatter</span><span class="o">.</span><span class="na">parse</span><span class="o">(</span><span class="s">"2024-01-22T16:42:33.1"</span><span class="o">);</span>
    <span class="kt">var</span> <span class="n">dateWith2S</span> <span class="o">=</span> <span class="n">formatter</span><span class="o">.</span><span class="na">parse</span><span class="o">(</span><span class="s">"2024-01-23T16:42:33.12"</span><span class="o">);</span>
    <span class="kt">var</span> <span class="n">dateWith3S</span> <span class="o">=</span> <span class="n">formatter</span><span class="o">.</span><span class="na">parse</span><span class="o">(</span><span class="s">"2024-01-24T16:42:33.123"</span><span class="o">);</span>

    <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">dateWith0S</span><span class="o">);</span>
    <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">dateWith1S</span><span class="o">);</span>
    <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">dateWith2S</span><span class="o">);</span>
    <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">dateWith3S</span><span class="o">);</span>
<span class="o">}</span></code></pre></figure>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is how you can parse milliseconds of a date-time with java. public static void main(String[] args) { var pattern = "yyyy-MM-dd'T'HH:mm:ss[.SSS][.SS][.S]"; var formatter = DateTimeFormatter.ofPattern(pattern); var dateWith0S = formatter.parse("2024-01-21T16:42:33"); var dateWith1S = formatter.parse("2024-01-22T16:42:33.1"); var dateWith2S = formatter.parse("2024-01-23T16:42:33.12"); var dateWith3S = formatter.parse("2024-01-24T16:42:33.123"); System.out.println(dateWith0S); System.out.println(dateWith1S); System.out.println(dateWith2S); System.out.println(dateWith3S); }]]></summary></entry><entry><title type="html">TypeScript - tsconfig.json base files</title><link href="https://vianneyfaivre.com/tech/typescript-tsconfig-base-files" rel="alternate" type="text/html" title="TypeScript - tsconfig.json base files" /><published>2023-12-23T00:00:00+00:00</published><updated>2023-12-23T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/typescript-tsconfig-base-files</id><content type="html" xml:base="https://vianneyfaivre.com/tech/typescript-tsconfig-base-files"><![CDATA[<p>This github repository lists some basic config tsconfig.json files: <a href="https://github.com/tsconfig/bases/tree/main/bases">Github - tsconfig</a></p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[This github repository lists some basic config tsconfig.json files: Github - tsconfig]]></summary></entry><entry><title type="html">Spring - How to connect to RabbitMQ</title><link href="https://vianneyfaivre.com/tech/spring-how-to-connect-to-rabbitmq" rel="alternate" type="text/html" title="Spring - How to connect to RabbitMQ" /><published>2023-02-07T00:00:00+00:00</published><updated>2023-02-07T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/spring-how-to-connect-to-rabbitmq</id><content type="html" xml:base="https://vianneyfaivre.com/tech/spring-how-to-connect-to-rabbitmq"><![CDATA[<p>Here is a snippet to test the connectivity between your machine and a RabbitMQ instance.</p>

<figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="nc">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>

    <span class="nc">String</span> <span class="n">queueName</span> <span class="o">=</span> <span class="s">"YOUR QUEUE"</span><span class="o">;</span>

    <span class="nc">ConnectionFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ConnectionFactory</span><span class="o">();</span>
    <span class="n">factory</span><span class="o">.</span><span class="na">setUsername</span><span class="o">(</span><span class="s">"YOUR USERNAME"</span><span class="o">);</span>
    <span class="n">factory</span><span class="o">.</span><span class="na">setPassword</span><span class="o">(</span><span class="s">"YOUR PASSWORD"</span><span class="o">);</span>
    <span class="n">factory</span><span class="o">.</span><span class="na">setVirtualHost</span><span class="o">(</span><span class="s">"/"</span><span class="o">);</span>
    <span class="n">factory</span><span class="o">.</span><span class="na">setHost</span><span class="o">(</span><span class="s">"your-rabbit-host.com"</span><span class="o">);</span>
    <span class="n">factory</span><span class="o">.</span><span class="na">setPort</span><span class="o">(</span><span class="mi">5672</span><span class="o">);</span>

    <span class="k">try</span> <span class="o">(</span><span class="nc">Connection</span> <span class="n">conn</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">newConnection</span><span class="o">())</span> <span class="o">{</span>
        <span class="nc">Channel</span> <span class="n">channel</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="na">createChannel</span><span class="o">();</span>

        <span class="no">AMQP</span><span class="o">.</span><span class="na">Queue</span><span class="o">.</span><span class="na">DeclareOk</span> <span class="n">response</span> <span class="o">=</span> <span class="n">channel</span><span class="o">.</span><span class="na">queueDeclarePassive</span><span class="o">(</span><span class="n">queueName</span><span class="o">);</span>
        <span class="kt">int</span> <span class="n">msgCount</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="na">getMessageCount</span><span class="o">();</span>
        <span class="kt">int</span> <span class="n">consumerCount</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="na">getConsumerCount</span><span class="o">();</span>

        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"msg="</span><span class="o">+</span><span class="n">msgCount</span><span class="o">+</span><span class="s">" consumers="</span><span class="o">+</span><span class="n">consumerCount</span><span class="o">);</span>
    <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="nc">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">e</span><span class="o">.</span><span class="na">getMessage</span><span class="o">());</span>
        <span class="n">e</span><span class="o">.</span><span class="na">printStackTrace</span><span class="o">();</span>
    <span class="o">}</span>
<span class="o">}</span></code></pre></figure>

<p>Tested with Spring Boot 2 and <code class="language-plaintext highlighter-rouge">spring-rabbit</code> version <code class="language-plaintext highlighter-rouge">1.7.4.RELEASE</code></p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is a snippet to test the connectivity between your machine and a RabbitMQ instance. public static void main(String[] args) { String queueName = "YOUR QUEUE"; ConnectionFactory factory = new ConnectionFactory(); factory.setUsername("YOUR USERNAME"); factory.setPassword("YOUR PASSWORD"); factory.setVirtualHost("/"); factory.setHost("your-rabbit-host.com"); factory.setPort(5672); try (Connection conn = factory.newConnection()) { Channel channel = conn.createChannel(); AMQP.Queue.DeclareOk response = channel.queueDeclarePassive(queueName); int msgCount = response.getMessageCount(); int consumerCount = response.getConsumerCount(); System.out.println("msg="+msgCount+" consumers="+consumerCount); } catch (Exception e) { System.err.println(e.getMessage()); e.printStackTrace(); } } Tested with Spring Boot 2 and spring-rabbit version 1.7.4.RELEASE]]></summary></entry><entry><title type="html">How to test if a port is open</title><link href="https://vianneyfaivre.com/tech/how-to-test-if-a-port-is-open" rel="alternate" type="text/html" title="How to test if a port is open" /><published>2022-12-17T00:00:00+00:00</published><updated>2022-12-17T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/how-to-test-if-a-port-is-open</id><content type="html" xml:base="https://vianneyfaivre.com/tech/how-to-test-if-a-port-is-open"><![CDATA[<p>You can use <code class="language-plaintext highlighter-rouge">netcat</code> aka <code class="language-plaintext highlighter-rouge">nc</code> to test if a port is open or not.</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash">// Test on port 80 <span class="o">(</span>open<span class="o">)</span>
<span class="o">&gt;</span> nc vianneyfaivre.com 80 <span class="nt">-v</span>      
Connection to vianneyfaivre.com port 80 <span class="o">[</span>tcp/http] succeeded!

// Test on port 81 <span class="o">(</span>closed<span class="o">)</span>
<span class="o">&gt;</span> nc vianneyfaivre.com 81 <span class="nt">-v</span>    
nc: connectx to vianneyfaivre.com port 81 <span class="o">(</span>tcp<span class="o">)</span> failed: Operation timed out

// Test on port 443 <span class="o">(</span>open<span class="o">)</span>
<span class="o">&gt;</span> nc vianneyfaivre.com 443 <span class="nt">-v</span>   
Connection to vianneyfaivre.com port 443 <span class="o">[</span>tcp/https] succeeded!

// Bonus: get TLS info and certificates <span class="o">(</span><span class="k">if </span>applicable<span class="o">)</span>
<span class="o">&gt;</span> openssl s_client <span class="nt">-connect</span> vianneyfaivre.com:443</code></pre></figure>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[You can use netcat aka nc to test if a port is open or not. // Test on port 80 (open) &gt; nc vianneyfaivre.com 80 -v Connection to vianneyfaivre.com port 80 [tcp/http] succeeded! // Test on port 81 (closed) &gt; nc vianneyfaivre.com 81 -v nc: connectx to vianneyfaivre.com port 81 (tcp) failed: Operation timed out // Test on port 443 (open) &gt; nc vianneyfaivre.com 443 -v Connection to vianneyfaivre.com port 443 [tcp/https] succeeded! // Bonus: get TLS info and certificates (if applicable) &gt; openssl s_client -connect vianneyfaivre.com:443]]></summary></entry><entry><title type="html">Spring - @Scheduled - How to get CRON next executions</title><link href="https://vianneyfaivre.com/tech/spring-scheduled-cron-next-executions" rel="alternate" type="text/html" title="Spring - @Scheduled - How to get CRON next executions" /><published>2022-09-02T00:00:00+00:00</published><updated>2022-09-02T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/spring-scheduled-cron-next-executions</id><content type="html" xml:base="https://vianneyfaivre.com/tech/spring-scheduled-cron-next-executions"><![CDATA[<p>Here is a simple snippet that let you know the next time your <code class="language-plaintext highlighter-rouge">@Scheduled</code> annotated method will run.</p>

<figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="c1">// Sample for a @Scheduled(cron = "0 59 23 * * 7")</span>

<span class="c1">// seconds minutes hours day-of-month months day-of-week</span>
<span class="nc">String</span> <span class="n">cronExpr</span> <span class="o">=</span> <span class="s">"0 59 23 * * 7"</span><span class="o">;</span>

<span class="nc">CronSequenceGenerator</span> <span class="n">cronTrigger</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">CronSequenceGenerator</span><span class="o">(</span><span class="n">cronExpr</span><span class="o">);</span>
<span class="nc">Date</span> <span class="n">exec1</span> <span class="o">=</span> <span class="n">cronTrigger</span><span class="o">.</span><span class="na">next</span><span class="o">(</span><span class="k">new</span> <span class="nc">Date</span><span class="o">());</span>
<span class="nc">Date</span> <span class="n">exec2</span> <span class="o">=</span> <span class="n">cronTrigger</span><span class="o">.</span><span class="na">next</span><span class="o">(</span><span class="n">exec1</span><span class="o">);</span>

<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Next execution: "</span> <span class="o">+</span> <span class="n">exec1</span><span class="o">);</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Next execution: "</span> <span class="o">+</span> <span class="n">exec2</span><span class="o">);</span></code></pre></figure>

<p>Tested with Spring Boot <code class="language-plaintext highlighter-rouge">2.2.13.RELEASE</code> (Quartz version: <code class="language-plaintext highlighter-rouge">2.3.2</code>)</p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is a simple snippet that let you know the next time your @Scheduled annotated method will run. // Sample for a @Scheduled(cron = "0 59 23 * * 7") // seconds minutes hours day-of-month months day-of-week String cronExpr = "0 59 23 * * 7"; CronSequenceGenerator cronTrigger = new CronSequenceGenerator(cronExpr); Date exec1 = cronTrigger.next(new Date()); Date exec2 = cronTrigger.next(exec1); System.out.println("Next execution: " + exec1); System.out.println("Next execution: " + exec2); Tested with Spring Boot 2.2.13.RELEASE (Quartz version: 2.3.2)]]></summary></entry><entry><title type="html">Spring Boot x Spring Cloud - Compatibility Grid</title><link href="https://vianneyfaivre.com/tech/spring-boot-cloud-compatibility-grid" rel="alternate" type="text/html" title="Spring Boot x Spring Cloud - Compatibility Grid" /><published>2022-05-14T00:00:00+00:00</published><updated>2022-05-14T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/spring-boot-cloud-compatibility-grid</id><content type="html" xml:base="https://vianneyfaivre.com/tech/spring-boot-cloud-compatibility-grid"><![CDATA[<p>To know which version of Spring Cloud you should use with your version of Spring Boot, you can check this compatibility grid:</p>

<figure class="highlight"><pre><code class="language-json" data-lang="json"><span class="nl">"spring-cloud"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"Hoxton.SR12"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.2.0.RELEASE and &lt;2.4.0.M1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2020.0.5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.4.0.M1 and &lt;2.6.0-M1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2021.0.0-M1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.6.0-M1 and &lt;2.6.0-M3"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2021.0.0-M3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.6.0-M3 and &lt;2.6.0-RC1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2021.0.0-RC1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.6.0-RC1 and &lt;2.6.1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2021.0.2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.6.1 and &lt;2.6.8-SNAPSHOT"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2021.0.3-SNAPSHOT"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=2.6.8-SNAPSHOT and &lt;3.0.0-M1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2022.0.0-M1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=3.0.0-M1 and &lt;3.0.0-M2"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"2022.0.0-M2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Spring Boot &gt;=3.0.0-M2 and &lt;3.1.0-M1"</span><span class="w">
</span><span class="p">}</span></code></pre></figure>

<p>Extracted from <a href="https://start.spring.io/actuator/info">here</a> in May 2022.</p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[To know which version of Spring Cloud you should use with your version of Spring Boot, you can check this compatibility grid: "spring-cloud": { "Hoxton.SR12": "Spring Boot &gt;=2.2.0.RELEASE and &lt;2.4.0.M1", "2020.0.5": "Spring Boot &gt;=2.4.0.M1 and &lt;2.6.0-M1", "2021.0.0-M1": "Spring Boot &gt;=2.6.0-M1 and &lt;2.6.0-M3", "2021.0.0-M3": "Spring Boot &gt;=2.6.0-M3 and &lt;2.6.0-RC1", "2021.0.0-RC1": "Spring Boot &gt;=2.6.0-RC1 and &lt;2.6.1", "2021.0.2": "Spring Boot &gt;=2.6.1 and &lt;2.6.8-SNAPSHOT", "2021.0.3-SNAPSHOT": "Spring Boot &gt;=2.6.8-SNAPSHOT and &lt;3.0.0-M1", "2022.0.0-M1": "Spring Boot &gt;=3.0.0-M1 and &lt;3.0.0-M2", "2022.0.0-M2": "Spring Boot &gt;=3.0.0-M2 and &lt;3.1.0-M1" } Extracted from here in May 2022.]]></summary></entry><entry><title type="html">Ubuntu - How to enable touchpad vertical &amp;amp; horizontal scrolling</title><link href="https://vianneyfaivre.com/tech/ubuntu-touchpad-scrolling-fix" rel="alternate" type="text/html" title="Ubuntu - How to enable touchpad vertical &amp;amp; horizontal scrolling" /><published>2021-08-09T00:00:00+00:00</published><updated>2021-08-09T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/ubuntu-touchpad-scrolling-fix</id><content type="html" xml:base="https://vianneyfaivre.com/tech/ubuntu-touchpad-scrolling-fix"><![CDATA[<p>Sometimes my pc freezes and when rebooting I can’t scroll via my touchpad anymore.</p>

<p>When going to the mouse settings it’s not showing the touchpad specific config as well.</p>

<p>That can be fixed by reconfiguring the touchpad input via its config file.</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">sudo gedit /usr/share/X11/xorg.conf.d/40-libinput.conf</code></li>
  <li>find the <code class="language-plaintext highlighter-rouge">Touchpad</code> section</li>
  <li>Add:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">Option "VerticalScrolling" "True"</code></li>
      <li><code class="language-plaintext highlighter-rouge">Option "HorizontalScrolling" "True"</code></li>
    </ul>
  </li>
</ul>

<p>You should end up with something like:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Section "InputClass"
    Identifier "libinput touchpad catchall"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "HorizontalScrolling" "True"
    Option "VerticalScrolling" "True"
EndSection
</code></pre></div></div>

<p>(This bugfix assumes you have libinput-tools installed)</p>

<p>Tested on Ubuntu 20.04 LTS</p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Sometimes my pc freezes and when rebooting I can’t scroll via my touchpad anymore. When going to the mouse settings it’s not showing the touchpad specific config as well. That can be fixed by reconfiguring the touchpad input via its config file. sudo gedit /usr/share/X11/xorg.conf.d/40-libinput.conf find the Touchpad section Add: Option "VerticalScrolling" "True" Option "HorizontalScrolling" "True" You should end up with something like: Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "HorizontalScrolling" "True" Option "VerticalScrolling" "True" EndSection (This bugfix assumes you have libinput-tools installed) Tested on Ubuntu 20.04 LTS]]></summary></entry><entry><title type="html">Spring Boot + Hibernate: how to log SQL Query and Parameters</title><link href="https://vianneyfaivre.com/tech/spring-boot-hibernate-log-sql-query-parameters" rel="alternate" type="text/html" title="Spring Boot + Hibernate: how to log SQL Query and Parameters" /><published>2021-05-17T00:00:00+00:00</published><updated>2021-05-17T00:00:00+00:00</updated><id>https://vianneyfaivre.com/tech/spring-boot-hibernate-log-sql-query-parameters</id><content type="html" xml:base="https://vianneyfaivre.com/tech/spring-boot-hibernate-log-sql-query-parameters"><![CDATA[<p>Here is how to enable SQL query logging (query + parameters) with Spring Boot + Hibernate.</p>

<figure class="highlight"><pre><code class="language-properties" data-lang="properties"><span class="py">spring.jpa.show-sql</span><span class="p">=</span><span class="s">true</span>
<span class="py">spring.jpa.properties.hibernate.format_sql</span><span class="p">=</span><span class="s">true</span>

<span class="py">logging.level.org.hibernate.SQL</span><span class="p">=</span><span class="s">DEBUG</span>
<span class="py">logging.level.org.springframework.transaction</span><span class="p">=</span><span class="s">TRACE</span>
<span class="py">logging.level.org.hibernate.type.descriptor.sql</span><span class="p">=</span><span class="s">TRACE</span></code></pre></figure>

<p>Tested with Spring Boot <code class="language-plaintext highlighter-rouge">2.4.4</code> (Hibernate version: <code class="language-plaintext highlighter-rouge">5.4.29.Final</code>)</p>]]></content><author><name>Vianney FAIVRE</name></author><category term="tech" /><summary type="html"><![CDATA[Here is how to enable SQL query logging (query + parameters) with Spring Boot + Hibernate. spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true logging.level.org.hibernate.SQL=DEBUG logging.level.org.springframework.transaction=TRACE logging.level.org.hibernate.type.descriptor.sql=TRACE Tested with Spring Boot 2.4.4 (Hibernate version: 5.4.29.Final)]]></summary></entry></feed>