<?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 Jairo Fernández on Medium]]></title>
        <description><![CDATA[Stories by Jairo Fernández on Medium]]></description>
        <link>https://medium.com/@jairofernandez?source=rss-cba8e04ed2d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YPC_6mzgKT34E4qV7kXmww.jpeg</url>
            <title>Stories by Jairo Fernández on Medium</title>
            <link>https://medium.com/@jairofernandez?source=rss-cba8e04ed2d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 14:53:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jairofernandez/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[Docker is destroying my machine! ]]></title>
            <link>https://jairofernandez.medium.com/docker-is-destroying-my-machine-8fc422bfa424?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fc422bfa424</guid>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Fri, 26 Jul 2024 01:47:10 GMT</pubDate>
            <atom:updated>2024-07-26T01:47:10.421Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Other possible titles for this post</blockquote><blockquote>“RTFM, oh boy…”</blockquote><blockquote>Buy a new laptop…</blockquote><blockquote>Saving Private Ryan, where are you daemon.json?</blockquote><p>I need to reconsider the use of Docker on my Mac M1 Pro. With a small disk and 1000 programs 😅, everything is fine at least until I start Docker Desktop. I use a lot of images and experiments that I never finish because I’m a lazy person. I was looking for some solution because my machine is crying all the time, and I feel like a loser deleting files, running docker system prune, and deleting my 1 million node modules from unfinished projects…</p><p>I have an old machine that I just use to do some experiments or run Windows for specific tasks or problems. That machine has Ubuntu and Windows as a dual boot. Yes, it’s a Frankenstein, and I feel nostalgic about Ubuntu.</p><p>— Sheldon: “Oh, Ubuntu!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VisgrPmnh4o7SMWSsrM4qA.gif" /><figcaption>Ubuntu user</figcaption></figure><p>Ok, give me the 💩 solution. I installed Docker on Ubuntu, allowed remote connection, and overrode the Docker client host to point to my old machine, and voila!</p><p>Or at least, I thought it was really easy to do. I checked the internet and ChatGPT told me to edit /etc/docker/daemon.json on my Ubuntu machine and just put:</p><pre>{<br>  &quot;hosts&quot;: [<br>    &quot;unix:///var/run/docker.sock&quot;,<br>    &quot;tcp://0.0.0.0:2376&quot;<br>  ]<br>}</pre><p>Easy peasy…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*laKdwGaE-wqu-mn3.gif" /></figure><p>No, that broke my Docker on Ubuntu (24.04 LTS).</p><p>After a couple of hours and going through a lot of tutorials, I found the documentation!! (Yes, <a href="https://en.wikipedia.org/wiki/RTFM">RTFM</a>) <a href="https://docs.docker.com/config/daemon/remote-access/">https://docs.docker.com/config/daemon/remote-access/</a> and finally understood why I couldn’t find the file. It was a misunderstanding of how Docker runs on the OS and the changes of Ubuntu to systemd.</p><p>For systemd we need to edit the service with sudo systemctl edit docker.service, as the documentation said, but, oh surprise, it didn’t work for me…</p><p>So, what happened was I needed to edit the service file directly:</p><pre>sudo nano /lib/systemd/system/docker.service</pre><p>And I commented out the lines containing ExecStart below [Service]:</p><pre>[Service]<br>ExecStart=<br>ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375</pre><p>I restarted the service with:</p><pre>sudo systemctl daemon-reload<br>sudo systemctl restart docker.service</pre><p>You need to confirm if port 2375 is accessible on your local network (this is another story; on my machine, it was available by default).</p><p>For now, that’s all on Ubuntu. Now, on the Mac, Docker doesn’t start on login, so when I run docker ps on the terminal, you’ll see:</p><pre>docker ps      <br>Cannot connect to the Docker daemon at unix:///Users/your_user/.docker/run/docker.sock. Is the docker daemon running?</pre><p>And that’s ok. Now for the magic:</p><pre>export DOCKER_HOST=tcp://&lt;UBUNTU_LOCAL_IP&gt;:2375</pre><p>Where UBUNTU_LOCAL_IP is the IP of your Ubuntu machine on the same network. Now, if you are on the same network:</p><pre>docker ps <br>CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES</pre><p>And that’s it! Enjoy! 🎉</p><blockquote>Please consider the security consequences of using this over your local network.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fc422bfa424" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CLI Maker: More Than We See]]></title>
            <link>https://jairofernandez.medium.com/cli-maker-more-than-we-see-7e41e52c8df2?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e41e52c8df2</guid>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 02:19:02 GMT</pubDate>
            <atom:updated>2024-07-24T02:49:00.049Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Build your ideas so fast!</blockquote><pre>npx @ideascol/cli-maker@latest</pre><figure><img alt="random cli :D" src="https://cdn-images-1.medium.com/max/1024/1*jIUqvL0PLAWR-tin3S4EYw.png" /></figure><p>We are creating and improving cli-maker, and when I showed my partner the latest version, he said to me, “Hey man, you can’t see this advantage directly by looking at the create command or checking the readme.” So, I decided to write this simple and short (I hope) article. ✍️📄</p><p><strong>Complete and simple CI configured </strong>🚀</p><p>You just need to add a secret NPM<em>TOKEN to your repository. Now, when you create a PR on Github, you’ll see the testing job running on the actions tab. When you merge or push code to the main branch, you will see 2 jobs: testing and publish job (for publishing, you need to change your package.json version manually).</em></p><p>I think it’s great to see that configuration without any effort. 👍✨</p><p><strong>Automatic Library exportable to npm 📦</strong></p><p>Your library is usable (folder src/lib) using an import like this: import { AwesomeThing } from &#39;@company/your-library&#39; 📚</p><p><strong>Automatic binary CLI 🛠️</strong></p><p>Your library, of course, is usable using npx @company/your-library. Your users will have access to your functionalities so fast! ⚡</p><p><strong>Setup unit testing without any extra dependencies 🧪</strong></p><p>Testing in Node.js, or in general JavaScript, is totally broken for me. Jest, Mocha, any new flavors, it’s a terrible thing (yes Jest, forgive me, you know how I love you). In Node.js 20, we finally have native testing (<a href="https://nodejs.org/docs/latest-v20.x/api/test.html">test runner Node.js 20 LTS</a>). 🥳🎉</p><p>So, that’s it! I hope you enjoy and check it out for yourself. 🙌😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e41e52c8df2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a simple CLI, a mess]]></title>
            <link>https://jairofernandez.medium.com/create-a-simple-cli-a-mess-fe24a70b0021?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe24a70b0021</guid>
            <category><![CDATA[tooling]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[package]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 20:30:11 GMT</pubDate>
            <atom:updated>2024-07-20T20:49:53.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*kh00ocfsJfFFvwAbF-TyGQ@2x.png" /></figure><p>In all my different jobs and personal projects, whenever I needed to create some kind of console application for any purpose, I always started from scratch. I used bash scripting, Cobra (Golang), Commander.js (Node.js), and even Dart and PHP. However, I always ended up with a bad taste in my mouth. Why? Starting the process is terrible 😩 (I guess the best starting point is with Cobra 😅). Checking the structure, discussing the correct place for the code, or simply putting all the code into a copy-paste example with 1000 options turns this simple task into a mess… 🤯</p><p>Aha, I decided to contribute to the chaos by creating my own library in Node.js. However, I have a strong stance about node_modules, I haven’t felt good about the huge size for simple things: too many testing frameworks, compilers, etc. I recently heard about Node.js LTS (20), which allows you to use the native testing library. I thought, I can support typeScript and @types/node as dev dependencies. It’s not perfect, but it’s just two dependencies.</p><p>The next challenge for me was configuring the CI, unit testing, and dealing with the garbage produced by GPT-4 trying to help me create this as an experiment, which ended really well 😅. (Don’t kill me in the future, AI, I am faithful to the machine cause 🤖.) But I need to recognize that this work would have been impossible to do without using GPT-4o in just one week! After my normal job, with a lot of coffee ☕, so thanks, GPT-4o! 😄</p><p>Which characteristics do I need from a CLI maker, that is the name of the library</p><ol><li>I need to start from zero with just one command; I hate to copy, paste, and rethink the same stupid things 🤦‍♂️</li><li>I need a simple structure supporting TypeScript.</li><li>I need a simple CI with GitHub Actions automatically set up.</li><li>I need the CLI exportable automatically.</li><li>I need to use my library like a simple package with and npm install and import in other parts.</li><li>I need support for an interactive CLI. I love the <a href="https://symfony.com/">Symfony</a> terminal — interactive, fast, great UX or something similar to <a href="https://github.com/charmbracelet/gum">Gum</a></li><li>I need to use the CLI in a direct mode passing the parameters.</li><li>I need simple types, I want to add emails, url, list and use them easily</li><li>I don’t want to configure 1 million dev dependencies</li><li>I want to see my commands and not want to vomit because of the mess 🤢</li></ol><p>Yeah, I’m not picky, but I wanted something like this for myself 😅.</p><p>So, hands of work, I would like to present you cli-maker my own version of the hell, just execute this command and check the magic,</p><p>Go to an empty directory and use Node 20 (I’ll add this validation, I promise you 😉)</p><p>Go to library if you want to skip this lecture <a href="https://www.npmjs.com/package/@ideascol/cli-maker">npm @ideascol/cli-maker</a></p><pre>npx @ideascol/cli-maker</pre><p>And that’s it, you will see the usual installation process. Please be patient 😊.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*dcZPW7IJKuat5aqDlp8Org.png" /></figure><p>Trust me, proceed… 😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*2Zmky2n4ExQpnGCWN0MPAA.png" /></figure><p>For now, I just have one command — the only one needed for now. Please proceed in an empty folder and fill in the data 😊.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*2N6WiNC94UEjOmGfuoM5uA.png" /></figure><h4>Right! Now, create your own CLI 🚀.</h4><pre>npx @ideascol/cli-maker create</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*CXooXOYhFwCoKd8yudNJmg.png" /></figure><p>Fill data</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*rJTjHrbcvjOX-yaW0GiaxA.png" /></figure><p>If all was good, you’ll see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*021rk_TzWRsF0NhTuIEYhw.png" /></figure><p>Let me explain to you in the next article how we can extract the best from this simple library… 📚✨</p><p>See you! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe24a70b0021" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Has tu README realmente útil]]></title>
            <link>https://jairofernandez.medium.com/has-tu-readme-realmente-%C3%BAtil-c9ee691a1095?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9ee691a1095</guid>
            <category><![CDATA[tools]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Thu, 30 May 2024 02:00:40 GMT</pubDate>
            <atom:updated>2024-05-30T02:00:40.643Z</atom:updated>
            <content:encoded><![CDATA[<p>Muchas veces, el readme se vuelve un poco tedioso, y en ocasiones he preferido usar y abusar de scripts bash, para automatizar procesos, sin embargo, a veces puede resultar un poco difícil mantener ambas cosas, sobre todo en proyectos donde el cambio está a la orden del día, entonces, me encontré con una herramienta que ayuda a convertir los files markdown en obras maestras, muy similar a como usaríamos un Jupyter notebook!</p><h4>manos a la obra,</h4><p>La herramienta se llama <a href="https://runme.dev/">runme</a>, y básicamente tiene 4 modos de uso:</p><ul><li>Con tu editor, por ahora solo con Vscode.</li><li>Vía terminal, donde puedes directamente ejecutar un comando de tu README (ya lo veremos!)</li><li>Vía terminal pero abriendo un servidor web, que “oh sorpresa”, es un Vscode corriendo en tu navegador.</li><li>Vía extensión web.</li></ul><h4>Veamos un ejemplo</h4><p>Usando la extensión de Vscode: <a href="https://marketplace.visualstudio.com/items?itemName=stateful.runme">Runme DevOps Notebooks</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckbsuO0EFxKaxa6NtcJuyw.png" /></figure><p>Al presionar allí empezarás a ver la magia</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*I9cAYVdcHb5rNe7E_q-I5Q.png" /></figure><p>Notarás que al acercar el mouse a una celda (sí, cada sección se llama celda como en los Jupyter notebooks)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*UW9HgbetvogDp_bSw_6URg@2x.png" /></figure><p>En nuestro caso, vamos a empezar con algo sencillo, escribiremos el comando</p><pre>uname -a</pre><p>Y al ejecutar veremos como la salida de la terminal queda directamente en nuestro README</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*JxyG7f67baMuu7h6hTNIzA@2x.png" /></figure><p>Veamos todo junto con un ejemplo mas grande como se ejecuta</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*MjE5B8lNVu39TOeuoLAaPg.gif" /></figure><h3>Usando su extensión</h3><p>Sigue las instrucciones para instalarla [aquí], y si vas al repositorio donde tengo el código del ejemplo anterior,</p><p><a href="https://github.com/jairoFernandez/articles/tree/main/readme-powers">https://github.com/jairoFernandez/articles/tree/main/readme-powers</a></p><p>Verás un botón que te dará un link de esta forma:</p><p><a href="https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2FjairoFernandez%2Farticles.git&amp;fileToOpen=readme-powers%2FREADME.md">https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2FjairoFernandez%2Farticles.git&amp;fileToOpen=readme-powers%2FREADME.md</a></p><p>Esto abrirá tu vscode y te permitirá ejecutar el Readme.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9ee691a1095" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter TDD]]></title>
            <link>https://jairofernandez.medium.com/flutter-tdd-1f1a2691d4a4?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f1a2691d4a4</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[tdd]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Thu, 04 Mar 2021 05:47:32 GMT</pubDate>
            <atom:updated>2021-03-04T05:47:32.165Z</atom:updated>
            <content:encoded><![CDATA[<p>Ejemplo de una lista de tareas basado en <a href="https://arctouch.com/blog/flutter-test-driven-development/">https://arctouch.com/blog/flutter-test-driven-development/</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLGZOCSBf5mThgC80GH_hLWKJrek77pyXb&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLGZOCSBf5mThgC80GH_hLWKJrek77pyXb&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgoHVT35ZKFM%2Fhqdefault.jpg%3Fsqp%3D-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ%3D%3D%26rs%3DAOn4CLCd7cnlPSjQ96MDBVJ3ibDaaIJMJQ%26days_since_epoch%3D18690&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbe18f30b0786c1611266ecd18704cf4/href">https://medium.com/media/fbe18f30b0786c1611266ecd18704cf4/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f1a2691d4a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rendimiento, listas indexadas en Dart]]></title>
            <link>https://jairofernandez.medium.com/rendimiento-listas-indexadas-en-dart-90b459a90217?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/90b459a90217</guid>
            <category><![CDATA[rendimiento]]></category>
            <category><![CDATA[listas-indexadas]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Tue, 15 Dec 2020 18:16:59 GMT</pubDate>
            <atom:updated>2020-12-15T18:16:59.181Z</atom:updated>
            <content:encoded><![CDATA[<p>Hace poco vi un video en el canal Hola mundo que me emocionó mucho, el título era similar a este, solo que lo hacía con Javascript, así que me decidí a verificar que funcionara en otro lenguaje como Dart, entonces vemos…</p><p>El link del video comentado es este <a href="https://youtu.be/8x_KnmfjEnU">https://youtu.be/8x_KnmfjEnU</a></p><blockquote>Si te da pereza leer todo, puedes ver el <a href="https://gist.github.com/jairoFernandez/04c677b7128c52d7ae68fce4f4b41a75">código completo aquí</a></blockquote><p>Necesitaremos 2 métodos para crear nuestros Productos y Usuario, en la parte de abajo se muestra la estructura de como quedaría el Map creado.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/afc716554f8f8fd65fe8071a93b73cf5/href">https://medium.com/media/afc716554f8f8fd65fe8071a93b73cf5/href</a></iframe><p><strong>Caraterísticas del Equipo</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88e5d0f2c97af4535e7f6bfa851e2fe5/href">https://medium.com/media/88e5d0f2c97af4535e7f6bfa851e2fe5/href</a></iframe><h3>Primero la función ineficiente</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5476a11dcb25658b60f0a4bf06fd48a/href">https://medium.com/media/f5476a11dcb25658b60f0a4bf06fd48a/href</a></iframe><p>Es una simple función que itera n productos y busca la información del usuario respectivo en la lista de usuarios. usando la función firstWhere de las listas en Dart</p><p>Al ejecutar esta función con diferentes valores, empieza a hacerse evidente que es más lenta con muchos registros.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*Kod1Zk0sJPqICr-YLziyvA.png" /></figure><h3>Finalmente, la Función eficiente</h3><h4>Crearemos primero un indexador</h4><p>La idea es transformar la lista de usuarios y convertir el Id del usuario en el index del elemento de la lista</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c8609bad20dfe42eb0fe1d94600b6f3/href">https://medium.com/media/1c8609bad20dfe42eb0fe1d94600b6f3/href</a></iframe><p>Y la función que combine ambos arrays</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/428abba3681165bde7a6b051de8f2476/href">https://medium.com/media/428abba3681165bde7a6b051de8f2476/href</a></iframe><p>Para unir todo, debemos invocar la nueva función</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d638dd1476b722474eeb918880007434/href">https://medium.com/media/d638dd1476b722474eeb918880007434/href</a></iframe><p>Y el rendimiento mejoró brutal, partiendo del más alto del ejemplo anterior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*0g_VQr9i4Eb-WQpqjGvuJg.png" /></figure><p>El ejemplo completo puedes verlo en:</p><p>Link: <a href="https://gist.github.com/jairoFernandez/04c677b7128c52d7ae68fce4f4b41a75">ejemplo completo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90b459a90217" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Habilitar es6 en un proyecto js]]></title>
            <link>https://jairofernandez.medium.com/habilitar-es6-en-un-proyecto-js-af83e80a1aa1?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/af83e80a1aa1</guid>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Sun, 15 Nov 2020 23:52:32 GMT</pubDate>
            <atom:updated>2020-11-15T23:52:32.331Z</atom:updated>
            <content:encoded><![CDATA[<p>Muchas veces cuando intentaba realizar un pequeño experimento con nodejs, me encontraba con la necesidad de utilizar notación moderna como destructuring, imports, const, await, etc. (ya sabes todos los juguetes bonitos que aparecieron con es6).</p><p>Pero, casi siempre sorteaba todo por ejemplo, si necesitaba.</p><pre>import { any } from &#39;any-library&#39;;</pre><p>Recurría a algo como lo siguiente… 😌</p><pre>const any = require(&#39;any-library&#39;);</pre><p>Seee, se que es pura pereza, pero hoy me determiné a no hacer más esto, y buscando por internet me dí cuenta que no había algún paso a paso bien sencillo para usarlo, (por lo menos en español), entonces encontré esto:</p><ol><li>Añadir 2 dependencias</li></ol><pre>npm install -D babel-cli babel-preset-env</pre><p>2. Crear un archivo .babelrc en la raíz de tu proyecto</p><pre># /.babelrc<br>{<br>  &quot;presets&quot;: [<br>     &quot;env&quot;<br>   ]<br>}</pre><p>3. Agregar el script start con lo siguiente:</p><pre>{<br>   # Other stuffs   <br>   &quot;scripts&quot;: {        <br>      &quot;start&quot;: &quot;babel-node index.js&quot;   <br>   },   <br>   # other other stuffs</pre><p>y voilá!</p><p>Cuando corras npm start verás que es6 ya es soportado 😉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af83e80a1aa1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AppBar con carousel — Parte 1]]></title>
            <link>https://jairofernandez.medium.com/appbar-con-carousel-parte-1-b74af8ff195b?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b74af8ff195b</guid>
            <category><![CDATA[appbar]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[spanish]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 01:49:32 GMT</pubDate>
            <atom:updated>2019-01-20T01:49:32.461Z</atom:updated>
            <content:encoded><![CDATA[<h3>AppBar con carousel — Parte 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*H962QoIPxKMjP0vYsc0Kpw.gif" /></figure><p>También podemos crear AppBars personalizados, y plasmar los diseños que nos soliciten nuestros diseñadores.</p><p>El objetivo es crear una barra de navegación con un carousel incorporado. (gracias <a href="https://twitter.com/anncode">@anncode</a>)</p><p>Manos a la obra!</p><p>Dividiremos la creación de este widget en dos post para poder tener una referencia de consulta, aprenderemos acerca del widget Stack, Container entre otros.</p><ol><li>Tenemos una barra de navegación de color azul con un gradiente linear, “GradientBack”</li><li>Crearemos un componente para mostrar el carousel, “CardImageList”.</li><li>Luego uniremos los componentes anteriores en uno solo que denominaremos “HeaderAppbar”.</li></ol><h3>Componente GradientBack</h3><p>Nuestro componente será un StatelessWidget, ya que el usuario no tendrá una interacción directa</p><blockquote><em>Usaremos el widget Container, que seria como el equivalente de un “div” en HTML</em></blockquote><blockquote><a href="https://docs.flutter.io/flutter/widgets/Container-class.html"><em>https://docs.flutter.io/flutter/widgets/Container-class.html</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*-X4nyKwfPliX6K_a42DpiQ.png" /></figure><p>Para entender de una manera simple este widget, te recomiendo leer <a href="https://flutter.io/docs/get-started/flutter-for/web-devs">https://flutter.io/docs/get-started/flutter-for/web-devs</a> también está la misma introducción para otros lenguajes 😍</p><p>La propiedad `decoration`que usaremos será `BoxDecoration`</p><pre># gradient_back.dart<br>class GradientBack extends StatelessWidget{<br>  final String title;<br>  GradientBack(this.title);</pre><pre>  @override<br>  Widget build(BuildContext context){<br>    return Container(<br>      height: 250.0,<br>      decoration: BoxDecoration(<br>        gradient: LinearGradient(<br>          colors: [<br>            Color(0xFF4268D3),<br>            Color(0xFF584CD1)<br>          ],<br>          begin: FractionalOffset(0.2, 0.0),<br>          end: FractionalOffset(1.0, 0.6),<br>          stops: [0.0,0.6],<br>          tileMode: TileMode.clamp<br>        )<br>      ),<br>      child: Text(<br>        title,<br>        style: TextStyle(<br>          color: Colors.white,<br>          fontSize: 30.0,<br>          fontFamily: &quot;Lato&quot;,<br>          fontWeight: FontWeight.bold<br>        )<br>      ),<br>      alignment: Alignment(-0.9, -0.6),<br>    );<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*PG3AyMzt0UcsIULojQvA9Q.png" /></figure><p>Artículo original <a href="https://jairofernandez.me/flutter/appbar/appbar-con-carousel/">https://jairofernandez.me/flutter/appbar/appbar-con-carousel/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b74af8ff195b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jugando con el AppBar de Flutter]]></title>
            <link>https://jairofernandez.medium.com/jugando-con-el-appbar-de-flutter-c5b5940d931d?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5b5940d931d</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[appbar]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 00:11:28 GMT</pubDate>
            <atom:updated>2019-01-20T00:11:28.446Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*KBgtvLY4LDFRY6ht_Bx-Hw.png" /></figure><p>Las tres partes por las cuales está conformado:</p><ol><li>La sección izquierda, donde vemos el ícono “menú”, llamado “leading”</li><li>La sección central, donde se ve el texto “Hi friend”, mas conocido como “title”</li><li>La sección de la derecha donde está el ícono “merge type”, se llama actions</li></ol><p>El código usado para la imagen resulta muy simple:</p><pre>appBar: AppBar(<br>          leading: Builder(<br>            builder: (BuildContext context) {<br>              return IconButton(<br>                icon: const Icon(Icons.menu),<br>                onPressed: () =&gt; print(&#39;hi on menu icon&#39;),<br>              );<br>            },<br>          ), <br>          title: Text(&#39;Hi friend&#39;),<br>          actions: &lt;Widget&gt;[<br>            IconButton(<br>              icon: new Icon(Icons.merge_type),<br>              onPressed: () =&gt; print(&#39;hi on icon action&#39;),<br>            ),<br>          ],<br>        )<br>      )</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5b5940d931d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clase AppBar]]></title>
            <link>https://jairofernandez.medium.com/clase-appbar-57cda30851ea?source=rss-cba8e04ed2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/57cda30851ea</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[appbar]]></category>
            <dc:creator><![CDATA[Jairo Fernández]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 00:08:29 GMT</pubDate>
            <atom:updated>2019-01-20T00:13:18.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zYTUIh2topd2PPqfpsN9A.jpeg" /></figure><p>Haremos uso de la clase AppBar, para crear nuestro propio widget que sirva de AppBar, ya sea porque queramos personalizar el comportamiento, o porque queramos que nuestro código quede más desacoplado, solo debemos crear una clase que herede de AppBar</p><pre>class MyAppBar extends AppBar {<br>   <br>}</pre><p>Ahora, debemos crear un constructor e inicializar el constructor de la clase padre</p><pre># my_app_bar.dart<br>class MyAppBar extends AppBar {<br>  MyAppBar(<br>    { <br>      Key key,<br>      Widget title, <br>      List&lt;Widget&gt; actions <br>    }) : super(key: key, title: title, actions: actions);<br>}</pre><p>Bien, ahora podemos usar nuestra propia barra de navegación</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;my_app_bar.dart&#39;;</pre><pre>void main() =&gt; runApp(MyApp());</pre><pre>class MyApp extends StatelessWidget {<br>  List&lt;Widget&gt; actions = [];</pre><pre>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      title: &#39;Flutter Demo&#39;,<br>      theme: ThemeData(<br>        primarySwatch: Colors.pink,<br>      ),<br>      home: Scaffold(<br>        appBar: MyAppBar(<br>          title: Text(&#39;Hi special&#39;),<br>          actions: actions<br>        )<br>      )<br>    );<br>  }<br>}</pre><p>Artículo original en <a href="http://jairofernandez.me/flutter/clase-appbar/">http://jairofernandez.me/flutter/clase-appbar/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57cda30851ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>