<?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>DEV Community: Jorge González</title>
    <description>The latest articles on DEV Community by Jorge González (@iksaku).</description>
    <link>https://dev.to/iksaku</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%2F129480%2F41ebbf6d-f275-41e9-9a21-47481f2c29cf.jpeg</url>
      <title>DEV Community: Jorge González</title>
      <link>https://dev.to/iksaku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iksaku"/>
    <language>en</language>
    <item>
      <title>Integrating Tinkerwell with GNOME</title>
      <dc:creator>Jorge González</dc:creator>
      <pubDate>Wed, 24 Feb 2021 22:22:31 +0000</pubDate>
      <link>https://dev.to/iksaku/integrating-tinkerwell-with-gnome-5ei8</link>
      <guid>https://dev.to/iksaku/integrating-tinkerwell-with-gnome-5ei8</guid>
      <description>&lt;p&gt;&lt;a href="https://tinkerwell.app/"&gt;Tinkerwell&lt;/a&gt; is one in the growing list of apps created by &lt;a href="https://beyondco.de/"&gt;BeyondCode&lt;/a&gt;. This Desktop app allows you to execute PHP code from a &lt;a href="https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop"&gt;REPL interface&lt;/a&gt;, which can be connected to a local environment, the production one or even a Docker container! 👀&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Tinkerwell?
&lt;/h2&gt;

&lt;p&gt;This incredible app was developed with the Laravel Developer in mind, to simplify the work that we all already do: Use the &lt;a href="https://github.com/laravel/tinker"&gt;&lt;code&gt;tinker&lt;/code&gt;&lt;/a&gt; tool. 🤔&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tinker&lt;/code&gt; is a package created by the core laravel team, which uses the &lt;a href="https://psysh.org/"&gt;psysh REPL&lt;/a&gt; under the hood. This allows developers to &lt;em&gt;tinker&lt;/em&gt; with their Laravel applications directly, executing code in the console and seeing the results right away, without needing to enter debug mode, or create test routes to verify that a simple Eloquent query work as they expect.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Tinkerwell&lt;/code&gt; was born to provide the same benefits from &lt;code&gt;tinker&lt;/code&gt;, but packed with a pretty UI, and the ability to switch context without having to leave the app ❤️.&lt;/p&gt;

&lt;p&gt;Oh... By the way... This app is multi-platform! It is available for Windows, macOS and Linux 😍.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux? Where do I sign?
&lt;/h2&gt;

&lt;p&gt;Well, you can buy a Tinkerwell license in their website without hesitation, no compromises!&lt;/p&gt;

&lt;p&gt;Now, one thing you need to know about the Linux compatibility is that it's distributed via &lt;a href="https://appimage.org/"&gt;AppImage&lt;/a&gt; packages, which is a simple executable form factor that doesn't require the end user to install system libraries nor recompile their kernel for an app to run.&lt;/p&gt;

&lt;p&gt;In my opinion, this was the right move.&lt;/p&gt;

&lt;p&gt;However, AppImages do come with a cost: Lack of system integration.&lt;/p&gt;

&lt;p&gt;As many Linux users may know, most Desktop Environments come with the ability to display your Desktop applications in their own application menu, however, since AppImages are not meant to be &lt;em&gt;installed&lt;/em&gt;, they will not show in your application list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---4Z8EWfX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbbrl06c6gmg598ex0dl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---4Z8EWfX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbbrl06c6gmg598ex0dl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, I'm here to tell you there's a way to solve this and provide neat discoverability for your application when using the GNOME Desktop Environment 👨‍💻...&lt;/p&gt;

&lt;h2&gt;
  
  
  Tinkering with GNOME
&lt;/h2&gt;

