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
class str_const { // constexpr string | |
private: | |
const char* const p_; | |
const std::size_t sz_; | |
public: | |
template<std::size_t N> | |
constexpr str_const(const char (&a)[N]) : // ctor | |
p_(a), sz_(N - 1) { | |
} | |
constexpr char operator[](std::size_t n) { // [] |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### OR take a look at | |
### https://github.com/HotCakeX/Harden-Windows-Security |
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
#!/bin/bash | |
available_governors=$(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors \ | |
| head -1 | sed -e 's/ \([a-zA-Z0-9]\)/|\1/g' -e 's/ $//') | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: $0 [$available_governors]" | |
fi | |
function current_cpu_governor () | |
{ |