Иногда бывает ситуация когда 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
@NewStickerOptimizerBot
Qué puede hacer este bot?
Simplemente envíeme una imagen o pegatina, y la convertiré en un archivo png y la optimizaré para que su tamaño sea más pequeño o igual a 350Kb, para que pueda agregarlo a un paquete de pegatinas usando el bot @stickers.
Idioma: Inglés
(visto en @BotsGram_cu)
#sticker, #png, #image, #picture, #optimize, #pack, #create, #tool, #convert
#shell#analyzer#appcleaner#clean#cleaner#cleaner_cli#cleaner_script#command_line#daisydisk#istat#mac#macos#optimize#sensei#shell#uninstall
Mole is a free, open-source terminal tool that deeply cleans and optimizes your Mac by removing caches, logs, browser junk, and app leftovers—freeing up gigabytes like 95GB in one go. It smartly uninstalls apps with all hidden files, analyzes disk space visually, monitors CPU/memory live, and rebuilds caches for better speed. Install easily via curl or Homebrew, preview changes safely, and use Touch ID. This saves you money on paid cleaners, reclaims storage fast, boosts performance, and diagnoses issues simply from your terminal.
https://github.com/tw93/Mole
#powershell#automated#bloatware#bloatware_removal#cleanup#debloat#debloater#interactive#optimize#powershell#powershell_script#privacy#ps1#registry_tweaks#tweaks#windows#windows_10#windows_11#windows_11_debloat#windows10#windows11
Win11Debloat is a free PowerShell script that quickly removes pre-installed Windows bloatware like TikTok, Xbox Game Bar, and Copilot while disabling ads, telemetry, and intrusive features. It simplifies tasks like restoring the classic right-click menu, hiding duplicate drives in File Explorer, and removing taskbar clutter, saving you from manually adjusting settings. The script is safe, reversible, and improves your experience by eliminating unnecessary background processes and distractions, making Windows cleaner and more focused.
https://github.com/Raphire/Win11Debloat