Skip to content

Instantly share code, notes, and snippets.

View jemsgit's full-sized avatar
🚀

Evgeniy J jemsgit

🚀
View GitHub Profile
// ==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==
/**
* 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> = {},
#!/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"
#!/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}'
}