<?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: Liam Stojanovic</title>
    <description>The latest articles on Forem by Liam Stojanovic (@stojanovicliam).</description>
    <link>https://forem.com/stojanovicliam</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%2F770193%2F81ff9376-669f-4ed6-8437-d9397381aea1.jpg</url>
      <title>Forem: Liam Stojanovic</title>
      <link>https://forem.com/stojanovicliam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stojanovicliam"/>
    <language>en</language>
    <item>
      <title>The Easier Way to Develop Web Applications</title>
      <dc:creator>Liam Stojanovic</dc:creator>
      <pubDate>Tue, 04 Jan 2022 16:46:48 +0000</pubDate>
      <link>https://forem.com/getpieces/the-easier-way-to-develop-web-applications-4ac3</link>
      <guid>https://forem.com/getpieces/the-easier-way-to-develop-web-applications-4ac3</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;It’s common to work with a virtual machine when developing and deploying web applications. Capturing changes made to a VM makes your deployment repeatable and easier to maintain.  &lt;a href="https://pieces.app/" rel="noopener noreferrer"&gt;Pieces&lt;/a&gt; enables you to easily save common snippets of information for future reference, like config files or SQL commands while building your project!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmctjnr8pnae75kwbd2h8.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmctjnr8pnae75kwbd2h8.png" alt="A turtle in the clouds"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;In the age of &lt;a href="https://pages.github.com/" rel="noopener noreferrer"&gt;GitHub pages&lt;/a&gt; and &lt;a href="https://replit.com/" rel="noopener noreferrer"&gt;Replit&lt;/a&gt;, it can be easy to overlook the work that goes into deploying, securing, and maintaining an internet-facing server.&lt;/p&gt;

&lt;p&gt;Cloud compute platforms are where developers go when they require a &lt;a href="https://www.atlassian.com/continuous-delivery/principles/cloud-computing" rel="noopener noreferrer"&gt;high degree of customizability, scalable resources, and efficient pricing&lt;/a&gt; for their web applications. Whether you wish to deploy a personal portfolio site or a SaaS product with 100,000 users, the cloud will help you accomplish that. There are different ways of leveraging cloud resources, &lt;a href="https://azure.microsoft.com/en-us/overview/what-is-a-virtual-machine/" rel="noopener noreferrer"&gt;virtual machines (VMs)&lt;/a&gt; being one of the most common methods.&lt;/p&gt;

&lt;p&gt;The challenge with VMs is that many pieces of information can get lost when you make changes. Getting into the habit of saving these edits allows you to be more productive; you'll know exactly what you did, and eventually be able to automate your deployments (be it through &lt;a href="https://www.shellscript.sh/" rel="noopener noreferrer"&gt;shell scripts&lt;/a&gt;, &lt;a href="https://www.docker.com/resources/what-container" rel="noopener noreferrer"&gt;containers&lt;/a&gt;, or &lt;a href="https://en.wikipedia.org/wiki/Configuration_management#Operating_system_configuration_management" rel="noopener noreferrer"&gt;configuration management tools&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pieces.app/" rel="noopener noreferrer"&gt;Pieces&lt;/a&gt; can help track changes to configuration files, secrets, commands and more in your projects. Let’s look at a specific scenario!&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario
&lt;/h2&gt;

&lt;p&gt;You and your friend are launching a podcast on Koalas. In your research, you've quickly realized that a website will be necessary for the podcast to gain traction.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faaop3wr80k5bpqgziwjy.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faaop3wr80k5bpqgziwjy.jpg" alt="A koala glancing thoughtfully at a laptop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You begin by googling podcast website hosting, but are displeased by the prices you see. "Fear not!", you proclaim to your friend. "I am a seasoned Linux user who knows enough cloud compute to be dangerous. If we spin up a VM, I could get &lt;a href="https://wordpress.org" rel="noopener noreferrer"&gt;Wordpress&lt;/a&gt; running today!"&lt;/p&gt;

&lt;p&gt;Your friend glances at you thoughtfully. "I have faith that you can do that," they begin. "But remember when you lost our database password? It’s really important you keep track of all the changes you make to the web server."&lt;/p&gt;

