Иногда бывает ситуация когда 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
#rstats#book
📕
Introducción a R: aprendiendo R sin morir en el intento.
Libro, en formato web y en español, ideal para aquellos interesados en iniciar el aprendizaje de #R a partir de los tipos de datos y la programación.
🌐ES
🔗Link
-----
Canal principal: @repo_science
Cupones: @freecoupons_reposcience
-----
#NYR2024#RStats
🖥
Excited to have Hadley Wickham, Chief Scientist at Posit, speaking at NY R Conference 2024! Dive into the evolution of data science and discover future trends with one of the pioneers in R programming.
rstats.ai/nyr.html
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#DataScience#rstats#DataScientist#dataanalysis#r#programming#dataviz#statistics
In an era driven by data, harnessing the power of statistics is key to deriving meaningful insights from the vast sea of information around us.
pyoflife.com/statistics-wit
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#ML#datascience#rstats#programming#dataviz#stats#analytics#machinelearning
6 formas de visualizar los resultados del análisis cluster jerárquico con R
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#programming#GPT4#GPT3#dataviz#stats#analytics#ML#AI#IA
🚀
Cómo programar más rápidamente en #RStats con #ChatGPT
Escribir código es un proceso lento, especialmente cuando estás aprendiendo #datascience por primera vez. ¿Y si pudieras acelerarlo?
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----