<?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>Forem: Eddy Bobbin</title>
    <description>The latest articles on Forem by Eddy Bobbin (@eddykaya).</description>
    <link>https://forem.com/eddykaya</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%2F297253%2Fb2fbfc93-b8f8-4128-9ee0-537a0d0fb3ab.jpeg</url>
      <title>Forem: Eddy Bobbin</title>
      <link>https://forem.com/eddykaya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/eddykaya"/>
    <language>en</language>
    <item>
      <title>Easily replace your hard drive</title>
      <dc:creator>Eddy Bobbin</dc:creator>
      <pubDate>Tue, 04 Jun 2024 06:06:18 +0000</pubDate>
      <link>https://forem.com/eddykaya/easily-replace-your-hard-drive-5396</link>
      <guid>https://forem.com/eddykaya/easily-replace-your-hard-drive-5396</guid>
      <description>&lt;p&gt;Recently, I encountered the issue that my 512GB SSD was gradually filling up. Naturally, the first step is to manually clean up. Under Linux, there’s a useful tool called &lt;strong&gt;du&lt;/strong&gt; that allows you to determine how much disk space each directory occupies. This helps identify space-consuming culprits quickly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# The `max-depth` parameter specifies the depth of the output breakdown.&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nt"&gt;--max-depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my case, there was no obvious space hog that I could easily eliminate, so I decided to upgrade to a new SSD.&lt;/p&gt;

&lt;p&gt;Now, how can you switch to a new disk without the hassle of a complete laptop reinstallation? Well, I took the lazy route and used the &lt;strong&gt;dd&lt;/strong&gt; tool to create a byte-wise copy of my old hard drive onto the new one. This saved me the time-consuming process of setting up my laptop from scratch, and I was done in about an hour (including installing the new drive).&lt;/p&gt;

&lt;h2&gt;
  
  
  Here’s a step-by-step guide:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a Bootable Ubuntu USB Stick
&lt;/h3&gt;

&lt;p&gt;Make sure you have a bootable USB stick with Ubuntu on it. You’ll need it to create a copy of your hard drive. Ensure that the old hard drive is not mounted; otherwise, the process won’t work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install the New Hard Drive in an External Enclosure
&lt;/h3&gt;

&lt;p&gt;I ordered the Samsung EVO 990 2TB hard drive. For compatibility, I paired it with &lt;a href="https://www.amazon.de/Geh%C3%A4use-NVMe-Geh%C3%A4use-kompatibel-Thunderbolt-Aluminiumlegierung/dp/B08X9YTWJC/ref=cm_cr_arp_d_product_top?ie=UTF8"&gt;this external enclosure&lt;/a&gt;. I opted for a more expensive enclosure because the cheaper ones had poor reviews regarding speed and support for the Samsung drive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connect the New Hard Drive via USB
&lt;/h3&gt;

&lt;p&gt;The new disk doesn’t need to be formatted, simply install it and connect it via USB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a Byte-Wise Copy
&lt;/h3&gt;

&lt;p&gt;Use the following command to create the copy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# List all installed HDDs&lt;/span&gt;
lshw &lt;span class="nt"&gt;-class&lt;/span&gt; disk

&lt;span class="c"&gt;# Replace `&amp;lt;old disk&amp;gt;` with something like `/dev/nvme0n1`, and `&amp;lt;new disk&amp;gt;` with `/dev/sdb` or similar (you'll recognize it by the disk size). Use `status=progress` to track the progress.&lt;/span&gt;
&lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;old disk&amp;gt; &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;new disk&amp;gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;64m &lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;progress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The copying process took less than 20 minutes for me, with the enclosure achieving around 700MB/s write speed to the new drive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing the New Hard Drive
&lt;/h3&gt;

&lt;p&gt;Open the laptop case, remove the old drive, insert the new drive, and close the case.&lt;/p&gt;

&lt;p&gt;With my Lenovo T14s, the screw securing the SSD was quite tight. I had to apply significant force to loosen it and ended up using pliers to make it easier. I suspect that too much screw-locking adhesive was used. Ideally, the screw shouldn’t be tighter than the case screws.&lt;/p&gt;

&lt;h3&gt;
  
  
  Boot the Laptop and Resize Partitions if Necessary
&lt;/h3&gt;

&lt;p&gt;The laptop should boot normally with the new hard drive.&lt;/p&gt;

&lt;p&gt;If the new drive is larger than the old one, you’ll need to adjust your partitions to utilize the entire space. The steps depend on your existing partition setup. In my Ubuntu installation, I chose the default partitioning. Here’s what I did to resize the partition:&lt;/p&gt;

&lt;p&gt;Open GParted and right-click on the largest partition to resize it to the maximum size.&lt;/p&gt;

&lt;p&gt;Since my partition is a LVM partition (Logical Volume Manager), I needed the following command to expand it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# First, check which parameter to append to `lvextend`:&lt;/span&gt;
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;

