Иногда бывает ситуация когда 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
Eggshells add calcium carbonate to soil, helping fast-growing plants like tomatoes and peppers grow strong and reducing soil acidity. To use, dry and grind eggshells into powder, then sprinkle around plants.
Their sharp edges might keep pests like slugs and snails away, but this is not proven.
🥚🌿🐌
[Read more]
@googlefactss
#Gardening#Eggshells#Calcium#PlantCare#PestControl
Plants make ultrasonic sounds when stressed. This happens if their stems are cut or they do not get enough water. Humans cannot hear these sounds without special microphones. Scientists have recorded them and found stressed plants make more pops and clicks than healthy ones.
The noises come from tiny air bubbles forming and collapsing inside plant tissues. Aka cavitation. It is a physical reaction, not a sign of pain like animals feel.
Some animals, like mice, bats, or insects, can hear these sounds. Machines and AI can too. By “listening” to plants, AI or bots with specialized sensors can tell when a plant is stressed or needs water. Farmers could use this to care for crops earlier, before signs appear.
🌱🔊🤖
[Read more]
[Read more]
@googlefactss
#PlantScience#Ultrasound#NatureFacts#Plants#AI#PlantCare#SmartFarming#Environment#DIY