Skip to content

Instantly share code, notes, and snippets.

Maksym Pavlenko mxpv

Block or report user

Report or block mxpv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mxpv
mxpv / benchmark_test.go
Last active Sep 18, 2018
Containerd decompression benchmark
View benchmark_test.go
package compression_test
import (
"bytes"
"crypto/md5"
"io"
"io/ioutil"
"os"
"os/exec"
"testing"
View gist:034933deeebb26b62f14
Should pass:
http://foo.com/blah_blah
http://foo.com/blah_blah/
http://foo.com/blah_blah_(wikipedia)
http://foo.com/blah_blah_(wikipedia)_(again)
http://www.example.com/wpstyle/?p=364
https://www.example.com/foo/?bar=baz&inga=42&quux
http://✪df.ws/123
http://userid:password@example.com:8080
View gist:07c88d30dae747fdd340
$ ../External/ctags/ctags.exe --append --fields=+ian --c-types=+cefgmnpstuvx --recurse --totals=yes .
1 file, 110 lines (2 kB) scanned in 0.0 seconds (1420 kB/s)
56 tags added to tag file (now 56 tags)
56 tags sorted in 0.00 seconds
@mxpv
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
mxpv / DialogTemplate.cpp
Last active Dec 17, 2015
Small helper class for generating dynamic dialog templates in memory and handling all alignment stuff. (see http://msdn.microsoft.com/en-us/library/windows/desktop/ff468828(v=vs.85).aspx)
View DialogTemplate.cpp
DialogTemplate::DialogTemplate(const wchar_t * caption, u32 x, u32 y, u32 width, u32 height)
: _size(0)
{
Header header = { 0 };
header.dlg.style = DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION;
header.dlg.dwExtendedStyle = 0;
header.dlg.x = x;
header.dlg.y = y;
@mxpv
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_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef WIN32_EXTRA_LEAN
@mxpv
mxpv / readme.md
Created Apr 18, 2013
Building Clang
View readme.md
@mxpv
mxpv / gist:5262043
Created Mar 28, 2013
Git caret and tilde
View gist:5262043
http://paulboxley.com/blog/2011/06/git-caret-and-tilde
http://alblue.bandlem.com/2011/05/git-tip-of-week-git-revisions.html
@mxpv
mxpv / gist:5187707
Last active Dec 15, 2015
Partition Type IDs
View gist:5187707
For MBR-style partition, each partition will have one Partition Type ID.
System can tell the types of partitions by the ID, the following is the most frequently used Type ID.
0x07 NTFS
0x0B FAT32, used by DOS & Win95
0x0C FAT32 using LBA mode to access to FAT32 partition
0x01 FAT12
0x04 FAT16, less than 32 MB
0x06 FAT16, greater than 32 MB
0x0E FAT16 using LBA mode to access to FAT16 partition
@mxpv
mxpv / delete.bat
Last active Dec 14, 2015
Unable to delete file or Directory in Windows 7 or Vista
View delete.bat
SET DIRECTORY_NAME="C:\Users\MAKSYM~1.PAV\AppData\Local\Temp"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
PAUSE
You can’t perform that action at this time.