This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #ДЗ Нетологии - Калькулятор. Максим Максимов | |
| echo "Простой калькулятор на Bash" | |
| PS3="Выберите операцию [1-5]: " | |
| select opt in "+" "-" "*" "/" "выйти"; do | |
| case $opt in | |
| [-+*/] ) | |
| read -p "Введите первое число: " n1 | |
| read -p "Введите второе число: " n2 | |
| if ! [[ "$n1" =~ ^-?[0-9]+[.,]?[0-9]*$ ]] || ! [[ "$n2" =~ ^-?[0-9]+[.,]?[0-9]*$ ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set server=ZAGS-SERVER | |
| set share=ZAGS32 | |
| set disk=Z | |
| set check=%disk%:\zags32.exe | |
| rem Если сетевой диск смонтирован, то просто запускаем программу | |
| if exist %check% goto run | |
| :loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| userconf="$HOME/.anydesk/user.conf" | |
| # Указываем файл в "облаке", если его нет, он будет создан автоматически | |
| cloud="$HOME/MEGAsync/anydesk.txt" | |
| if ! [ -f "$userconf" ]; then | |
| echo -e "Ошибка: Файл $userconf не найден!\n\tСкорее всего не установлен AnyDesk" >&2 | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Основные переменные | |
| $proxyServer = "10.0.46.52:3128" | |
| # какие адреса не проксируем, через ; | |
| $bypassList = "192.168.*;10.*;localhost;127.*" | |
| $cert = "ca-root.crt" | |
| # каким пользователям не назначаем прокси | |
| $excludeList = "Public", "maximax;)" | |
| $wifiProfile = "wifi.xml" | |
| # Для совместимости со старыми версиями powershell, где нет этих переменных |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clear-Host | |
| #Указываем папку c webdriver.dll и драйвером нужного браузера | |
| $seleniumPath = 'C:\scripts\selenium' | |
| #Указываем браузер | |
| $browser = 'firefox' | |
| #Арес веб-интерфейса роутера | |
| $url = 'http://192.168.1.1' | |
| #Добавляем путь до webdrivera в переменные окружения пользователя | |
| if (($env:Path -split ';') -notcontains $seleniumPath) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $server = "localhost" #Адресс сервера (в моем случае локальный) | |
| $db = "Skif_Bp" #База данных | |
| $back_dir = "E:\backup" #Куда сохранять бэкапы | |
| $file_name = $db + "_" + (Get-Date -Format yyyy-MM-dd) + ".bak" #имя бэкапа вида BaseName_2018-12-31.bak | |
| $arch_type = "7z" #Тип архива | |
| $days = 14 #сколько дней хранить бекапы | |
| #Для бекапа сетевой базы нужно будет использовать логин и пароль для доступа к серверу | |
| #cм. справку к команде Backup-SqlDatabase | |
| Set-Location $back_dir |
NewerOlder