André Amorim

Crafting Web Experiences

// All My Notes

  • Is Vibe-Coding Just a Trend? Unpacking the Hype and Substance

    Vibe-coding has taken the coding world by storm, but is it more than just a fleeting trend? We dive into the world of vibe-coding to separate the hype from the substance.

  • The Future of AI: Separating Fact from Fiction

    Artificial intelligence has made tremendous progress in recent years, but will it eventually replace human workers? We explore the possibilities and limitations of AI in this in-depth article. Discover the truth behind the hype and what the future holds for human-AI collaboration.

  • Setting Up NextCloud: A Step-by-Step Guide to Private Cloud Storage

    Take control of your data with NextCloud, a self-hosted cloud storage solution. Learn how to set up NextCloud on your own server for secure and private file sharing.

  • Take Control of Your Data: A Comprehensive Guide to NextCloud, the Self-Hosted Cloud Solution

    Discover the benefits of self-hosting your cloud storage with NextCloud, a secure and feature-rich alternative to public cloud services. Learn how to set up and use NextCloud to take control of your data.

  • Setting Up Proxmox: A Step-by-Step Guide to Virtualization

    Learn how to set up Proxmox, a powerful open-source virtualization platform, and take control of your virtual infrastructure. Follow our step-by-step guide for a seamless setup process.

  • Manually analyze for Malware with VS Code (it’s a tedious job)

    Press Ctrl+Shift+F (or Cmd+Shift+F on Mac). Click the .* button on the right side of the search box to enable regex mode— this is important because most of these patterns are regex. Also useful: the “files to include” field at the bottom. Use *.php to limit to PHP files, or *.{php,js} for both. The “files to exclude” field helps too — put **/libraries/**, **/libs/**, **/vendor/**, **/node_modules/** there to skip third-party code. Tier…

  • Protected: WP Malware/Backdoor: credential harvesting and remote uploader

    There is no excerpt because this is a protected post.

  • Block editor functions

    Lists all blocks from block editor  wp.data.select( ‘core/block-editor’ ).getBlocks();  wp.data.select( ‘core/block-editor’).getBlockRootClientId( clientId )  Get Parent Block Client Id  Set attributes  wp.data.dispatch(“core/block-editor”).updateBlockAttributes(“block_client_id”, {attr});  Get root block client id: (e.g when you are extending the query-loop)  wp.data.select(“core/block-editor”).getBlockRootClientId( clientId_child_block );  Get featured image  $featuredImageId = wp.data.select(“core/editor”).getEditedPostAttribute(“featured_media”);  Get current post type  wp.data.select(“core/editor”).getCurrentPostType();  Execute on DOM ready  wp.domReady(function () {} ); …

  • Gutenberg Instructions/Documentation

    How to create a block? npx @wordpress/create-block@latest <block-name> Generate .pot file for block translation: After translating with Poedit or the Loco Translate plugin (better sync), you need to generate the .json files for the translations to take effect in the block editor: How to create a block? Default Components: Default Blocks Repo: https://github.com/WordPress/gutenberg…ibrary/src How to Extend the…

  • How to get posts from REST API for a Gutenberg Block

    Examples:  https://ryanwelcher.com/2021/08/18/req…tyrecords https://permanenttourist.ch/2023/01/us…-rest-api

  • WordPress Block JS Code Standard (Prettier)

    Installation Install the module $ npm install @wordpress/prettier-config –save-dev Note: This package requires Node.js version with long-term support status (check Active LTS or Maintenance LTS releases). It is not compatible with older versions. Usage Add this to your package.json file: “prettier”: “@wordpress/prettier-config” Alternatively, add this to .prettierrc file: “@wordpress/prettier-config” Or add this to .prettierrc.js file: module.exports = require( ‘@wordpress/prettier-config’ );

  • Customize Loop Query

    https://developer.wordpress.org/refere…uery_vars Frontend: Editor: JS: Note: When defining the code on the server side, changes are not reactive in the block editor. To achieve an immediate effect, I recommend using Gutenberg’s built-in methods (see link), inside a useEffect.