<?php
require 'vendor/autoload.php';
use PhpOffice\PhpWord\PhpWord;
$phpWord = new PhpWord();
$section = $phpWord->addSection();
// 1. Сначала добавляем изображение как фон (первый слой)
$section->addImage(
__DIR__ . '/img/test.png',
[
'width' => 100, // Ширина изображения
'height' => 100, // Высота изображения
'wrappingStyle' => 'behind', // Ключевой параметр: изображение становится фоном
'positioning' => 'relative', // Относительное позиционирование
'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER,
'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP,
]
);
// 2. Затем добавляем текст (второй слой)
$section->addText(
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam error doloribus doloremque voluptate natus, numquam laudantium ducimus cupiditate, cumque nulla fugit consectetur ipsam nobis illum enim. Rerum, nulla. Laborum, tempora?',
[
'name' => 'Arial',
],
[
//'alignment' => 'center', // Выравнивание текста по центру
'spaceAfter' => 0,
]
);
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save('layered.docx');
echo "Текст наложен на изображение.";
def get_db_path():
if getattr(sys, 'frozen', False):
# Если запущен из .exe, использовать путь рядом с исполняемым файлом
return os.path.join(os.path.dirname(sys.executable), 'database.db')
else:
# При обычном запуске — рядом с .py файлом
return os.path.join(os.path.dirname(__file__), 'database.db')
pyinstaller --onefile --windowed app.py
pyinstaller --onefile --add-data "database.db;." --windowed app.py
// Остановка моторов при запуске
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
analogWrite(ENA, 0);
analogWrite(ENB, 0);
void loop() {
if (radio.available()) {
int joystickData[2] = {0};
radio.read(&joystickData, sizeof(joystickData));
controlMotors(joystickData[0], joystickData[1]);
} else {
controlMotors(512, 512); // Нейтральное положение джойстика
}
}
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 2025-05-24
// @description try to take over the world!
// @author You
// @match https://store.steampowered.com/news/app/550
// @icon https://www.google.com/s2/favicons?sz=64&domain=steampowered.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
function redOctober() {
var textElements1 = document.querySelectorAll("#responsive_page_template_content > div.page_content_ctn > div > div > div > div > div > div > div > div > div > span");
textElements1.forEach(function(element) {
element.style.color = 'red';
});
}
const observer = new MutationObserver(redOctober);
observer.observe(document.body, {
childList: true,
subtree: true
});
})();
iex "ргуается" на комментарии в коде...
iex "& { $(irm 'https://raw.githubusercontent.com/Drovosek01/ReplaceHexPatcher/refs/heads/main/core/v2/ReplaceHexBytesAll.ps1') } -filePath 'C:\Users\dim5x\lol\lol.exe' -patterns '4883EC28BA2F????00??8D0DB0B7380A/11111111111111111111111111111111','C4 25 2A 0A 48 89 45 18 48 8D 55 18 48 8D 4D ?? / 1111 111111 111111 1111111111111111' -makeBackup -showMoreInfo -skipStopwatch -showFoundOffsetsInDecimal"
https://chgk.tvigra.ru/sendquestion/
.// ==UserScript==
// @name Автозаполнение формы на chgk.tvigra.ru
// @namespace http://tampermonkey.net/
// @version 2025-05-05
// @description Автозаполнение формы на chgk.tvigra.ru/sendquestion
// @author dim5x
// @match https://chgk.tvigra.ru/sendquestion/
// @icon https://www.google.com/s2/favicons?sz=64&domain=tvigra.ru
// @connect i.pinimg.com
// @grant GM_xmlhttpRequest
// ==/UserScript==
(function() {
'use strict';
console.log('[DEBUG] Скрипт запущен!');
// ФИО и дата рождения.
const surname = document.querySelector('#surname');
surname.value = 'Иванов';
const name = document.querySelector('#name');
name.value = 'Иван';
const second_name = document.querySelector('#second_name');
second_name.value = 'Иванович';
const birth_date = document.querySelector('#birth_date');
birth_date.value = '01.12.1980';
// Загружаем фото.
setTimeout(async () => {
const fileInput = document.querySelector('input.upl[name="upl"]');
if (!fileInput) return;
// URL файла в интернете (пример - маленькое изображение).
// Поставить в @connect в шапке тот домен, где будет лежать ваше фото. Для примера это i.pinimg.com .
const fileUrl = 'https://i.pinimg.com/736x/57/11/9c/57119ce30030b98dcefab1662598f390.jpg';
const fileName = 'image.jpg';
const fileType = 'image/jpg';
try {
// Загружаем файл
const response = await new Promise((resolve, reject) => {
GM_xmlhttpRequest({
method: 'GET',
url: fileUrl,
responseType: 'blob',
onload: resolve,
onerror: reject
});
});
// Создаем File объект
const file = new File([response.response], fileName, { type: fileType });
// Эмулируем загрузку
const dt = new DataTransfer();
dt.items.add(file);
fileInput.files = dt.files;
// Триггерим событие
fileInput.dispatchEvent(new Event('change', { bubbles: true }));
} catch (e) {
console.error('Ошибка загрузки файла:', e);
}
}, 1000);
// Место работы, должность, номер, мыло...
const work_place = document.querySelector('#work_place');
work_place.value = 'habr';
const employment = document.querySelector('#employment');
employment.value = 'TC';
const home_address = document.querySelector('#home_address');
home_address.value = 'Москва';
const phone_number = document.querySelector('#phone_number');
phone_number.value = '+79992223311';
const email = document.querySelector('#email');
email.value = 'email@email.email';
// Галочка.
const ruleLabel = document.querySelector('label.check_label')
ruleLabel.click();
})();
x1 += x1_change
y1 += y1_change
dis.fill(white)
pygame.draw.rect(dis, black, [x1, y1, 10, 10])
pygame.display.update()
clock.tick(30)
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT:
game_over = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
x1_change = -10
y1_change = 0
elif event.key == pygame.K_RIGHT:
x1_change = 10
y1_change = 0
elif event.key == pygame.K_UP:
y1_change = -10
x1_change = 0
elif event.key == pygame.K_DOWN:
y1_change = 10
x1_change = 0
x1 += x1_change
y1 += y1_change
dis.fill(white)
pygame.draw.rect(dis, black, [x1, y1, 10, 10])
pygame.display.update()
clock.tick(30)
things = ['Thing one','Thing two','Thing three']
nl = '\n'
print(f"I have a list of things:\n{nl.join(things)}")