Skip to content

Instantly share code, notes, and snippets.

View puppis42's full-sized avatar
🎃
I may be slow to respond.

puppis42

🎃
I may be slow to respond.
View GitHub Profile
@zekroTJA
zekroTJA / example.cpp
Last active January 22, 2024 10:35
Simple C++ asynchronous timer class
/*
COPYRIGHT © 2018 Ringo Hoffmann (zekro Development)
READ BEFORE USING: https://zekro.de/policy
*/
#include "timer.h"
using namespace std;
@lelegard
lelegard / win-home-gpedit.md
Last active April 25, 2024 17:36
Enabling the Group Policy Editor on Windows 10 Home

Enabling the Group Policy Editor on Windows 10 Home

On Windows 10 Home edition, there is no Local Group Policy Editor (gpedit.msc) and no Local Security Policy Editor (secpol.msc). These tools are reserved to Professional editions of Windows.

It is however possible to install them on Windows 10 Home if you need them.

Open a PowerShell window as administrator and run the following command:

@gchudnov
gchudnov / cpp_utf8_utf16.cpp
Created November 6, 2014 19:33
C++ string conversion UTF8 <-> UTF16
#include <string>
#include <locale>
#include <codecvt>
//UTF-8 to UTF-16
std::string source;
//...
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;
std::u16string dest = convert.from_bytes(source);
@superkojiman
superkojiman / bin2sc.py
Created April 22, 2014 03:15
Convert bin to shellcode.
#!/usr/bin/env python
import sys
if __name__ == "__main__":
if len(sys.argv) < 2:
print "usage: %s file.bin\n" % (sys.argv[0],)
sys.exit(0)
shellcode = "\""
ctr = 1
maxlen = 15
@philip-goh
philip-goh / screen_grab.cpp
Created October 10, 2012 13:54
Take a screenshot and write it out as a JPEG in C++ on Windows
#include <iostream>
#include <windows.h>
#include <gdiplus.h>
#include <memory>
using namespace Gdiplus;
using namespace std;
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
{