<?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: Loránd Márton</title>
    <description>The latest articles on Forem by Loránd Márton (@lorandmarton).</description>
    <link>https://forem.com/lorandmarton</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%2F1011137%2F489d73a9-8b0c-4751-9ede-c0da379af048.jpeg</url>
      <title>Forem: Loránd Márton</title>
      <link>https://forem.com/lorandmarton</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lorandmarton"/>
    <language>en</language>
    <item>
      <title>Just start using WSL</title>
      <dc:creator>Loránd Márton</dc:creator>
      <pubDate>Sun, 13 Oct 2024 15:13:28 +0000</pubDate>
      <link>https://forem.com/lorandmarton/just-start-using-wsl-55kd</link>
      <guid>https://forem.com/lorandmarton/just-start-using-wsl-55kd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;WSL lets you run Linux on your Windows machine, giving you access to the best of both worlds for development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get an awesome tool: WSL
&lt;/h2&gt;

&lt;p&gt;To install WSL, open the terminal and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --install --no-distribution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command installs WSL without the default Ubuntu distribution. If the &lt;code&gt;wsl&lt;/code&gt; command doesn't work use &lt;code&gt;wsl.exe&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;Restart your computer, to complete the installation.&lt;/p&gt;

&lt;p&gt;To check the list of available distributions, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --list --online
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                            FRIENDLY NAME
Ubuntu                          Ubuntu
Debian                          Debian GNU/Linux
kali-linux                      Kali Linux Rolling
Ubuntu-18.04                    Ubuntu 18.04 LTS
Ubuntu-20.04                    Ubuntu 20.04 LTS
Ubuntu-22.04                    Ubuntu 22.04 LTS
Ubuntu-24.04                    Ubuntu 24.04 LTS
OracleLinux_7_9                 Oracle Linux 7.9
OracleLinux_8_7                 Oracle Linux 8.7
OracleLinux_9_1                 Oracle Linux 9.1
openSUSE-Leap-15.6              openSUSE Leap 15.6
SUSE-Linux-Enterprise-15-SP5    SUSE Linux Enterprise 15 SP5
SUSE-Linux-Enterprise-15-SP6    SUSE Linux Enterprise 15 SP6
openSUSE-Tumbleweed             openSUSE Tumbleweed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install one of these distributions with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --install &amp;lt;Distro&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will install your chosen distribution. For getting familiar with WSL, Ubuntu or Debian are good starting points. &lt;br&gt;
When installed, you have to choose username and password.&lt;/p&gt;

&lt;p&gt;If you install multiple distributions, you can set a default with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --set-default &amp;lt;DistributionName&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setting a default distribution ensures that when you open WSL without specifying a distribution it will start your preferred environment.&lt;br&gt;
You can either start the distribution, you can use the current working directory or the distribution's user home directory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current working directory:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;User's home directory:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To list the installed distributions, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --list --verbose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the running distributions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl -l --running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stop a running distribution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --terminate &amp;lt;Distribution Name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WSL is a powerful tool that brings the Linux experience directly into Windows, allowing for a flexible development environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/wsl/basic-commands" rel="noopener noreferrer"&gt;WSL Basic Commands - Microsoft Learn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>wsl</category>
      <category>windows</category>
      <category>linux</category>
      <category>development</category>
    </item>
    <item>
      <title>Optimizing a Webpack project to improve the performance and user experience</title>
      <dc:creator>Loránd Márton</dc:creator>
      <pubDate>Thu, 19 Jan 2023 11:42:18 +0000</pubDate>
      <link>https://forem.com/lorandmarton/optimizing-a-webpack-project-to-improve-the-performance-and-user-experience-2loi</link>
      <guid>https://forem.com/lorandmarton/optimizing-a-webpack-project-to-improve-the-performance-and-user-experience-2loi</guid>
      <description>&lt;p&gt;Webpack is a powerful tool for building and bundling JavaScript applications, but it can also result in large, slow-to-load bundles if not optimized properly. In this article, we will discuss some techniques for optimizing a Webpack project to improve the performance and user experience of your application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use code splitting: One of the most effective ways to reduce the size of your bundle is to use code splitting. This allows you to break up your application into smaller chunks, so that only the code that is needed for a particular page or feature is loaded. You can use the splitChunks option in the optimization section of your webpack config to configure code splitting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Minify and uglify your code: Minification is the process of removing unnecessary characters and whitespace from your code to make it smaller. Uglification is the process of making your code more difficult to read and understand. Both of these can be achieved using the terser-webpack-plugin and uglifyjs-webpack-plugin.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use a Content Delivery Network (CDN): A Content Delivery Network (CDN) is a network of servers that are distributed across the globe. By using a CDN, your application's assets will be served from a server that is geographically closer to the user, resulting in faster load times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the bundle analyzer: The webpack bundle analyzer is a tool that allows you to visualize the size and contents of your bundle. This can help you identify which modules and dependencies are taking up the most space and make decisions about which to remove or replace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use lazy loading: Lazy loading is a technique where you only load the code that is needed for a particular page or feature when it is requested by the user. This can be done using the react-lazy and react-loadable libraries for React applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use production mode: By default, webpack runs in development mode, which includes additional debugging and development-related features. Running webpack in production mode will automatically turn off development-specific features and enable production-specific optimizations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use caching: Enabling caching allows webpack to store the build results and reuse them on subsequent builds. This can significantly speed up the build time. To enable caching you can use cache-loader or hard-source-webpack-plugin.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use environment variables: Instead of hardcoding values in your code, you can use environment variables to store values that may change between environments, such as an API endpoint or a feature flag.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By following these techniques, you can significantly reduce the size and improve the performance of your webpack project, resulting in a better user experience for your application. Remember that webpack optimization is an ongoing process, you should regularly monitor your bundle size and make adjustments as necessary.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>webpack</category>
      <category>react</category>
    </item>
  </channel>
</rss>
