This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers] | |
"ForceCSREMFDespooling"=dword:00000000 | |
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print] | |
"RpcAuthnLevelPrivacyEnabled"=dword:00000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: PXT related installs :: | |
:: :: | |
:: Author: Jacob I. Tate <[email protected]> :: | |
:: Date: 09/07/2021 :: | |
:: Version: 1.0.0 :: | |
:: :: | |
:: Changelog :: | |
:: 1.0.0 :: | |
:: - Created the script :: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for aptx: | |
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true | |
for AAC: | |
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true | |
for verification: | |
sudo defaults read bluetoothaudiod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stringWithWhiteSpace = " The trimmingCharacters method, removes the whitespace at both ends of a string. " | |
var whiteSpaceRemoved = stringWithWhiteSpace.trimmingCharacters(NSCharacterSet.whitespaces) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using ZStack | |
var body: some View{ | |
ZStack { | |
Color.blue.ignoreSafeArea() | |
// Other content goes here | |
// NOTE: The other content will respect the safe area | |
} | |
} | |
// Using Overlay Modifiers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdexcept> | |
class CrashHandlerException : public std::runtime_error | |
{ | |
public: | |
explicit inline CrashHandlerException(const std::string& error_desc) | |
: std::runtime_error(error_desc) {} | |
}; | |
class CrashHandlerFileCreate : public CrashHandlerException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wchar_t path[FILENAME_MAX] = { 0 }; | |
GetModuleFileName(nullptr, path, FILENAME_MAX); | |
// "C:\path1" "C:\" | |
// "C:\path1\path2" "C:\path1" | |
// "C:\path1\" "C:\path1" | |
// "\\path1\path2\path3" "\\path1\path2" | |
// "\path1" "\" | |
// This removed the exe from get module file name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming unicode | |
#include <string> | |
wchar_t path[FILENAME_MAX] = { 0 }; | |
GetModuleFileNameW(nullptr, path, FILENAME_MAX); | |
std::wstring wide_string(path); | |
std::string result_string(wide_string.begin(), wide_string.end()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// esi contains the struct ptr | |
// vtable = *(DWORD*)ptr | |
mov eax,dword ptr [esi] | |
// function = *(DWORD*)vtable | |
mov edx,dword ptr [eax] | |
// put the class pointer in ecx | |
// this = ptr | |
mov ecx,esi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-ChildItem .).BaseName |
NewerOlder