Category: Uncategorized

  • Node: Export Import

    Export Let’s say we have a file called export.mjs. Alternative export syntax with the same result as above: Import Create a file called import.mjs: References:

  • Vite: Module Federation with Vue3

    Create two projects called vite-remote and vite-host: Install the plugin in both apps: Head to vite-remote and open vite.config.js: It is important to build the project first, in order to generate dist folder, before starting the server. Build the project with: Start the server for vite-remote you should get port 5173: Next, head to vite-host…

  • Quasar Framework: Vite Module Federation

    Create two projects called remote-app and host-app: Install the plugin in remote-app and host-app: Create a component in remote-app called HelloWorld.vue: Inside remote-app open quasar.config.js: Inside host-app quasar.config.js: Inside host-app App.vue: Start the remote-app. This will assign port 9000 to remote-app. Start the host-app. This will assign port 9001 to host-app.

  • Kafka: REST Proxy

    v2: v3: { “kind”: “KafkaClusterList”, “metadata”: {   “self”: “http://rest-proxy:8082/v3/clusters”,   “next”: null }, “data”: [   {     “kind”: “KafkaCluster”,     “metadata”: {       “self”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw”,       “resource_name”: “crn:///kafka=4L6g3nShT-eMCtK–X86sw”     },     “cluster_id”: “4L6g3nShT-eMCtK–X86sw”,     “controller”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/brokers/1”     },     “acls”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/acls”     },     “brokers”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/brokers”     },     “broker_configs”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/broker-configs”     },     “consumer_groups”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/consumer-groups”     },     “topics”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/topics”     },     “partition_reassignments”: {       “related”: “http://rest-proxy:8082/v3/clusters/4L6g3nShT-eMCtK–X86sw/topics/-/partitions/-/reassignment”     }   } ]} References:

  • Dockerfile: ARG

    FROM instructions support variables that are declared by any ARG instructions that occur before the first FROM. An ARG declared before a FROM is outside of a build stage, so it can’t be used in any instruction after a FROM. FROM instructions is the only instructions that support variable declared by ARG before the first…

  • PowerShell: Create Files and Folders

    To create a file: To create a folder: To create a file with parent folders:

  • Windows 11: Right Click Menu More Options

    /f Force overwriting the existing registry entry without prompt. /ve (Optional) adds an empty value name (Default) for the key. References:

  • PowerShell: Process List

    To get process list: To get process list and sort by CPU (ascending): To get process list sorted by CPU (ascending) and get last 10 results: To get process list and sort by CPU (descending): To get process list sorted by CPU (desceding) and get first 10 results: To get usage (CPU, Memory, Network, Disk):…

  • PHP: HTTP Request Body

    php://input is a read-only stream that allows you to read raw data from the request body. php://input is not available in POST requests with enctype=”multipart/form-data” if enable_post_data_reading option is enabled. References: