Skip to content

Instantly share code, notes, and snippets.

View roshane's full-sized avatar
🤘

roshane roshane

🤘
View GitHub Profile
@roshane
roshane / system-design-interview.md
Last active June 8, 2022 12:04
system design interview short notes

horizontal vs vertical scalign

single server design

  • why
    • no much traffic
    • database/application-server/fron-end all deployed in one box
    • low budget
    • easy to maintain
  • if this is a commercial software system very bad
  • single point of failure
@roshane
roshane / application.yaml
Created July 14, 2022 23:36
DGS dynamic GraphQL schema
server:
port: 9000
dgs:
graphql:
schema-locations:
- "file:///D:/IdeaProjects/Temp/schema.graphqls"
spring:
application:
@roshane
roshane / Booking.java
Created March 22, 2023 04:13
Booking Algo
import java.time.*;
import java.time.format.*;
import java.util.*;
public class BookingAlgorithm {
public static void main(String[] args) {
// Example inputs
LocalDateTime startTime = LocalDateTime.of(2023, 3, 22, 9, 0);
LocalDateTime endTime = LocalDateTime.of(2023, 3, 22, 17, 0);
@roshane
roshane / Dockerfile
Created March 24, 2024 22:06
spring application custom docker build multistage
ARG ARTIFACT_NAME=application.jar
ARG BUILD_DIR=/usr/app
# Use an appropriate base image
FROM azul/zulu-openjdk-alpine:17.0.8.1-17.44.53 AS build
ARG ARTIFACT_NAME
ARG BUILD_DIR
# Set working directory
WORKDIR $BUILD_DIR