Skip to content

Instantly share code, notes, and snippets.

View dsrathore1's full-sized avatar
:octocat:
Focusing

Digpal Singh Rathore dsrathore1

:octocat:
Focusing
View GitHub Profile
@dsrathore1
dsrathore1 / Commit options
Created February 22, 2026 01:29
These helps to commit in professional way
| Type | Used For |
| ---------- | ------------------------------------- |
| `feat` | New feature / endpoint |
| `fix` | Bug fix |
| `refactor` | Code restructure (no behavior change) |
| `perf` | Performance improvement |
| `test` | Adding/updating tests |
| `docs` | Documentation changes |
| `build` | Docker, dependencies, CI |
@dsrathore1
dsrathore1 / kind-config.yaml
Last active February 22, 2026 01:30
Creating Kind cluster snippet
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
@dsrathore1
dsrathore1 / Dockerfile.express
Last active August 3, 2024 14:29
Docker files production ready
#* Use official NodeJS image as the base - Stage 1 (Builder stage)
FROM node:22-alpine AS builder
#* Create and Change to the app dir
WORKDIR /ex-app
#* Copy the package.json & package-lock.json files to /ex-app dir
COPY package*.json .
#* Install all the dependencies
@dsrathore1
dsrathore1 / Terraform_Notes.txt
Last active March 13, 2024 00:55
Learn Terraform
1. terraform plan
--> The `terraform plan` command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure.
--> Good practice to use this before upload or apply any configuration file
2. terraform validate
--> It checks all the errors in code
3. terraform apply
--> This command is most important, when we apply this command then all the configurations written into config file that get configured as per configurations.
--> The terraform apply command executes the actions proposed in a Terraform plan.
@dsrathore1
dsrathore1 / workflow.yml
Last active February 18, 2025 04:51
GitHub Actions Snippet
name: BLOG'S WORKFLOW
run-name: Actions number ${{github.run_number}}
on:
push:
branches:
- "main"
jobs:
build_next_app:
@dsrathore1
dsrathore1 / deployment-ref.yml
Last active July 27, 2024 03:04
Kubernetes notes
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-deployment
labels:
app: frontend
spec:
replicas: 3
selector:
matchLabels:
@dsrathore1
dsrathore1 / commands.txt
Last active January 31, 2024 09:48
Importants commands on AWS
#* For execute the key of EC2 instance terminal
chmod 400 key.pem
#* connect terminal in local machine
ssh -i <key-name>@<host-ip>
#* Install nvm (node version manager) for latest node on AWS cloud
Step 1
> Go to official site and copy paste the installation link of nvm
Step 2
@dsrathore1
dsrathore1 / importFont.md
Last active March 14, 2024 10:24
Add Custom google font in react-native project

Step 1 :-

  • Install required font.

npx expo install expo-font @expo-google-fonts/<Name-of-font>

Step 2 :-

  • Add Plugin code into 'app.json' file
@dsrathore1
dsrathore1 / Queries.sql
Last active January 31, 2024 10:51
Important Postgresql queries with new features
-- Active: 1701163633093@@localhost@5432@test
--! Create new database
CREATE DATABASE LEARN;
--! Drop database
DROP DATABASE LEARN;
@dsrathore1
dsrathore1 / docker-compose.db.yml
Last active January 31, 2024 04:21
Docker Compose file for connection between PgAdmin4 and Postgres with docker
version: "3"
volumes:
db_vol:
name: "postgres-vol"
pg_admin-vol:
services:
# Adminer Container
pg_admin: