Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
#phrases
💥Shallow matters
⚜The term "shallow matters" refers to topics, discussions, or concerns that lack depth, seriousness, or
significance. They are often superficial and do not engage with deeper issues or complexities.
⚜While many people were debating the impact of climate change, Sarah seemed more interested in the shallow matters of which celebrity was dating whom."
#Phrases
💢To cry out for
💠To be in desperate need of something
📝Note:- 📝
the subject is generally not a person, but an organisation, object or situation
🌀 Example:-
A:- This room is crying out for some colour and modern furnishing. I suggested subtle green wallpaper, but it didn’t register with Jenny. On second thoughts, maybe red?
B:- RED? You've definitely got a screw loose.
#Phrases
💢 A chink in one’s armour
💠One small weakness in a person or their argument which makes them open to attack or criticism
🌀 Example:-
Our lawyers have been sifting through the evidence but cannot find a chink in the defending company’s armour. It’s no wonder they are being very woolly on how they intend to present our case in court.
#phrases
⚜Prepositional phrase
🔅Until all hours
▪️(informal) Until very late; until the small hours.
▪️I used to stay up until all hours watching television.
#phrases
⚜Hear oneself think
◐To engage in mental activity without being distracted by noise.
◐Please turn down that music. I can hardly hear myself think.