&lt;p&gt;It is stated &lt;a href="https://developer.gnome.org/integration-guide/stable/desktop-files.html.en"&gt;in the GNOME Documentation&lt;/a&gt;, that you can create your own application shortcuts by creating files with the extension &lt;code&gt;.desktop&lt;/code&gt; and linking them in one of the corresponding directories.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;From this point forward, I'm going to assume that you have downloaded the&lt;br&gt;
Tinkerwell AppImage in the &lt;code&gt;~/Applications/Tinkerwell/&lt;/code&gt; directory&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First, verify that your AppImage is executable, otherwise, make it executable using the command:&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="nb"&gt;chmod &lt;/span&gt;a+rx ~/Applications/Tinkerwell/Tinkerwell.AppImage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before creating our Desktop Entry, we must get an icon for our start menu. You can simply google for the &lt;code&gt;tinkerwell icon&lt;/code&gt; and just save it in the same directory as the AppImage file.&lt;/p&gt;

&lt;p&gt;Now, let's create the Desktop shortcut for Tinkerwell. I'll be creating it in the same directory that Tinkerwell was downloaded:&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="nb"&gt;touch&lt;/span&gt; ~/Applications/Tinkerwell/beyondcode-tinkerwell.desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To keep things simple, you can copy and paste the following Desktop Entry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Desktop Entry]
Name=Tinkerwell
Exec=/home/&amp;lt;your-user&amp;gt;/Applications/Tinkerwell/Tinkerwell.AppImage
Icon=/home/&amp;lt;your-user&amp;gt;/Applications/Tinkerwell/icon.png
Type=Application
Categories=tinkerwell;electron;php;beyondcode;laravel;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Remember to specify your user's path properly, as well as the AppImage name and icon file name.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you created your Desktop Entry and properly referenced both the AppImage and icon files, it's time to tell GNOME to include your application. In this case, we will be creating a &lt;a href="https://en.wikipedia.org/wiki/Symbolic_link"&gt;Symbolic link&lt;/a&gt; to our desktop entry:&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;# Remember: The syntax for the link command is&lt;/span&gt;
&lt;span class="c"&gt;#     ln -s &amp;lt;TARGET&amp;gt; &amp;lt;LINK_NAME&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# In other words, it means&lt;/span&gt;
&lt;span class="c"&gt;#     ln -s &amp;lt;ORIGIN&amp;gt; &amp;lt;DESTINATION&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Important: You must always reference absolute (full) paths when creating any type of links.&lt;/span&gt;

&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  /home/&amp;lt;your-user&amp;gt;/Applications/Tinkerwell/beyondcode-tinkerwell.desktop &lt;span class="se"&gt;\&lt;/span&gt;
  /home/&amp;lt;your-user&amp;gt;/.local/share/applications/beyondcode-tinkerwell.desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you read the GNOME documentation linked previously, you would remember that linking a Desktop Entry file to &lt;code&gt;~/.local/share/applications/&lt;/code&gt; will allow GNOME to index and display your application in their main menu 🔮.&lt;/p&gt;

&lt;p&gt;Now, in order to tell GNOME to immediately show us the way, we must run the following command:&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;# Look ma! No sudo!&lt;/span&gt;
update-desktop-database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If every piece is properly configured, we should now see tinkerwell in our application menu! 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TWGZw6nf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/waz6rkez4cy4q6f9mr35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TWGZw6nf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/waz6rkez4cy4q6f9mr35.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, besides having such a powerful tool at your disposition, you also have a quick access entry in your application menu 🏃‍♂️.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>ubuntu</category>
      <category>linux</category>
      <category>php</category>
    </item>
    <item>
      <title>Setting up Laravel applications with Caddy 2</title>
      <dc:creator>Jorge González</dc:creator>
      <pubDate>Wed, 24 Feb 2021 22:13:06 +0000</pubDate>
      <link>https://dev.to/iksaku/setting-up-laravel-applications-with-caddy-2-251c</link>
      <guid>https://dev.to/iksaku/setting-up-laravel-applications-with-caddy-2-251c</guid>
      <description>&lt;p&gt;Managing web servers can be kind of tricky, and with an increasing number of applications in one server, managing all of their configuration files can start to feel like a burden 🥴.&lt;/p&gt;

&lt;p&gt;Maybe just my point of view, maybe not at all...&lt;/p&gt;

