Skip to content

Instantly share code, notes, and snippets.

/*
* Module Name:
* WorkingSetWatch.cpp
*
* Abstract:
* Tracks page faults that occur within the process.
*
* NOTE: This is not compatible with Wow64 and must be run as a 64-bit
* program on x64 and a 32-bit program on x86.
*
@mattratleph
mattratleph / vimdiff.md
Last active May 9, 2024 03:11 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active May 9, 2024 03:11
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

@bradwestfall
bradwestfall / HoC-vs-RenderProps-vs-Hooks.md
Last active May 9, 2024 03:08
An explanation of why Hooks are a nicer way to abstract re-useable state and functionality vs HoC's and Render Props

HoC (pattern) vs Render Props (pattern) vs Hooks (not pattern, a new API)

Someone was asking me about comparing the HoC and Render Props patterns (and their shortcomings) to hooks. I might leave this up as a public gist for others if it's helpful.


tldr;

Issues with HoC:

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 9, 2024 03:03
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@pismy
pismy / ThreadPoolTaskExecutorWithMdcPropagation.java
Created January 12, 2016 09:15
SLF4J Tool: ThreadPoolExecutor that propagates MDC from calling thread to executor thread
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@miliarch
miliarch / install-arch-in-virtual-machine.md
Last active May 9, 2024 02:59
Install Arch Linux in a Virtual Machine
@binary1230
binary1230 / .gitignore (wwise)
Created March 22, 2021 15:38
WWise + Unity .gitignore file example (older, but should still work)
# unofficial .gitignore for WWise + Unity projects
# dom at audiotankstudios dot com for questions
#
# this is based on a slightly older Unity and WWise version but, should be a decent starting point
#
# Instructions:
# 1) Place this in your root folder for your Unity project
# 2) Modify "WWiseProject/" below to be the path to your .wproj folder inside your Unity assets
# Unity portion based on https://github.com/github/gitignore/blob/master/Unity.gitignore

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 03:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory