<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Docs on Matus Stafura</title>
    <link>https://stafura.dev/tags/docs/</link>
    <description>Recent content in Docs on Matus Stafura</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Mon, 03 Feb 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://stafura.dev/tags/docs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Limiting resources with ulimit in Linux</title>
      <link>https://stafura.dev/limiting-processes-with-ulimit-in-linux/</link>
      <pubDate>Mon, 03 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://stafura.dev/limiting-processes-with-ulimit-in-linux/</guid>
      <description>&lt;h3 id=&#34;what-is-ulimit&#34;&gt;What is ulimit&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;ulimit&lt;/code&gt; is a builtin shell command that allows us to restrict system resources, for example the number of processes, number of open files, maximum logins.&lt;/p&gt;&#xA;&lt;h3 id=&#34;display-the-limits&#34;&gt;Display the limits&lt;/h3&gt;&#xA;&lt;p&gt;The see the current resource limits for the logged-in user, run:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;ulimit&lt;/span&gt; -a&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;example-output&#34;&gt;Example Output&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-t: cpu &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;time&lt;/span&gt; &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;seconds&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;              unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-f: file size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;blocks&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;              unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-d: data seg size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;kbytes&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;          unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-s: stack size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;kbytes&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;             &lt;span style=&#34;color:#bd93f9&#34;&gt;8192&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-c: core file size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;blocks&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;         &lt;span style=&#34;color:#bd93f9&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-m: resident &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;set&lt;/span&gt; size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;kbytes&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;      unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-u: processes                       &lt;span style=&#34;color:#bd93f9&#34;&gt;22678&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-n: file descriptors                &lt;span style=&#34;color:#bd93f9&#34;&gt;2048&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-l: locked-in-memory size &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;kbytes&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;  &lt;span style=&#34;color:#bd93f9&#34;&gt;735404&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-v: address space &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;kbytes&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;          unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-x: file locks                      unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-i: pending signals                 &lt;span style=&#34;color:#bd93f9&#34;&gt;22678&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-q: bytes in POSIX msg queues       &lt;span style=&#34;color:#bd93f9&#34;&gt;819200&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-e: max nice                        &lt;span style=&#34;color:#bd93f9&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-r: max rt priority                 &lt;span style=&#34;color:#bd93f9&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-N 15:                              unlimited&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;setting-resource-limits&#34;&gt;Setting resource limits&lt;/h3&gt;&#xA;&lt;p&gt;If you want to limit the number of processes for a user&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Calibrate the Milwaukee pH600 pH Meter</title>
      <link>https://stafura.dev/how-to-calibrate-the-milwaukee-ph600-ph-meter/</link>
      <pubDate>Thu, 30 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://stafura.dev/how-to-calibrate-the-milwaukee-ph600-ph-meter/</guid>
      <description>&lt;p&gt;I recently purchased a Milwaukee pH600 pH meter for my microgreens project, and I want to share a quick and easy guide on how to calibrate it. Proper calibration ensures accurate readings, which are crucial for the health and growth of your microgreens.&lt;/p&gt;&#xA;&lt;p&gt;What you&amp;rsquo;ll need:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Milwaukee pH600&lt;/li&gt;&#xA;&lt;li&gt;Calibration solution MA9007&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;calibration-steps&#34;&gt;Calibration Steps:&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Turn on the pH meter by switching the ON/OFF button.&lt;/li&gt;&#xA;&lt;li&gt;Remove the protective cap.&lt;/li&gt;&#xA;&lt;li&gt;Immerse the electrode in the pH 7.01 calibration solution (MA9007) and wait for the reading to stabilize.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&lt;picture&gt;&#xA;    &#xA;      &#xA;&#xA;      &#xA;&#xA;      &#xA;      &#xA;&#xA;      &lt;source srcset=&#34;https://stafura.dev/images/blog/how-to-calibrate-the-milwaukee-ph600-ph-meter/ph600-calibration-1.webp&#34; type=&#34;image/webp&#34;&gt;&#xA;&#xA;    &#xA;&#xA;    &#xA;&#xA;    &lt;img&#xA;      src=&#34;https://stafura.dev/images/blog/how-to-calibrate-the-milwaukee-ph600-ph-meter/ph600-calibration-1.jpg&#34;&#xA;      alt=&#34;Milwaukee pH600 meter display reading 6.9 while immersed in pH 7.01 calibration solution&#34;&#xA;      loading=&#34;lazy&#34;&#xA;      decoding=&#34;async&#34;&#xA;      width=&#34;1200&#34;&#xA;      height=&#34;1600&#34;&#xA;    /&gt;&#xA;&#xA;    &#xA;  &lt;/picture&gt;&#xA;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install and Configure Redis on a Separate DigitalOcean Droplet for Magento</title>
      <link>https://stafura.dev/how-to-install-and-configure-redis-on-a-separate-digitalocean-droplet-for-magento/</link>
      <pubDate>Thu, 23 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://stafura.dev/how-to-install-and-configure-redis-on-a-separate-digitalocean-droplet-for-magento/</guid>
      <description>&lt;p&gt;Install redis on separate droplet to offload Redis from the Magento monolith.&lt;/p&gt;&#xA;&lt;h3 id=&#34;create-a-droplet-for-redis&#34;&gt;Create a Droplet for Redis&lt;/h3&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s create a droplet for Redis in DigitalOcean (DO from now on).&lt;/p&gt;&#xA;&lt;p&gt;I chose the following minimal parameters (you can scale later):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Basic Droplet&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Premium AMD&lt;/strong&gt;: 1GB RAM, 25GB NVMe SSD, 1000GB transfer.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;IMPORTANT: Make sure the new droplet is within the same VPC and Region as your Magento server.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;redis-installation&#34;&gt;Redis installation&lt;/h3&gt;&#xA;&lt;p&gt;Once the droplet is successfully created, SSH into the droplet and install Redis:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
