Skip to content

Instantly share code, notes, and snippets.

View shiponcs's full-sized avatar
💻
Coding

Abdul Matin shiponcs

💻
Coding
View GitHub Profile
sudo rm -rf /
@shiponcs
shiponcs / error.md
Created March 1, 2024 06:53
bazel build //contrib/exe:envoy-static --sandbox_debug --verbose_failures --config=docker-clang
ERROR: /home/user/office/envoy-build/envoy-main/contrib/vcl/source/BUILD:72:8: Executing genrule //contrib/vcl/source:build_files failed: (Exit 123): process-wrapper failed: error executing command 
  (cd /home/user/.cache/bazel/_bazel_user/85b43671366bdc8fbb781cf3625a62cc/sandbox/docker/4723/execroot/envoy && \
  exec env - \
    BAZELISK_SKIP_WRAPPER=true \
    COLORTERM=truecolor \
    DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus' \
    DESKTOP_SESSION=ubuntu \
    DISPLAY=:0 \
    GDMSESSION=ubuntu \
@shiponcs
shiponcs / output.sh
Created February 29, 2024 11:58
bazel build //contrib/exe:envoy-static --sandbox_debug --verbose_failures
➤ bazel build //contrib/exe:envoy-static --sandbox_debug --verbose_failures
INFO: Analyzed target //contrib/exe:envoy-static (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: From Foreign Cc - Make: Building dlb:
1709207842.885253807: src/main/tools/linux-sandbox.cc:152: calling pipe(2)...
1709207842.885286387: src/main/tools/linux-sandbox.cc:171: calling clone(2)...
1709207842.886051758: src/main/tools/linux-sandbox.cc:180: linux-sandbox-pid1 has PID 1283193
1709207842.886100449: src/main/tools/linux-sandbox-pid1.cc:681: Pid1Main started
1709207842.886176730: src/main/tools/linux-sandbox.cc:197: done manipulating pipes
1709207842.886264821: src/main/tools/linux-sandbox-pid1.cc:285: working dir: /home/user/.cache/bazel/_bazel_user/85b43671366bdc8fbb781cf3625a62cc/sandbox/linux-sandbox/16954/execroot/envoy
apiVersion: kubedb.com/v1alpha2
kind: Postgres
metadata:
name: pg-tls-15-3-new
namespace: poc
spec:
version: "15.3"
replicas: 1
configSecret:
name: user-conf
@shiponcs
shiponcs / kf-guide.md
Last active November 15, 2023 06:37
How to run kafka server and client from local machine

First download this and extract it followed by getting inside.

Run Kafka server on local machine

Follow this

Create a topic to the server (running in local machine):

bin/kafka-topics.sh --create --topic quickstart-matin --bootstrap-server localhost:19092

Create a topic to the server (running in remote machine by KubeDB):

@shiponcs
shiponcs / echo2.yaml
Created July 27, 2023 10:20
Some fundamental envoy configuration yaml files
# this configure file is only for envoy-filter-example repo
admin:
access_log_path: ./loglog.log
address:
socket_address:
address: 127.0.0.1
port_value: 0
static_resources:
clusters:
name: cluster_0
@shiponcs
shiponcs / tech_links_shortlist.md
Last active June 23, 2023 09:14
Whenever I start to learn a new technology I almost every time find it demotivating the way the documentations and references are organized: nested repeated, redundant and confusing. So, I decided make a short list of links that I will create after giving a thorough visit on the official website of that technology.
@shiponcs
shiponcs / bazel.md
Last active June 26, 2023 06:04
Bazel Notes
  1. The root directory of the project is where WORKSPACE file is created.
  2. All path is relative to the root directory.
  3. BUILD is located per package.
stage3/
├── lib
│   ├── BUILD
│   ├── hello-time.cc
│   └── hello-time.h
├── main
@shiponcs
shiponcs / test_grpc.md
Last active June 15, 2023 06:43
Test a gRPC server with grpcurl tool

grpcurl tool usages

I have a grpc server running at 0.0.0.0:50051. I'll show how you can use grpcurl to test it. Before that, install grpcurl (mybe using go).

  1. List services the server provides:
user@matin ~/o/g/examples ((v1.55.1))> grpcurl  -plaintext localhost:50051 list
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection
helloworld.Greeter
/*
here case1 is always true before case2 (i.e. 1st call of help -> case1 is true, 2nd call of help -> case2 true).
So, in the 2nd call, case2 is true where we're using exp, ctinfoPrev, saddr_m what have been initialized before in case1.
Note: these structures are allocated in module init function which is called when the module is loaded
*/
union nf_inet_addr *saddr_m;
struct sk_buff* skbPrev;
enum ip_conntrack_info ctinfoPrev;
struct nf_conntrack_expect *exp;