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
| // ==UserScript== | |
| // @name Extract Text from Astrocentr Pages | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Extract text content from multiple pages on Astrocentr website | |
| // @author Your Name | |
| // @match https://www.astrocentr.ru/index.php* | |
| // @grant none | |
| // ==/UserScript== |
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
| /** | |
| * Creates multipart body for files with additional headers | |
| * @param formData native FormData | |
| * @param headers object: key - field name, value - object with header: value pairs | |
| * @returns contentType and body | |
| */ | |
| function createMultipartBody( | |
| formData: FormData, | |
| headers: Record<string, AdditionalHeaders> = {}, |
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 | |
| # === Помощь === | |
| if [ $# -lt 2 ]; then | |
| echo "Использование: $0 <путь_к_скрипту> <расписание> [описание]" | |
| echo "Пример: $0 /usr/local/bin/sysreport.sh '0 9 * * *' 'Daily system report'" | |
| exit 1 | |
| fi | |
| SCRIPT_PATH="$1" |
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 | |
| # === Настройки === | |
| BOT_TOKEN="" | |
| CHAT_ID="" | |
| HOSTNAME=$(hostname) | |
| get_cpu_load() { | |
| top -bn2 | grep "Cpu(s)" | tail -n1 | awk -F',' '{print 100-$4}' | awk '{printf "%.1f\n", $1}' | |
| } |
OlderNewer