<?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: Dídac</title>
    <description>The latest articles on Forem by Dídac (@sabatesduran).</description>
    <link>https://forem.com/sabatesduran</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%2F4202%2F28a36fe8-89a9-471a-ac57-57f55c8ea95d.jpeg</url>
      <title>Forem: Dídac</title>
      <link>https://forem.com/sabatesduran</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sabatesduran"/>
    <language>en</language>
    <item>
      <title>WorkDash - Slack Status Changer</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Wed, 19 Aug 2020 17:13:30 +0000</pubDate>
      <link>https://forem.com/sabatesduran/workdash-slack-status-changer-4oa4</link>
      <guid>https://forem.com/sabatesduran/workdash-slack-status-changer-4oa4</guid>
      <description>&lt;p&gt;The other day I decided that I will build something for my desk and I did this:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1295815551642673154-677" src="https://platform.twitter.com/embed/Tweet.html?id=1295815551642673154"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1295815551642673154-677');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1295815551642673154&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;My idea is to make kind of a cheap DIY version of Elgato Stream Deck and the first version only uses the Slack's API to change my status, but it's a start.&lt;/p&gt;

&lt;p&gt;For now, if you are interested to build your own you can check the gist that I've made to make one for yourself:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Follow this series to known what else I will be adding!&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nice banner from &lt;a href="https://liyasthomas.github.io/banner/" rel="noopener noreferrer"&gt;Banner&lt;/a&gt; build by &lt;a href="https://dev.to/liyasthomas"&gt;Liyas Thomas 🦄&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>electronics</category>
      <category>arduino</category>
      <category>api</category>
      <category>funny</category>
    </item>
    <item>
      <title>Rails webhook integration development with Ngrok</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Fri, 11 Jan 2019 21:20:01 +0000</pubDate>
      <link>https://forem.com/sabatesduran/ngrok-for-rails-development-5f9k</link>
      <guid>https://forem.com/sabatesduran/ngrok-for-rails-development-5f9k</guid>
      <description>&lt;p&gt;All begin when I started using &lt;a href="https://www.mollie.com" rel="noopener noreferrer"&gt;Mollie&lt;/a&gt;, it's a PSP (Payment Service Provider) like &lt;a href="https://stripe.com" rel="noopener noreferrer"&gt;Stripe&lt;/a&gt; and it has a ruby wrapper, but if you want to test payments in a development environment (localhost) you need a valid URL so they can reach you via webhook (if you want to validate the payment, the webhook URL parameter is mandatory).&lt;/p&gt;

&lt;p&gt;The solution was easy I just create an &lt;a href="https://ngrok.com/" rel="noopener noreferrer"&gt;ngrok&lt;/a&gt; tunnel and I change the &lt;code&gt;default_url_options&lt;/code&gt; with an environment variable depending if I was working on something that needed only my local machine or other services.&lt;/p&gt;

&lt;p&gt;For running my app with mollie webhooks i needed to do this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start ngrok&lt;/li&gt;
&lt;li&gt;Change &lt;code&gt;ENV&lt;/code&gt; variables for the new ngrok &lt;code&gt;https&lt;/code&gt; url&lt;/li&gt;
&lt;li&gt;Start my app&lt;/li&gt;
&lt;li&gt;Start Sidekiq (for background jobs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;IMO it's not to much but at some point becomes annoying so I decided to make it easier for me, now i only have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start my app&lt;/li&gt;
&lt;li&gt;Start Sidekiq&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here it is how to did it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install ngrok v2+ in your computer&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;ngrok-tunnel&lt;/code&gt; in your Gemfile
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="ss"&gt;:development&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'ngrok-tunnel'&lt;/span&gt;
  &lt;span class="c1"&gt;# Cool stuff for later but not really needed&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'tty-box'&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;puma.rb&lt;/code&gt; we add this code at the bottom
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"IS_DEV_ENV"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="k"&gt;begin&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;# App port&lt;/span&gt;
      &lt;span class="ss"&gt;addr: &lt;/span&gt;&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PORT"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="c1"&gt;# ngrok system files&lt;/span&gt;
      &lt;span class="ss"&gt;config: &lt;/span&gt;&lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"HOME"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="s2"&gt;".ngrok2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ngrok.yml"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;# In case that you have a pay plan you can create&lt;/span&gt;
    &lt;span class="c1"&gt;# tunnels with custom subdomains&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:subdomain&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"NGROK_SUBDOMAIN"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"NGROK_SUBDOMAIN"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="c1"&gt;# Region (since I only work in the EU is hardcoded)&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:region&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"eu"&lt;/span&gt;

    &lt;span class="c1"&gt;# Create tunnel&lt;/span&gt;
    &lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Create cool box&lt;/span&gt;
    &lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;TTY&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;width: &lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;height: &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;padding: &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;title: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;top_left: &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;NGROK&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bottom_right: &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;/NGROK&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="ss"&gt;style: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;fg: :green&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bg: :black&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;border: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;fg: :green&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bg: :black&lt;/span&gt;&lt;span class="p"&gt;}})&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="s2"&gt;"STATUS: &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;PORT:   &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;port&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;HTTP:   &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ngrok_url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;HTTPS:  &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ngrok_url_https&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;rescue&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;
    &lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;TTY&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;width: &lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;height: &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;align: :center&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;padding: &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;title: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;top_left: &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;NGROK&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bottom_right: &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;/NGROK&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="ss"&gt;style: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;fg: :red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bg: :black&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;border: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;fg: :red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bg: :black&lt;/span&gt;&lt;span class="p"&gt;}})&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="s2"&gt;"I couldn't create the tunnel ;("&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's comment this code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ENV["IS_DEV_ENV"]&lt;/code&gt; : Since &lt;code&gt;Rails.env.development?&lt;/code&gt; is not loaded (at least in Heroku) in this point of the app we are using an environment variable that is only set in your &lt;code&gt;secrets.yml&lt;/code&gt; or &lt;code&gt;application.yml&lt;/code&gt; only in the &lt;code&gt;development&lt;/code&gt; section and it needs to be set to true.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;    &lt;span class="na"&gt;development&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;IS_DEV_ENV&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;true"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In the &lt;code&gt;options&lt;/code&gt; hash we have the app port and the home directory where the ngrok files are located.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;options[:subdomain]&lt;/code&gt; In case that you are an ngrok subscriber you can have a custom subdomain so I left the code here just in case I became a subscriber one day.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;options[:region]&lt;/code&gt; This is not in an ENV variable because we are based in the EU and we don't work outside of it, so I just hardcoded EU but you can choose between:

&lt;ul&gt;
&lt;li&gt;us - United States (Ohio)&lt;/li&gt;
&lt;li&gt;eu - Europe (Frankfurt)&lt;/li&gt;
&lt;li&gt;ap - Asia/Pacific (Singapore)&lt;/li&gt;
&lt;li&gt;au - Australia (Sydney)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;WHAT'S IN THE &lt;code&gt;box&lt;/code&gt; ????!!! just to make it cooler (at least for me) it's showing a nice box with the ngrok information. &lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15ptopyljndpmmgqzq2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15ptopyljndpmmgqzq2z.png" width="598" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In case ngrok cannot be connected we use the box to show that we cannot connect&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2yd91sexkv4vjtiuu94.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2yd91sexkv4vjtiuu94.png" width="597" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Change the varibles
&lt;/h2&gt;

&lt;p&gt;You maybe don't need this if you just want to test Mollie payments but for me was nice to have.&lt;/p&gt;

&lt;p&gt;To change the config dynamically I choose a way that I think it's far from okey but it works (yeah i know it's running on every request). In the &lt;code&gt;application_controller.rb&lt;/code&gt; I added this method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;before_action&lt;/span&gt; &lt;span class="ss"&gt;:set_ngrok_urls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;if: &lt;/span&gt;&lt;span class="s2"&gt;"Rails.env.development?"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;set_ngrok_urls&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;running?&lt;/span&gt;
      &lt;span class="c1"&gt;# Getting current url&lt;/span&gt;
      &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Ngrok&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tunnel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ngrok_url_https&lt;/span&gt;

      &lt;span class="c1"&gt;# Variable hash&lt;/span&gt;
      &lt;span class="n"&gt;default_url_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;host: &lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="c1"&gt;# Overwriting current variables&lt;/span&gt;
      &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;action_controller&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asset_host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;
      &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;action_mailer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asset_host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;
      &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;default_url_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;default_url_options&lt;/span&gt;
      &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;action_mailer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;default_url_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;default_url_options&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what I'm doing here is in case that the environment is development I'm executing the function &lt;code&gt;set_ngrok_urls&lt;/code&gt; and checks if ngrok is connected.&lt;/p&gt;

&lt;p&gt;Then I get the current ngrok https URL and I create a hash (this hash is needed for the routes and the mailer default URL's) the two first only use the url.&lt;/p&gt;

&lt;p&gt;That will be all, hope this works for some people and please if I did something very wrong leave a comment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bibliography
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Autostart Ngrok With Rails: &lt;a href="https://stuff-things.net/2016/10/12/autostart-ngrok-with-rails/" rel="noopener noreferrer"&gt;https://stuff-things.net/2016/10/12/autostart-ngrok-with-rails/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
      <category>webdev</category>
      <category>ngrok</category>
    </item>
    <item>
      <title>How do you manage Calendars in your company?</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Tue, 19 Jun 2018 09:36:01 +0000</pubDate>
      <link>https://forem.com/sabatesduran/how-do-you-manage-calendars-in-your-company-5b04</link>
      <guid>https://forem.com/sabatesduran/how-do-you-manage-calendars-in-your-company-5b04</guid>
      <description>&lt;p&gt;At the company that I've been working for, since the biginning they have a shared iCloud calendar and it difficult to sync when we have new Android, Linux or Windows devices.&lt;/p&gt;

&lt;p&gt;I would like to change it to a shared calendar that can be sync thought any platform, I know Google Apps is an option but we don't use it, we have an email provider.&lt;/p&gt;

&lt;p&gt;Do you know any platform that can help to fix this problem?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Mining cryptocurrencies instead of having ads?</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Wed, 22 Nov 2017 21:58:07 +0000</pubDate>
      <link>https://forem.com/sabatesduran/mining-cryptocurrencies-instead-of-ads-bl1</link>
      <guid>https://forem.com/sabatesduran/mining-cryptocurrencies-instead-of-ads-bl1</guid>
      <description>&lt;p&gt;Today I saw a tweet from &lt;a class="mentioned-user" href="https://dev.to/ben"&gt;@ben&lt;/a&gt;
 that had a dev.to link talking about ads that made me remember something that I saw some weeks ago:&lt;/p&gt;

&lt;p&gt;Liquid error: internal&lt;/p&gt;

&lt;h3&gt;
  
  
  Coinhive
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://coinhive.com/"&gt;Coinhive&lt;/a&gt; offers a Javascript API for mining a cryptocurrency called &lt;a href="https://getmonero.org/"&gt;Monero&lt;/a&gt; in your own website so instead of having a tons of ads you ask for some processing power for mining to the user.&lt;/p&gt;

&lt;p&gt;Concepts (I got this from their website):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Captcha: We offer an easy to implement captcha-like service where users need to solve a number of hashes (adjustable by you) in order to submit a form. This prevents spam at an inconvenience that is comparable to a classic captcha. All with the added benefit of earning you money.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shortlinks: If you have an URL you'd like to forward your users to, you can create a cnhv.co shortlink to it. The user has to solves a number of hashes (adjustable by you) and is automatically forwarded to the target URL afterwards.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Javascript API: If you don't like the captcha or shortlinks for whatever reason, nothing is stopping you from implementing your own solution on top of our API.&lt;br&gt;
The JavaScript API let's you associate solved hashes to specific users on your site. Users can solve hashes on your behalf in return for benefits you provide.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I think this super interesting in captcha and short links but I would not like it that much if all my tabs are mining at the same time.&lt;/p&gt;

&lt;p&gt;Do you think that this will become the new ads?&lt;/p&gt;

&lt;p&gt;Do you know some potential problems that we could encounter as users?&lt;/p&gt;

&lt;p&gt;Please share your opinion.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Is a bad idea to use Github Pages for a production ready app?</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Tue, 14 Nov 2017 11:15:19 +0000</pubDate>
      <link>https://forem.com/sabatesduran/is-a-bad-idea-to-use-github-pages-for-a-production-ready-app-8on</link>
      <guid>https://forem.com/sabatesduran/is-a-bad-idea-to-use-github-pages-for-a-production-ready-app-8on</guid>
      <description>&lt;p&gt;I'm trying to not spend money on hosting for a react app and I found this package:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/tschaub/gh-pages"&gt;gh-pages&lt;/a&gt;: Publish files to a gh-pages branch on GitHub (or any other branch anywhere else)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By adding  this script you can build and push the code directly to &lt;code&gt;gh-pages&lt;/code&gt; and publish your app in seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
  "deploy": "gh-pages -d build"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do you think is a bad idea to use Github pages as production?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Talking to a figure</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Sat, 11 Nov 2017 12:17:09 +0000</pubDate>
      <link>https://forem.com/sabatesduran/talking-to-a-figure-ac5</link>
      <guid>https://forem.com/sabatesduran/talking-to-a-figure-ac5</guid>
      <description>&lt;p&gt;&lt;em&gt;From the comments I realized that there is another post in dev.to called &lt;a href="https://dev.to/tkeeney/becoming-the-duck"&gt;Becoming The Duck&lt;/a&gt; from &lt;a href="https://dev.to/tkeeney"&gt;Terry Keeney&lt;/a&gt; talking about this and there's a name for what I tried to explain &lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging"&gt;Rubber duck debugging&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In 2014 I started my first job as a full-time developer and I have to say I was super nervous I felt that I wasn't good enough to do the job (&lt;a href="https://davidwalsh.name/impostor-syndrome"&gt;Impostor Syndrome&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A problem that I had at the beginning is that when I ask for help to one of my colleagues I start explaining my problem and suddenly the answer hits my head (This is still happening to me sometimes).&lt;/p&gt;

&lt;p&gt;One day a colleague (that knew that I was about to do the same thing) gave me a little Mario Bros figure from McDonald's and told me:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Okay, for now on you will explain to this figure your problem and if you don't have the answer when you finish you can ask me"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;At the beginning it was pretty weird but I took his advice and I have to say that most of the time explaining the problem to the figure gave me the answer.&lt;/p&gt;

&lt;p&gt;I don't use the figure anymore but this changed the way I think about the problems that I find while I'm programming.&lt;/p&gt;

&lt;p&gt;If you have the same experience, you don't need a figure but try to explain the problem to yourself (like you are talking to another person or even you colleague).&lt;/p&gt;

&lt;p&gt;Please share your opinion.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React + Custom Bootstrap 4 Sass [PROBABLY DEPRECATED]</title>
      <dc:creator>Dídac</dc:creator>
      <pubDate>Sat, 26 Aug 2017 23:21:47 +0000</pubDate>
      <link>https://forem.com/sabatesduran/add-custom-bootstrap-4-sass-to-create-react-app</link>
      <guid>https://forem.com/sabatesduran/add-custom-bootstrap-4-sass-to-create-react-app</guid>
      <description>&lt;p&gt;I needed a way to customize Bootstrap 4 from the Sass files making easier to change the variable values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Node.js&lt;br&gt;
&lt;code&gt;$ sudo apt-get install nodejs&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Yarn&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-sS&lt;/span&gt; https://dl.yarnpkg.com/debian/pubkey.gpg | &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-key add -
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb https://dl.yarnpkg.com/debian/ stable main"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/yarn.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install create-react-app package (you probably need to use &lt;code&gt;sudo&lt;/code&gt;)
&lt;code&gt;$ yarn global add create-react-app&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Create your react app
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;create-react-app bootstrap4-react-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Adding Sass (This part is from the &lt;code&gt;create-react-app&lt;/code&gt; package &lt;a href="https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;)
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Create &lt;code&gt;/src/styles/&lt;/code&gt; folder
&lt;/h4&gt;

&lt;p&gt;Inside your project folder execute &lt;code&gt;$ mkdir src/styles&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Install the command-line interface for Sass, the package to run tasks in parallel and Bootstrap 4.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ yarn add node-sass-chokidar npm-run-all bootstrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Add the new tasks in the &lt;code&gt;package.json&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build-css"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node-sass-chokidar --include-path ./src/styles --include-path ./node_modules src/styles/ -o src/styles/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"watch-css"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build-css &amp;amp;&amp;amp; node-sass-chokidar --include-path ./src/styles --include-path ./node_modules src/styles/ -o src/styles --watch --recursive"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start-js"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-scripts start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm-run-all -p watch-css start-js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build-css &amp;amp;&amp;amp; react-scripts build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-scripts test --env=jsdom"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"eject"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-scripts eject"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see if you look at your &lt;code&gt;package.json&lt;/code&gt; this are the new commands:&lt;br&gt;
&lt;code&gt;build-css&lt;/code&gt;: Builds the css from the &lt;code&gt;/src/styles/&lt;/code&gt; directory.&lt;br&gt;
&lt;code&gt;watch-css&lt;/code&gt;: Whatches for changes of the .scss files from the &lt;code&gt;/src/styles/&lt;/code&gt; directory.&lt;br&gt;
&lt;code&gt;start-js&lt;/code&gt;: Executes the old start command.&lt;br&gt;
&lt;code&gt;start&lt;/code&gt;: Runs in parallel &lt;code&gt;whatch-css&lt;/code&gt; and &lt;code&gt;start-js&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;build&lt;/code&gt;: Builds the css and build the scripts.&lt;/p&gt;
&lt;h3&gt;
  
  
  Create sass files
&lt;/h3&gt;

&lt;p&gt;Now we can create &lt;code&gt;index.scss&lt;/code&gt; and &lt;code&gt;_custom_bootstrap.scss&lt;/code&gt; in our &lt;code&gt;styles&lt;/code&gt; directory (that will create an &lt;code&gt;index.css&lt;/code&gt; when it's build).&lt;/p&gt;

&lt;p&gt;We use '_' for skipping this file to be build independently from the index file, instead we are going to import the file inside &lt;code&gt;index.scss&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// My Bootstrap configuration&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'custom_bootstrap'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Bootstrap library&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'bootstrap/scss/bootstrap'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Here you can import more .scss files or write scss code.&lt;/span&gt;
&lt;span class="nc"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Add custom variables
&lt;/h4&gt;

&lt;p&gt;In `&lt;code&gt;_custom_bootstrap.scss&lt;/code&gt; we can overwrite Bootstrap variablesthat we can find in &lt;code&gt;./node_modules/bootstrap/sass/_variables.scss&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For exemple we are going to change the primary theme color:&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;scss&lt;br&gt;
// New color&lt;br&gt;
$new-color: #ad9a5b;&lt;/p&gt;

&lt;p&gt;// Array of colors from _variables.scss&lt;br&gt;
$theme-colors: (&lt;br&gt;
  primary: $new-color,&lt;br&gt;
  secondary: $gray-600,&lt;br&gt;
  success: $green,&lt;br&gt;
  info: $cyan,&lt;br&gt;
  warning: $yellow,&lt;br&gt;
  danger: $red,&lt;br&gt;
  light: $gray-100,&lt;br&gt;
  dark: $gray-800&lt;br&gt;
) !default;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
Since we don't have some variables you will have to copy them from the&lt;/code&gt;_variables.scss`.&lt;/p&gt;

&lt;p&gt;The next step is loading the CSS file into &lt;code&gt;index.js&lt;/code&gt; adding this line before the import off the &lt;code&gt;App&lt;/code&gt; component: &lt;code&gt;import './styles/index.css';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For starting the app just execute &lt;code&gt;yarn start&lt;/code&gt; in your project folder and start changing variables, the terminal will tell you if your &lt;code&gt;scss&lt;/code&gt; file has some errors and also every time you change something on the file will re-built the index.css and reload the page so you can see the changes,&lt;/p&gt;

&lt;p&gt;This is the before and after:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgczt961p97lh0r44doyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgczt961p97lh0r44doyo.png" title="Before" alt="Before adding the variable"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmjqmk3bhqsit3dxz5001.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmjqmk3bhqsit3dxz5001.png" title="After" alt="After adding the variable"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This is my first article, so if you have some input or recomendation is always helpful.&lt;/p&gt;

&lt;p&gt;Thanks and I hope this article is useful for you.&lt;/p&gt;

</description>
      <category>react</category>
      <category>bootstrap</category>
      <category>sass</category>
      <category>css</category>
    </item>
  </channel>
</rss>
