Skip to content

Instantly share code, notes, and snippets.


Maksym Pavlenko mxpv

View GitHub Profile
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 / ProcessUtil.cs
Created Sep 28, 2012
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 Feb 19, 2019
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
mxpv / benchmark_test.go
Last active Sep 18, 2018
Containerd decompression benchmark
View benchmark_test.go
package compression_test
import (
mxpv / gist:2935715
Last active Apr 18, 2018
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 Mar 28, 2013
Git caret and tilde
View gist:5262043
View gist:034933deeebb26b62f14
Should pass:
mxpv / gist:5879528
Created Jun 27, 2013
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"
mxpv / DialogTemplate.cpp
Last active Dec 17, 2015
Small helper class for generating dynamic dialog templates in memory and handling all alignment stuff. (see
View DialogTemplate.cpp
DialogTemplate::DialogTemplate(const wchar_t * caption, u32 x, u32 y, u32 width, u32 height)
: _size(0)
Header header = { 0 }; = DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION;
header.dlg.dwExtendedStyle = 0;
header.dlg.x = x;
header.dlg.y = y;
mxpv / Win32.h
Created May 2, 2013
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