<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eduardo De Britto Castro on Medium]]></title>
        <description><![CDATA[Stories by Eduardo De Britto Castro on Medium]]></description>
        <link>https://medium.com/@eduardobcastro?source=rss-b3e192065b7c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*a31lRqyDtfR8tLxN.</url>
            <title>Stories by Eduardo De Britto Castro on Medium</title>
            <link>https://medium.com/@eduardobcastro?source=rss-b3e192065b7c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 20:27:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eduardobcastro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your Linux will never freeze again]]></title>
            <link>https://eduardobcastro.medium.com/your-linux-will-never-freeze-again-bb7af06d8793?source=rss-b3e192065b7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb7af06d8793</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Eduardo De Britto Castro]]></dc:creator>
            <pubDate>Thu, 06 May 2021 20:01:53 GMT</pubDate>
            <atom:updated>2021-05-06T20:01:53.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5zHtOeaMabbY3tB8wwPUPw.jpeg" /><figcaption>Google Chrome running with too many tabs</figcaption></figure><p>Some applications like Google Chrome are very CPU and memory hungry and the situation can be out of control. Since I started doing this I never had this problem again.</p><pre>#!/bin/bash<br>set -e <br>ulimit -m 10000000</pre><pre>cputool -c 300 -- sh -c &#39;<br>  thunderbird &amp;<br>  brave-browser &amp;<br>  slack &amp;<br>  zoom &amp;<br>  skypeforlinux &amp;<br>  /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=teams --file-forwarding com.microsoft.Teams &amp;<br>  code &amp;<br>  sleep infinity<br>&#39;</pre><p>This script starts the apps I use the most, limited 10GB and 3 CPUs usage. Adjust it accordingly to your needs.</p><p>The commandsleep infinity prevents cputool from finishing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb7af06d8793" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Dockerized Linux IDE in Windows]]></title>
            <link>https://eduardobcastro.medium.com/running-dockerized-linux-ide-in-windows-80f82678b3a3?source=rss-b3e192065b7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/80f82678b3a3</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[visual-studio-code]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Eduardo De Britto Castro]]></dc:creator>
            <pubDate>Tue, 20 Mar 2018 01:30:46 GMT</pubDate>
            <atom:updated>2018-03-26T01:59:00.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CwW22EnrNqX7tu9Vv0fg3A.png" /><figcaption>Visual Studio Code window drawn by Windows and processed by Linux (see the terminal)</figcaption></figure><h3>Motivation and Advantages</h3><ul><li>I want to keep Windows (for Windows development, gaming, hardware compatibility, etc)</li><li>I’m a NodeJS developer and I often face compatibility issues with Windows. Node runs better in Linux</li><li>Local debugging works better than remote</li><li>It is counterproductive writing files in Windows and then transfering them to Linux</li><li>Need copying and pasting</li><li>Need ALT+TAB</li><li>I don’t want to install a desktop environment and Guest Additions just for running the IDE</li><li>Developing in production-like environment is more reliable</li><li>Two or more developers can run IDE’s on the same Linux at the same time</li><li>Works over network</li></ul><h3>Steps</h3><p>1) Install any virtualization system of your choice (I installed VirtualBox) or use a remote server</p><p>2) Install Linux on it (I installed Debian)</p><p>3) Install an X-Server on Windows and connect to Linux through SSH with X11 forwarding enabled. Or just use <a href="https://mobaxterm.mobatek.net/">MobaXterm </a>that does everything for you (all you have to do is connecting just like with Putty).</p><p>4) Install Docker on Linux</p><p>5) Create a Docker image like your production server’s. Add development tools and IDE. This is my NodeJS+Vscode+tools example.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e33b6c6cafcda0a013bf0094b10f20e1/href">https://medium.com/media/e33b6c6cafcda0a013bf0094b10f20e1/href</a></iframe><p>6) Build it:</p><pre>docker build -t vscode .</pre><p>7) Run it:</p><pre>docker run -e DISPLAY --net=host -it --rm --name myproject-vscode -v $HOME:/home/node vscode bash</pre><blockquote><strong>DISPLAY </strong>variable in my case is <strong>localhost:10.0</strong> that means “send window drawing commands to x-server running on localhost:6010 (that is actually a tunnel to the ssh client machine on port 6000”.<br><strong>net=host</strong> makes all host open ports available in the container (and vice-versa).</blockquote><p>This is the same as:</p><pre>docker run -e DISPLAY=192.168.0.14:0 -it --rm --name myproject-vscode -v $HOME:/home/node vscode bash</pre><p>where 192.168.0.14 is the x-server IP. You can open the window on any machine that is running an x-server! There are x-servers for Windows, Mac and Linux (all linuxes have one installed)</p><blockquote>It is very important to map $HOME:/home/node because there is an authorization file stored at ~/.Xauthority. The user id (uid) used in the container must be the same logged in the host. The example above works because the <strong>node</strong> user as the id 1000 (the same as mine in the host machine). To check your id use the command line <strong>id</strong>:</blockquote><p>In the container:</p><pre>node@debian:~$ id<br>uid=1000(node) gid=1000(node) groups=1000(node)</pre><p>And in the host:</p><pre>eduardo@debian:~$ id<br>uid=1000(eduardo) gid=1000(eduardo) groups=1000(eduardo),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(netdev),111(bluetooth),999(docker)</pre><p>8) Run vscode:</p><pre>node@debian:~$ code</pre><h3>Android Studio</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/50d47e100c02e11baa1ed8962ef27f32/href">https://medium.com/media/50d47e100c02e11baa1ed8962ef27f32/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80f82678b3a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>