Skip to content

Instantly share code, notes, and snippets.

@ADeltaX
ADeltaX / main.cpp
Created March 22, 2021 15:38
DWM Thumbnail/VirtualDesktop IDCompositionVisual example
#include <Unknwn.h>
#include <Windows.h>
#include <ntstatus.h>
#include <winternl.h>
#include <wrl\implements.h>
#include <comutil.h>
#include <dcomp.h>
#include <dwmapi.h>
#include <dxgi1_3.h>
#include <d3d11_2.h>
#include <windows.ui.composition.interop.h>
#include <ShellScalingAPI.h>
#include <DispatcherQueue.h>
#include <winrt/Windows.System.h>
#include <winrt/Windows.UI.Composition.Desktop.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
using namespace winrt;
using namespace Windows::UI;
@MrYar
MrYar / Firefox-68
Last active July 4, 2024 22:52 — forked from haasn/about:config.md
Firefox telemetry and spy removal
// Turn off "Sends data to servers when leaving pages"
user_pref("beacon.enabled", false);
// Prevention of some telemetry related to the newtab
user_pref("browser.newtabpage.directory.ping", "");
user_pref("browser.newtabpage.directory.source", "");
user_pref("browser.newtabpage.enhanced", false);
// "In the release channels the Mozilla location service is used to help in figuring out regional search defaults."
// Which means sending collectable data
@Citillara
Citillara / kb-uninstall.bat
Last active January 17, 2024 12:26
Windows 7 updates to remove to prevent telemetry collection. Disables automatic upgrade to Windows 10
:: Removes most telemetry/data collection/potentially unwanted behavior from Windows 7
:: Disables the automatic download of Windows 10
:: Note : be careful to keep KB in descending order
:: Comment that line to restore prompts for uninstall/reboot
:: Thanks to https://gist.github.com/geoffroyjabouley
set WUSA_OPTIONS=/quiet /norestart
:: Removes Windows 7-8.1 telemetry (part 1)
wusa %WUSA_OPTIONS% /uninstall /kb:3080149
@markshannon
markshannon / dynattr.py
Created November 30, 2014 22:06
Dynamic attribute module
import sys
import warnings
from types import ModuleType
from importlib import import_module
try:
basestring
except NameError:
basestring = str
@shimizukawa
shimizukawa / _templates-localtoc.html
Created March 11, 2013 03:35
Sphinx extension to render local toctree in templates (ex. sidebar). see also: https://groups.google.com/d/topic/sphinx-users/dqfCLab4oB0/discussion
<h3>toctree</h3>
{{ local_toctree(pagename, maxdepth=-1) }}
@tritao
tritao / libclang-NameMangling.patch
Created May 22, 2012 03:15
libclang Name Mangling API
Index: include/clang-c/Index.h
===================================================================
--- include/clang-c/Index.h (revision 156043)
+++ include/clang-c/Index.h (working copy)
@@ -4737,10 +4737,32 @@
* @}
*/
+/** \defgroup CINDEX_MANGLE Name Mangling API Functions
+ *