Navigation Menu

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 = git@github.com: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:

@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
Microsoft Windows [Version 10.0.10586] 
 
zkr32@ZKRWS C:\Users\zkr32 
> cd E:\Programming\Android\ReactNative\ZKRTestSharedProject 
 
zkr32@ZKRWS C:\Users\zkr32 
> e: 

@Maximus5
Maximus5 / export_repo_issues_to_csv.py
Created November 28, 2016 09:13 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@Maximus5
Maximus5 / gist:502b6feb95cf29e431d046ac5fdd05f4
Created June 21, 2016 14:53 — forked from xyzzy-17-638/gist:2354412
Windows2000 で xyzzyのマルチフレーム版を動かすための修正案

Windows2000 で xyzzyのマルチフレーム版を動かすための修正案

サポートしない、というのが一番楽だとは思いますが…

OS の環境を Windows 2000 SP4 update Rollup 1 にする

/subsystem のバージョンを 5.0 にする

@Maximus5
Maximus5 / TrueColour.md
Created February 16, 2016 20:17 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows