Иногда бывает ситуация когда 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
An elephant’s trunk 🐘 is an amazing example of evolutionary development 🧬. It is a combined nose and upper lip that lengthened as the elephant’s ancestors became taller and their tusks grew bigger. With its heavy head, it needed an easy way to reach the ground.
@googlefactss#evolution
Автопортреты Joni Mitchell, которые стали обложками её релизов
• Clouds
• Ladies Of The Canyon
• Wild Things Run Fast
• Turbulent Indigo
• Taming The Tiger
• Both Sides Now
• Travelogue
• Dreamland
• The Reprise Albums (1968-1971)
Митчелл часто говорила, что она «художник, который выпускает песни».
Нельзя не заметить очевидную отсылку на другого художника, который за жизнь нарисовал с десяток автопортретов, — Винсента Ван Гога с отрезанным ухом на обложке «Turbulent Indigo».
#evolution
🌍 The island of New Caledonia is a biodiversity hotspot where ancient plants like the rare Amborella tree represent some of Earth’s oldest surviving flowering lineages, found nowhere else. ✨
#biodiversity⚡#islands⚡#evolution⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 The star-nosed mole detects prey in total darkness using its unique nose, covered in 22 finger-like tentacles packed with touch sensors. This extraordinary adaptation lets it identify and eat tiny insects and worms faster than any other mammal, even underwater. ✨
#animals⚡#adaptation⚡#evolution
👉subscribe Interesting Planet
🌎 The saiga antelope’s enlarged, drooping nose acts as a built-in air filter and cooler on the Central Asian steppes. When alarmed, herds can stampede at speeds up to 80 kilometers per hour. ✨
#animals⚡#evolution⚡#biodiversity
👉subscribe Interesting Planet
👉more Channels
🌎 The shoebill stork stands over 1.2 meters tall and has a massive, shoe-shaped bill up to 24 centimeters long. Native to East African swamps, this solitary bird hunts lungfish, frogs, and even baby crocodiles. ✨
#animals⚡#biodiversity⚡#evolution
👉subscribe Interesting Planet
👉more Channels
🌎 The platypus baffles scientists as it lays eggs like a reptile but produces milk and has fur like a mammal—a rare mix found in no other living animal. This odd, Australian creature even senses prey underwater using electroreceptors in its bill. ✨
#animals⚡#evolution⚡#Australia
👉subscribe Interesting Planet
🌎 Horseshoe crabs have remained virtually unchanged for about 450 million years. Despite their name, they are more closely related to spiders than to true crabs. Modern horseshoe crabs can be found along the Atlantic coast of North America and in Southeast Asia. ✨
#animals⚡#evolution⚡#fossils
👉subscribe Interesting Planet
👉more Channels
🌎 Living fossils like the chambered nautilus and horseshoe crab have changed little for hundreds of millions of years. The nautilus dates back over 500 million years, and its closest extinct relatives include ammonites, which died out with the dinosaurs. ✨
#evolution⚡#fossils⚡#animals
👉subscribe Interesting Planet
👉more Channels
🌎 Living fossils like the giant freshwater stingray and the Australian lungfish have remained almost unchanged for over 100 million years, surviving dramatic changes in Earth’s environment. The horseshoe crab’s body plan is so ancient, it first appeared 450 million years ago. ✨
#evolution⚡#fossils⚡#animals
👉subscribe Interesting Planet
👉more Channels
🌎 Some ancient animals have survived unchanged for millions of years. The coelacanth, once thought extinct, first appeared 400 million years ago and still swims deep ocean waters today. The horseshoe crab dates back over 450 million years, predating dinosaurs and even trees. ✨
#evolution⚡#fossils⚡#animals
👉subscribe Interesting Planet