Tag: terminal

  • Syntax Highlighting SQL in Terminal

    Syntax Highlighting SQL in Terminal

    Do you ever find yourself doing some debugging with error_log() or its friends? Does that debugging ever involve SQL queries? Are you tired of staring at grey queries all the time? I have just the product for you! Introducing Syntax Highlighting SQL in Terminal! Brought to you by our friends at Large Language Models, Incorporated,…

  • PHPCS Anywhere!

    PHPCS Anywhere!

    Something that I do often is run PHPCS on code I’m working on, almost always inside a git repository. Even more likely is that PHPCS was installed via composer, which means it will live in $GIT_ROOT/vendor/bin. So I always end up doing something like ../../../vendor/bin/phpcs file.php which is hugely annoying. Which is why I made…

  • Bash Script: Calculate before/after 2: Calculate Harder

    Bash Script: Calculate before/after 2: Calculate Harder

    I’ve updated my script to test URL performance during changes, measuring the Time to First Byte (TTFB). The script now records initial and subsequent TTFB to determine update impact, displaying percentage change—a helpful tool for reporting.

  • Matrix Reimagined: Crafting Digital Rain with Bash and ChatGPT

    Matrix Reimagined: Crafting Digital Rain with Bash and ChatGPT

    Exploring the creation of a Matrix Digital Rain effect in the terminal using ChatGPT-4, this post delves into coding a unique bash-based version, complete with Japanese Katakana and extended ASCII characters.

  • Macbook Battery Stats in Your ZSH Terminal Prompt

    Macbook Battery Stats in Your ZSH Terminal Prompt

    Discover how to transform your ZSH terminal prompt into a dynamic battery monitor for your MacBook, offering real-time status updates with every command.

  • Supercharge Your Clipboard with a Shell Function for iTerm2

    Supercharge Your Clipboard with a Shell Function for iTerm2

    Discover a nifty shell function tailored for iTerm2 on macOS, bridging the gap between your terminal and clipboard, making it seamless to copy content directly to your clipboard, even from remote servers.

  • Command Timing in ZSH

    Command Timing in ZSH

    Dive into how you can enhance your ZSH experience by adding a snippet that measures the exact time it takes to process a command, right down to the millisecond! This guide provides a detailed walkthrough of the script, allowing you to integrate it with your .zshrc file.

  • Quick Tip: Looping a command in bash

    Quick Tip: Looping a command in bash

    Discover how to monitor disk space usage efficiently while running slow programs to prevent sudden command failures. Use `watch -n10 bash -c “df -h | ack disk1s5″` for real-time updates, where `disk1s5` represents the desired partition. Run `df` to find the correct device file.

  • Quick Tip: Viewing Headers With Curl

    Quick Tip: Viewing Headers With Curl

    Learn how to inspect HTTP headers for redirects, cache details, SSL, etc., using `curl` with `-I` switch. Discover how to resolve potential inconsistencies between `HEAD` and `GET` requests by using `-X` switch to override the default method in `curl` commands. Simplify with a combined command: `curl -IXGET http://example.com/`.