<?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: Simon Halimonov</title>
    <description>The latest articles on Forem by Simon Halimonov (@simulieren).</description>
    <link>https://forem.com/simulieren</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%2F382549%2Fa43f3acf-0766-4325-8652-354b9b0dbeda.png</url>
      <title>Forem: Simon Halimonov</title>
      <link>https://forem.com/simulieren</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/simulieren"/>
    <language>en</language>
    <item>
      <title>💡 TIL: Listen for a right click with "contextmenu"</title>
      <dc:creator>Simon Halimonov</dc:creator>
      <pubDate>Thu, 27 Aug 2020 03:44:31 +0000</pubDate>
      <link>https://forem.com/simulieren/til-listen-for-a-right-click-with-contextmenu-1nbi</link>
      <guid>https://forem.com/simulieren/til-listen-for-a-right-click-with-contextmenu-1nbi</guid>
      <description>&lt;p&gt;TIL: If you want to listen for a right click in JavaScript you can use the &lt;code&gt;contextmenu&lt;/code&gt; event.&lt;/p&gt;

&lt;p&gt;Example with &lt;code&gt;.addEventListener&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;btn.addEventListener(`contextmenu`, ()=&amp;gt;{})
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In React with JSX:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Button onContextMenu={()=&amp;gt;{}}/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I always used to check some key code or another event property ... 🤣&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>typescript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to set up a free WordPress CMS on Google Cloud Platform</title>
      <dc:creator>Simon Halimonov</dc:creator>
      <pubDate>Sat, 09 May 2020 14:02:30 +0000</pubDate>
      <link>https://forem.com/simulieren/how-to-set-up-a-free-wordpress-cms-on-google-cloud-platform-17ao</link>
      <guid>https://forem.com/simulieren/how-to-set-up-a-free-wordpress-cms-on-google-cloud-platform-17ao</guid>
      <description>&lt;p&gt;The price of hosting a WordPress site can vary a lot. A lot of hosting platforms charge about 10+ USD for a basic WordPress installation on a shared server.&lt;/p&gt;

&lt;p&gt;But there's a cheaper solution. It's even &lt;strong&gt;free&lt;/strong&gt;, if you don't have too much traffic and want to use it for a personal site or your side project.&lt;/p&gt;

&lt;p&gt;The trick is to use a cloud provider. Like Google Cloud Platform (GCP) or Amazon Web Services (AWS). The web interface of these Cloud Provider may seem overwhelming, but I will show you a simple and secure way to set it up.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: This guide is best suited for hobbyist/professional programmers. This may get more complicated in the long run. So if you are not a technical person, I suggest you should stick to a more expensive and convenient hosting provider.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Cloud Platform
&lt;/h2&gt;

&lt;p&gt;When you visit the Google Cloud Platform for the first time, you will see this screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vDgJ6iyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/1645f23836a57cf4387505024efcdb0a/447c0/image-14.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vDgJ6iyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/1645f23836a57cf4387505024efcdb0a/447c0/image-14.webp" alt="First Screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose your country and agree to continue at this point. Then continue to the marketplace by using the sidebar on the left.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Meah0Kv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/8eb050ed21d9ef86234d2a40da2a8f42/447c0/image-16.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Meah0Kv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/8eb050ed21d9ef86234d2a40da2a8f42/447c0/image-16.webp" alt="GCP Marketplace"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Type in WordPress and you will get about 40 results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S4cw4zQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/9d68e0258eb80b6f69df19a6d316f772/447c0/image-18.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S4cw4zQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/9d68e0258eb80b6f69df19a6d316f772/447c0/image-18.webp" alt="GCP Marketplace Results for WordPress"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are all different Virtual Machine (VM) configurations. They are preconfigured to serve all kinds of different use cases. Big international WordPress websites that use extremely powerful VM networks. Enterprise websites with high security. Or extremely efficient ones that you can use for free.&lt;/p&gt;

&lt;p&gt;To simplify this process, we will use the standard one provided by Google.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jglWFh5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/66d18ac305641782bb43746403178903/e2264/image-19.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jglWFh5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/66d18ac305641782bb43746403178903/e2264/image-19.webp" alt="Basic 1-Click WordPress installation from Google"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the details page you will see a cost estimate.&lt;br&gt;
Estimated costs: $13.61/month. 💵&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HdPQkDQA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/fa50bc46b0971569b981fc8ab4b8b391/447c0/image-20.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HdPQkDQA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/fa50bc46b0971569b981fc8ab4b8b391/447c0/image-20.webp" alt="Details page for Google 1-click WordPress installation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But wait. Didn’t I say it was free? 🤔&lt;br&gt;
Yes! The estimated costs are for a g1-small virtual machine instance. This instance has 1 shared vCPU + 1.7 GB memory.&lt;/p&gt;

&lt;p&gt;Well, there is a smaller one. The f1-micro is the lowest VM instance you can get and it is included in the free tier of GCP. So it’s completely free.&lt;/p&gt;

&lt;p&gt;Hit the big blue launch button and it will ask you for your details. Enter those details and continue.&lt;/p&gt;

&lt;p&gt;Almost done. There are 5 steps on this page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ODDF3umK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/2bf68e71b14214008d3d8c4f1bfadac7/447c0/image-21.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ODDF3umK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/2bf68e71b14214008d3d8c4f1bfadac7/447c0/image-21.webp" alt="Deployment settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select a zone in the US (Do not use us-east4)&lt;/li&gt;
&lt;li&gt;Select a micro machine&lt;/li&gt;
&lt;li&gt;Enter an E-Mail address&lt;/li&gt;
&lt;li&gt;Scroll to the bottom and hit deploy.&lt;/li&gt;
&lt;li&gt;Wait for the deployment to finish&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the deployment of the VM has finished, you will see all the details for your own server and WordPress Installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qHb5RF4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/e75ab04091638fb1e0fba25d2fc1d85a/447c0/image-22.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qHb5RF4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://simonhalimonov.com/static/e75ab04091638fb1e0fba25d2fc1d85a/447c0/image-22.webp" alt="Deployment status and results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the automatically generated passwords you can log in into your WordPress installation and do whatever you want with it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Setting up your own WordPress VM on a cloud provider is not as hard as you might think. And it’s free. There is almost no reason to not do it.&lt;/p&gt;

&lt;p&gt;I personally use it for a free headless &lt;a href="https://simonhalimonov.com/"&gt;WordPress CMS with GatsbyJS for my personal site&lt;/a&gt;. The static files are hosted on &lt;a href="https://vercel.com/"&gt;Vercel.com&lt;/a&gt; for free. Doing this gives me a blazing fast website with unlimited traffic, because the WordPress installation never gets direct traffic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Next steps
&lt;/h3&gt;

&lt;p&gt;Here are a couple things you can do to get comfortable with GCP&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up an automatic snapshot backup, so you don’t have to worry about loosing anything.

&lt;ol&gt;
&lt;li&gt;Set it to every day and delete after 3 days.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;Create another instance

&lt;ol&gt;
&lt;li&gt;Try the openlite-speed VM for WordPress&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;Connect via SSH

&lt;ol&gt;
&lt;li&gt;Generate a key&lt;/li&gt;
&lt;li&gt;Upload it under Compute Engine &amp;gt; Metadata&lt;/li&gt;
&lt;li&gt;Use ssh @ to connect&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>wordpress</category>
      <category>showdev</category>
      <category>headless</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
