Category: Dev Stuff

  • 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.

  • More Garbage Sysadmin: Reboot Linux Server on Kernel Panic

    More Garbage Sysadmin: Reboot Linux Server on Kernel Panic

    Facing kernel panics on your Raspberry Pi? Dive into a less-than-ideal but efficient fix involving an automatic reboot using a startup script, ensuring your server recovers swiftly on kernel panics.

  • Get First Date of Week in Google Sheets, When the Week of the Year is Related to the Row Number

    Get First Date of Week in Google Sheets, When the Week of the Year is Related to the Row Number

    Discover how I used ChatGPT to devise a Google Sheets formula that returns the first date of the week based on a row number. This comprehensive guide breaks down each part of the formula, ensuring you can adapt it to your specific needs and track your daily or weekly tasks with ease.

  • Quick Tip: Bash CLI params

    Quick Tip: Bash CLI params

    Learn a clean and simple way to add CLI params to a bash script by incorporating short, long, space-separated, and equal-separated arguments for ease. Ideal for quick bash script hacks, this method facilitates efficient handling of CLI parameters.

  • Nano: The One True Editor

    Nano: The One True Editor

    Forget about other console editors. Customize Nano in your `.nanorc` to enhance your editing experience. Utilize features like auto-indent, bold text, history log, mouse support, line numbers, tab size adjustment, and syntax highlighting for a smoother workflow.

  • Quick Tip: Export WordPress SQL output via WP-CLI

    Quick Tip: Export WordPress SQL output via WP-CLI

    Learn how to run custom SQL queries on your WordPress database using a small WP-CLI command. The command supports different output formats like table, CSV, JSON, and more. Plus, it includes a dry run option for safety. No need to rely on `wp db query` anymore!

  • phpMyAdmin and MariaDB with Docker

    phpMyAdmin and MariaDB with Docker

    Learn how to set up MariaDB and phpMyAdmin using Docker on a MacBook Pro. Start containers, configure settings, and connect to databases easily. Useful commands included for managing containers and performing tasks like importing SQL files. Helpful references provided for your Docker journey.

  • Converting CSV to SQL

    Converting CSV to SQL

    Learn how to convert CSV files into SQL statements using PHP. Avoid directly inserting data into a live database; follow a safer approach. See a PHP script example for converting CSV files into SQL inserts, with an output demonstration for an “airtravel.csv” sample. Use this script cautiously or as a starting point for similar tasks.

  • 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.