Skip to content

Instantly share code, notes, and snippets.

View debu999's full-sized avatar

Debabrata Patnaik debu999

  • JP MORGAN CHASE N.A.
  • Bengaluru
  • 06:28 (UTC +05:30)
  • X @i_m_debu
View GitHub Profile
@debu999
debu999 / App.java
Last active December 20, 2023 03:09
Rest API university student Max per city for hacker rank
/*
* University Data App
* Description: This Java program retrieves university data from a REST API, performs analysis, and prints results.
* Author: Your Name
*/
package org.doogle;
import java.io.BufferedReader;
import java.io.IOException;
@debu999
debu999 / 1.README.MD
Created May 29, 2023 16:52
QUARKUS VSCODE CMDER AKA CONEMU

If using cmder do use a custom shell executable to run tasks else you might find source file not found issue.

"windows": {
    "options": {
      "shell": {
        "executable": "cmd.exe",
        "args": [
          "/d", "/c", "[cmder_root]\\vendor\\init.bat", "&&"
 ]
@debu999
debu999 / .gitconfig
Created May 27, 2023 14:08
gitconfig
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[user]
name = DDDD PPPP
email = aaa_bbb@ccc.com
[core]
autocrlf = Input
@debu999
debu999 / 4. MONGODB CRUD OPERATIONS.md
Last active May 25, 2023 04:16
MongoDB Crud Operations

Create a new db via mongosh or change to exisiting db.

use oreillylearning
switched to db oreillylearning
db
oreillylearning

db.books.insertOne({title: 'mastering oreilly mongoDB', isbn: 101})
db.books.find()
@debu999
debu999 / ckad_exam.md
Last active April 16, 2024 15:09
CKAD Exam

===========================================================================================

get contexts

alias k=kubectl
k config get-context
k config current-context
echo " k config current-context" > /opt/course/1/context_default_kubectl.sh
chmod +x /opt/course/1/context_default_kubectl.sh
bash /opt/course/1/context_default_kubectl.sh
cat .kube/config | grep current
package com.example.codecs;
import io.quarkus.kafka.client.serialization.ObjectMapperDeserializer;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
public class ProcessInstanceDataEventDeserializer extends ObjectMapperDeserializer<ProcessInstanceDataEvent> {
public ProcessInstanceDataEventDeserializer() {
super(ProcessInstanceDataEvent.class);
}
}
@debu999
debu999 / 01.MONGO DB SCHEMA DESIGN.md
Last active July 18, 2023 12:54
Learn Mongo DB - Various Notes

In MongoDB, we have to base our modeling on our application-specific data access patterns. Finding out the questions that our users will have is paramount to designing our entities. In contrast to an RDBMS, data duplication and denormalization are used far more frequently, for good reason.

Supported Data Types

The sorting order of different types of data, from highest to lowest, is as follows:
Max. key/Regular expression/Timestamp/Date/Boolean/ObjectID/Binary data/Array/string/Numbers/Null/Min. key

Screenshot 2023-01-16 at 8 00 07 AM

Schema Design

  • Index early and often
@debu999
debu999 / idea
Created January 15, 2023 06:04 — forked from agoncal/idea
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@debu999
debu999 / httpie-graphql.sh
Last active January 3, 2023 10:34 — forked from 2color/httpie-graphql.sh
How to send a GraphQL request with HTTPie
http -f https://graphqlapiurl/graphql Authorization:"Bearer accessToken" query="query { Process(id=\"test\") { id title } }"
http -f https://graphqlapiurl/graphql Authorization:"Bearer accessToken" query="mutation { Process(id=\"test\", title=\"testtitle\") { id title } }"
kubectl get networkpolicy deny-metadata -o yaml
kubectl explain networkpolicy.spec.egress
kubectl explain networkpolicy.spec.egress.to
kubectl explain networkpolicy.spec.egress.to.ipBlock

kubectl run busybox --image=busybox --rm -it /bin/sh
wget https://www.google.co.in
kubectl create namespace test
kubectl run busybox --image=busybox --rm -it -n test /bin/sh