Skip to content

Instantly share code, notes, and snippets.

View mandarjog's full-sized avatar

Mandar U Jog mandarjog

  • ex-google
  • Mountain View, CA
View GitHub Profile
.sidebar {
background: linear-gradient(to bottom, #414868, #232336);
color: #c0caf5;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
img.sidebar__logo__character {
width: 60px !important;
content: url("https://user-images.githubusercontent.com/2389292/264784405-1e7e5902-d48f-440d-98f4-44028f4bd90e.png") !important;
}
@mandarjog
mandarjog / avx-secondary-account.json
Last active May 14, 2024 19:42
avx-secondary-account
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Aviatrix Systems - Create IAM roles and policies to grant primary account access",
"Metadata": {
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
"default": "Aviatrix Controller's AWS account ID"
},
@mandarjog
mandarjog / gist:cf0ab120e00edbfcfeff25f54a142d97
Last active May 14, 2024 18:46
avx-secondary-account.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Aviatrix Systems - Create IAM roles and policies to grant primary account access",
"Metadata": {
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
"default": "Aviatrix Controller's AWS account ID"
},
@mandarjog
mandarjog / nix_error.log
Created November 28, 2023 19:19
nix error
INFO: Repository nixpkgs_sh_posix_config instantiated at:
/home/mjog/dev/cloudn/WORKSPACE.bazel:92:27: in <toplevel>
/home/mjog/.cache/bazel/_bazel_mjog/398b85718c017c6027437fbce67a066f/external/rules_nixpkgs_posix/posix.bzl:163:28: in nixpkgs_sh_posix_configure
/home/mjog/.cache/bazel/_bazel_mjog/398b85718c017c6027437fbce67a066f/external/rules_nixpkgs_posix/posix.bzl:23:20: in nixpkgs_sh_posix_config
/home/mjog/.cache/bazel/_bazel_mjog/398b85718c017c6027437fbce67a066f/external/rules_nixpkgs_core/nixpkgs.bzl:723:21: in nixpkgs_package
Repository rule _nixpkgs_package defined at:
/home/mjog/.cache/bazel/_bazel_mjog/398b85718c017c6027437fbce67a066f/external/rules_nixpkgs_core/nixpkgs.bzl:591:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'nixpkgs_sh_posix_config':
Traceback (most recent call last):
File "/home/mjog/.cache/bazel/_bazel_mjog/398b85718c017c6027437fbce67a066f/external/rules_nixpkgs_core/nixpkgs.bzl", line 589, column 31, in _nixpkgs_package_impl
ep 21 15:24:02 ip-10-4-184-136 vpp[50360]: received signal SIGSEGV, PC 0x7fb729955590, faulting address 0x3c
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #0 0x00007fb728ea8ea2 0x7fb728ea8ea2
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #1 0x00007fb728a42520 0x7fb728a42520
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #2 0x00007fb729955590 virtio_show + 0x90
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #3 0x00007fb72995dec2 0x7fb72995dec2
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #4 0x00007fb728e19044 0x7fb728e19044
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #5 0x00007fb728e18d17 0x7fb728e18d17
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #6 0x00007fb728e183bd vlib_cli_input + 0x7d
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #7 0x00007fb728e96ac8 0x7fb728e96ac8
Sep 21 15:24:02 ip-10-4-184-136 vpp[50360]: #8 0x00007fb728e40557 0x7fb728e40557
@mandarjog
mandarjog / fd.cpp
Created April 12, 2023 17:21
Flow_dissector_with_UDP
1) | irq_exit_rcu() {
1) | __do_softirq() {
1) | net_rx_action() {
1) 0.128 us | __usecs_to_jiffies();
1) | __napi_poll() {
1) | e1000_clean [e1000]() {
1) 0.880 us | e1000_clean_tx_irq [e1000]();
1) | e1000_clean_rx_irq [e1000]() {
1) | __napi_alloc_skb() {
1) | __alloc_skb() {
filters:
OR:
- { attr.ip: 1.2.3.4/32 }
- { attr.ip: 1.2.3.5/32 }
- AND:
- { attr.region: us-west1 }
- { dept: eng }
@mandarjog
mandarjog / Dockerfile
Created December 13, 2021 19:36
Repackage dockerfile
#
# $ tree
#
# ├── Dockerfile
# └── gcp_envoy_bootstrap.json. --> update and copy the file here.
# To build an image
# $ export IMAGE_NAME=gcr.io/gke-release/asm/proxyv2:1.11.2-asm.17-modified-1
# $ docker build -t ${IMAGE_NAME} .
# $ docker push ${IMAGE_NAME}
@mandarjog
mandarjog / dfw.yaml
Last active October 14, 2021 20:00
Envoy-dynamic-forward proxy
admin:
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9901
static_resources:
listeners:
- name: listener_0
address:
@mandarjog
mandarjog / gist:473c4f15e26ddd0b99cf135889ddb500
Created February 12, 2021 05:51
conntrack inside istio-proxy
sudo nsenter -t $PROXY_PID -n -m -a sudo cat /proc/net/nf_conntrack
ipv4 2 tcp 6 86398 ESTABLISHED src=10.60.2.21 dst=10.64.9.165 sport=37094 dport=15012 src=10.64.9.165 dst=10.60.2.21 sport=15012 dport=37094 [ASSURED] mark=0 zone=0 use=2
ipv4 2 tcp 6 19 TIME_WAIT src=10.44.40.158 dst=10.60.2.21 sport=34714 dport=15021 src=10.60.2.21 dst=10.44.40.158 sport=15021 dport=34714 [ASSURED] mark=0 zone=0 use=2
ipv4 2 tcp 6 17 TIME_WAIT src=10.44.40.158 dst=10.60.2.21 sport=34692 dport=15021 src=10.60.2.21 dst=10.44.40.158 sport=15021 dport=34692 [ASSURED] mark=0 zone=0 use=2
ipv4 2 tcp 6 73 TIME_WAIT src=10.44.40.158 dst=10.60.2.21 sport=35050 dport=15021 src=10.60.2.21 dst=10.44.40.158 sport=15021 dport=35050 [ASSURED] mark=0 zone=0 use=2
ipv4 2 tcp 6 57 TIME_WAIT src=10.44.40.158 dst=10.60.2.21 sport=34952 dport=15021 src=10.60.2.21 dst=10.44.40.158 sport=15021 dport=34952 [ASSURED] mark=0 zone=0 use=2
ipv4 2 tcp 6 51 TIME_WAIT src=10.44.40.158 dst=10.60.2.21