Posts in category “Tips”

Default ASP.NET Core port changed from 80 to 8080 in .NET8 => API project deployment / health check failure

This change has wasted my DevOps Colleague a lot of time. I hope this information could help more people.

How to change package name in flutter? (it is not easy!)

IMHO, using a tool should be the solution.

How to: move the cursor to the first non-whitespace (non-blank) character on the current line in Vim

  1. use:^ (shift + 6)

This moves the cursor to the first non-blank character of the current line.

  1. _ (underscore)

This also moves the cursor to the first non-blank character on the same line the cursor is on.

By the way, the 0 command moves to the absolute start of the line, including any leading whitespace.

Change Github TABSIZE to 4 and make code review easier

Have you ever seen weird indentations when doing code review? Mostly, the cause is that GitHub's default TABSIZE setting is 8 instead of 4 while some old code uses TAB for indentation. Fortunately, we can easily fix it by change this setting. 8 is not an ideal default TABSIZE nowadays, right? so it is all GitHub's fault!

Reference

Ubuntu on Macbook Pro: set the function keys to act like F1-F12 by default (disable Fn default behavior)

put the following line in your ~/.bashrc or ~/.zshrc if you are using zsh

echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode

What? your sudo command asks your password? then

sudo visudo
#add this line
your-user-name  ALL=(ALL:ALL) NOPASSWD:ALL

Don't you want to set this NOPASSWD option for security reasons? then put the following line into /etc/rc.local instead. It should work.

echo 2 > /sys/module/hid_apple/parameters/fnmode

Reference