Skip to content

Instantly share code, notes, and snippets.

View akitectio's full-sized avatar
:shipit:

Trần Đức Duy akitectio

:shipit:
View GitHub Profile
@akitectio
akitectio / todo.model.ts
Created May 25, 2020 08:19
todo.model.ts
export default class ToDo {
Title: string;
IsCompleted: boolean;
}
@akitectio
akitectio / todo.state.ts
Created May 25, 2020 08:22
todo.state.ts
import ToDo from './todo.model';
export default class ToDoState {
ToDos: Array<ToDo>;
ToDoError: Error;
}
export const initializeState = (): ToDoState => {
return { ToDos: Array<ToDo>(), ToDoError: null };
};
@akitectio
akitectio / System Design.md
Created July 4, 2020 08:14 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#!/bin/bash
wget https://www.virtualbox.org/download/oracle_vbox_2016.asc
cat oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/virtualbox.gpg > /dev/null 2>&1
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/virtualbox.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list > /dev/null 2>&1
sudo apt update
sudo apt install virtualbox-7.0
@akitectio
akitectio / all-in-one-dbless.yaml
Created January 21, 2023 18:00
all-in-one-dbless.yaml
apiVersion: v1
kind: Namespace
metadata:
name: kong
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
apiVersion: apps/v1
kind: Deployment
metadata:
name: service01
namespace: kong
labels:
app: service01
spec:
replicas: 1
selector:
apiVersion: apps/v1
kind: Deployment
metadata:
name: service02
namespace: kong
labels:
app: service02
spec:
replicas: 1
selector:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: service01
namespace: kong
spec:
ingressClassName: kong
rules:
- http:
paths:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: service02
namespace: kong
spec:
ingressClassName: kong
rules:
- http:
paths:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: http-ingress
namespace: observability
annotations:
kubernetes.io/ingress.class: public
spec:
rules:
- host: grafana.localhost