<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tomasz Giba</title>
    <description>The latest articles on DEV Community by Tomasz Giba (@tomaszgiba).</description>
    <link>https://dev.to/tomaszgiba</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F304828%2F6f37e5b6-ea07-4a69-92f2-ab5d0dedca9d.jpg</url>
      <title>DEV Community: Tomasz Giba</title>
      <link>https://dev.to/tomaszgiba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tomaszgiba"/>
    <language>en</language>
    <item>
      <title>Investigation: Why I can't use my ThinkPad L14 fingerprint reader in Ubuntu 21.04?</title>
      <dc:creator>Tomasz Giba</dc:creator>
      <pubDate>Sun, 01 Aug 2021 13:34:13 +0000</pubDate>
      <link>https://dev.to/tomaszgiba/why-are-you-not-able-to-use-your-thinkpad-fingerprint-reader-in-your-linux-distro-3l80</link>
      <guid>https://dev.to/tomaszgiba/why-are-you-not-able-to-use-your-thinkpad-fingerprint-reader-in-your-linux-distro-3l80</guid>
      <description>&lt;p&gt;Running Ubuntu I wanted my Thinkpad fingerprint reader to work. It's not working out of the box and there are no first-page results when googling the problem.&lt;/p&gt;

&lt;p&gt;So, I need to investigate.&lt;/p&gt;

&lt;p&gt;This is the device my ThinkPad L14 has built-in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;➜  ~ lsusb | grep Fingerprint
Bus 002 Device 003: ID 27c6:55b4 Shenzhen Goodix Technology Co.,Ltd. Fingerprint Reader
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OK. Device ID is &lt;code&gt;27c6:55b4&lt;/code&gt; - got it&lt;/p&gt;

&lt;p&gt;Now, most common lib that is used in fingerprint reading is &lt;code&gt;libfprint&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Alright. Visiting its GitLab page, there's a link to list of unsupported devices: &lt;a href="https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported%20Devices"&gt;https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported%20Devices&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;..and my fingerprint reader is listed as unsupported:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J7mLJ4UW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcs9n91i65qdxb911zlp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J7mLJ4UW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcs9n91i65qdxb911zlp.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;..and &lt;code&gt;libfprint&lt;/code&gt; developers are stating the following: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These are devices that are not supported. &lt;strong&gt;For most of them support is unlikely to ever happen&lt;/strong&gt;, and if then only through reverse engineering efforts as vendors are only officially supporting a small subset of devices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Oops.&lt;/p&gt;

&lt;p&gt;Perhaps because it's a new device, the vendor "Shenzhen Goodix Technology" will support their devices in near future? &lt;/p&gt;

&lt;p&gt;Nope..&lt;/p&gt;

&lt;p&gt;Found this forum post where user asks Goodix for Linux support: &lt;a href="https://developers.goodix.com/en/bbs/detail/2cc68cdf9f824e28b247f626c4a9374b"&gt;https://developers.goodix.com/en/bbs/detail/2cc68cdf9f824e28b247f626c4a9374b&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_52kfR7L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfopg7glt7ezd7gpexqj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_52kfR7L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfopg7glt7ezd7gpexqj.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, it's 2021 and still no support. &lt;/p&gt;

&lt;p&gt;Bummer Lenovo couldn't pressure their hardware providers to open-source the drivers or take care of this themselves. Shame.&lt;/p&gt;

</description>
      <category>fingeprin</category>
      <category>thinkpad</category>
      <category>lenovo</category>
      <category>libfprint</category>
    </item>
    <item>
      <title>How to get live currency rate(s) in command line</title>
      <dc:creator>Tomasz Giba</dc:creator>
      <pubDate>Wed, 16 Dec 2020 10:30:23 +0000</pubDate>
      <link>https://dev.to/tomaszgiba/how-to-get-live-currency-rate-s-in-command-line-28l8</link>
      <guid>https://dev.to/tomaszgiba/how-to-get-live-currency-rate-s-in-command-line-28l8</guid>
      <description>&lt;p&gt;You need curl and jq packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install curl jq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can do this using floatrates.com API. It's updated daily at midnight. &lt;/p&gt;

&lt;p&gt;For USDPLN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://www.floatrates.com/daily/usd.json | jq .pln
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;..or for USDEUR:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://www.floatrates.com/daily/usd.json | jq .eur
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and for EURUSD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://www.floatrates.com/daily/eur.json | jq .usd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and so on.&lt;/p&gt;

