<?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: Jakub</title>
    <description>The latest articles on DEV Community by Jakub (@jakub41).</description>
    <link>https://dev.to/jakub41</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%2F226029%2F06836d81-410d-46e4-81cd-971cecdaf141.jpeg</url>
      <title>DEV Community: Jakub</title>
      <link>https://dev.to/jakub41</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jakub41"/>
    <language>en</language>
    <item>
      <title>Docker and Snort 3</title>
      <dc:creator>Jakub</dc:creator>
      <pubDate>Tue, 08 Jun 2021 19:53:43 +0000</pubDate>
      <link>https://dev.to/jakub41/docker-and-snort-3-386h</link>
      <guid>https://dev.to/jakub41/docker-and-snort-3-386h</guid>
      <description>&lt;p&gt;Hello, &lt;br&gt;
My inquiry is about a project I'm building in Docker with Snort3 and what should be the correct way to have it set it up to get in the console the alerts logs. &lt;/p&gt;

&lt;p&gt;The project is here: &lt;a href="https://github.com/Jakub41/snort3-traefik-docker-demo"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I tried many researchers but was unable to make the correct setup for the HOME_NET and to see the alerts when I try to ping any of the IP addresses I set up in the snort.lua &lt;/p&gt;

&lt;p&gt;Would be possible to get help to set it up correctly in my project? &lt;/p&gt;

&lt;p&gt;I would like to make it work and correctly. &lt;/p&gt;

&lt;p&gt;Please help me to improve my knowledge on this matter and the way I should make the set up with Docker to run Snort3 as should be. &lt;/p&gt;

&lt;p&gt;Thank you for yours help :)&lt;/p&gt;

</description>
      <category>docker</category>
      <category>snort</category>
      <category>network</category>
      <category>security</category>
    </item>
    <item>
      <title>KnexJS: how to convert a SQL join with aliases and ordered by values from another table</title>
      <dc:creator>Jakub</dc:creator>
      <pubDate>Thu, 08 Apr 2021 08:32:18 +0000</pubDate>
      <link>https://dev.to/jakub41/knexjs-how-to-convert-a-sql-join-with-aliases-and-ordered-by-values-from-another-table-4n7g</link>
      <guid>https://dev.to/jakub41/knexjs-how-to-convert-a-sql-join-with-aliases-and-ordered-by-values-from-another-table-4n7g</guid>
      <description>&lt;p&gt;Hello DEV community,&lt;/p&gt;

&lt;p&gt;I'm writing here as I'm a new in &lt;strong&gt;KnexJS&lt;/strong&gt; query builder and need help to how to make a specific &lt;code&gt;SQL&lt;/code&gt; script in KnexJS.&lt;/p&gt;

&lt;p&gt;The script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;updated_at&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;updated_at&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;
    &lt;span class="n"&gt;conversation&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
    &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conversation_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;created_at&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt;
    &lt;span class="n"&gt;updated_at&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script joins 2 tables &lt;code&gt;message&lt;/code&gt; and &lt;code&gt;conversation&lt;/code&gt;.&lt;br&gt;
The result is all conversations ordered by the last created_at message in message table &lt;/p&gt;

&lt;p&gt;example of an output result:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;id&lt;/th&gt;
&lt;th&gt;topic&lt;/th&gt;
&lt;th&gt;origin_type&lt;/th&gt;
&lt;th&gt;origin_id&lt;/th&gt;
&lt;th&gt;created_at&lt;/th&gt;
&lt;th&gt;updated_at&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;xx&lt;/td&gt;
&lt;td&gt;aaa&lt;/td&gt;
&lt;td&gt;bbb&lt;/td&gt;
&lt;td&gt;2021-04-07 14:47:55.55+00&lt;/td&gt;
&lt;td&gt;2021-04-07 18:47:43.558+00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;xx&lt;/td&gt;
&lt;td&gt;aaa&lt;/td&gt;
&lt;td&gt;bbb&lt;/td&gt;
&lt;td&gt;2021-04-07 14:37:45.446+00&lt;/td&gt;
&lt;td&gt;2021-04-07 18:12:01.91+00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;xx&lt;/td&gt;
&lt;td&gt;aaa&lt;/td&gt;
&lt;td&gt;bbb&lt;/td&gt;
&lt;td&gt;2021-04-07 14:48:04.055+00&lt;/td&gt;
&lt;td&gt;2021-04-07 14:56:52.709884+00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;updated_at&lt;/code&gt; is deducted from the message table where the last created message as &lt;code&gt;created_at&lt;/code&gt; gives which is the newest &lt;code&gt;updated_at&lt;/code&gt; conversation.&lt;/p&gt;

&lt;p&gt;All what I need is to convert to KnexJs but I have no idea how to make it.&lt;/p&gt;

&lt;p&gt;I hope what I explained is understandable and hope to get some help with that so I may learn the ideal way  of doing it.&lt;/p&gt;

&lt;p&gt;Thank you for yor time spent reading my help request :)&lt;/p&gt;

</description>
      <category>help</category>
      <category>postgres</category>
      <category>sql</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to manage in React the statuses response from a Google API</title>
      <dc:creator>Jakub</dc:creator>
      <pubDate>Tue, 05 Jan 2021 09:27:29 +0000</pubDate>
      <link>https://dev.to/jakub41/how-to-manage-in-react-the-statuses-response-from-a-google-api-3k40</link>
      <guid>https://dev.to/jakub41/how-to-manage-in-react-the-statuses-response-from-a-google-api-3k40</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm writing this post as I would like to learn and understand the best way to manage Google API status responses.&lt;/p&gt;

&lt;p&gt;Link to statuses:&lt;br&gt;
&lt;a href="https://developers.google.com/places/web-service/autocomplete#place_autocomplete_status_codes"&gt;https://developers.google.com/places/web-service/autocomplete#place_autocomplete_status_codes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would like to understand what should I do to cover the statuses in the right way and how to inform a client about it.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
Probably with a status &lt;code&gt;ZERO_RESULTS&lt;/code&gt; I can show a message to the client about the result was not a success. &lt;/p&gt;

&lt;p&gt;But what about those statuses which are more for the dev team or management to know like this:&lt;br&gt;
&lt;code&gt;OVER_QUERY_LIMIT&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;Would be good to throw an error? and to client show, a message like &lt;code&gt;The service is temporarily not available&lt;/code&gt;? &lt;/p&gt;

&lt;p&gt;I would like to see some example of a good way of managing those statuses in React so I can learn a good practice :)&lt;/p&gt;

&lt;p&gt;Thank you for your help :)&lt;/p&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
