Skip to content

Instantly share code, notes, and snippets.

View kachsheev's full-sized avatar
💩

Anton Kashcheev kachsheev

💩
  • Tashkent, Uzbekistan
View GitHub Profile
@kachsheev
kachsheev / gitlab-create-merge-request.sh
Created September 18, 2024 13:22 — forked from joshjohanning/gitlab-create-merge-request.sh
create gitlab merge requests via the api
#!/bin/bash
GITLAB_URL="https://example.gitlab.com/"
PROJECT_ID="2" # get this id via the repo/project's overview page
ACCESS_TOKEN="glpat-abc"
# Create a new merge request
curl --header "Private-Token: $ACCESS_TOKEN" \
"$GITLAB_URL/api/v4/projects/$PROJECT_ID/merge_requests" \
--data "source_branch=my-branch" \
--data "target_branch=main" \
@kachsheev
kachsheev / main.cpp
Created December 28, 2023 19:37 — forked from ForNeVeR/main.cpp
"ЩИ!!!Симулятор жестокости" - http://www.gamedev.ru/projects/forum/?id=160897
#define WIN32_LEAN_AND_MEAN // just say no to MFC
#define INIT_GUID
#include "hge.h"
#include <hgesprite.h>
#include <hgefont.h>
#include <hgecolor.h>
@kachsheev
kachsheev / SharedMemorySample_read_main.cpp
Last active March 15, 2023 19:03 — forked from yoggy/SharedMemorySample_read_main.cpp
SharedMemory Sample for WIN32
#include <SDKDDKVer.h>
#include <Windows.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int shmem_size = 16; // 16byte
HANDLE shmem = INVALID_HANDLE_VALUE;
HANDLE mutex = INVALID_HANDLE_VALUE;
@kachsheev
kachsheev / Source.cpp
Created February 14, 2023 22:00 — forked from AngelicosPhosphoros/Source.cpp
Example of OVERLAPPED IO using WinAPI
#include <atomic>
#include <cassert>
#include <iostream>
#include <list>
#include <memory>
#include <mutex>
#include <optional>
#include <thread>
#include <vector>
@kachsheev
kachsheev / main.cpp
Created January 10, 2023 18:48 — forked from sunmeat/main.cpp
client server UDP C++ example
CLIENT SIDE:
#include <iostream>
#include <winsock2.h>
using namespace std;
#pragma comment(lib,"ws2_32.lib")
#pragma warning(disable:4996)
#define SERVER "127.0.0.1" // or "localhost" - ip address of UDP server
@kachsheev
kachsheev / fork.c
Created February 27, 2018 21:35 — forked from Cr4sh/fork.c
fork() for Windows
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@kachsheev
kachsheev / learn.lua
Created May 6, 2017 15:44 — forked from tylerneylon/learn.lua
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------