Speed Up SQLite Database Copying: The Text Dump Trick

2025-05-01
Speed Up SQLite Database Copying: The Text Dump Trick

The author encountered a speed bottleneck when copying large SQLite databases due to the large size of index files. They discovered that dumping the database as a text file (using the `.dump` command) and then compressing it with gzip significantly reduces file size, thereby speeding up the copy process. Compared to directly copying a 3.4GB database, this method compressed the file to 240MB, resulting in a 14x speed improvement. Additionally, this method avoids database corruption issues that can arise from updates during the copy process, improving reliability.

Read more
Development database copying

GitHub Actions Security Risk: The Mutable Tag Vulnerability

2025-03-25
GitHub Actions Security Risk: The Mutable Tag Vulnerability

A recent attack on the tj-actions/changed-files GitHub Action highlighted a security vulnerability. By modifying a mutable Git tag, attackers could inject malicious code and leak secrets from build logs, which are public for public repositories. The author shares a shell script to audit used GitHub Actions, emphasizing the importance of using immutable commit IDs for security. The script analyzes workflow YAML files to identify and count actions, prioritizing those from large organizations or self-written scripts over less trustworthy ones. The author advocates for prioritizing actions from large organizations and writing custom scripts when possible.

Read more
Development