Skip to content

Instantly share code, notes, and snippets.

View sunmeat's full-sized avatar
🐈
MEOW

Oleksandr Zahoruiko sunmeat

🐈
MEOW
View GitHub Profile
@sunmeat
sunmeat / main.cpp
Created June 9, 2026 07:19
пример находит строку текста в памяти другого процесса, и меняет её на другую строку такой же длины (проверять в notepad++)
#include <windows.h>
#include <tlhelp32.h>
#include <iostream>
#include <vector>
#include <string>
#include <shellapi.h>
bool IsRunAsAdmin() {
bool isAdmin = false;
HANDLE token = NULL;
@sgtvcamera
sgtvcamera / gist:b3e2f16e3b7c4c0c679b303b780afb7b
Last active June 9, 2026 06:52
Тест взлома памяти на с++
#define _CRT_SECURE_NO_WARNINGS // Отключаем предупреждения безопасности Windows
#include <iostream>
#include <cstring>
#include <clocale> // Подключаем библиотеку для работы с локалью
struct MemoryTest {
char name[4]; // Выделили ровно 4 байта под имя (например: 'T', 'o', 'm', '\0')
int secret_code; // Сразу за именем в памяти лежит секретный код (число)
};
@sunmeat
sunmeat / shpora.md
Created June 4, 2026 12:34
бомбічна шпаргалка на іспит з С++

📘 Основи та принципи ООП (на прикладі мови C++)

Стислий довідник до іспиту — визначення та концепції, проблема - рішення - результат.


🧩 Об'єктно-орієнтоване програмування (ООП)

Загальна ідея

@sunmeat
sunmeat / shpora.md
Last active June 4, 2026 12:33
бомбічна шпаргалка на іспит з С++

📘 Основи та принципи ООП (на прикладі мови C++)

Стислий довідник до іспиту — визначення та концепції, проблема - рішення - результат.


🧩 Об'єктно-орієнтоване програмування (ООП)

Загальна ідея

@sunmeat
sunmeat / main.cpp
Created June 3, 2026 10:23
приклад на статичні поля та методи, клас Math, утілітарний клас ConsoleApp (версія для мак ос)
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <termios.h>
using namespace std;
#define uint unsigned int
@sunmeat
sunmeat / main.cpp
Created June 3, 2026 09:05
парсинг HTML з використанням регулярок на С++ (версія для мак ос)
#include <iostream>
#include <string>
#include <regex>
#include <vector>
#include <cstdio>
#include <cstdlib>
using namespace std;
// https://wttr.in/odesa
@sgtvcamera
sgtvcamera / gist:bb439e38613366ee915c49e4303e7909
Created May 30, 2026 08:29
Версия тетриса. Для примера.
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <ctime>
using namespace std;
// Размеры игрового поля
const int WIDTH = 12;
const int HEIGHT = 20;
@sunmeat
sunmeat / init.cpp
Created May 30, 2026 08:13 — forked from EnaEd/init.cpp
int main() {
/// Choose task theme to test program behavior
/// naming rule: ThemeTask has the same Name as target class with postfix Task
/// <sample> auto task = TaskTheme::GreetingTask; </sample>
/// by defaulttask has pointer to lastest work
auto taskTheme = static_cast<TaskTheme>(static_cast<int>(TaskTheme::LastOneMark) - 1);
TaskFactory factory;
auto task = factory.GetTask(taskTheme);
if (task == nullptr) {
int main() {
/// Choose task theme to test program behavior
/// naming rule: ThemeTask has the same Name as target class with postfix Task
/// <sample> auto task = TaskTheme::GreetingTask; </sample>
/// by defaulttask has pointer to lastest work
auto taskTheme = static_cast<TaskTheme>(static_cast<int>(TaskTheme::LastOneMark) - 1);
TaskFactory factory;
auto task = factory.GetTask(taskTheme);
if (task == nullptr) {
@sunmeat
sunmeat / main.cpp
Last active May 30, 2026 08:10
це моя перша домашка по С++
#include <iostream>
using namespace std;
int main() {
asdasd
return 0;
}