<?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: laidah</title>
    <description>The latest articles on DEV Community by laidah (@laidah).</description>
    <link>https://dev.to/laidah</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%2F688031%2F861387d1-80aa-43db-b25d-e1c9128a1eba.jpeg</url>
      <title>DEV Community: laidah</title>
      <link>https://dev.to/laidah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laidah"/>
    <language>en</language>
    <item>
      <title>Crontab</title>
      <dc:creator>laidah</dc:creator>
      <pubDate>Fri, 20 Aug 2021 10:43:09 +0000</pubDate>
      <link>https://dev.to/laidah/crontab-1053</link>
      <guid>https://dev.to/laidah/crontab-1053</guid>
      <description>&lt;p&gt;Today I stumbled upon a flaky test. It's been bothering our developers for some time already, but usually, it took about two runs to have it turn green. So no big deal for them.&lt;br&gt;
But it is for me. &lt;/p&gt;

&lt;p&gt;As soon as I've opened it, I realized that this test is about cron jobs. And I know almost nothing about cron.&lt;br&gt;
No worries! 10 minutes of intense googling and I am ready to tackle it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cron&lt;/em&gt; (&lt;strong&gt;C&lt;/strong&gt;ommand &lt;strong&gt;R&lt;/strong&gt;un &lt;strong&gt;ON&lt;/strong&gt;) - is a program in Unix-based systems that can run scripts and tasks at specific time and order.&lt;/p&gt;

&lt;p&gt;For example, you download a lot of cat pictures, videos, and memes every day, and o-oh! Your disk space is running low, there is no place to store your work files.&lt;br&gt;
Have no fear! You can schedule crone to delete pictures and videos from download folder once a week.&lt;br&gt;
Prepare your bash script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /users/user_name/Downloads
find . -type f \( -name \*jpg -o -name \*png -o -name \*gif -o -name \*mp4 \) -delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save it to file , for ex &lt;code&gt;clean_dowloads.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now open your terminal and write:&lt;br&gt;
crontab -e&lt;br&gt;
This will open a text redactor where you can write your task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Every Sunday at 00:00 run bash script clean_downloads.sh
@weekly bash /home/www/clean_dowloads.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit. Now you are all set up, no more worries about too many cat pics.&lt;br&gt;
Cron can schedule jobs using different time parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# at every minute
* * * * *  &amp;lt;command&amp;gt;

# at 02:00 on Friday in July
0 2 * 7 5  &amp;lt;command&amp;gt;

# every 15 minutes after 2:00
*/15 2 * * * &amp;lt;command&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;a href="https://crontab.guru/"&gt;Crontab.gury&lt;/a&gt; for easy planning. &lt;/p&gt;

&lt;p&gt;And I should go back to my flaky test.&lt;br&gt;
┐(￣∀￣)┌&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cron</category>
      <category>bash</category>
    </item>
    <item>
      <title>Learning GO. Step 1</title>
      <dc:creator>laidah</dc:creator>
      <pubDate>Tue, 17 Aug 2021 13:15:42 +0000</pubDate>
      <link>https://dev.to/laidah/learning-go-step-1-3601</link>
      <guid>https://dev.to/laidah/learning-go-step-1-3601</guid>
      <description>&lt;p&gt;Hi, my name is Olesia. I work as QA engineer in e-commerce. &lt;br&gt;
2 months ago I faced a new challenge - my new job required me to learn Golang. &lt;br&gt;
My coding experience is limited to a little bit of Java and UI autotests using JUnit and Selenium. But now I need to learn how to write backend tests in Go, how to build and deploy services and tests using Bamboo and Kubernetes. &lt;/p&gt;

&lt;p&gt;I will be using different resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.coursera.org/learn/golang-getting-started/home/welcome"&gt;Getting Started with Go&lt;/a&gt; by Coursera - free version without homework, tests or any certification.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://quii.gitbook.io/learn-go-with-tests/"&gt;Learn Go with Tests&lt;/a&gt; - great resource suggested by my colleague. Learning process there based on &lt;a href="https://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; principle. As a QA engineer I am very interested in this way of learning.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gobyexample.com/"&gt;Go by example&lt;/a&gt; - step by step guide from Google.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, welcome to my journey :) &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
