Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active March 4, 2026 06:04
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sunmeat
sunmeat / main.cpp
Last active August 17, 2025 08:06
будова об'єкта
#include <iostream>
#include <windows.h>
using namespace std;
class Dog {
public:
char* name; // 8 (якщо архітектура х64)
int age; // 4
void Guard() {
@sunmeat
sunmeat / main.cpp
Last active August 17, 2025 09:32
VMT example
#include <iostream>
#include <windows.h>
using namespace std;
class Dog
{
// void** __vfptr;
// VPTR - вказівник на таблицю VTABLE (по одному вказівнику на кожен об'єкт!)
// static void* Dog::vftable[2];
@sunmeat
sunmeat / main.cpp
Last active July 11, 2025 18:24
console cpp app logger example with singleton patterns
#include <iostream>
#include <string>
using namespace std;
class Logger
{
static Logger* instance; // приватний статичний вказівник на єдиний екземпляр класу
int log_count = 0; // скільки разів відбувся запис рядка у файл
Logger() // конструктор - приватний (забороняє створювати об'єкти за межами класу)
@sunmeat
sunmeat / example.xml
Last active January 5, 2026 16:51
xml document example
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE recipe>
<recipe name="хліб" preptime="5min" cooktime="180min">
<title>
Простий хліб
</title>
<composition>
<ingredient amount="3" unit="стакан">Борошно</ingredient>
<ingredient amount="0.25" unit="грам">Дріжджі</ingredient>
<ingredient amount="1.5" unit="стакан">Вода</ingredient>
@sunmeat
sunmeat / example.xml
Last active January 5, 2026 16:54
second example
<?xml version="1.0" encoding="UTF-8"?>
<breakfast_menu>
<food>
<name>Бельгійські вафлі</name>
<price>₴205.95</price>
<description>Наші знамениті бельгійські вафлі з великою кількістю справжнього кленового сиропу</description>
<calories>650</calories>
</food>
<food>
<name>Французький тост</name>
@sunmeat
sunmeat / main.cpp
Last active July 12, 2025 09:45
C++ diamond problem (rhombus inheritance)
#include <iostream>
#include <string>
using namespace std;
#define PI 3.14159265358979323846
// точка
class Point
{
protected:
@sunmeat
sunmeat / activity_main.xml
Last active January 5, 2026 17:34
приклад верстки актівіті в android-додатку
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true">
<com.google.android.gms.ads.AdView
@sunmeat
sunmeat / Program.cs
Last active December 4, 2025 21:04
inheritance simple example c#
using System.Text;
class Person
{
public string Name { get; set; }
public string Lastname { get; set; }
public int Age { get; set; }
public Person() : this("Іван", "Іваненко", 25)
{
@sunmeat
sunmeat / snake.cpp
Last active February 26, 2026 07:54
snake game cpp console application code example
#include <iostream>
#include <windows.h>
#include <conio.h>
using namespace std;
int main() {
srand(time(0)); // запуск генератора случайных чисел
system("title Snake Game");
system("mode con cols=70 lines=31"); // установка размеров окна консоли
MoveWindow(GetConsoleWindow(), 50, 50, 2000, 2000, true); // установка стартовой позиции окна консоли (50 и 50 - это пиксели