From 26e404e441334c6ce787138e9d32ca54f259a022 Mon Sep 17 00:00:00 2001 From: vlnko Date: Sat, 3 Jan 2026 15:47:32 +0300 Subject: [PATCH] check ip update --- README.md | 17 +++++++++++------ check-ip.sh | 8 ++++---- macos-first-install.sh | 13 ++----------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3b02a7d..16167fd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,14 @@ # scripts -### Bash scripts for setting things up +### Scripts for setting things up -- `nvim-install.sh` installs nvim and creates my config file for it -- `alacritty-install.sh` installs alacritty, creates my config file and installs catpuccin frappe theme -- `check-ip.sh` checks the public IP address linked to the domain name -- `svg-parse.py` parses the svg russia map and outputs titles of the regions and their ids -- `macos-first-install.sh` installs basic soft i need on clean machine +#### Bash + +- `nvim-install.sh` Installs neovim and creates config +- `alacritty-install.sh` Installs alacritty, creates config and installs catpuccin frappe theme +- `check-ip.sh` Checks if the public IP address linked to the domain name +- `macos-first-install.sh` Installs basic soft I need on a clean machine + +#### Python + +- `svg-parse.py` parses the svg russia map and outputs titles of the regions and their ids \ No newline at end of file diff --git a/check-ip.sh b/check-ip.sh index eca16d4..5c8f7ea 100755 --- a/check-ip.sh +++ b/check-ip.sh @@ -1,12 +1,12 @@ #!/bin/bash -URL="gitea.vlnko.com" -IPADDR="31.210.220.6" +read -p "URL для проверки: " url +read -p "IP для проверки: " ipaddr while true; do timestamp=$(date +"%H:%M:%S") - result=$(nslookup $URL | grep $IPADDR) + result=$(nslookup $url | grep $ipaddr) if [ -n "$result" ]; then echo "✔️ Запись обновилась." @@ -14,6 +14,6 @@ while true; do exit 0 fi - printf "\r🔃Проверил $IPADDR в $timestamp: Запись еще не обновилась." + printf "\r🔃Проверил $ipaddr в $timestamp: Запись еще не обновилась." sleep 60 done diff --git a/macos-first-install.sh b/macos-first-install.sh index 4c75558..1b94620 100644 --- a/macos-first-install.sh +++ b/macos-first-install.sh @@ -1,24 +1,20 @@ #!/bin/bash - # Installing homebrew - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo "✅ Homebrew installed" - # Installing z - brew install z echo "✅ Z installed" - # Installing ohmyzsh - sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +# Installing zsh-autosuggestions plugin git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +# Writing .zshrc file cat < ~/.zshrc # Basics export ZSH="$HOME/.oh-my-zsh" @@ -33,13 +29,9 @@ alias dea=". env/bin/activate" EOF echo "✅ Ohmyzsh installed, .zshrc created, zsh-autosuggestions installed" - # Installing neovim and config - brew install neovim - mkdir -p ~/.config/nvim - cat < ~/.config/nvim/init.lua vim.cmd("set expandtab") vim.cmd("set tabstop=2") @@ -53,7 +45,6 @@ echo "✅ Neovim installed, config written (~/.config/nvim/init.lua)" # Installing obsidian, figma, firefox - brew install --cask obsidian echo "✅ Obsidian installed" brew install --cask figma