&lt;span class="c"&gt;# Then, execute this command to ultimately resize the partition:&lt;/span&gt;
lvextend &lt;span class="nt"&gt;-l&lt;/span&gt; +100%FREE &lt;span class="nt"&gt;-r&lt;/span&gt; /dev/mapper/vgubuntu-root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it—the hard drive replacement is complete!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>harddrive</category>
      <category>bash</category>
    </item>
    <item>
      <title>Github Action to check helm charts for deprecated k8s APIs</title>
      <dc:creator>Eddy Bobbin</dc:creator>
      <pubDate>Fri, 05 May 2023 16:02:45 +0000</pubDate>
      <link>https://forem.com/eddykaya/github-action-to-check-helm-charts-for-deprecated-k8s-apis-5a78</link>
      <guid>https://forem.com/eddykaya/github-action-to-check-helm-charts-for-deprecated-k8s-apis-5a78</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I Built a github action which checks your helm chart for deprecated k8s API usages by leveraging &lt;a href="https://github.com/FairwindsOps/pluto"&gt;pluto&lt;/a&gt; functionality.&lt;/p&gt;

&lt;p&gt;At the moment, you have to build this on your own using multiple steps in your github action workflow. This github action simplifies it in one step and makes your workflow definition more readable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Maintainer Must Haves&lt;/li&gt;
&lt;li&gt;DIY Deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/marketplace/actions/check-deprecated-k8s-apis"&gt;Helm pluto github action&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;Without the plugin, you have to put multiple steps in your github action pipeline to match necessary preconditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download helm&lt;/li&gt;
&lt;li&gt;Download pluto&lt;/li&gt;
&lt;li&gt;render your helm chart&lt;/li&gt;
&lt;li&gt;hand over helm chart to pluto&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This github action takes care of all the preconditions and allows you to verify your helm chart in a single step.&lt;/p&gt;

&lt;p&gt;It's just a minor improvement, but by using this action you do not have to take care of the boilerplate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/eddykaya/helm-pluto-github-action"&gt;Source Code&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;Apache 2.0&lt;/p&gt;

&lt;h2&gt;
  
  
  Background (What made you decide to build this particular app? What inspired you?)
&lt;/h2&gt;

&lt;p&gt;I built this as a shared library for Jenkins and did not find a pendant for github actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?)
&lt;/h3&gt;

&lt;p&gt;This is a github action itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;p&gt;An example usage can be found &lt;a href="https://github.com/eddykaya/yahc"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>githubhack23</category>
    </item>
    <item>
      <title>Atom editor with linter, prettier and all the stuff you need</title>
      <dc:creator>Eddy Bobbin</dc:creator>
      <pubDate>Thu, 19 Mar 2020 10:23:54 +0000</pubDate>
      <link>https://forem.com/eddykaya/atom-editor-with-linter-prettier-and-all-the-stuff-you-need-2gi</link>
      <guid>https://forem.com/eddykaya/atom-editor-with-linter-prettier-and-all-the-stuff-you-need-2gi</guid>
      <description>&lt;h1&gt;
  
  
  Finally, my working atom editor setup for javascript
&lt;/h1&gt;

&lt;p&gt;Recently, I setup my atom editor because of a React javascript project. What I knew from work (my fellow teammembers use VSCode there) is there are some nice tools like linter and prettier to keep your code clean, error free and readable. Some of those things remind me of the typical IntelliJ IDEA tools (e.g. Firebug, Checkstyle and so on).&lt;br&gt;
However I didn't find a good instruction or tutorial to make all the stuff work. So I tried a bit around and here is what I got for all those who have the same trouble I had:&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;This tutorial is optimized for unix- based clients which have a bash or similar. However, you can use this setup on other machines as well but I did not test it for them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download atom from &lt;a href="https://atom.io/"&gt;https://atom.io/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Required atom packages
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Install required atom packages with
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;apm &lt;span class="nb"&gt;install &lt;/span&gt;linter &lt;span class="se"&gt;\ &lt;/span&gt;
linter-eslint &lt;span class="se"&gt;\&lt;/span&gt;
linter-ui-default &lt;span class="se"&gt;\&lt;/span&gt;
busy-signal &lt;span class="se"&gt;\&lt;/span&gt;
intentions &lt;span class="se"&gt;\&lt;/span&gt;
prettier-atom &lt;span class="se"&gt;\&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Atom settings
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Open the editor and the settings by pressing &lt;code&gt;CTRL + Comma&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to packages and filter for &lt;strong&gt;prettier-atom&lt;/strong&gt; and click &lt;strong&gt;settings&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enable the options &lt;strong&gt;ESlint integration&lt;/strong&gt; and &lt;strong&gt;Format files on save&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Test your setup
&lt;/h1&gt;

&lt;p&gt;To test the setup, I created a new react-app by executing &lt;code&gt;npx create-react-app test-app&lt;/code&gt; and imported it into atom editor.&lt;br&gt;
When saving an edited file with obvious errors (unused import, newlines, single vs double quotes), I can see the editor shows me linter warnings and autoformats things on save:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RVD82USf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byj5eppn61pof5yw1z0y.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RVD82USf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byj5eppn61pof5yw1z0y.gif" alt="linter and autoformat"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The create-react-app setup inherits a default eslint config from the react packages. If you wish to override these with your own settings, you can create a &lt;code&gt;.eslintrc&lt;/code&gt; file in your project root.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>atom</category>
      <category>linter</category>
      <category>prettier</category>
    </item>
  </channel>
</rss>
