cli

81 posts tagged “cli”.

  1. 2024
  2. A script to capture frames from a QuickTime video

    I was putting together some notes for a talk I gave, and I wanted an efficient way to create screenshots of specific moments in a video of that talk.

    2 min read
  3. Browsing your local git checkout of homebrew-core

    The homebrew-core repository contains all of the default formulas for Homebrew. It's a huge repo, and if you browse it through the GitHub web interface you can run into errors like this one…

    1 min read
  4. Enabling WAL mode for SQLite database files

    I was getting occasional messages from a Datasette instance that was running against a bunch of different SQLite files that were updated by cron scripts (my personal Dogsheep).

    1 min read
  5. Adding a CORS policy to an S3 bucket

    Amazon S3 buckets that are configured to work as public websites can support CORS, allowing assets such as JavaScript modules to be loaded by JavaScript running on other domains.

    2 min read
  6. Assistance with release notes using GitHub Issues

    I like to write the release notes for my projects by hand, but sometimes it can be useful to have some help along the way. Today I figured out this recipe.

    2 min read
  7. Escaping strings in Bash using !:q

    TIL this trick, via Pascal Hirsch on Twitter. Enter a line of Bash starting with a comment, then run on the next line to see what that would be with proper Bash escaping applied.

    1 min read
  8. How to scp files to and from Fly

    I have a Fly instance with a 20GB volume, and I wanted to copy files to and from the instance from my computer using . Here's the process that worked for me. 1. Connect to Fly's WireGuard network.

    1 min read
  9. Export a Mastodon timeline to SQLite

    I've been playing around with the Mastodon timelines API. It's pretty fun! I'm running my own instance which means I don't feel limited by politeness in terms of rate limits - if I'm just using my own…

    1 min read
  10. Deploying Python web apps as AWS Lambda functions

    I've been wanting to figure out how to do this for years. Today I finally put all of the pieces together for it. AWS Lambda can host functions written in Python.

    6 min read
  11. 2023
  12. Compile a new sqlite3 binary on Ubuntu

    I wanted to try the backup command that was released in SQLite3 3.27.0 on 2019-02-07. Ubuntu 18.04.4 LTS has SQLite 3.22.0 from 2018-01-22.

    1 min read
  13. Athena error: The specified key does not exist

    I was trying to run Athena queries against compressed JSON log files stored in an S3 bucket. No matter what I tried, I got the following error: The specified key does not exist.

    1 min read
  14. Atuin for zsh shell history in SQLite

    Atuin (via Rhet Turnbull) "replaces your existing shell history with a SQLite database". Obviously I had to try this out!

    1 min read
  15. Compile and run a new SQLite version with the existing sqlite3 Python library on macOS

    I've been trying to figure this out for years. Previous notes include Using LD PRELOAD to run any version of SQLite with Python (Linux only), and Building a specific version of SQLite with pysqlite on…

    1 min read
  16. Compiling the SQLite spellfix.c module on macOS

    I wanted to browse a backup copy of my Plex database, which is a SQLite file. I tried this: The module is an optional module for SQLite.

    1 min read
  17. Finding uses of an API with the new GitHub Code Search

    The GitHub Code Search beta is really powerful - it allows advanced search - including regular expression matches - against every public repo on GitHub.

    1 min read
  18. Basic strace to see what a process is doing

    I had a long-running process and I wanted to check that it was at least doing something . I know its PID (32425 in this case) - here's how to use to see what it's doing right now.

    1 min read
  19. Copy tables between SQLite databases

    I figured out a pattern for doing this today using the CLI tool - given two SQLite databases in the current folder, called and : I'm using that in this GitHub Actions workflow.

    1 min read
  20. Free API Gateway to expose localhost (ngrok alternative)

    I needed to build and use many inhouse tools (like controlling my lights, checking doors cameras remotely, checking my server's temperature, etc).

    1 min read
  21. Downloading partial YouTube videos with ffmpeg

    I spoke at WordCamp US 2023, and wanted to grab a copy of the video of my talk. I always try to keep my own copies of these because I've seen some conferences eventually take these offline in the…

    2 min read
  22. CLI tools hidden in the Python standard library

    Seth Michael Larson pointed out that the Python module can be used as a CLI tool like this: This is a neat Python feature: modules with a block that are available on Python's standard import path can…

    2 min read