&lt;p&gt;You pause. You're used to moving fast and breaking things, not writing documentation. You experience vivid mental imagery of the file-folder hell you have for shell command snippets; randomly placed text files with no context.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x41ceppkca319rva35r.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x41ceppkca319rva35r.png" alt="Not to be confused with "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your friend interrupts to show you something on their laptop. "Here," they say, "I'll send you a link to an app you can use to capture the &lt;strong&gt;commands&lt;/strong&gt; you run, &lt;strong&gt;app secrets&lt;/strong&gt;, and &lt;strong&gt;config files&lt;/strong&gt;. It's called Pieces. All you gotta do is copy and paste things into it."&lt;/p&gt;

&lt;p&gt;"Oh!" You respond sarcastically. "Another clipboard app! Just what I need."&lt;/p&gt;

&lt;p&gt;"Well, not exactly..."&lt;/p&gt;

&lt;h2&gt;
  
  
  Web server configuration
&lt;/h2&gt;

&lt;p&gt;I begin my website by spinning up a virtual machine instance on my favorite cloud compute platform. I opt to perform the installation of Wordpress by hand, because vanilla Ubuntu server is free to use. Plus, I gain sick satisfaction from watching progress bars fill in my terminal.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw6zffnrx4208eqkna8vt.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw6zffnrx4208eqkna8vt.png" alt="Time well spent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  SSH
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Saving an SSH key to Pieces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My Ubuntu virtual machine needs a public key for SSH authentication.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F530e4k4cke80g52l6irh.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F530e4k4cke80g52l6irh.png" alt="SSH key import in Microsoft Azure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I create a new key pair by running the command&lt;br&gt;
&lt;code&gt;ssh-keygen -t rsa -b 4096&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I name my new keypair koalaCast.&lt;br&gt;
Followed by...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cat koalaCast.pub&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;... outputting the public key to the terminal.&lt;/p&gt;

&lt;p&gt;I then copy and paste that into Pieces for future reference. Losing this public key would effectively lock me out of my server, so it’s important I keep it on hand!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4s0ausqof0x8a2aztq8x.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4s0ausqof0x8a2aztq8x.png" alt="A public key, saved to Pieces"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Neat! We can easily reference this later if we need quick access to the koalaCast public key.&lt;/p&gt;

&lt;p&gt;For good measure, I also drop the shell snippet I leverage to connect to the virtual machine into Pieces.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb54xrcn0c8wirzm2lrun.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb54xrcn0c8wirzm2lrun.png" alt="A command to connect to the koalacast VM via SSH"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  App secrets
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Saving a MySQL database password to Pieces&lt;/strong&gt;&lt;br&gt;
Our MySQL database will act as storage for our Wordpress installation.&lt;/p&gt;

&lt;p&gt;Once MySQL is installed, I’ll run the built-in security script. This removes some insecure default settings that ship with MySQL, and allows me to specify the root password.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# mysql_secure_installation&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I mash a series of random numbers and letters.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;9sBzdRcw4D4Et7Y8US3w65c#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I then save that to Pieces for easy future access!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febdao9pzywlwa8w8o9qw.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febdao9pzywlwa8w8o9qw.png" alt="MySQL root password saved to the Pieces app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration files
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Saving file changes that aren’t captured in bash history&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When using Apache web server, website configuration details are written in virtual host syntax. It is unique to Apache, and important to retain when setting up a web server. The content of this file determines how your website will handle user traffic.&lt;/p&gt;

&lt;p&gt;I’ll create my website directory, and assign proper permissions...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# mkdir /var/www/koalacast.io&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# chown -R $USER:$USER /var/www/koalacast.io&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then, create a blank .conf file to which I’ll write virtual host instructions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vi /etc/apache2/sites-available/koalacast.io.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I devise the following configuration while reading the Apache documentation...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br&gt;
    ServerName koalacast.io&lt;br&gt;
    ServerAlias www.koalacast.io&lt;br&gt;
    ServerAdmin webmaster@localhost&lt;br&gt;
    DocumentRoot /var/www/koalacast.io&lt;br&gt;
    ErrorLog ${APACHE_LOG_DIR}/error.log&lt;br&gt;
    CustomLog ${APACHE_LOG_DIR}/access.log combined&lt;br&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;...and save to Pieces. If there are connection issues on port 80, I can quickly reference the rules I wrote for that virtual host.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v7niq7w2iqwfa1dyiak.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v7niq7w2iqwfa1dyiak.png" alt="My Apache virtual host file saved to Pieces"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also drop in a related link to the Apache documentation. This allows me to view that webpage from my virtual host snippet!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F514n5yr1w15qlym6mi06.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F514n5yr1w15qlym6mi06.png" alt="The related link for my Apache virtual host snippet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL commands
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Ensure you never lose a SQL command again&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The SQL commands I run are not logged to my bash history, but I still want to keep track of what changes I make to my database.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '9sBzdRcw4D4Et7Y8US3w65c#'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I use this command to change the root password. Most of the time, this command would be captured in ~/.mysql_history. However, if you log into mysql leveraging sudo...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo mysql -u root&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;... it may not be captured in a .mysql_history file. To be safe, I drop that command into Pieces before I run it!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftkapdpejewtgarukpj0s.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftkapdpejewtgarukpj0s.png" alt="The SQL command I used to change the root password in my database"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The outcome
&lt;/h2&gt;

