Skip to content

Instantly share code, notes, and snippets.

View vSzemkel's full-sized avatar
💭
[\*]{5}\s[\*]{3}

Marcin Buchwald vSzemkel

💭
[\*]{5}\s[\*]{3}
View GitHub Profile
@vSzemkel
vSzemkel / OAuth2_O365.cs
Created November 5, 2020 11:16
Demonstrates how to send and receive emails with OAuth2 authentication and Office 365
namespace OAuthWithO365
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using MailKit;
using MailKit.Net.Imap;
@vSzemkel
vSzemkel / download-parse-read-IXMLDOMDocument .cpp
Last active August 31, 2017 08:56
Download, parse and read IXMLDOMDocument
#include <afx.h>
#include <msxml2.h>
HRESULT CDocumentEvidenceManager::TryResolvePageDerivation(SDocumentEvidence evidence, const char* destinationPath)
{
HRESULT ret = S_OK;
// format url with xml source stream
CString url;
const CString title = evidence.szTitle;
@vSzemkel
vSzemkel / QueryStringObjectSerializer.cs
Last active May 16, 2025 17:59
QueryStringObjectSerializer enables caching sophisticated results of GET search requests in favor of POST noncachable ones
namespace Helpers
{
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
@vSzemkel
vSzemkel / MsgWaitForMultipleObjectsEx.cpp
Created July 1, 2017 08:31
MsgWaitForMultipleObjectsEx with MWMO_ALERTABLE
// MsgWaitForMultipleObjectsEx.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
VOID CALLBACK APCProc(ULONG_PTR dwParam) {
printf("Worker thread in APCProc\n");
};