Mermaid.js text-to-rendering diagram examples

Mermaid.js allows you to create diagrams using text-based syntax. This post shows how to create various diagram types, from simple flowcharts to complex system architectures. Each example includes both the code and its rendered result. 1. Basic Flowchart Here’s the code: flowchart LR A[Start] --> B{Is it working?} B -->|Yes| C[Great!] B -->|No| D[Debug] D --> B Which renders as: flowchart LR A[Start] --> B{Is it working?} B -->|Yes| C[Great!] B -->|No| D[Debug] D --> B 2. Sequence Diagram The code: ...

November 10, 2024 · 9 min · 1845 words

Video to Text Rendering: A Simple AI Pipeline

Here’s a powerful one-liner that converts any video into a concise text summary using modern AI tools: #!/bin/sh yt-dlp -x --audio-format mp3 "$1" -o "audio.mp3" && \ whisper "audio.mp3" --model medium --output_format txt --output_dir . && \ cat audio.txt | ollama run mistral "Summarize the following text, removing any fluff and focusing on key points: ${cat}" > summary.txt && \ rm audio.mp3 audio.txt && cat summary.txt How It Works The pipeline combines three powerful tools: yt-dlp: A robust video downloader that handles YouTube, Vimeo, and many other platforms. It extracts just the audio track to minimize processing time. ...

October 12, 2024 · 2 min · 268 words

Git vs Blockchain: A Comparison

When discussing version control and distributed ledger technologies, it’s possible to think of Git and blockchain and get confused on where they overlap and where they go their own way. Both use hash chains to maintain data integrity. However, their fundamental purposes and ideal use cases are different. In this post, we explore what each technology was designed to solve and when blockchain actually offers capabilities that Git cannot provide. ...

September 2, 2023 · 3 min · 608 words