&lt;p&gt;The koalacast website has been fully set up, and your Pieces app contains all the file changes and secrets you created during the installation process.&lt;/p&gt;

&lt;p&gt;You and your friend hop on a call so they can access the web server and its moving parts.&lt;/p&gt;

&lt;p&gt;“Hey, can you send me the public key for the SSH user koalacast?”&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdiee9iyf8jsclieib42n.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdiee9iyf8jsclieib42n.gif" alt="Searching for and copying my public key"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“You’ve got the database password, right?”&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwgum35bbcie5q1aircp.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwgum35bbcie5q1aircp.gif" alt="One database password coming right up!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Are there any other pieces you think I’ll need?”&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk34m5fxbtp9tna996la5.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk34m5fxbtp9tna996la5.gif" alt="Welcome to my ASCII zoo"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thank you for reading! If you enjoyed this article, &lt;a href="https://code.pieces.app/install" rel="noopener noreferrer"&gt;check out our app&lt;/a&gt;, &lt;a href="https://twitter.com/getpieces" rel="noopener noreferrer"&gt;follow us on Twitter&lt;/a&gt;, and &lt;a href="https://medium.com/getpieces" rel="noopener noreferrer"&gt;give our Medium publication a follow!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Don’t Touch That Mouse! Smart Developers Use Keyboard Shortcuts</title>
      <dc:creator>Liam Stojanovic</dc:creator>
      <pubDate>Mon, 13 Dec 2021 19:49:57 +0000</pubDate>
      <link>https://forem.com/getpieces/dont-touch-that-mouse-smart-developers-use-keyboard-shortcuts-3i9</link>
      <guid>https://forem.com/getpieces/dont-touch-that-mouse-smart-developers-use-keyboard-shortcuts-3i9</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Mouses are slow. Keyboards are fast. If you’re a developer, use keyboard shortcuts to drastically increase your productivity in web browsers, IDEs and code snippet tools like &lt;a href="https://pieces.app" rel="noopener noreferrer"&gt;Pieces&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&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%2Fp46k3tafxyw9s9l0fzx2.gif" 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%2Fp46k3tafxyw9s9l0fzx2.gif" alt="How it feels using keyboard shortcuts in the Pieces app" width="498" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Case for Keyboard Shortcuts
&lt;/h2&gt;

&lt;p&gt;According to &lt;a href="https://www.brainscape.com/academy/keyboard-shortcuts-revive-economy/" rel="noopener noreferrer"&gt;Brainscape…&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If your job requires you to be working on a computer throughout each standard 8-hour workday, then using keyboard shortcuts can save you 8 entire workdays every year.&lt;/p&gt;
&lt;/blockquote&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%2Fc2i5s7r8bp7s98freppw.jpeg" 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%2Fc2i5s7r8bp7s98freppw.jpeg" alt="Image description" width="589" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A single keystroke may only shave you “0.4 seconds” but think about the hundreds of times you reach for your mouse daily. We’re talking hours per week, days per month, weeks per year.&lt;/p&gt;

&lt;p&gt;More importantly, &lt;strong&gt;keyboard shortcuts keep you in your flow and let you work at the speed of thought.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With some practice, you’ll be able to quickly perform key tasks and navigate menus in your browser, IDE and code snippet tools like &lt;a href="https://pieces.app" rel="noopener noreferrer"&gt;Pieces&lt;/a&gt; without ever touching that dreaded mouse.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Browser
&lt;/h2&gt;

