Skip to content

Instantly share code, notes, and snippets.

View pancudaniel7's full-sized avatar
🎯
Focusing

Daniel pancudaniel7

🎯
Focusing
View GitHub Profile
@pancudaniel7
pancudaniel7 / system-design-thinking.md
Last active September 5, 2024 08:59
System Design Thinking

System Design Thinking Guide

1. Requirements Gathering

  • Clarify the requirements: Ask clarifying questions to understand both functional and non-functional requirements. This will help ensure that you focus on the correct aspects of the system.
    • Functional Requirements: Core features (e.g., upload a file, search for a user).
    • Non-functional Requirements: Scalability, performance, latency, availability, consistency, and security.
  • Example Questions:
    • What’s the expected user base? How many daily active users?
  • Is there a focus on low-latency or high throughput?
@pancudaniel7
pancudaniel7 / business-cases.md
Created April 27, 2024 09:17
Business Cases

I will need you to createa .md downloadable file with the title How our product solves the problem? We will make a list of business cases:

  1. Invitation creation
  • Event owner can design the basic virtual invitation using template
  • Advance customisation of the invitation (Editor)
  • Visualization of the final invitation UI app
  • Invitation preferences like (sms reminder)
  • GDPR consent before collecting quests PII (personal identification information)
  • Service payment
@pancudaniel7
pancudaniel7 / business-plan.md
Last active June 1, 2024 09:47
Business Plan

Final Business Plan for Virtual Event Invitation SaaS

Introduction

Our SaaS platform revolutionizes the traditional approach to wedding invitations by introducing a digital, eco-friendly, and highly customizable solution that addresses the specific needs of modern couples and event planners. The service simplifies the process of invitation management while offering personalized experiences for each guest.

1. The Problem We Are Solving

Traditional wedding invitations are often expensive, time-consuming to distribute, and not environmentally sustainable. They also lack flexibility in managing RSVPs and communicating updates or changes to guests efficiently.

2. Solution: Virtual Event Invitation SaaS

#!/bin/bash
# List running Docker containers
echo "Running Docker containers:"
docker ps --format "table {{.Names}}\t{{.Image}}\t{{.ID}}" | nl -w2 -s': '
# Ask the user to select a container
echo "Enter the number of the container you want to bash into:"
read container_number
#!/bin/bash
# Size of each log message
LOG_MESSAGE_SIZE=100000
# Function to rapidly log messages
function log_messages {
for i in {1..100000}; do
LOG_MESSAGE=$(head -c "$LOG_MESSAGE_SIZE" /dev/urandom | tr -dc 'A-Za-z0-9')
#!/usr/bin/bash
echo "Reloading systemd daemon..."
sudo systemctl daemon-reload
echo "Enabling and starting the logrotate timer..."
sudo systemctl enable --now log_size_check.timer
echo "Checking the status of the timer..."
sudo systemctl status log_size_check.timer
#!/usr/bin/bash
# Logrotate Configuration
echo "Setting up Logrotate configuration for your application..."
sudo cat <<EOF > /etc/log_size_check.conf
/var/log/syslog {
su root root
size 100M
copytruncate
rotate 30

Logrotate Configuration with Systemd Timer

This document explains how to set up logrotate to manage log files more frequently using a systemd timer. This approach is useful for log files that grow rapidly and need to be rotated more often than the daily rotation typically provided by cron jobs.

Logrotate Configuration

First, set up the logrotate configuration for your specific log file. Create a file in /etc/logrotate.d/ for your application. Here is an example configuration that rotates a log file when it reaches a certain size:

#!/bin/bash
# Logrotate Configuration
echo "Setting up Logrotate configuration for your application..."
cat <<EOF > /etc/logrotate.d/logrotate_size_check
/var/log/syslog {
size 100M
rotate 30
compress
missingok

Logrotate Configuration with Systemd Timer

This document explains how to set up logrotate to manage log files more frequently using a systemd timer. This approach is useful for log files that grow rapidly and need to be rotated more often than the daily rotation typically provided by cron jobs.

Logrotate Configuration

First, set up the logrotate configuration for your specific log file. Create a file in /etc/logrotate.d/ for your application. Here is an example configuration that rotates a log file when it reaches a certain size: