Skip to content

Instantly share code, notes, and snippets.

View ju1ion's full-sized avatar

ju1ion

  • Gelsenkirchen, NRW, Germany
View GitHub Profile
@ju1ion
ju1ion / dcsc.hpp
Last active October 17, 2022 11:40
C++ remove Codesigning Certificates from any file
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <imagehlp.h>
#include <malloc.h>
#include <tchar.h>
#include <string>
#define REGULARFILE(x) ((x) & ~(FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_ENCRYPTED | FILE_ATTRIBUTE_VIRTUAL))
@ju1ion
ju1ion / split.hpp
Created June 1, 2016 09:39
C++ String split without boost
public:
static std::vector<std::string> splitStrA(const std::string &InputString, char delimiterChar) {
std::vector<std::string> ResultVec;
splitStrA(InputString, delimiterChar, ResultVec);
return ResultVec;
};
static std::vector<std::wstring> splitStrW(const std::wstring &InputString, wchar_t delimiterChar) {
std::vector<std::wstring> ResultVec;
splitStrW(InputString, delimiterChar, ResultVec);
@ju1ion
ju1ion / endswith.hpp
Last active June 1, 2016 09:37
C++ String ends_with without boost
static bool endswithA(std::string const &InputString, std::string const &compareString)
{
if (InputString.length() >= compareString.length()) {
return (0 == InputString.compare(InputString.length() - compareString.length(), compareString.length(), compareString));
}
else {
return false;
}
};