&lt;p&gt;Let’s start with the good ol’ browser, where you’re probably doing a lot of your development research (and checking crypto prices, flicking through YouTubes and I don’t want to know what else).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vimium.github.io/" rel="noopener noreferrer"&gt;Vimium&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vimium — often referred to as the “hacker’s browser” — is a popular &lt;a href="https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb" rel="noopener noreferrer"&gt;Chrome extension&lt;/a&gt; (with a &lt;a href="https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/" rel="noopener noreferrer"&gt;port to Firefox&lt;/a&gt;) that allows you to navigate the web using just your keyboard! Shortcuts are based on the &lt;a href="https://www.vim.org/" rel="noopener noreferrer"&gt;Vim text editor.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some power shortcuts in the GIF below include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow a hyperlink in a new tab (&lt;strong&gt;F&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Scroll up and down (&lt;strong&gt;j&lt;/strong&gt;, &lt;strong&gt;k&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Switch between tabs (&lt;strong&gt;J&lt;/strong&gt;, &lt;strong&gt;K&lt;/strong&gt;)&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%2Fluduquhms3s4ersk0kbo.gif" 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%2Fluduquhms3s4ersk0kbo.gif" alt="Vimium features mouse-less scrolling and web page navigation" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Snippet Tools Like Pieces
&lt;/h2&gt;

&lt;p&gt;Code snippets are an incredibly helpful way to save time by not re-writing the same code or re-searching for solved solutions.&lt;/p&gt;

&lt;p&gt;But it’s always been a hassle to save and work with code snippets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://code.pieces.app" rel="noopener noreferrer"&gt;Pieces&lt;/a&gt; is a popular new tool that enables you to save code snippets in less than a second from your code editor or any web page in Chrome and Edge.&lt;/p&gt;

&lt;p&gt;And as you can guess, keyboard shortcuts are the heart of this beautifully intuitive app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Saving a Snippet from IntelliJ&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just highlight your snippet and click &lt;strong&gt;⌥&lt;/strong&gt; + &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;P&lt;/strong&gt; (Mac) or &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;Alt&lt;/strong&gt; + &lt;strong&gt;P&lt;/strong&gt; (Windows).&lt;/p&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%2Feupa8xubw84bq9t6qdp6.gif" 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%2Feupa8xubw84bq9t6qdp6.gif" alt="Saving snippets in IntelliJ with keyboard shortcuts" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Saving a Snippet from Chrome&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Pieces &lt;a href="https://chrome.google.com/webstore/detail/pieces/igbgibhbfonhmjlechmeefimncpekepm?hl=en" rel="noopener noreferrer"&gt;Chrome extension&lt;/a&gt; makes saving code from the internet a breeze.&lt;/p&gt;

&lt;p&gt;Highlight the desired code and hit &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;Shift&lt;/strong&gt; + &lt;strong&gt;P&lt;/strong&gt; (Mac) or &lt;strong&gt;Alt&lt;/strong&gt; + &lt;strong&gt;Shift&lt;/strong&gt; + &lt;strong&gt;P&lt;/strong&gt; twice (Windows).&lt;/p&gt;

&lt;p&gt;Even easier, while this isn’t technically a keyboard shortcut, Pieces pops up a “Save” button when it detects code on a webpage. A single click will save that snippet.&lt;/p&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%2F46mx2ukbg314gy58sfj5.gif" 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%2F46mx2ukbg314gy58sfj5.gif" alt="Saving to Pieces with Google Chrome" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finding and Re-Using Snippets in Pieces&lt;/strong&gt;&lt;br&gt;
To find a snippet in Pieces, just hit / and start searching.&lt;/p&gt;

&lt;p&gt;What’s even more helpful is that the Pieces &lt;a href="https://chrome.google.com/webstore/detail/pieces/igbgibhbfonhmjlechmeefimncpekepm?hl=en" rel="noopener noreferrer"&gt;Chrome extension&lt;/a&gt; automatically adds the source URL to the snippet as a Related Link. This is one of my favorite features and I no longer have endlessly cluttered Stack Overflow bookmarks with no context.&lt;/p&gt;