&lt;p&gt;In the last few days, I started looking for a way to migrate from Nginx to a Caddy web server for all my Laravel applications, just because of two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Caddy is HTTPS-first, so I don’t need to worry about certbot trying to renew domains that are no longer available in my private server, nor failing to manage recently added domains that I forgot to tell certbot about. Caddy manages this for me automatically 💖.&lt;/li&gt;
&lt;li&gt;Caddy’s configuration files are way easier to understand than Nginx’s, even without previous knowledge of the properties of a &lt;code&gt;Caddyfile&lt;/code&gt;, you can easily grasp what a config file is doing just by reading it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Surprisingly to me, &lt;a href="https://caddyserver.com/v2"&gt;Caddy just got its v2 upgrade&lt;/a&gt; a few months ago, which is full of new awesome features, and the cherry of the cake for me is that their traditional &lt;code&gt;Caddyfiles&lt;/code&gt; just got way easier to read! So much was &lt;strong&gt;done right&lt;/strong&gt; for this update!&lt;/p&gt;

&lt;p&gt;Also surprising to me was the lack of Laravel templates available for Caddy 2, which is not a big deal, but I hoped to find a good template as a starting point after all these months that Caddy 2 has been available.&lt;/p&gt;

&lt;p&gt;Instead, I found &lt;a href="https://ma.ttias.be/caddyfile-config-example-for-laravel/"&gt;Mattias’ Laravel template for Caddy v1&lt;/a&gt; (thanks Mattias!), which seemed pretty solid to me, so I saved a copy and started to work 👨‍💻.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Caddy
&lt;/h2&gt;

&lt;p&gt;First of all, you need to install Caddy on your server (obviously), you can find a pretty detailed guide on &lt;a href="https://caddyserver.com/docs/"&gt;Caddy’s Documentation&lt;/a&gt;. So just go and surf the documentation before coming back.&lt;/p&gt;

&lt;h2&gt;
  
  
  PHP + Caddy = ❤️
&lt;/h2&gt;

&lt;p&gt;So, managing PHP applications with Caddy is dead simple, and even Laravel is a &lt;strong&gt;dead simple&lt;/strong&gt; framework for PHP, so a pretty good match can come out of this 👀.&lt;/p&gt;

