This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| rabbitmq: | |
| image: rabbitmq:4.1.6-management | |
| ports: | |
| # AMQP port: Used by applications (publishers/consumers) | |
| - "5672:5672" | |
| # Management UI port: Access the web interface at http://localhost:15672 | |
| - "15672:15672" | |
| # Set default credentials (NOTE: Change these for production!) | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| kafka: | |
| image: confluentinc/cp-kafka:8.0.0 | |
| ports: | |
| - "9092:9092" | |
| - "9093:9093" | |
| - "9094:9094" | |
| environment: | |
| KAFKA_PROCESS_ROLES: "broker,controller" | |
| KAFKA_NODE_ID: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| mongo: | |
| image: mongo:7.0.9 | |
| restart: always | |
| container_name: demo_mongo | |
| ports: | |
| - '27017:27017' | |
| volumes: | |
| - mongo-data:/data/db | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| redis: | |
| image: redis:7.0 | |
| restart: always | |
| ports: | |
| - '6379:6379' | |
| command: redis-server --requirepass "demo" | |
| volumes: | |
| - redis-data:/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| zookeeper: | |
| image: bitnami/zookeeper:3.8.1 | |
| hostname: zookeeper | |
| ports: | |
| - "2181:2181" | |
| environment: | |
| ZOOKEEPER_CLIENT_PORT: 2181 | |
| ZOOKEEPER_TICK_TIME: 2000 | |
| ALLOW_ANONYMOUS_LOGIN: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Created by mvp | |
| # pip install PyJWT | |
| import datetime | |
| import jwt | |
| SECRET = "<Some key here>" | |
| def encode_auth_token(data, exp_secs=86400): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use one in these way: | |
| * ssh-keygen -t ed25519 -C "your_email@example.com" | |
| If you are using a legacy system that doesn't support the Ed25519 algorithm, use: | |
| * ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| db: | |
| image: postgres:17.2-bookworm | |
| environment: | |
| - POSTGRES_USER=postgres | |
| - POSTGRES_PASSWORD=postgres | |
| - POSTGRES_DB=postgres | |
| ports: | |
| - "5433:5432" | |
| restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install python-whois | |
| import whois | |
| def get_domain_info(domain): | |
| try: | |
| # Query the domain information | |
| domain = whois.whois(domain) | |
| print(domain) | |
| # print(f"Domain Name: {domain.domain_name}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install pymupdf | |
| import os | |
| import fitz # PyMuPDF | |
| def pdf_to_images(pdf_path, output_folder, zoom=1.0): | |
| """ | |
| Convert PDF pages to images with a zoom scale. |
NewerOlder