Skip to content

Instantly share code, notes, and snippets.


Maksym Pavlenko mxpv

View GitHub Profile
mxpv / Win32.h
Created May 2, 2013 13:27
Slim version of windows.h header
View Win32.h
#ifndef SYS_WIN32_H
#define SYS_WIN32_H
// Slim version of windows.h header
#ifndef WIN32_EXTRA_LEAN
mxpv / ProcessUtil.cs
Created September 28, 2012 09:31
Process start helper utility with CancellationToken and async output reading support
View ProcessUtil.cs
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace ConsoleApplication
public class ProcessUtil : IDisposable
mxpv / windows_build_numbers.txt
Last active July 22, 2022 05:00
Windows build numbers
View windows_build_numbers.txt
Windows Name or Service Pack Version Number
---------------------------- --------------
Windows 1.0 1.04
Windows 2.0 2.11
Windows 3.0 3
Windows NT 3.1 3.10.528
Windows for Workgroups 3.11 3.11
View list_images_bench.go
func TestBenchmarkListImages(t *testing.T) {
tmpDir := t.TempDir()
specFile := filepath.Join(tmpDir, "1.json")
testSpec := imagespec.Image{
Author: "1",
Architecture: "2",
Variant: "3",
OS: "4",
Config: imagespec.ImageConfig{
User: "c",
View gist:171ebdc312499493df9833899433ccda
$ curl
# HELP container_cpu_kernel_nanoseconds The total kernel cpu time
# TYPE container_cpu_kernel_nanoseconds gauge
container_cpu_kernel_nanoseconds{container_id="test120",namespace="default",runtime_class="io.containerd.runtime.v1.linux"} 1e+07
container_cpu_kernel_nanoseconds{container_id="test12345",namespace="default",runtime_class="io.containerd.other.v2"} 1e+07
# HELP container_cpu_throttle_periods_total The total cpu throttle periods
# TYPE container_cpu_throttle_periods_total gauge
container_cpu_throttle_periods_total{container_id="test120",namespace="default",runtime_class="io.containerd.runtime.v1.linux"} 0
container_cpu_throttle_periods_total{container_id="test12345",namespace="default",runtime_class="io.containerd.other.v2"} 0
# HELP container_cpu_throttled_periods_total The total cpu throttled periods
mxpv / benchmark_test.go
Last active September 18, 2018 23:59
Containerd decompression benchmark
View benchmark_test.go
package compression_test
import (
mxpv / gist:2935715
Last active April 18, 2018 19:16
InstallShield Custom Actions notes
View gist:2935715

Deferred Custom Actions

To adhere to the Windows Installer "Best Practices," all changes that are made to a system are in a "deferred" action.

A deferred execution custom action must be scheduled in the execute sequence table within the section that performs script generation.

Deferred execution custom actions must come after "InstallInitialize" and come

mxpv / gist:5262043
Created March 28, 2013 09:52
Git caret and tilde
View gist:5262043
mxpv / gist:034933deeebb26b62f14
Last active January 15, 2016 23:26
URL tests
View gist:034933deeebb26b62f14
Should pass:
mxpv / gist:5879528
Created June 27, 2013 19:21
How to make sublime text the default editor for git on Windows
View gist:5879528
git config --global core.editor "'c:/program files/sublime text 2/sublime_text.exe' -w"