Your cart is currently empty!
Category: Uncategorized
Kubernetes: GatewayAPI URLRewrite Filter
In this example, request to /echo or /echo/ (because of the type: PathPrefix) will be rewritten as / and becomes the request of “web” Service. In this example, request only to /echo (because of the type: Exact) will be rewritten as / and becomes the request of “web” Service.
Kubernetes: Service vs. Endpoints vs. EndpointSlice
Service When you create a resource of type Service using kubectl create command, Kubernetes will auto create Endpoints and EndpointSlice. If you are creating the Service using YAML file, then you need to make sure to add spec.selector part. Or else, it will not auto create Endpoint and EndpointSlice. Even though you forget to add…
Podman: Volume Mounting
When you try to mount local folder into the container, but it gives you an error such as: Then what you need to do is to append :Z at the end of the -v flag. References:
Docker: Magento2 Installation
Get Magento2: Install composer Open app/etc/di.xml and go to line 1860. Disable external search modules:
OSX: Disable Keyboard Press and Hold
When you press and hold A in your keyboard, OSX will give you several accented A character to choose from. To disable this behaviour: Then you need to logout and login again before you can see the change. To revert to default behaviour: Logout and login again.
Kubernetes: Traefik Middleware
Traefik’s Middleware in Kubernetes is a type of CustomResourceDefinition (CRD). This means that it is not natively supported by Kubernetes. To get the list of CRD: To get the list of Traefik’s Middlewares:
Linux: DD Bytes
Create 1G file in PC with 1G of RAM: This is because the command is creating 1G of data in MEMORY before writing it to disk. Workaround: This will create 100M data in memory then writing it to disk while creating the second 100M and so on.
Javascript: Window Location (URL)
Say we have this URL: window.location.protocol is http: window.location.host is 127.0.0.1:5000 window.location.hostname is 127.0.0.1 window.location.port is 5000 window.location.pathname is /index.html window.location.search is ?a=111&b=222 window.location.hash is #x=888&y=999 For full property, you can type window.location in the console log. References:
Microsoft Graph: User Authentication with Javascript (SPA)
First you need to: 1. Register your application. 2. Set the callback URI redirect. Then you add Microsoft Authentication Library (MSAL.js): Once you complete the sign-in process, you will get an access_token. At this point, you can use the access_token with Microsoft Graph API. But because we have our own backend resources, We want to…