Skip to content

Instantly share code, notes, and snippets.

View snowie2000's full-sized avatar

snowie2000

View GitHub Profile
@snowie2000
snowie2000 / TextScaleSample.cpp
Created October 14, 2024 02:53 — forked from mlalic/TextScaleSample.cpp
A full sample for obtaining the current system text scale. It doesn't rely on any libraries (such as WRL or C++/WinRT) and uses only base Windows SDK APIs.
#include <windows.h>
#include <roapi.h>
#include <iostream>
#include <cwchar>
// For Windows.UI.ViewManagement.UISettings
#include <windows.ui.viewmanagement.h>
int main() {
@snowie2000
snowie2000 / lambda_to_function.cpp
Created March 21, 2024 06:19 — forked from khvorov/lambda_to_function.cpp
Convert lambda to std::function
// g++ prog.cc -Wall -Wextra -O2 -march=native -std=gnu++1y
#include <cxxabi.h>
#include <algorithm>
#include <functional>
#include <iostream>
#include <typeinfo>
namespace detail

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@snowie2000
snowie2000 / Makefile
Created June 12, 2023 03:02
Make a fully synology compatible tengine with built-in health-check
# Author: Eric Pruitt (http://www.codevat.com)
# License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
# Description: This Makefile is designed to create a statically linked tengine
# binary without any dependencies on the host system's version of glibc.
tengine_VERSION=2.3.3
OPENSSL_VERSION=1.1.1u
PCRE_VERSION=8.45
ZLIB_VERSION=1.2.13
@snowie2000
snowie2000 / entware_synology.md
Created March 7, 2023 06:32 — forked from darencard/entware_synology.md
Setting up and using Entware on Synology device
@snowie2000
snowie2000 / PowerSerttings.Unhide.reg
Created March 27, 2022 02:12 — forked from Dark4Codrutz/PowerSerttings.Unhide.reg
Reveals the most used hidden power settings in Windows 10. The value Attributes=2 means reveal, where value of 1 or 0 means hide from Power Options. Good Tweaking!
Windows Registry Editor Version 5.00
;Reveals the most used hidden power settings in Windows 10. The value Attributes=2 means reveal, where value of 1 or 0 means hide from Power Options.
;Good Tweaking!
;WLAN
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\19cbb8fa-5279-450e-9fac-8a3d5fedd0c1\12bbebe6-58d6-4636-95bb-3217ef867c1a]
"Attributes"=dword:00000002
;Power Scheme Personality
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\245d8541-3943-4422-b025-13a784f679b7]