</description>
      <category>cli</category>
      <category>commandline</category>
      <category>currency</category>
      <category>rate</category>
    </item>
    <item>
      <title>Lenovo ThinkPad L14 Problem booting Ubuntu 20.10 (Kernel 5.8) with Ryzen 7 Pro 4750U</title>
      <dc:creator>Tomasz Giba</dc:creator>
      <pubDate>Tue, 27 Oct 2020 09:20:01 +0000</pubDate>
      <link>https://dev.to/tomaszgiba/lenovo-thinkpad-l14-problem-booting-ubuntu-20-10-kernel-5-8-with-ryzen-7-pro-4750-1i47</link>
      <guid>https://dev.to/tomaszgiba/lenovo-thinkpad-l14-problem-booting-ubuntu-20-10-kernel-5-8-with-ryzen-7-pro-4750-1i47</guid>
      <description>&lt;p&gt;I got my ThinkPad L14 this year (2020) &lt;br&gt;
When I upgraded my Ubuntu from 20.04 to 20.10 I encountered blank screen. &lt;/p&gt;

&lt;p&gt;In booting logs I saw this error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AMD-Vi: Unable to read/write to IOMMU perf counter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and inspired by this Stackoverflow answer &lt;a href="https://stackoverflow.com/questions/62827591/amd-vi-unable-to-read-write-to-iommu-coun-problem-loading-x-509-certificate/63112560"&gt;https://stackoverflow.com/questions/62827591/amd-vi-unable-to-read-write-to-iommu-coun-problem-loading-x-509-certificate/63112560&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;in your GRUB boot menu select Advanced Ubuntu &lt;/li&gt;
&lt;li&gt;select your previous (working) kernel version, mine was 5.4&lt;/li&gt;
&lt;li&gt;log into Ubuntu&lt;/li&gt;
&lt;li&gt;edit GRUB &lt;code&gt;sudo vim /etc/default/grub&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;change this line &lt;code&gt;GRUB_CMDLINE_LINUX="iommu=soft"&lt;/code&gt; and save the change&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;sudo update-grub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;restart and select your updated Ubuntu with kernel version 5.8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And it works!&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>thinkpad</category>
      <category>boot</category>
      <category>kernel</category>
    </item>
    <item>
      <title>How get int from base64'd number bytes representation in Go</title>
      <dc:creator>Tomasz Giba</dc:creator>
      <pubDate>Tue, 15 Sep 2020 10:51:54 +0000</pubDate>
      <link>https://dev.to/tomaszgiba/how-get-int-from-base64-in-go-f7d</link>
      <guid>https://dev.to/tomaszgiba/how-get-int-from-base64-in-go-f7d</guid>
      <description>&lt;p&gt;To make sure we won't overflow, we need math/big from Go&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;inputString&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"Ag=="&lt;/span&gt; &lt;span class="c"&gt;// base64'd byte representation of number 2&lt;/span&gt;

&lt;span class="c"&gt;// first base64 -&amp;gt; bytes &lt;/span&gt;
&lt;span class="n"&gt;decodedBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;b64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StdEncoding&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DecodeString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;// bytes -&amp;gt; big.Int&lt;/span&gt;
&lt;span class="n"&gt;bigInt&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;big&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;bigInt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SetBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;decodedBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;resultInt64&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;bigInt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Int64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c"&gt;// == int64(2)&lt;/span&gt;
&lt;span class="n"&gt;resultInt&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resultInt64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// == int(2)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://play.golang.org/p/DVxwwJHrbNu"&gt;https://play.golang.org/p/DVxwwJHrbNu&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>base64</category>
      <category>cryptography</category>
      <category>rsa</category>
    </item>
    <item>
      <title>How to display Go processes with their commands</title>
      <dc:creator>Tomasz Giba</dc:creator>
      <pubDate>Wed, 22 Jul 2020 15:22:59 +0000</pubDate>
      <link>https://dev.to/tomaszgiba/how-to-display-go-processes-with-their-commands-1lda</link>
      <guid>https://dev.to/tomaszgiba/how-to-display-go-processes-with-their-commands-1lda</guid>
      <description>&lt;p&gt;you have to have &lt;code&gt;gops&lt;/code&gt; installed: &lt;a href="https://github.com/google/gops"&gt;https://github.com/google/gops&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gops | awk '{print $1}' | xargs ps -o pid,args
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>go</category>
      <category>gops</category>
      <category>cli</category>
      <category>shell</category>
    </item>
  </channel>
</rss>
