Skip to content

Instantly share code, notes, and snippets.

@Maximus5
Maximus5 / test.cpp
Created August 13, 2020 13:08 — forked from qpfiffer/test.cpp
C++ Memory Leak Detection in VS2010
#ifdef _DEBUG
#include <ostream>
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
// ...
@Maximus5
Maximus5 / pr.md
Created March 11, 2019 13:46 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@echo off
if NOT "%~1" == "" (
goto :%~1
pause
)
:in_gui
call cecho /Green "This is first tab, running new tab with two splits"
echo on
@Maximus5
Maximus5 / latency.markdown
Created August 31, 2018 20:08 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@Maximus5
Maximus5 / BiDiSupport.md
Created July 31, 2018 07:16 — forked from XVilka/BiDiSupport.md
BiDirectional Text

This gist will show the support of BiDirectional text in the terminal emulators and console programs.

How to test

Logical Order ◀ ◀ ◀ RTL LTR ▶ ▶ ▶
WHAT IS UNICODE؟ in arabic in arabic ؟EDOCINU SI TAHW ؟EDOCINU SI TAHW in arabic
ما هو الترميز الموحد يونيكود؟ in Arabic ما هو الترميز الموحد يونيكود؟ in Arabic
@Maximus5
Maximus5 / ConEmu-Dracula.xml
Created April 22, 2018 12:34
Dark color theme 'Dracula' for ConEmu
<?xml version="1.0" encoding="utf-8"?>
<!-- Title: Dark color theme 'Dracula' for ConEmu -->
<!-- Source: https://draculatheme.com/ -->
<!-- License: https://zenorocha.mit-license.org/ -->
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla">
<value name="ColorTable00" type="dword" data="00362a28"/>
<value name="ColorTable01" type="dword" data="00bc4354"/>
<value name="ColorTable02" type="dword" data="003dde66"/>
c]9;10\
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch daily
# Your branch is up-to-date with 'origin/daily'.
#
# Changes to be committed:
# modified: src/ConEmu/ConEmuSize.cpp
# modified: src/ConEmuHk/Ansi.cpp
#
Macro
{
area="Shell Info QView Tree";
key="Esc";
flags="EmptyCommandLine";
description="Use Esc to toggle panels on/off";
action = function()
-- Yes, we can switch to 'Desktop' screen, but it does not have command line
-- Keys("F12 0")
Microsoft Windows [Version 10.0.10586] 
 
zkr32@ZKRWS C:\Users\zkr32 
> cd E:\Programming\Android\ReactNative\ZKRTestSharedProject 
 
zkr32@ZKRWS C:\Users\zkr32 
> e: