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
| (() => { | |
| const NEEDLE = "Yes, and don't ask again for commands that start with"; | |
| const clickButton = () => { | |
| const buttons = [...document.querySelectorAll('button[role="radio"], button')]; | |
| const btn = buttons.find(b => { | |
| const label = b.getAttribute("aria-label") || ""; | |
| const text = b.innerText || ""; | |
| return ( |
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
| // make-extension.js — запустите через: node make-extension.js | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const zlib = require('zlib'); | |
| const EXT_DIR = 'auto-confirm-extension'; | |
| if (!fs.existsSync(EXT_DIR)) fs.mkdirSync(EXT_DIR); | |
| const files = { | |
| 'manifest.json': `{ |
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
| #!/usr/bin/env bash | |
| #put to /usr/local/bin/notify | |
| set -u | |
| SECRETS_FILE="$HOME/.config/secrets/notifier.env" | |
| STATE_DIR="$HOME/.local/state/notify" | |
| mkdir -p "$STATE_DIR" | |
| if [ -f "$SECRETS_FILE" ]; then | |
| set -a |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # инстукция https://habr.com/ru/articles/1020450/ | |
| CODEX_DIR="${CODEX_HOME:-$HOME/.codex}" | |
| AUTH_FILE="$CODEX_DIR/auth.json" | |
| OPENCODE_AUTH_FILE="${OPENCODE_AUTH_FILE:-$HOME/.local/share/opencode/auth.json}" | |
| PROFILES_DIR="${CODEX_AUTH_PROFILES_DIR:-$HOME/.codex-auth-profiles}" | |
| CURRENT_FILE="$PROFILES_DIR/.current_profile" | |
| PROXY_FILE="$PROFILES_DIR/.default_proxy" | |
| CACHE_TIME_FILE="$PROFILES_DIR/.cache_time" |
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
| # --- all: run command or script on local + many hosts (bash-only) ------------ | |
| all() { | |
| # ---- defaults / env ---- | |
| local parallel=${ALL_PARALLEL:-1} # 1=parallel remotes | |
| local run_local=${ALL_LOCAL:-1} # 1=run local too | |
| local local_parallel=${ALL_LOCAL_PARALLEL:-1} # 1=local concurrent with remotes | |
| local timeout=${ALL_TIMEOUT:-8} | |
| local pty=${ALL_PTY:-0} | |
| local sudo_n=${ALL_SUDO_N:-1} | |
| local prefix=${ALL_PREFIX:-1} # kept for backward compatibility |
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
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |
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 | |
| # Проверка прав root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Пожалуйста, запустите скрипт с правами root" | |
| exit 1 | |
| fi | |
| # Установка пакетов pptpd | |
| if ! command -v pptpd &> /dev/null; 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
| #!/bin/bash | |
| # Проверка прав root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Пожалуйста, запустите скрипт с правами root" | |
| exit 1 | |
| fi | |
| # Установка необходимых пакетов | |
| echo "Устанавливаем необходимые пакеты..." |
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 | |
| # Проверка прав root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Пожалуйста, запустите скрипт с правами root" | |
| exit 1 | |
| fi | |
| # Установка WireGuard, если не установлен | |
| if ! command -v wg &> /dev/null; 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
| #!/bin/bash | |
| # Check for root privileges | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "Warning: Some operations (like checking service status) require root privileges." | |
| echo "You are not running as root. Continuing without those operations." | |
| fi | |
| # Use the current directory as default if no argument is provided | |
| DIR=${1:-.} |
NewerOlder