Skip to content

Instantly share code, notes, and snippets.

View dev117uday's full-sized avatar
💭
Buffering knowledge.... Please wait

Uday Yadav dev117uday

💭
Buffering knowledge.... Please wait
View GitHub Profile
@dev117uday
dev117uday / btree_insert.cpp
Created September 24, 2023 16:38
Btree insertion
View btree_insert.cpp
#include <iostream>
using namespace std;
class BTreeNode
{
int *keys;
int t;
BTreeNode **C;
int n;
View fedora setup.md

Setup.txt

OS setup

add 
max_parellel_downloads=10 
to 
/etc/dnf/dnf.conf
@dev117uday
dev117uday / setup.md
Last active June 2, 2022 13:17
My PC Setup
View setup.md

Setup.txt

OS setup

gedit admin:///etc/sysctl.conf

vm.swappiness=10
@dev117uday
dev117uday / solution.md
Created August 19, 2021 10:08
Lab Setting Up a Replica Set : MongoDB university
View solution.md
mkdir -p /var/mongodb/db/{1,2,3}
sudo mkdir -p /var/mongodb/pki/
openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile
chmod 400 /var/mongodb/pki/m103-keyfile
storage:
  dbPath: /var/mongodb/db/1
@dev117uday
dev117uday / nginx.conf
Created May 3, 2021 08:41
Nginx.conf for docker deploy of vuejs on VM
View nginx.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@dev117uday
dev117uday / Dockerfile
Created May 3, 2021 08:38
Dockerfile for deploying vue.js on VM
View Dockerfile
FROM node:15.12.0-alpine3.10 as build-stage
WORKDIR /app
COPY . ./
RUN yarn install && yarn run build
FROM nginx as production-stage
RUN mkdir /app
COPY - from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
@dev117uday
dev117uday / tool.md
Created November 30, 2020 18:38
Golang tooling
View tool.md

Golang tooling

Video : Go toolings

  • Formattor : gofmt main.go

    • to view diff use -d
  • to get all import inside a program : goimports

  • to compile for windows : GOOS=windows go build