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
Checks: '-*,readability-identifier-naming' | |
CheckOptions: | |
- { key: readability-identifier-naming.NamespaceCase, value: lower_case } | |
- { key: readability-identifier-naming.ClassCase, value: CamelCase } | |
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ } | |
- { key: readability-identifier-naming.StructCase, value: CamelCase } | |
- { key: readability-identifier-naming.FunctionCase, value: CamelCase } | |
- { key: readability-identifier-naming.VariableCase, value: camelBack } | |
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE } | |
- { key: readability-identifier-naming.GlobalVariableCase, value: camelBack } |
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
CC=gcc | |
AR=ar | |
V = 0 | |
ACTUAL_CC := $(CC) | |
CC_0 = @echo "CC [$<]"; $(ACTUAL_CC) | |
CC_1 = $(ACTUAL_CC) | |
CC = $(CC_$(V)) | |
ACTUAL_AR := $(AR) |
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
perf record --call-graph dwarf -p PID | |
perf report --call-graph=graph,0.001,calle,function,percent --sort=symbol | |
perf report --call-graph=graph,0.001,calle,function,count --sort=symbol |
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
--- | |
Language: Cpp | |
# BasedOnStyle: WebKit | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: true | |
AlignConsecutiveAssignments: true | |
AlignConsecutiveDeclarations: true | |
AlignEscapedNewlinesLeft: false | |
AlignOperands: true | |
AlignTrailingComments: true |
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
// Example code which shows how to compare the two typedefs for size equivalency. | |
#define CONCAT_(a,b) a##b | |
#define CONCAT(a,b) CONCAT_(a, b) | |
#define STATIC_ASSERT(e) \ | |
; enum { CONCAT(assert_line_, __LINE__) = 1/(int)(!!(e)) } | |
/* Note that ; is needed before enum if the STATIC_ASSERT is added right after case or label statement */ | |
/* Note that multiple CONCATs are needed so that __LINE__ could be expanded .. Thus you can now have multiple STATIC_ASSERTs in the same code block */ |
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
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" | |
sudo apt-get update | |
sudo apt-get install -y clang-6.0 clang-tidy |
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
![QUIC/ngtcp2 handshake flow](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/nyrahul/ngtcp2-helper/master/res/ngtcp2-handshake.puml?cache=no) |
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
b StreamSetUserData | |
r | |
n | |
n | |
n | |
eval "watch *(int *)%p", &strm->userData | |
c | |
c | |
c | |
c |
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
#!/bin/bash | |
set -E | |
trap 'echo Failed line: $LINENO command: $BASH_COMMAND && exit $?' ERR | |
lcnt=1 | |
nw_pref="192.168.10" | |
create_node() | |
{ | |
ns="$1"; shift; |
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
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
USAGE: $0 [-hc] [-a <adapter>] [-d <delay-param>] [-l <loss-param>] | |
OPTIONS: | |
-h Show this message | |
-a <adapter> Set the adapter | |
-d <delay> Set delay/latency parameters (as accepted by netem[1]) |