&lt;p&gt;Let’s take a moment and think of what we need to tell Caddy about our Laravel application:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It should use HTTPS.&lt;/li&gt;
&lt;li&gt;It should serve static files if possible.&lt;/li&gt;
&lt;li&gt;If no static files are found, then it should properly route incoming requests to PHP-FPM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Well, this seems like a good starting point. So, I present to you the Caddy 2 template I use for Laravel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-website.com {
    # Resolve the root directory for the app
    root * /var/www/my-website/public

    # Provide Zstd and Gzip compression
    encode zstd gzip

    # Allow caddy to serve static files
    file_server

    # Enable PHP-FPM
    php_fastcgi unix//run/php/php7.4-fpm.sock
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;A fun thing about this is that Caddy does support the &lt;em&gt;Zstd Compression Algorithm&lt;/em&gt;, however, no browsers actually support it. Anyhow, supported algorithms are requested from the client, so we're prepared for the time when browsers start supporting zstd.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As you can see, integrating Laravel with Caddy is dead simple. Just define the root directory, present our PHP-FPM socket to Caddy and finally tell Caddy to serve static files when possible.&lt;/p&gt;

&lt;p&gt;But wait... What about HTTPS? Where do I define port 443? How do I configure my &lt;em&gt;Let’s Encrypt&lt;/em&gt; SSL certificates? Well... &lt;strong&gt;SURPRISE!!!&lt;/strong&gt; Caddy automatically handles SSL certificates for you! 😍. No need to define port 443, no need to have a folder with certificates, all is handled automatically by Caddy and it’s internal Let’s Encrypt integration 🥳.&lt;/p&gt;

&lt;p&gt;Up to this point, everything should be OK for you, you can start copy-pasting this template for all your websites! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's make this easier...
&lt;/h2&gt;

&lt;p&gt;Okay, hold on a sec... Didn't I say that it is a burden to manage multiple configuration files? Yeah, I did... But we can actually abstract this template into a &lt;a href="https://caddyserver.com/docs/caddyfile/concepts#snippets"&gt;Caddy Snippet&lt;/a&gt; which can help us to re-use this template without copy-pasting anything!&lt;/p&gt;

&lt;p&gt;Supposing that you're interested enough, I hope you already took a look at the link above, if not, go check it out!&lt;/p&gt;

&lt;p&gt;Now, back to our snippet... In my setup, I have a &lt;code&gt;/etc/caddy/snippets/&lt;/code&gt; directory where I place all my snippets, so I can easily import them beforehand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Caddyfile
import snippets/*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it, all available snippets in the directory will be available for us,&lt;br&gt;
now, we can create our &lt;code&gt;laravel-app&lt;/code&gt; snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# snippets/laravel-app
# {args.0} represents the root url of the app. Example: "jorgeglz.io".
# {args.1} represents the root path to the app. Example: "/var/www/my-site.com"

(laravel-app) {
    {args.0} {
        # Resolve the root directory for the app
        root * {args.1}/public

        # Provide Zstd and Gzip compression
        encode zstd gzip

        # Enable PHP-FPM
        php_fastcgi unix//run/php/php7.4-fpm.sock

        # Allow caddy to serve static files
        file_server
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cool! Now we can start referencing this snippet for all our Laravel apps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import snippets/*

# Use the "laravel-app" snippet for our site:
import laravel-app my-site.com /var/www/my-site.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And with this, we're good to go! ⚡&lt;/p&gt;

&lt;p&gt;Just beware that modifying the snippet will update the configuration for all your applications, so keep it as simple as you can 😉.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>caddy</category>
      <category>hosting</category>
    </item>
    <item>
      <title>Implementing Dark color scheme with TailwindCSS</title>
      <dc:creator>Jorge González</dc:creator>
      <pubDate>Tue, 21 Apr 2020 02:42:39 +0000</pubDate>
      <link>https://dev.to/iksaku/implementing-dark-color-scheme-with-tailwindcss-oja</link>
      <guid>https://dev.to/iksaku/implementing-dark-color-scheme-with-tailwindcss-oja</guid>
      <description>&lt;p&gt;Dark mode 🌑 has been a hot topic in the UX land for quite some time, and it recently blew up with its official implementation in major Operating Systems during the last few months.&lt;/p&gt;

&lt;p&gt;With this trends, many websites started to generate a Dark mode version of themselves, which may enabled manually by the user, automatically based on your device's preference, or both ways.&lt;/p&gt;

&lt;p&gt;Modern web browsers implemented this functionality recently with the introduction of the &lt;a href="https://caniuse.com/#feat=prefers-color-scheme"&gt;&lt;code&gt;prefers-color-scheme&lt;/code&gt; CSS Media Query&lt;/a&gt;. We can use this feature to dynamically adjust the look of our websites to match users preferred setting :hushed:.&lt;/p&gt;

&lt;p&gt;In this post I'll explain how to achieve &lt;em&gt;automatic adjustment&lt;/em&gt; based on the &lt;code&gt;prefers-color-scheme&lt;/code&gt; media query with &lt;a href="//tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt; ⭐. If you would like to implement a manual-based switch, this is not for you 😢.&lt;/p&gt;

&lt;h1&gt;
  
  
  TailwindCSS and its Utility-first Design
&lt;/h1&gt;

&lt;p&gt;TailwindCSS allows the developer to use &lt;em&gt;utility classes&lt;/em&gt; to define the look and feel of their websites, instead of needing to create complex CSS classes for your components ⚡. Also, it allows us to customize the configuration even further, by changing the default color palette, screen breakpoints, interactive variants, and way more! ✨&lt;/p&gt;

&lt;h1&gt;
  
  
  Implementing the &lt;code&gt;prefers-color-scheme&lt;/code&gt; Media Query
&lt;/h1&gt;

&lt;p&gt;We &lt;em&gt;don't&lt;/em&gt; need to re-write all class utilities offered by Tailwind in order for them to switch between Dark/Light modes 😬, instead, we can use media queries to define our new color scheme &lt;em&gt;the Tailwind way&lt;/em&gt; 🔥.&lt;/p&gt;

&lt;p&gt;All we need to do is extend the responsive configuration in our &lt;code&gt;tailwind.config.js&lt;/code&gt; file like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;screens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;(prefers-color-scheme: dark)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will add a &lt;code&gt;dark&lt;/code&gt; responsive utility that works like any size utilities like &lt;code&gt;sm&lt;/code&gt;, &lt;code&gt;md&lt;/code&gt;, etc. This new responsive utility will come in handy when defining (for example) which colors to use when a user's color preference is set to &lt;code&gt;dark&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A simple example will be to define a White background by default, and switch to a Darker one if possible. With our new responsive variant we could do something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- On your HTML code... --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white dark:bg-gray-900"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Your content here... --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it folks, we can start implementing our own Dark website! 🎉&lt;/p&gt;

&lt;h1&gt;
  
  
  What about &lt;code&gt;hover&lt;/code&gt; or &lt;code&gt;focus&lt;/code&gt;?
&lt;/h1&gt;

&lt;p&gt;This could be a tricky situation, for example, when you change the color of an element based on a &lt;code&gt;hover&lt;/code&gt; interaction. The most common solution I've seen is that many people end up implementing both a &lt;code&gt;dark-hover&lt;/code&gt; and &lt;code&gt;dark-focus&lt;/code&gt; variants.&lt;/p&gt;

&lt;p&gt;The good news is that it's not needed for most of the use cases 🧐.&lt;/p&gt;

&lt;p&gt;There's actually a (not so) secret &lt;a href="https://tailwindcss.com/docs/pseudo-class-variants#combining-with-responsive-prefixes"&gt;Tailwind feature&lt;/a&gt; that allows us to combine responsive prefixes with interaction variants!&lt;/p&gt;

&lt;p&gt;As seen in the official docs, we can use orange-based colors for a button on certain screen sizes, and green-based colors for the other screen sizes 😮:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-orange-500 hover:bg-orange-600 sm:bg-green-500 sm:hover:bg-green-600 md:bg-red-500 md:hover:bg-red-600 lg:bg-indigo-500 lg:hover:bg-indigo-600 xl:bg-pink-500 xl:hover:bg-pink-600 "&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Button
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look carefully... Theres a &lt;code&gt;sm:hover:bg-green-600&lt;/code&gt; class! So, if our &lt;code&gt;dark&lt;/code&gt; query truly is a &lt;em&gt;responsive&lt;/em&gt; prefix, then it means we could switch &lt;code&gt;sm&lt;/code&gt; for &lt;code&gt;dark&lt;/code&gt; and follow the same naming conventions... And the answer is &lt;em&gt;YES&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;If we want to use a &lt;code&gt;white&lt;/code&gt;-based colors for a button in our Light scheme, and &lt;code&gt;gray&lt;/code&gt;-based colors for the same button in our Dark scheme, we can write something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- ... --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will indicate that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When on Light scheme, our button will have a white background, and a subtle gray when hovered.&lt;/li&gt;
&lt;li&gt;When on Dark scheme, our button will have a darker background, and a slightly lighter color when hovered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this, we can start expanding our coloring schemes to give those Dark users the feeling they truly want and prevent &lt;em&gt;soaring eyes&lt;/em&gt; (DEV pun intended)!&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
      <category>webdev</category>
      <category>darkmode</category>
    </item>
    <item>
      <title>A pretty long story about myself and how I became a self-taught developer.</title>
      <dc:creator>Jorge González</dc:creator>
      <pubDate>Thu, 23 May 2019 12:45:02 +0000</pubDate>
      <link>https://dev.to/iksaku/a-pretty-long-story-about-myself-and-how-i-became-a-self-taught-developer-25ob</link>
      <guid>https://dev.to/iksaku/a-pretty-long-story-about-myself-and-how-i-became-a-self-taught-developer-25ob</guid>
      <description>&lt;p&gt;NOTE: I've been here at &lt;em&gt;dev.to&lt;/em&gt; some time already, but never actually introduced myself, so &lt;strong&gt;Hello World&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;I'm Jorge González, I'm (at the time of writing this) currently coursing a &lt;em&gt;Software Engineering&lt;/em&gt; degree in Mexico 🇲🇽.&lt;br&gt;
I love to code and play around with new technologies. Mostly, I've been in the Web development world, learning about the &lt;br&gt;
&lt;em&gt;Do's&lt;/em&gt; and &lt;em&gt;Don'ts&lt;/em&gt; for both the &lt;em&gt;Frontend&lt;/em&gt; development and the &lt;em&gt;Backend&lt;/em&gt; development. I consider my self a &lt;em&gt;Full-Stack&lt;br&gt;
capable developer&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;I'm not new to the internet, I've been around for quite some time, but this is technically my first formal presentation&lt;br&gt;
to the world, and done in a way that web archives can keep for history.&lt;/p&gt;

&lt;h2&gt;
  
  
  My story
&lt;/h2&gt;

&lt;p&gt;My first approach to technology was when I was around 4-5 years old. I can remember that my grandfather bought a digital&lt;br&gt;
camera, which was, by the time, only available in English. He taught me how to use it to take photos, and since he let&lt;br&gt;
me play with it almost every day, I discovered how to turn on the Sepia and B/W filters, and later on, how to record&lt;br&gt;
video footage. This was definitely the biggest turn point in my whole life.&lt;/p&gt;

&lt;p&gt;After 2 years, he also bought a Desktop Computer, and requested internet access from a pretty common Mexican ISP.&lt;br&gt;
With that new computer, he taught me to use Windows Paint, and I got to spend hours &lt;em&gt;trying&lt;/em&gt; to draw cars and houses,&lt;br&gt;
but as soon as I got bored, I started exploring the different options, menus and configurations that I could find in&lt;br&gt;
that program, without really knowing what anything was actually, since I was just starting to learn to read and write&lt;br&gt;
 in Spanish.&lt;/p&gt;

&lt;p&gt;Some time after mastering my circle painting skills, I discovered that the PC had more programs than paint that I could&lt;br&gt;
actually use without blowing up the whole system, being those the &lt;em&gt;File Explorer&lt;/em&gt; and the &lt;em&gt;Internet Explorer&lt;/em&gt;.&lt;br&gt;
Files are files, right? But... Internet? Wow, that was new to me... I could go in IE and it would open up Google&lt;br&gt;
automatically, and if I typed anything with the keyboard, it would go and search for it in a catalog of items...&lt;br&gt;
I remember that somebody once talked about &lt;em&gt;Encartas&lt;/em&gt; for local system dictionary searches, but Google was way more than&lt;br&gt;
that, I could literally type anything and it would result in some matches.&lt;/p&gt;

&lt;p&gt;And aunt of mine showed me how I could use Google to get some pretty basic search results in Spanish, so I was able to&lt;br&gt;
Google for Power Ranges, Racing and other random games, as well as to look for &lt;em&gt;news&lt;/em&gt;.&lt;br&gt;
The combination of the high neoplasticity of a young me, and the power of the internet allowed me to start accelerating&lt;br&gt;
my learning path, starting of by learning to read and write in English at the same time that I was learning to do so&lt;br&gt;
in Spanish, so I was able to develop my secondary language almost as fast as I was improving my mother language.&lt;/p&gt;

&lt;p&gt;Technological news got my attention, I started learning how to actually use the Internet, how to make Google searches,&lt;br&gt;
how to take advantage of Wikipedia to make my homework, and also, to use Youtube just to see those Super Saiyan 50&lt;br&gt;
Goku and Vegeta theories.&lt;/p&gt;

&lt;p&gt;Now, back to more relevant stuff...&lt;/p&gt;

&lt;p&gt;At the age of 10, I asked myself if it was possible for me to build a website like Google, or like Facebook, just so I &lt;br&gt;
could have miscellaneous stuff in there for other people to watch. So I came across with Jimdo and Wordpress, and they&lt;br&gt;
where really great, but wasn't satisfied with the customization options that they offered me by the time, so I started&lt;br&gt;
googling for tutorials that guided you to make your own Website.&lt;/p&gt;

&lt;p&gt;Some years later, I got involved in the PHP world, all because I wanted to write Minecraft: Pocket Edition (Now known as&lt;br&gt;
Bedrock Edition) plugins, and the only software available at the time was&lt;br&gt;
&lt;a href="https://github.com/PocketMine/PocketMine-MP"&gt;PocketMine-MP&lt;/a&gt;. I learnt to use Object Oriented programming and started&lt;br&gt;
developing my very first coding project (which by the way, was Open Source):&lt;br&gt;
&lt;a href="https://github.com/LegendOfMCPE/EssentialsPE"&gt;EssentialsPE&lt;/a&gt;. This was an ambitious project, since I was porting&lt;br&gt;
some of the features from a Java plugin to PHP, and also, I started learning about code optimization and peer-working,&lt;br&gt;
and thanks to Github, I was able to get involved with some other cool developers, and we created the&lt;br&gt;
&lt;a href="https://github.com/LegendOfMCPE"&gt;LegendsOfMCPE&lt;/a&gt; (aka LoMCPE) organization, which aimed to develop plugins for PocketMine-MP.&lt;/p&gt;

&lt;p&gt;Actually most of the plugin ideas we had, were not able to see the light of a stable release, but the ones that did,&lt;br&gt;
gained quite some popularity in the community. We were able to grow a lot and learn one from another. That was the first&lt;br&gt;
time I experienced the phenomena called &lt;em&gt;globalization&lt;/em&gt; by myself.&lt;/p&gt;

&lt;p&gt;Time passed, most of those &lt;em&gt;Legends&lt;/em&gt; that developed plugins started looking to other life projects, and most of us, started&lt;br&gt;
looking toward further developing our path in the coding world.&lt;/p&gt;

&lt;p&gt;If you remember, at the beginning of this post, I was talking about being a &lt;em&gt;capable Full-stack developer&lt;/em&gt;, well, my&lt;br&gt;
very first introduction to the &lt;em&gt;Backend&lt;/em&gt; land was indeed while programming plugins with the &lt;em&gt;LoMCPE&lt;/em&gt; organization,&lt;br&gt;
but I also got some a lot of experience since I got a job years later as a Junior Dev at a &lt;em&gt;Multiplayer Games&lt;br&gt;
Company&lt;/em&gt;. That's where I got lots of knowledge on project architecture, API optimization and kind of what is called &lt;br&gt;
&lt;em&gt;Microservices&lt;/em&gt; for high availability of our services.&lt;/p&gt;

&lt;p&gt;My introduction to the &lt;em&gt;Frontend&lt;/em&gt; land was indeed with that company, I was one of the only employees that really liked to&lt;br&gt;
work with PHP, since I worked with it before in some projects, so I was asked to cover the Website developer while he was&lt;br&gt;
away for a week. I remember contacting that developer a week before he went busy, asking him to help me getting familiar&lt;br&gt;
with the structure of the Website. To my surprise, he was actually using a pretty solid PHP Framework, I was expecting&lt;br&gt;
&lt;em&gt;pure-php&lt;/em&gt; code, like many tutorials explain for people that just started programming.&lt;/p&gt;

&lt;p&gt;Everything went fine, I was able to know how to modify the Website without breaking everything up, deploy it and also create&lt;br&gt;
modules for connecting with our game servers and show an (almost) live count of players currently playing in each of the&lt;br&gt;
games we offered.&lt;/p&gt;

&lt;p&gt;I left that company a year later, but full of new knowledge.&lt;/p&gt;

&lt;p&gt;Nowadays, I'm further developing my coding skills by maintaining some personal side projects, and working independently &lt;br&gt;
for a Nutritional Center, developing their whole system.&lt;/p&gt;

&lt;p&gt;So, this is currently me, but we're just getting started.&lt;/p&gt;

</description>
      <category>firstpost</category>
      <category>whoami</category>
    </item>
  </channel>
</rss>
