Skip to content

Instantly share code, notes, and snippets.

View fwsGonzo's full-sized avatar
💭
I may be slow to respond.

Alf-André Walla fwsGonzo

💭
I may be slow to respond.
  • Varnish Software
  • Norway
View GitHub Profile
@trick77
trick77 / gov.sh
Last active August 18, 2020 09:49
Bash shell script to set the CPU governor to any supported scaling mode (performance, ondemand...)
#!/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 ()
{
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### 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
###
###
@creative-quant
creative-quant / str_const.h
Created April 14, 2016 12:00
str_const from Scott Schurr - 2012.cppnow.org -> schurr_cpp11_tools_for_class_authors.pdf
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) { // []