今日已更新 412 条资讯 | 累计 19972 条内容
关于我们

标签:#cli

找到 180 篇相关文章

AI 资讯

Day 50 - How to Migrate Data from MySQL to ClickHouse®: A Step-by-Step Guide

Introduction As applications grow, traditional relational databases such as MySQL may struggle with analytical workloads involving millions of records and complex aggregations. While MySQL excels at Online Transaction Processing (OLTP), ClickHouse® is purpose-built for Online Analytical Processing (OLAP), enabling lightning-fast analytical queries on massive datasets. Migrating data from MySQL to ClickHouse® allows organizations to build high-performance reporting systems, dashboards, and real-time analytics without impacting transactional workloads. In this guide, you'll learn several approaches to migrate data from MySQL to ClickHouse®, along with their advantages, limitations, and ideal use cases. Why Migrate from MySQL to ClickHouse®? MySQL and ClickHouse® are designed for different workloads. Feature MySQL ClickHouse® Storage Model Row-based Columnar Best For Transactions (OLTP) Analytics (OLAP) Query Speed Fast for row lookups Extremely fast for large scans Aggregation Performance Moderate Extremely fast Scalability Primarily Vertical Optimized for analytical scaling Typical Use Cases Applications and transactional systems Reporting, dashboards, and analytics Migrating from MySQL to ClickHouse® makes sense when: Analytical queries are becoming slow in MySQL. You need real-time dashboards over large datasets. Reporting queries are impacting your production database. You regularly process millions or billions of rows. Migration Architecture MySQL │ ▼ Export / Synchronization │ ▼ Data Transformation │ ▼ ClickHouse® │ ▼ Dashboards / Analytics Migration Methods There are multiple ways to migrate data depending on your requirements. Method 1: CSV Export and Import (Recommended for Beginners) This is the simplest approach for performing a one-time migration of historical data. Step 1: Export Data from MySQL Run the following command inside MySQL: SELECT * INTO OUTFILE '/tmp/employees.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY ' \n ' FROM employ

2026-06-30 原文 →
AI 资讯

When to denormalize, when to join: A ClickHouse guide (2026)

Denormalization has been the standard approach to analytical data modeling for good reason. Moving joins, lookups, and business rules out of query time and into ingestion gives you the fastest possible reads for a known access pattern. For most of the past decade, it was often the practical default for latency-sensitive analytics. Earlier columnar engines and distributed query processors could execute joins, but many workloads paid for them through higher latency, higher compute cost, spill-to-disk, or distributed coordination overhead. That constraint has loosened. Modern columnar databases with advanced join algorithms have reduced the cost of runtime joins enough that normalization is now a genuinely viable option for many analytical workloads. Denormalization still delivers faster reads, but normalization can bring operational benefits: simpler pipelines, flexible schemas, and cleaner governance. Engineers can now make the decision based on their actual workload characteristics, rather than being forced into one approach by engine limitations. This guide is a decision framework for making that choice in ClickHouse. It starts with why denormalization became the default, explains what has changed in join performance, then compares the tradeoffs on both sides so you can decide where to denormalize, where to join, and where to use ClickHouse primitives that bridge the gap. For a broader evaluation framework covering latency, concurrency, ingest throughput, SQL flexibility, and cost across real-time OLAP options, see our guide to choosing a database for real-time analytics in 2026 . For a deeper comparison of how ClickHouse executes star schema joins against Druid, Pinot, and cloud DWHs, see our star schema and fast joins guide . TL;DR Denormalization and normalization are both valid modeling strategies. The right choice depends on your workload. Denormalization's tradeoffs are primarily operational : pipeline complexity, write-path overhead, data freshness lag, back

2026-06-29 原文 →
AI 资讯

PaperQuire v0.2.0 — CLI for Automating Your Docs Pipeline

Your docs pipeline, from the terminal PaperQuire v0.2.0 ships with a full command-line interface. Everything you can do in the desktop app — render, template, brand — now works from your terminal. This means you can automate document generation, integrate PaperQuire into CI/CD pipelines, and batch-process entire directories of Markdown without opening the GUI. Quick start If you installed via Homebrew, the paperquire command is already on your PATH: brew install --cask paperquire/paperquire/paperquire Verify with: paperquire version The simplest render is just: paperquire report.md This produces report.pdf in the same directory, using the default template. What you can do Render with options Apply templates, set metadata, control output: paperquire report.md -t corporate --title "Q2 Report" --author "Jane Doe" paperquire spec.md --page-size a4 --margins 0.75,0.75,0.75,0.75 --no-toc paperquire draft.md --watermark "DRAFT" -o drafts/draft.pdf All 22 flags from the desktop app's Document Setup panel are available. See the full list in the CLI Reference . Pipe through stdin/stdout PaperQuire works in Unix pipelines: cat notes.md | paperquire - --stdout > out.pdf Use - as the input file to read from stdin, and --stdout to write the PDF to stdout instead of a file. Batch render directories Render every Markdown file in a directory with one command: paperquire batch ./docs -o ./out paperquire batch ./project --glob "**/*.md" -t corporate paperquire batch ./docs --concurrency 8 --continue-on-error Use --dry-run to preview which files would be rendered without actually producing output. Manage templates List, inspect, create, and share templates: paperquire templates list paperquire templates show minimal-clean paperquire templates init my-template paperquire templates export corporate -o corporate.pqt paperquire templates import ./shared-template.pqt We also launched a community templates repo where you can browse all built-in templates and submit your own via pull request.

