Quick Tips

Handy bite-sized articles on all things web-design and development. They won’t take long to read, but these tips can take you a long way! More coming soon…
Leonardo Petrucci
February 21, 2021

Setting safe areas in React with CSS variables

Most apps and sites have elements or menus that overlap others and depending on the number of pages you have you might want to not set these safe areas manually. So here's a little trick to set safe areas with React. Consider this simple interface: Left - Interface without safe areas, Right - with safe areas It contains a scrollable list of cards as well as

Leonardo Petrucci
December 7, 2020

How to add emojis to git commits with this handy tool

Commit messages can easily look like a wall of text and, at a glance, can be hard to follow. Gitmoji, a style guide for adding emojis to your commit, makes this a problem of the past. Today we'll go through how to add emojis to git commits quickly and easily using this resource. If you've been maintaining a project on Github for a while, it's likely you've looked at your list of commits and been disappointed by how hard to find specific things were. And if yo

Leonardo Petrucci
October 1, 2020

How to: Deploy Node.js apps to Apache Ubuntu

Learning how to deploy Node.js apps on web-servers like Apache is surprisingly confusing. Here's how you can host your Node.js apps on a standard Apache server. The problem with Node.js and Apache If you've tried to run a Node.js app on a more standard web-server that uses Apache or Nginx, you may have noticed that the process of putting your app online isn't as simple as you thought. Starting the app is easy as you have access to your server's terminal, but soon you'll realise that your app is being shown on yo

Leonardo Petrucci
April 19, 2020

How to connect to a remote MySQL Database with SSH

MySQL databases are the backbone of the internet. But developing with them can be a pain if you can't afford to run them locally. This solution allows you to connect to your remote MySQL database without any extra setup. I recently had to expand my knowledge and build my own API, rather than using a freely available one. But the hardest part wasn't making the API itself. It was connecting with my Database. But why? A default MySQL installation is likely to block any connection requests happening fr

Leonardo Petrucci
April 10, 2020

How to: create an alert popup with jQuery

Alert popups are a great way to alert your visitors. Since I recently had to implement an alert popup with jQuery on an older site, I thought it could be interesting to share its code. I wanted my alert popup to achieve a couple of things: It should be highly reusable If dismissed by a user it should stay dismissed It should be easy to implement and expand The following example is made to work wi