(Для пользователей, которые хотят только нужное без графического входа)
apt update && apt install -y xfce4 xfce4-goodies
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession
cat > geo-check.sh << 'EOF' | |
#!/bin/bash | |
IP=$(curl -s ifconfig.me) | |
echo "🔍 Проверка IP: $IP" | |
echo "====== WHOIS ======" | |
whois $IP | grep -iE 'country|origin|mnt|descr|netname' | |
echo "" | |
echo "====== ipinfo.io ======" |
Это руководство поможет вам настроить VNC-сервер на Ubuntu 22.04 для удалённого доступа к графическому интерфейсу.
git init # Инициализировать репозиторий | |
git add . # Добавить все файлы | |
git commit -m "initial commit" # Создать первый коммит | |
git branch -M main # Создать (или переименовать) главную ветку | |
git remote add origin https://github.com/ТВОЙ_ЮЗЕРНЕЙМ/ИМЯ_РЕПОЗИТОРИЯ.git # Добавить удалённый репозиторий | |
git pull origin main --rebase # сохранить и объединить их с твоими | |
git push -u origin main # Залить на GitHub | |
# ~/.conkyrc | |
# Включаем создание отдельного окна для Conky | |
own_window yes | |
# Указываем, что окно будет обычным (с рамкой и кнопками) | |
own_window_type normal | |
# Отключаем прозрачность окна | |
own_window_transparent no |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
def click_element(driver, by, value, timeout=10): | |
"""Ожидание элемента и нажатие на него.""" | |
try: | |
element = WebDriverWait(driver, timeout).until( | |
EC.element_to_be_clickable((by, value)) | |
) |
import pywifi | |
from pywifi import const, Profile | |
import time | |
def get_wifi_connections(): | |
wifi = pywifi.PyWiFi() | |
interfaces = wifi.interfaces() | |
print("Состояние подключения Wi-Fi адаптеров:") |
import time | |
def progress_bar(progress, total, bar_length=40): | |
filled_length = int(bar_length * progress // total) | |
bar = '█' * filled_length + '-' * (bar_length - filled_length) | |
percentage = progress / total * 100 | |
print(f'\rProgress: [{bar}] {percentage:.2f}%', end='', flush=True) | |
def simulate_process(total_time): | |
for t in range(total_time + 1): |
import time | |
def progress_bar(progress, total, bar_length=40): | |
filled_length = int(bar_length * progress // total) | |
bar = '█' * filled_length + '-' * (bar_length - filled_length) | |
percentage = progress / total * 100 | |
print(f'Progress: [{bar}] {percentage:.2f}%') | |
def simulate_process(total_time): | |
for t in range(total_time + 1): |