&lt;p&gt;You can view and manage your related links by hitting &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;K&lt;/strong&gt; (Mac) or &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;K&lt;/strong&gt; (Windows).&lt;/p&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%2Fhb6lajem112m18stc7ka.gif" 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%2Fhb6lajem112m18stc7ka.gif" alt="Related links in Pieces" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So Many Shortcuts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are loads of other great keyboard shortcuts throughout Pieces. Hover over almost any action and you’ll see a shortcut option.&lt;/p&gt;

&lt;p&gt;Some of my favorites include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rename your snippet: &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;R&lt;/strong&gt; / &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;R&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Edit the description: &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;N&lt;/strong&gt; / &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;N&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Reclassify the snippet language: &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;Y&lt;/strong&gt; / &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;Y&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Open the Quick Menu actions: &lt;strong&gt;⌘&lt;/strong&gt; + &lt;strong&gt;O&lt;/strong&gt; / &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;O&lt;/strong&gt;
&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%2Ft51y7iyibg7gqri5jh7k.gif" 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%2Ft51y7iyibg7gqri5jh7k.gif" alt="Quickly add a description. Descriptions are searchable, and can span multiple lines." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code Editors
&lt;/h2&gt;

&lt;p&gt;When it’s time to get down to coding, the mouse is your enemy. Let’s look at some critical shortcuts for two popular editors:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VSCode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; is one of the most popular free code editors, with &lt;a href="https://marketplace.visualstudio.com/vscode" rel="noopener noreferrer"&gt;extensions&lt;/a&gt; for all kinds of programming languages and projects.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Xa5EU-qAv-I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IntelliJ&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html" rel="noopener noreferrer"&gt;IntelliJ&lt;/a&gt; comes jammed with built-in shortcuts and has a &lt;a href="https://plugins.jetbrains.com/" rel="noopener noreferrer"&gt;robust library of plugins&lt;/a&gt; to boost your productivity.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QYO5_riePOQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Guake Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simple and easy way to use the terminal without leaving your current application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Guake/guake/blob/master/README.rst" rel="noopener noreferrer"&gt;Guake&lt;/a&gt; is triggered by a hotkey that drops down a terminal over your desktop, and retreats when that same hotkey is pressed again.&lt;/p&gt;

&lt;p&gt;Only available for Linux machines running &lt;a href="https://www.gnome.org/" rel="noopener noreferrer"&gt;Gnome&lt;/a&gt; as their desktop environments.&lt;/p&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%2Fnsyoj9thx69sm92h2jew.jpeg" 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%2Fnsyoj9thx69sm92h2jew.jpeg" alt="Guake terminal" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AceJump for IntelliJ&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/acejump/AceJump" rel="noopener noreferrer"&gt;AceJump&lt;/a&gt; enables single character search, select and jump inside IntelliJ.&lt;/p&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%2Fu8cj5mr9axgkbkjb4yur.gif" 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%2Fu8cj5mr9axgkbkjb4yur.gif" alt="Image description" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KeyCombiner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not to get too meta on you, but &lt;a href="https://keycombiner.com/" rel="noopener noreferrer"&gt;KeyCombiner&lt;/a&gt; is a cool app designed to help practice keyboard shortcuts. &lt;a href="https://keycombiner.com/collections/" rel="noopener noreferrer"&gt;Collections&lt;/a&gt; are available for many popular apps, including IDEs and web applications.&lt;/p&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%2Fs2pe13xejqhsfo57kh3z.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%2Fs2pe13xejqhsfo57kh3z.png" alt="Image description" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Keyboard shortcuts liberate you from the burden of mouse wiggles and right-clicks. Simple time-saving measures compound into &lt;strong&gt;days&lt;/strong&gt; of your life back! &lt;strong&gt;Take the red pill,&lt;/strong&gt; learn keyboard shortcuts, and relish in your regained time.&lt;/p&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%2Fb5h8vzjdbt74clnrnq41.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%2Fb5h8vzjdbt74clnrnq41.png" alt="I know Kung Fu" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading! If you enjoyed this article, &lt;a href="https://code.pieces.app/install" rel="noopener noreferrer"&gt;check out our app&lt;/a&gt;, &lt;a href="https://twitter.com/getpieces" rel="noopener noreferrer"&gt;follow us on Twitter&lt;/a&gt;, and &lt;a href="https://medium.com/getpieces" rel="noopener noreferrer"&gt;give our Medium publication a follow&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>startup</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
