Skip to content

Instantly share code, notes, and snippets.

View mxpv's full-sized avatar

Maksym Pavlenko mxpv

View GitHub Profile
@mxpv
mxpv / DialogTemplate.cpp
Last active December 17, 2015 04:19
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)
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 / readme.md
Created April 18, 2013 09:29
Building Clang
@mxpv
mxpv / gist:5187707
Last active December 15, 2015 02:29
Partition Type IDs
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 December 14, 2015 12:59
Unable to delete file or Directory in Windows 7 or Vista
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
@mxpv
mxpv / ExchangeServerBuildNumbers.txt
Last active October 12, 2015 07:38
Exchange Server build numbers
# http://support.microsoft.com/kb/158530
# http://www.wardvissers.nl/2010/04/26/exchange-2007-builds-numbers/
# http://social.technet.microsoft.com/wiki/contents/articles/240.exchange-server-and-update-rollups-build-numbers.aspx
Microsoft Exchange Server 4.0 4.0.837
Microsoft Exchange Server 4.0 (a) 4.0.993
Microsoft Exchange Server 4.0 SP1 4.0.838
Microsoft Exchange Server 4.0 SP2 4.0.993
Microsoft Exchange Server 4.0 SP3 4.0.994
Microsoft Exchange Server 4.0 SP4 4.0.995
@mxpv
mxpv / gist:3295227
Created August 8, 2012 13:58
Turn off firewall on Windows Server Core edition
netsh advfirewall set allprofiles state off
@mxpv
mxpv / gist:3141112
Created July 19, 2012 06:16
Disable all caps menu titles in Visual Studio 2012 RC
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General\SuppressUppercaseConversion
Type DWord
Value 1
@mxpv
mxpv / gist:2987459
Created June 25, 2012 08:50
Open .msi installer file
msiexec /a "setup.msi" /qb TARGETDIR=c:\temp
@mxpv
mxpv / logging.reg
Created June 15, 2012 09:12
Turn on MSI verbose logging
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmupx!"
$ ../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