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
void decrypt(short* src, short* dest, int size) | |
{ | |
int x=0xA2C2A, y=0; | |
for (int i = 0; i < size; ++i) | |
{ | |
x = x*0x343FD + 0x269EC3; | |
y = x >> 0x10 & 0x7FFF; | |
dest[i] = src[i] ^ LOWORD(y); | |
} | |
} |
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
#define NOMINMAX | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
static bool PurgeRAM() | |
{ | |
MEMORYSTATUSEX info = {}; | |
info.dwLength = sizeof(MEMORYSTATUSEX); | |
if (!GlobalMemoryStatusEx(&info)) | |
return false; |
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_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\General] | |
"U2DCheckVerbosity"=dword:00000001 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemDefinitionGroup> | |
<ClCompile> | |
<TreatWarningAsError>false</TreatWarningAsError> | |
<!-- otherwise in fallback mode you might end up with /Zi object files --> | |
<DebugInformationFormat>OldStyle</DebugInformationFormat> | |
<PrecompiledHeader>NotUsing</PrecompiledHeader> | |
<OpenMPSupport>true</OpenMPSupport> | |
<!-- -fuse-ld=lld --> |
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 System; | |
using System.IO; | |
using System.Xml.Linq; | |
static class Program | |
{ | |
static void check(string fileName) | |
{ | |
XDocument project = XDocument.Load(fileName); | |
XNamespace msbuild = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); |
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
#pragma comment(lib, "D:\\Visual Leak Detector\\lib\\Win64\\vld.lib") | |
#include <D:\Visual Leak Detector\include\vld.h> | |
static int dummy = (VLDSetReportOptions(VLD_OPT_REPORT_TO_FILE | VLD_OPT_UNICODE_REPORT, nullptr), 0); |
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
import requests | |
from urllib.request import * | |
import sys | |
import os.path | |
def getDetails(type, id): | |
url = 'http://geoportal.geoportal-th.de/gaialight-th/_apps/dladownload/_ajax/details.php' | |
params = dict( | |
type = type, | |
id = id |
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
// https://godbolt.org/z/5Fyg7y | |
#pragma once | |
#include <stddef.h> | |
#include <stdint.h> | |
#if _WIN32 | |
#define WIN32_LEAN_AND_MEAN |
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
# useful to test auto-vectorization on different compilers | |
# https://godbolt.org/z/mUdeQn | |
# gcc | |
-Wall -W -std=c++2a -fopenmp-simd -O3 -ffast-math -march=haswell -fopt-info-vec-omp-optimized-missed | |
# clang | |
-Wall -W -Werror=pass-failed -std=c++2a -fopenmp-simd -O3 -ffast-math -march=haswell -Rpass="loop|vect" -Rpass-missed="loop|vect" -Rpass-analysis="loop|vect" | |
# icc on Linux | |
-Wall -std=c++17 -qopenmp-simd -O3 -ffast-math -march=haswell -qopt-report-file=stdout -qopt-report-format=vs -qopt-report=5 -qopt-report-phase=loop,vec | |
# msvc |
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
# copy $1 to folder $2 | |
ldd $1 | grep -oP '=> \K(/[^(]+)' | xargs cp -vt "$2" "$1" |