How to Count Characters in a Javascript String
The challenge The main idea is to count all the occurring characters in a string. If you have a string like aba, then the result should… Read More »How to Count Characters in a Javascript String
The challenge The main idea is to count all the occurring characters in a string. If you have a string like aba, then the result should… Read More »How to Count Characters in a Javascript String
Use the following code block to get started: Then in your HTML code, add it like this:
If you would like to disable the text selection highlighting that is enabled by default on all browsers, then you can do this: If you… Read More »How to disable text selection highlighting in CSS
The challenge You will have a list of rationals in the form: where all numbers are positive integers. You have to produce their sum N /… Read More »Irreducible Sum of Rationals in Golang
In your source account create a customer-managed policy: In your destination bucket, update the bucket policy: Testing the S3 copy between accounts:
If you need to recursively find all symbolic links in a directory tree on a Mac, then you have a couple of options. You could… Read More »How to find all symlinks in a directory tree on Mac
You can follow the steps below to install App Mesh on AWS EKS (Kubernetes). Step 1 – Prerequisites Step 2 – Add Helm Repo Step… Read More »How to Install App Mesh on AWS EKS
If you have tried to delete a Kubernetes namespace, and it has been hanging in ‘deleting’ for hours on end, it’s likely that you have… Read More »[Solved] Kubernetes Namespace stuck in Terminating state
So you’ve run a deployment and tried to check the pods and there’s nothing there! kubectl get pods Next step is to see what’s happening… Read More »[Solved] Error creating: pods “my-service-a-xxx” is forbidden: error looking up service account my-apps/my-service-a: serviceaccount “my-service-a” not found
If you get the following error: This is because you probably haven’t committed any files to git yet! How to fix this Make sure to… Read More »[Solved] error: src refspec main does not match any
If you need to force a redeploy of a deployment in Kubernetes, then you can use the rollout feature. You may have an image that… Read More »How to Force a Redeploy in Kubernetes
If you are trying to print() to the console/stdout in your Flask app, but nothing is happening, then you just need to flush your prints,… Read More »How to Print to stdout in Flask using Python
If you need to restart a deployment in Kubernetes, perhaps because you would like to force a cycle of pods, then you can do the… Read More »How to Restart a Deployment in Kubernetes
I have a parent directory containing multiple sub-directories. Each of these child directories is a different application and contains a Dockerfile. I want to build… Read More »How to push multiple Dockerfile apps to AWS ECR at the same time
If you could like to a create a Horizontal Pod Autoscaler (hpa) in Kubernetes, then you could run the following: Step 1 – Create a… Read More »How to Create a Horizontal Pod Autoscaler in Kubernetes
If you would like to test hpa, Horizontal Pod Autoscaling, or throw some chaos at a specific deployment in Kubernetes, then you could run a… Read More »How to Run a Load Generator on Kubernetes
If you would like to deploy a Metrics Server in Kubernetes, then you first need to create a namespace for it to live it, followed… Read More »How to Deploy a Metrics Server in Kubernetes
eksctl dramatically simplifies the creation of AWS EKS clusters, by providing a simple command-line interface. Step 1 – Define a Cluster YAML You can either… Read More »How to create an AWS EKS cluster using eksctl
If you have a Flask app that you would like packaged in a Docker container, then you can do the following. The steps outlined below… Read More »How to Dockerize a Flask App
You can use the aws cli to get the EKS cluster name, parse the first result and return it into a variable.
If you want to automatically generate a manifest file in Kubernetes, you can do so by using the kubectl run command coupled with a –dry-run… Read More »How to automatically generate a Manifests file in Kubernetes
If you need to sort a list of your pods by their CreationTimestamp, then do the following: A better way to specify the JSON path… Read More »How to Sort Pods by CreationTimestamp in Kubernetes
If you want to jump onto a particular Kubernetes Pod and run Bash within it, you can do so as follows: You can get the… Read More »How to Jump onto a Kubernetes Pod with Bash
If you would like to run shell commands inside of your Kubernetes cluster, then you can use the kubectl run command. What the syntax looks… Read More »How to run Shell Commands in a Kubernetes Cluster
If you find yourself in a position where you need to sync all emails from one account to another, then you can use the imapsync… Read More »How to Bulk Move All Email from One Account to Another using the CLI