Tag: data-management

  • Pi-hole, Google Wifi, and Device Names

    Pi-hole, Google Wifi, and Device Names

    Using a custom script with `nmap` to find device hostnames on a Google Wifi network. The script outputs to `/etc/pihole/custom.list` with manual MAC to hostname mappings. It can be slow, especially on a Raspberry Pi 1.

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

  • Deleting Old Post Revisions in WordPress with WP-CLI

    Deleting Old Post Revisions in WordPress with WP-CLI

    Working with a client’s large database, I crafted a custom WP-CLI command to purge post revisions based on specific criteria, saving backups of those deleted. This script efficiently prunes revisions older than a year and prior to post publication, reducing the overall database size prior to a site migration.

  • WordPress Post Meta and JSON

    WordPress Post Meta and JSON

    Learn about the challenges of storing JSON strings in WordPress post meta. Discover how WordPress’s `wp_unslash()` function can unintentionally interfere with the data. Find out how to safely store JSON by using `wp_slash()` to double-encode it, ensuring data integrity when unslashing.

  • Page Generation Graph for WordPress

    Page Generation Graph for WordPress

    Discover how to create a personalized page generation graph for your website’s performance tracking. Compare different page types and delve into performance data through URL and time analysis. Find out how to enhance your site’s speed with the custom widgets and options provided. Check out the GitHub repository for the code.

  • More Fake Flash Fun

    More Fake Flash Fun

    Like last time, I’ve come into ownership of a suspicious flash drive that holds a secret: It’s actually a micro SD card and reader… and completely broken 🙂

  • Fake Flash Adventures

    Fake Flash Adventures

    I recently purchased a “256 GB” flash drive for $3.  I knew this had to be fake, but I was also curious about how it worked.  It turns out that there was a “256 GB” micro SD card inside of it and I’m pretty sure that’s fake. I didn’t get this on Amazon, but here’s…