Skip to content

Instantly share code, notes, and snippets.

View ngoc24794's full-sized avatar

Ngọc Nguyễn ngoc24794

View GitHub Profile
@ngoc24794
ngoc24794 / kien-truc-database-cho-saas-multi-tenant.md
Last active November 13, 2025 01:33
Kiến trúc Database cho SaaS Multi-Tenant

Kiến trúc Database cho SaaS Multi-Tenant: Phân tích sâu 3 mô hình và chiến lược Hybrid

kien-truc-database-cho-saas-multi-tenant-0

Khi bắt tay vào xây dựng một ứng dụng SaaS (Software as a Service), có vô số quyết định quan trọng bạn phải đưa ra. Nhưng có một quyết định nền tảng, thường phải quyết ngay từ đầu, sẽ ảnh hưởng sâu sắc đến toàn bộ vòng đời sản phẩm của bạn: "Chúng ta sẽ lưu trữ và phân tách dữ liệu của các khách hàng (tenants) như thế nào?"

Đây không đơn thuần là một lựa chọn kỹ thuật khô khan. Cách bạn chọn kiến trúc cơ sở dữ liệu sẽ tác động trực tiếp đến chi phí vận hành, khả năng mở rộng, mức độ bảo mật, khả năng tùy chỉnh, và thậm chí là cả mô hình kinh doanh của bạn. Chọn sai, bạn có thể bị "mắc kẹt" với chi phí hạ tầng leo thang, hiệu năng kém, hoặc tệ hơn là một lỗ hổng bảo mật nghiêm trọng.

@ngoc24794
ngoc24794 / gist:778dc17ebec3c582912f226f22284901
Created May 26, 2025 07:26
Jenkins Bot Discord Privacy Policy
Privacy Policy for Jenkins Discord Bot
1. Introduction
This Privacy Policy explains how the Jenkins Discord Bot ("Bot") collects, uses, and protects data when you ("User") interact with the Bot. The Bot is designed to send notifications about Jenkins build statuses to Discord channels via webhooks. By using the Bot, you agree to the practices described in this policy.
2. Data We Collect
The Bot collects and processes the following data:
Webhook URLs: Discord webhook URLs provided by the User to enable the Bot to send messages to specific channels.
Jenkins Build Data: Information about Jenkins build statuses (e.g., success, failure, or pipeline events) sent by the Jenkins server to the Bot for notification purposes.
Discord Metadata: Limited metadata, such as channel IDs, required to deliver notifications via Discord’s API or webhooks.
@ngoc24794
ngoc24794 / gist:31f2f3ea1b3a85073d1337aae310de86
Created May 26, 2025 07:25
Jenkins Bot Discord Terms of Service
Terms of Service for Jenkins Discord Bot
1. Introduction
This Terms of Service Agreement ("Agreement") governs your use of the Jenkins Discord Bot ("Bot"), which integrates with Discord to provide notifications and updates from a Jenkins server. By using the Bot, you ("User") agree to be bound by these terms and Discord’s Terms of Service (available at https://discord.com/terms).[](https://discord.com/terms)
2. Purpose of the Bot
The Jenkins Discord Bot is designed to send notifications to Discord channels about Jenkins build statuses, such as success, failure, or other pipeline events, using Discord webhooks. The Bot is provided "as is" without warranties of any kind.
3. User Responsibilities
Compliance with Discord Policies: Users must comply with Discord’s Terms of Service and Developer Terms of Service when interacting with the Bot.
Proper Configuration: Users are responsible for correctly configuring the Bot’s webhooks and ensuring the Jenkins server has appropriate permissions to send messages to the d
@ngoc24794
ngoc24794 / CSharp-DotNet-WebAPI
Created September 6, 2024 02:17
C#, .NET Framework và Tạo Web API
# C#, .NET Framework và Tạo Web API
## 1. Cơ bản về C# và .NET Framework
### C# là gì?
C# (đọc là "C Sharp") là một ngôn ngữ lập trình hướng đối tượng mạnh mẽ được phát triển bởi Microsoft. Nó có các đặc điểm sau:
- Cú pháp dễ học, tương tự với C++ và Java
- Hỗ trợ đầy đủ các khái niệm lập trình hướng đối tượng như kế thừa, đa hình, encapsulation
const path = require('path');
module.exports = {
mode: 'development',
devtool: 'source-map',
resolve: {
extensions: ['.ts'],
alias: {
'@': path.resolve(__dirname, 'src/'),
},
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es6",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules"]
}
module.exports = {
env: {
browser: true,
es2020: true,
},
extends: [
'airbnb-base',
],
parser: '@typescript-eslint/parser',
parserOptions: {