André Amorim

Crafting Web Experiences

// All My Notes

  • Completely Cleanup Docker

    Stop all containers: One by One Prune: Remove all including Build Cache: Reference: https://docs.docker.com/config/pruning/#prune-everything

  • Filter Docker containers and list with specific information

    The default running container listing command: List all containers either running and stopped: Choose specific information for the table that will be listed. I only wanted to list container names and their statuses: And finally, filter them by container names. I’m filtering the containers which contain “_wp” word: Reference: https://docs.docker.com/engine/reference/commandline/container_ls/

  • Questions for New Project Definition

    What’s <project_name>? What’s the problem? How does <project_name> solve this? Who uses <project_name>? Where’s <project_name> now? How big is the market? What’s the competitive landscape? Details about competitors: When they started? How many people they have? Revenue How did they grow? What are they currently doing? Comparison with <project_name> What’s the strategy? How do we…

  • WordPress Permalink Structure: “/custom-post-type/custom-taxonomy/post-slug”

    First, register your taxonomy and set the slug argument of rewrite to shows: Next, register your post type and set the slug to shows/%show_category%, and set has_archive argument to shows: Last, add a filter to post_type_link to substitute the show category in individual show permalinks: EDIT: Forgot the has_archive argument of register_post_type above, that should be set to shows. Reference: https://wordpress.stackexchange.com/a/108647

  • Get into a Docker Container’s Shell

    If you’re using Docker Composer in your project: Or, if you want to get into any kind of container: According to your system needs, you might need to add “-it” flag after “exec” parameter. Reference URLs:1. https://docs.docker.com/engine/reference/commandline/compose_exec/2. https://docs.docker.com/engine/reference/commandline/exec/

  • If Condition Types in Bash

    Multi Line: One Line: Another One Line Method:

  • Easier: WPCS Workspace Based

    1. composer.json (composer.lock must be exist) 2. Install the VS Code Extension PHP Sniffer & Beautifier: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab

  • Remove Google reCaptcha Privacy Badge

    First, you need to add the privacy text under any form: This is the CSS to hide the automatically created reCaptcha privacy text on every page:

  • Simple PayPal Link

    Use this link to create a simple and direct PayPal payment link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_button-designer&factory_type=buynow

  • See Memory Status on Linux Server

    Command to run: