KFUPM Payment GateWay

0 min · Jaaved Khan

Kubernetes Setting Resource Limitations

Summary It is important to remember that you cannot set requests that are larger than resources provided by your nodes. Soft limit = Request. Hard limit = Limit. Refs https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits Vocabulary CPU CPU resources are defined in millicores. 1000m = 1 core Example If your container needs two full cores to run, you would put the value “2000m”. If your container only needs ¼ of a core, you would put a value of “250m”....

2 min · Jaaved Khan

Literate Programming

Python Only if you use the header argument :results value the code of the block is wrapped by a function and the result of the code block is the return value of that function. return 7 + 7 14 On the other hand :results output means that the code of the block is sent to the interpreter. The result of the code block is what the code prints to the standard output....

1 min · Jaaved Khan

Lint Code: What Is Linting + When To Use Lint Tools | Perforce

What Is Linting? Linting is the automated checking of your source code for programmatic and stylistic errors. This is done by using a lint tool (otherwise known as linter). A lint tool is a basic static code analyzer. The term linting originally comes from a Unix utility for C. There are many code linters available for various programming languages today.

1 min · Jaaved Khan

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects · Issue #4693 · celery/celery · GitHub

Solution given For anyone stumbling across this issue, changing my broker url from amqp:// to pyamqp:// solved the issue for me. I guess that forced usage of py-amqp over librabbitmq? What worked for me? pip uninstall librabbitmq pip install pyamqp and then replace amqp with pyamqp #app = Celery('tasks', broker='amqp://guest@localhost//') app = Celery('tasks', broker='pyamqp://guest@localhost//')

1 min · Jaaved Khan

Kubernetest the Hardway

0 min · Jaaved Khan

Kubernetes API

Summary The Kubernetes API lets you query and manipulate the state of objects in Kubernetes. The core of Kubernetes' control plane is the API server and the HTTP API that it exposes . Users, the different parts of your cluster, and external components all communicate with one another through the API server.

1 min · Jaaved Khan

Loose Weight

Summary Keep weight under contorl.

1 min · Jaaved Khan

Load balancer

Summary wiki In computing, load balancing refers to the process of distributing a set of tasks over a set of resources (computing units), with the aim of making their overall processing more efficient. Load balancing techniques can optimize the response time for each task, avoiding unevenly overloading compute nodes while other compute nodes are left idle.

1 min · Jaaved Khan

Linux CS

Commands Logging journalctl -f [f]ollow new messages (like `tail -f` for traditional syslog): journalctl -u kibana -f journalctl –since now|today|yesterday|tomorrow –until YYYY-MM-DD HH:MM:SS Filter messages within a time range (either timestamp or placeholders like “yesterday”): journalctl _PID=pid Show all messages by a specific process: Process Files Users

1 min · Jaaved Khan