Иногда бывает ситуация когда 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
Here are some ways to keep your food safe from rodents⬇️
✅Store your food in tightly covered containers
✅Clean your environments regularly
✅Put rodent repellents around your food store
✅Seal all cracks, gaps, or holes in your homes to prevent entry of rodents
#STOPLassaFever
Rats and mice constantly urinate & defaecate, contaminating every surface they touch
Keep your homes & communities clean to prevent direct or indirect contact with rats
➡️Properly dispose of waste from your homes
➡️Do not defecate in open areas
➡️Sweep your floors regularly, removing crumbs or food remnants
#STOPLassaFever
Not all fevers are malaria!
Report early to a healthcare facility when experiencing #LassaFever-associated symptoms.
Early symptoms of #LassaFever include fever, body weakness, sore throat, muscle & chest pain, nausea, vomiting, diarrhoea, cough & abdominal pain.
#STOPLassaFever
Do NOT eat food or drink water contaminated with the urine, faeces, saliva, or blood of rats.
Food safety is key in the prevention of #LassaFever:
✅Store all foods properly in tightly closed containers
✅Ensure proper hygiene when preparing & eating food
#STOPLassaFever
Food safety is key in the prevention of infectious diseases like #LassaFever.
Maintain these safety measures :
✅Store all foods properly in tightly closed containers
✅Ensure proper hygiene in the preparation & consumption of food
#STOPLassaFever
Preventing #LassaFever starts with simple habits!
Remember: 20 seconds of regular handwashing with soap and water can save lives🧼
Let's keep our hands clean and our loved ones safe.
#STOPLassaFever#HandHygiene
🛑 Lassa Fever is highly infectious!
Your hands can carry more than you think — keep them clean to stay safe.
🧼 Wash regularly with soap under running water.
💪 Protect yourself. Protect others.
#LassaFever#HygieneIsKey#NCDCNigeria#StopLassaFever