Category: Dev Stuff
-
phpMyAdmin and MariaDB with Docker
in Dev StuffLearn 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
in Dev StuffLearn 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
in Dev StuffDiscover 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.
-
Open source ngrok alternative
in Dev StuffLearn about setting up sish, an open-source ngrok alternative, for secure HTTP(S)/WS(S)/TCP tunnels. Follow the steps to create a wildcard subdomain, set up a DigitalOcean droplet, install necessary packages, obtain SSL certificates, and set up sish service with Docker. Finally, create a shortcut program to initiate tunnels locally.
-
Quick Tip: Viewing Headers With Curl
in Dev StuffLearn 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/`.