Skip to content

Instantly share code, notes, and snippets.

@allenk
allenk / solution.txt
Created April 6, 2023 03:24 — forked from Jacob-Tate/solution.txt
windows: 0x800705b4
Error:
After installing this update, users may experience this error "0x800705b4" when launching windows defender application guard or windows sandbox
Fix:
Use the credentials of a local admin to create and set the following registry keys on the host OS then restart the host.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Containers\CmService\Policy]
"DisableClone"=dword:00000001
"DisableSnapshot"=dword:00000001
@allenk
allenk / code_style.md
Created February 23, 2023 11:12 — forked from jesseschalken/code_style.md
Code style

My preferred code style is 2-space K&R. This is intended to provide a justification for this style.

Why K&R?

K&R style has the following properties:

  1. Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
  2. Forces no empty or meaningless lines, thereby avoiding artificial distance between related things that should be together.
  3. Consumes the minimum vertical space while keeping the opening and closing syntax of a block on separate lines from the content.
@allenk
allenk / compile_git.md
Created January 1, 2022 00:11 — forked from samrocketman/compile_git.md
Compiling git

The version of git that comes with RHEL6 is very old. I'll outline steps for compiling the latest git version on RHEL6. Working from /usr/local/src.

Following instructions for Git Pro book Getting Started Installing Git.

Prerequisites

yum install gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker

Optional man page prereqs.

@allenk
allenk / libevent-v-libuv.md
Created December 9, 2021 13:40 — forked from eddieh/libevent-v-libuv.md
libevent vs libuv

libevent vs libuv

Comparing libevent and libuv. My upfront biased: I want to like libevent. However, I want to objectively compare the two and make an informed decision.

What versions are we comparing?

  • libevent 2.0.22 (Stable) [2014-01-05]
  • libuv 1.8.0 (Stable) [2015-12-15]
@allenk
allenk / delete_git_submodule.md
Created August 11, 2020 14:33 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@allenk
allenk / YUV420PGrabber.cpp
Last active March 24, 2020 19:13 — forked from roxlu/YUV420PGrabber.cpp
OpenGL RGB > YUV420P shader/class (doesn't do much more. implementation/usage is up to you)
#include <assert.h>
#include <roxlu/core/Utils.h>
#include <roxlu/core/Log.h>
#include "YUV420PGrabber.h"
YUV420PGrabber::YUV420PGrabber()
:y_prog(0)
,y_vert(0)
,y_frag(0)
,uv_prog(0)
@allenk
allenk / profiles.json
Created February 29, 2020 18:57 — forked from mehulmpt/profiles.json
Sample profiles.json for new Windows Terminal
{
"defaultProfile": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"profiles": [
{
"guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}",
@allenk
allenk / profile.json
Created February 29, 2020 18:57 — forked from shanselman/profile.json
Windows Terminal Profile
{
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@allenk
allenk / 2018-https-localhost.md
Created June 26, 2019 10:14 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@allenk
allenk / Microsoft Sculpt Mobile Keyboard Remap
Created May 5, 2019 21:54 — forked from tehshane/Microsoft Sculpt Mobile Keyboard Remap
AutoHotKey script that remaps the F1-F12 function keys on the Microsoft Sculpt Mobile keyboard to be pressed without having to use the Fn key. Disables some of the Windows 8 shortcuts, but leaves media keys intact.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; OPTIONAL: For those who use Home/End more than PgUp/PgDown, this flips their use with the Fn key.
; If you want the buttons to function as they are, add a semicolon (;) to the beginning of each line below.
Home::PgUp
End::PgDn
PgUp::Home