Иногда бывает ситуация когда 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
@redfoxuz / #rebranding#restyling
Facebook o'zini aydentikasini yangiladi
Xabaringizbo'lsa 3-4 kun oldin facebook logosi yangilangani haqida xabarlar bo'lganedi, endi esa aydentikasi ham yangilandi
Batafsil: https://design.facebook.com/stories/redefining-facebooks-brand-identity/
@redfoxuz / #rebranding#restyling
Instagram o'z brendini restayling qildi!
Yangi shrift, gradient rangi yanada yorqinlashgan. Yangi shriftdan tashqari "wordmark" va dastur ikonkasi yangilangan
Batafsil: https://about.instagram.com/brand
Restayling haqida qanday fikrdasiz?
📰 New Mercedes-Benz G-Class has received a retroversion
A total of 460 of these SUVs will be produced.
💪 The Mercedes G-Class 2025 lineup features an exclusive Stronger than the 1980s version inspired by the early Gelendwagen models.
🔎 The exterior differs due to black bumpers, underbody protection, orange turn signals, wheel rims and roof rack. The body colors are borrowed from the models of the 80s. The interior combines expensive Nappa leather and checkered fabric, and on the front panel there is a plate with the serial number and the inscription Stronger than the 1980s.
🐎 The models are offered with 3.0-liter turbo engines: G500 – 449 hp, G450 d – 367 hp.
💰 The price starts from $203,000.
@CarsNews
#Mercedes#restyling
🚘 has unveiled a Phantom Goldfinger car with a hidden gold bar in the cabin
🎂 The sedan was created for the 60th anniversary of Goldfinger – a film about James Bond. In the film, a millionaire criminal smuggles gold. He smelts gold and makes it into parts for his Rolls-Royce Phantom.
🔎 The modern Phantom received a golden-black body paint, repeating the colour scheme of the car from the film, and many other references to the film. For example, the signature nose piece ‘Spirit of Ecstasy’ looks as if it was made of pure gold, which for disguise was covered with silver, partially erased. In fact, the opposite is true: the mascot was made of silver and plated with an uneven coating of 18-carat gold.
@CarsNews
#RollsRoyce#Bespoke#restyling