Skip to content

Instantly share code, notes, and snippets.

View kostix's full-sized avatar

Konstantin Khomoutov kostix

  • TradingView
  • Saint-Petersburg, Russia
View GitHub Profile
@kostix
kostix / README.md
Created December 10, 2021 18:23
Low-level parsing of an AppStore Receipts DER-encoded block (malformed)
package main
/*
#include <stdio.h>
struct real_client {
int x;
};
typedef struct Client{
@kostix
kostix / Makefile
Last active October 29, 2022 10:40
Writing C string to a C-allocated buffer from Go
CC = /usr/bin/i686-w64-mingw32-gcc
GOOS = windows
GOARCH = 386
CGO_ENABLED = 1
export CC GOOS GOARCH CGO_ENABLED
.PHONY: all build run clean
all: run
@kostix
kostix / find_first_file.c
Last active September 5, 2023 09:16
FindFirstFile/FindNextFile
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#define WIN32_LEAN_AND_MEAN
#define _UNICODE
#include <windows.h>
int print_sys_error(DWORD last_error)
{