This file contains hidden or 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
// From Sok Data: https://arxiv.org/ftp/arxiv/papers/2007/2007.14266.pdf | |
// This is an occurance count. For 53 binaries in various compiler modes how many functions where padded with sequence XXX | |
{ | |
"cl_m32_O1": { | |
"cc": 553, | |
"cccc": 306, | |
"cccccc": 529, | |
"cccccccc": 165, | |
"6666666666660f1f840000000000": 6, | |
"90": 468, |
This file contains hidden or 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
//Thanks @_can1357 for help with this. | |
#include <type_traits> | |
#include <tuple> | |
#include <utility> | |
template<typename T, typename = void> | |
struct callback_type { using type = T; }; | |
template<typename T> |
This file contains hidden or 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://www.reddit.com/r/programming/comments/gnazif/ray_tracing_in_notepadexe_at_30_fps/ | |
static void nlog(char *str, ...) | |
{ | |
HWND notepad, edit; | |
va_list ap; | |
char buf[256]; | |
va_start(ap, str); | |
vsprintf(buf, str, ap); | |
va_end(ap); |
This file contains hidden or 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
# make a key | |
gpg --full-generate-key | |
# make it > 4096 | |
gpg --list-secret-keys --keyid-format LONG | |
# key id is numbers on asc line after / | |
gpg --armor --export <key id> | |
# add to github | |
git config --global user.signingkey <key id> |
This file contains hidden or 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 powerline fonts install (OR https://github.com/microsoft/cascadia-code/releases?WT.mc_id=-blog-scottha <<- PREFER THIS) | |
git clone https://github.com/powerline/fonts.git | |
cd fonts | |
Set-ExecutionPolicy Bypass | |
./install.ps1 | |
Set-ExecutionPolicy Default | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install zsh curl git | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
This file contains hidden or 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 <iomanip> | |
#include <iostream> | |
#include <vector> | |
#include <termcolor.hpp> | |
void hexDump(const std::vector<uint8_t>& bytes, std::ostream& stream) | |
{ | |
char buff[17]; | |
size_t i = 0; |
This file contains hidden or 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
// goto radarr->settings->general then paste this. | |
const key = document.getElementsByClassName('x-api-key')[0].value; | |
if (!key) { | |
alert('Navigate to /settings/general and run again'); | |
} | |
let ids = []; | |
let _movies = []; | |
let index = 0; |
This file contains hidden or 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 sys | |
import os | |
with open(sys.argv[1]) as f: | |
lines = f.readlines() | |
for line in lines: | |
stripped = line.strip() | |
fixed = stripped.replace(',', "").replace(':','').replace(' - ', ' ').replace('-',' ').replace('.','').replace('&','and').replace('\'','').replace('!','') | |
folder = os.path.join(sys.argv[2], fixed) |
This file contains hidden or 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
By maamountki | |
#include <Windows.h> | |
#include <DbgHelp.h> | |
#include <stdio.h> | |
#pragma comment(lib, "dbghelp.lib") | |
BOOL CALLBACK EnumProc(SYMBOL_INFO* info, ULONG size, void* param) | |
{ |
This file contains hidden or 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://www.unknowncheats.me/forum/c-and-c-/307336-compile-time-pattern.html | |
#include <type_traits> | |
#include <algorithm> | |
#include <cstdint> | |
constexpr std::uint8_t parse_hex(char c) { | |
if (c >= '0' && c <= '9') return c - '0'; | |
if ((c | 32) >= 'a' && (c | 32) <= 'f') return (c | 32) - 'a' + 10; | |
if (c == '?') return 0; |