2026-06-29 原文 →
AI 资讯

Stop Guessing Why Your Shopify Product CSV Import Failed

You exported a product CSV, edited it in Excel or Google Sheets, and uploaded it to Shopify. Shopify shows a generic error — or worse, it silently imports the wrong thing: a handle gets overwritten, a variant attaches to the wrong product, half your rows go missing. You find out days later from a customer. Shopify CSV Preflight Validator checks the file before you upload it. It runs locally on your machine, never touches your store, needs no API key, and returns three things: fixed_products.csv — a safe copy with the unambiguous, mechanical mistakes already corrected. errors.csv — a machine-readable list of every finding (row, rule, severity, suggested fix). report.md — a human-readable report you can read in 30 seconds. No login. No upload of your catalog to a third party. Just a file in, a verdict out. Why CSV imports fail (and why the error message doesn't help) Shopify's product CSV import is a two-stage process: it validates the file, then applies rows. A file can pass the upload dialog and still misbehave on apply. The most common ways merchants get burned: A spreadsheet adds a UTF-8 BOM to the first cell. The first header ( Title ) becomes invisible-garbage + Title , so Shopify can't find the title column. Header case / legacy names drift. title instead of Title , Handle instead of URL handle . Some get ignored, some get rejected. A variant row loses its parent handle. Shopify can't tell which product the variant belongs to. Two product rows share one handle. Shopify silently keeps one and overwrites/merges the other. Image alt text with no image URL, negative prices, compare-at prices below the real price — small data bugs that ship to your live storefront. These are not exotic. They're what happens every time a human edits a CSV in a spreadsheet. What the tool actually does — a real run Here is a messy export with several of the problems above. Running: csv-preflight check messy-product-import-sample.csv --out-dir ./out --lang en produces this report.md (ve

2026-06-28 原文 →
AI 资讯

Update on Zen — we now have a package ecosystem

A few weeks back I shared some early Zen code examples. Since then, a lot has changed. We're now at v1.1.1 and the language actually has real tooling. What's new: Full CLI with package management zen publish - publish packages directly from CLI zen install - install packages from the registry zen list - browse all published packages with pagination Language improvements Struct support with literals and returns Regex with POSIX ERE ( matchRegex ) File I/O with binary support FFI bindings to C functions 162 stdlib functions across math, strings, fs, os, http, crypto, path utilities Package Registry (v1.0.0) JWT-based authentication GitHub-hosted packages Support for both runnable apps and libraries Semantic versioning The reactive variables concept from the first post is still there (that was my favorite feature), and now you can actually write real programs and share them with the community. Full docs: https://jishith-dev.github.io/zen-doc/site/ Install: curl -fsSL https://raw.githubusercontent.com/jishith-dev/Zen/main/install.sh | bash Next up: HTTP server APIs, better imports, and whatever the community asks for. Open to feedback and collaborators 💻 ✨ zen #programming #compiler #llvm #packagemanager #opensource #programminglanguage

2026-06-28 原文 →
AI 资讯

From "I Can't Click" to a Full Testing Harness: How We Built Playwright for the Terminal

I'm building TTT -- a terminal text editor and IDE written in Go. Single binary, zero config, runs anywhere. Think VS Code but in your terminal. It has syntax highlighting, LSP integration, a plugin system, an integrated terminal, git integration, etc... The source is on GitHub and I develop it with Claude Code as my pair programmer. This is the story of how a frustrating limitation turned into something genuinely useful: a built-in scripted interaction system that lets AI agents (or anyone) drive the editor like Playwright drives a browser. The problem I was deep in revamping the widget system and building out a Lua plugin API. Phases of work stacking up -- widget rendering, panel support, tree views, input fields, command registration, keybinding hooks. The kind of work where you need to see what's happening. Click a tree node, check if it expands. Open a panel, verify focus moves correctly. Run a plugin, confirm the dialog appears. Here's the thing: Claude Code can run shell commands and read files. It cannot interact with a live TUI session. The editor launches, takes over the terminal, and that's it -- Claude is blind. Step 1: tui-use (what we had) The project already had functional tests using tui-use , a JavaScript library that drives a real terminal binary. It can type, press keys, wait for text to appear, and take snapshots: const tui = await start ( " bin/ttt " , [ " test-file.go " ]); await tui . waitFor ( " test-file.go " ); await tui . exec ( " editor.joinLines " ); const screen = await tui . snapshot (); expect ( screen ). toContain ( " joined line " ); This works. But it's slow -- each test spawns the binary, waits for screen renders, polls with timeouts, and parses terminal escape codes. And critically, it can't click . Mouse events aren't supported. For a widget system with tree views, buttons, and split panels, that's a dealbreaker. Step 2: Debug commands (the workaround) So we added a Debug: Simulate Click command to the editor itself. Open the co

2026-06-28 原文 →
AI 资讯

Building a Local-First Voice Copilot for the Shell with HoldSpeak and Ollama

The Promise: A Private, Voice-Activated Shell The dream of a voice-activated command line is compelling: speak a command, see it executed. But for many developers, piping terminal input through a cloud-based API is a non-starter. This is the promise of a project like karolswdev/HoldSpeak , a cross-platform tool for local voice typing. Could it be the core of a truly local-first, push-to-talk shell assistant? I paired it with Ollama and a local llama3.2 model to find out. The goal was simple: hold a key, speak a command like "list files by size," release the key, and have the correct shell command appear, gated by a final confirmation prompt. This project turned out to be a tale of two stacks: one for voice that was surprisingly clean, and one for language that revealed the sharp edges of the local-first promise. Building the Demo To test this idea, I built a small Python script to tie these components together. You can find the complete code for this experiment, including the prompt engineering, in my demo project on GitHub: voice-activated-shell-demo . Setup Instructions Recreating this local-first voice assistant involves a few distinct steps: Install HoldSpeak from Source : Since we need to use it as a library, clone the repository and install it in editable mode. git clone https://github.com/karolswdev/HoldSpeak.git cd HoldSpeak pip3 install -e . Install and Run Ollama : Use Homebrew (on macOS) to install the Ollama CLI, then start the server. brew install ollama ollama serve Pull a Local LLM : In a separate terminal, pull a small, capable model. I used llama3.2 . ollama pull llama3.2 Grant Permissions (macOS) : To allow the hotkey listener to work, your terminal application (e.g., iTerm, Terminal.app) must be given Accessibility permissions in System Settings > Privacy & Security > Accessibility . Run the Demo Script : With the setup complete, you can run the final Python script that integrates all these components. Finding the Seams in HoldSpeak HoldSpeak pres

2026-06-27 原文 →
AI 资讯

Building Cross-Platform Distributed Scheduling Platform — My Workflow & Tech Stack

Hi folks! I’m the architect behind WLOADCTL, a commercial workload scheduling system for enterprise automated task orchestration and RPA docking. A quick share of my daily work focus: Distributed task scheduling core development with Java & C Cross-system automation scripts built by Python & Shell Backend frontend based on SpringBoot + Vue3 Edge traffic protection & access optimization using Cloudflare Enterprise RPA integration to automate repetitive backend operations I’ve been tackling a lot of real-world pain points like cross-Linux distro compatibility, high-frequency API access security and mass task concurrency control recently. If you’re working on workload scheduling, backend automation or Cloudflare security tuning, feel free to leave a comment to chat!

2026-06-26 原文 →
AI 资讯

linux lab

Lab 1 – Linux Navigation & Files (20 points) Task 1 Create the following structure. /home/student/ ├── project │ ├── logs │ ├── scripts │ └── backup Requirements create all directories create app.log error.log install.sh inside correct folders. Task 2 Move app.log into backup Task 3 Delete error.log Task 4 Find install.sh using only one command. Lab 2 – Permissions (20 points) Create secret.txt Requirements Owner read/write Group read Others no access Verify permissions. Create a new user developer Switch to that user. Can the user read secret.txt Explain why. Lab 3 – Processes (20 points) Start a process Example sleep 500 Questions Find PID Kill the process Verify it stopped. Bonus Find the top five processes using the most memory. Lab 4 – Disk Space (20 points) Create a directory practice Generate a file about 100 MB. Questions How much disk space is used? How much free disk space remains? Which command shows directory size? Lab 5 – Networking (30 points) Find Your hostname private IP default gateway DNS server Ping 8.8.8.8 Questions Did it work? Ping google.com If this fails but 8.8.8.8 works, what is the problem? Display All listening ports. What service is listening on port 22? Lab 6 – Troubleshooting (40 points) Scenario 1 A user says "Internet is not working." Show the commands you would run. Expected ideas ip addr ping 8.8.8.8 ping google.com ip route cat /etc/resolv.conf Explain each step. Scenario 2 A website is down. Questions How do you verify server is running? nginx is running? port 80 is listening? firewall issue? logs? Commands should include systemctl status nginx journalctl -u nginx ss -tuln curl localhost systemctl restart nginx Scenario 3 SSH stopped working. How would you troubleshoot? Expected ping server ssh localhost systemctl status ssh ss -tulpn journalctl -xe systemctl restart ssh Lab 7 – Mixed Practical (Best Assessment) Tell students: You are the new Junior DevOps Engineer. The manager asks you to prepare a server. Complete all tasks. Ta

2026-06-26 原文 →