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
#if defined(_BENCHMARK_INC_H_) | |
#endinput | |
#else | |
#define _BENCHMARK_INC_H_ | |
#endif | |
#include <profiler> | |
// Can nest max this many profilers, total. | |
#define MAX_PROFILERS 32 |
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 | |
from inspect import signature | |
import os | |
import sys | |
# TODO: fix the megabytes/mebibytes inconsistency in comments/docstrings. | |
def write_data( |
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/sphelper.h b/sphelper.h | |
index fbc5668..c684e32 100644 | |
--- a/sphelper.h | |
+++ b/sphelper.h | |
@@ -767,7 +767,7 @@ inline HRESULT SpFindBestToken( | |
HRESULT hr = S_OK; | |
const WCHAR *pszVendorPreferred = L"VendorPreferred"; | |
- const ulLenVendorPreferred = wcslen(pszVendorPreferred); | |
+ const size_t ulLenVendorPreferred = wcslen(pszVendorPreferred); |
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
Windows Registry Editor Version 5.00 | |
; This is a fix for the Source SDK 2013 mp/src/createXprojects.bat scripts erroring out as: | |
; ERROR: Unable to find RegKey for .vcproj or .vcxproj files in solutions. | |
; https://github.com/ValveSoftware/source-sdk-2013/issues/72#issuecomment-20534954 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\VC\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}] | |
"DefaultProjectExtension"="vcproj" |
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
adb shell settings put secure unsafe_volume_music_active_ms 1 | |
# reboot device |
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
from string import ascii_lowercase, ascii_uppercase | |
# Note that this already exists in Python as codecs.encode("text", "rot13") | |
# so you'd probably wanna use that instead of this implementation, | |
# unless you need a rotation of n places with n != 13. | |
def rot(text, rotation=13): | |
"""ROT-n cipher. | |
Decode by running the output through the function again |
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
;= Some doskey macros for limited aliasing-like behaviour on Windows. | |
;= | |
;= To install, drop this file into %USERPROFILE%\.config\macros.doskey, and run: | |
;= reg add "HKCU\Software\Microsoft\Command Processor" /v Autorun /d "DOSKEY /MACROFILE=\"%USERPROFILE%\.config\macros.doskey\"" /f | |
;= | |
;= Be sure to check the doskey docs before relying on this for complex stuff, | |
;= as there are some nonobvious ways in which more complex commands can fail: | |
;= https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey | |
;= Extract audio from a media url using yt-dlp. |
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
// ==UserScript== | |
// @name YouTube Reverse Playlist | |
// @namespace yt-reverse-playlist | |
// @updateURL https://gist.githubusercontent.com/Rainyan/28f85d23de9ac850a3d27ae39d4d1e62/raw/ | |
// @version 0.2.1 | |
// @description Adds a playlist button to reverse/invert the current YouTube playlist. Useful when wanting to watch oldest to newest, or vice versa. | |
// @author Rain | |
// @match https://www.youtube.com/* | |
// @require https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js | |
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js |
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
@ECHO off | |
git pull | |
REM Use single '%' symbols to call directly from command prompt: %%a -> %a | |
for /f "delims=" %%a in ('git describe --tags --abbrev^=0') do set "tag=%%a" | |
git checkout %tag% | |
git status |
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
// ==UserScript== | |
// @name Fix old reddit URLs | |
// @description Fixes problems with displaying old.reddit URLs. Examples of breakage include links with underscores, double quotes, or trailing closing braces. | |
// @version 1.4.1 | |
// @namespace redditFixOldLinks | |
// @updateURL https://gist.githubusercontent.com/Rainyan/0fdf3d449404fb786ea1a29589608ce5/raw/ | |
// @include https://old.reddit.com/* | |
// @run-at document-idle | |
// ==/UserScript== |