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
// Copyright 2007 Andy Tompkins | |
// Copyright 2023 Jan Niklas Hasse | |
// Distributed under the Boost Software License, Version 1.0. (See | |
// accompanying file LICENSE_1_0.txt or copy at | |
// https://www.boost.org/LICENSE_1_0.txt) | |
#pragma once | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> |
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 <boost/uuid/detail/sha1.hpp> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
std::string sha1(const std::string& input) { | |
boost::uuids::detail::sha1 sha1; | |
sha1.process_bytes(input.data(), input.size()); | |
unsigned int digest[5]; | |
sha1.get_digest(digest); |
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 <iostream> | |
#include <boost/uuid/sha1.hpp> | |
void display(char* hash) | |
{ | |
std::cout << "SHA1: " << std::hex; | |
for(int i = 0; i < 20; ++i) | |
{ | |
std::cout << ((hash[i] & 0x000000F0) >> 4) | |
<< (hash[i] & 0x0000000F); |
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 <iostream> | |
#include <thread> | |
class InterruptedException : public std::exception { | |
}; | |
class AsyncThread { | |
public: | |
AsyncThread() { | |
std::unique_lock<std::mutex> lock(mutex); |
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
#!/usr/bin/env python3 | |
import json | |
import subprocess | |
import time | |
cputool = '/home/hasse/.local/share/gnome-shell/extensions/cpupower@mko-sl.de/src/cpufreqctl' | |
turbo_output = subprocess.check_output([cputool, 'turbo', 'get']).decode().strip() | |
if turbo_output != '0' and turbo_output != '1': |
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 sys | |
import subprocess | |
import os | |
import shutil | |
import re | |
old_dll = "" | |
def copy_dlls(binary): | |
print("\nChecking " + binary) |
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
diff --git a/include/wx/string.h b/include/wx/string.h | |
index a4e682b8ff..ad0cc200a2 100644 | |
--- a/include/wx/string.h | |
+++ b/include/wx/string.h | |
@@ -17,6 +17,8 @@ | |
#ifndef _WX_WXSTRING_H__ | |
#define _WX_WXSTRING_H__ | |
+#define wxNO_UNSAFE_WXSTRING_CONV2 1 | |
+ |
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
try: | |
import msvcrt | |
import atexit | |
import ctypes | |
from ctypes import wintypes | |
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) | |
# input flags | |
ENABLE_PROCESSED_INPUT = 0x0001 | |
ENABLE_LINE_INPUT = 0x0002 |
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
# pacman -Syu --needed --noconfirm --noprogressbar meson gcc sdl2 pkg-config fontconfig glew libwebp openal libvorbis boost | |
:: Synchronizing package databases... | |
core is up to date | |
extra is up to date | |
community is up to date | |
:: Starting full system upgrade... | |
resolving dependencies... | |
:: There are 2 providers available for libgl: | |
:: Repository extra | |
1) libglvnd 2) nvidia-340xx-utils |
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
{ | |
"version": "2.0.0", | |
"windows": { | |
"command": "C:\\msys64\\usr\\bin\\bash" | |
}, | |
"linux": { | |
"command": "/bin/bash" | |
}, | |
"args": ["-lc", "cd \"\"${workspaceRoot}\"\" && cargo $0 && $@"], | |
"options": { |
NewerOlder