Skip to content

Tips

Handy tips always at your fingertips

A collection of 123 tips that come in real handy when you need them. Originally posted as tweets on my Twitter account, and now gathered here so you can browse them easily.

Quickly Get JavaScript Event Keycode

💡 I always find myself googling keycodes when I need to work with them in #JavaScript.

📚 I've now bookmarked https://www.toptal.com/developers/keycode by @wesbos to get my answer a little bit quicker. Because who has time to memorise arbitrary mappings. 🙅🏻‍♀️

Frontpage of keycode.info showing keycode and event name as you type a key. Read tip

How To Ask For Help

💡 As a newbie, it's hard to get the answer you're looking for from others.

You have a clear picture of the end result. Putting that into writing when you don't know how ask for help is tough. 🤔

@StackOverflow 's guide helps you to better help yourself.

https://stackoverflow.com/help/how-to-ask

Read tip

Easily Customise Your Shell Prompt

💡 Want to customise your terminal prompt?

👉🏼 https://ezprompt.net/ gives you an UI to pick the elements you want and it gives you the code to paste in your .bashrc file.

Terminal prompt with folder name followed by active branch and a yellow x indicating presence of uncommitted changes. Read tip

Github Profile README Chess Game

💡 Have you seen @Github's new feature that spices up your profile page?

Create a repository named after your username with a README file and go to your profile page. 👀

This chess game ♕ is a clever and ingenious use of this feature.

https://github.com/timburgan

Read tip

Full REST API Without Any Coding

💡 Working on a demo project and need a quick backend?

👉🏼 I highly recommend json-server by @typicode. Specify your data in a JSON file and get a full REST API with zero coding.

➡️ npx json-server db.json

https://github.com/typicode/json-server

Read tip

Print Your Environment

💡 Not sure how to ask for help? Help others help *you* by giving them the info they need.

👉🏼 envinfo by @trevorbrindlejs prints your local environment which you can then paste in your question/issue.

➡️ npx envinfo

https://github.com/tabrindle/envinfo

Simplistic green landscape as logo with the text: envinfo generates a report of the common details needed when troubleshooting software issues. Read tip

Enabling HTTPS During Development

💡 Are you struggling to get https working on localhost?

👉🏼 mkcert by @FiloSottile adds a custom CA and creates an SSL certificate in just two commands. 🧙🏻‍♂️

⚠️ Node.js users, don't forget to set NODE_EXTRA_CA_CERTS.

https://github.com/FiloSottile/mkcert

Read tip

Upload Files From Terminal

💡 https://transfer.sh/ is a neat tool that allows you to upload files directly from the terminal. Its benefits are:

- Files up to 10GB
- Available for 2 weeks
- Get a shareable link
- It's free

As always, be careful with sensitive files. 😉

Upload a hello.txt file by running: curl --upload-file ./hello.txt https://transfer.sh/hello.txt Read tip

HTTP Service Backend for Fast Prototyping

💡 Want to quickly develop on a frontend without having to setup your own backend?

👉🏼 https://httpbin.org/ by @ken_reitz is a mirror backend that returns what it gets. Useful as a mock backend for quick prototypes.

Read tip