Tmux Cheatsheet

I use linux terminal all day, and if you are like me, you should use tmux, which enables a number of terminals to be created, accessed, and controlled from a single screen, just to be more productive! So, there’re some essential commands for tmux down below. start a new session tmux # session name will be 0,1,2, ... by default tmux new -s <session name> # you can set a custom session name rename an existing session tmux rename-session -t <old name> <new name> detach current session C-b d

Automatic Https With Caddy - Extremely Easy

Today I had a chance to try Caddy for dev purpose, and you guess what, it was extremely easy and funny. Only two steps and boom, you got a secured website almost instantly. Here are the steps I followed: Install Caddy on Ubuntu/Debian Check their documentation for another OS/installation method. 1 2 3 4 5 sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.

How to Deploy Next.js App to AWS EC2 in Production and Set up CI/CD with Github Actions

Yo! In this article, we’ll be discussing how to deploy a Next.js app to AWS EC2 and set up continuous integration and deployment using Github Actions. Before proceeding, you will need to have the infrastructure ready on AWS, which can be deployed manually or by using Terraform code. I’ll be skipping the infrastructure setup part for the purpose of this article. First things first, we need to SSH into the EC2 instance.

How to Configure Vim as Your Go IDE

Vim/Neovim is my IDE for day-to-day work. My vimrc file can be found here. This article is all about Vim(not Neovim), and I assume that you have already configured Vim as your code editor. Okay, let’s get started by installing fatih/vim-go plugin with your favorite vim plugin manager. After that, if you have Go installed correctly on your machine already, you will be able to run :GoInstallBinaries. Next, install coc.nvim plugin, which is a great language server host for Vim.

How to Setup Eslint and Prettier With Git Precommit Hooks in React Typescript Project

You may create a new react app with typescript like so: 1 npx create-react-app my-app --template typescript Now let’s setup eslint and prettier. Remove eslintConfig from package.json. Install prettier using these commands: 1 2 3 yarn add --dev --exact prettier # these are for making eslint and prettier to play well together yarn add --dev eslint-config-prettier eslint-plugin-prettier Create config files like this: 1 touch .eslintrc.js .eslintignore .prettierrc.js .prettierignore Use same contents for both ignore files: