UnixUtils https://unixutils.com Free resources for your Unix systems Fri, 23 Oct 2020 08:27:52 +0000 en hourly 1 https://wordpress.org/?v=5.5.3 https://unixutils.com/wp-content/uploads/2017/10/loggo.png UnixUtils https://unixutils.com 32 32 Download – Docker Certified Associate study guide (PDF) Free! with online mock tests https://unixutils.com/download-docker-certified-associate-study-guide-pdf-free/ https://unixutils.com/download-docker-certified-associate-study-guide-pdf-free/#respond Sat, 15 Aug 2020 22:28:08 +0000 https://unixutils.com/?p=2529 Downloadable study materials for Docker Certified Associate Exam in PDF format. Get yourself prepped up quickly by using this guide that has been created by putting together all the key information needed for quick understanding of concepts with relevant examples and links to documentation. And, be sure to checkout the online mock tests embedded in […]

The post Download – Docker Certified Associate study guide (PDF) Free! with online mock tests appeared first on UnixUtils.

]]>
https://unixutils.com/download-docker-certified-associate-study-guide-pdf-free/feed/ 0
python: decorators https://unixutils.com/python-decorators/ https://unixutils.com/python-decorators/#respond Thu, 11 Jun 2020 14:42:57 +0000 https://unixutils.com/?p=2468 Decorator is a type of function that accepts another function as an argument. By doing so it enables us to add or modify the behavior of the function that is passed as an argument, without having to modify the function itself. Lets assume we have a function to display the balance amount in a wallet. […]

The post python: decorators appeared first on UnixUtils.

]]>
https://unixutils.com/python-decorators/feed/ 0
Daemonize a process with python https://unixutils.com/daemonize-a-process-with-python/ https://unixutils.com/daemonize-a-process-with-python/#respond Mon, 08 Jun 2020 15:22:59 +0000 https://unixutils.com/?p=2461 Python library to deamonize any process, is made available on the unixutils github page. This can be used as a base to create systemd services on Linux on the fly. Steps to Create your own systemd service clone the directory from github and copy the bin & lib directories to a location from where you’d […]

The post Daemonize a process with python appeared first on UnixUtils.

]]>
https://unixutils.com/daemonize-a-process-with-python/feed/ 0
python: constructors https://unixutils.com/python-constructors/ https://unixutils.com/python-constructors/#respond Mon, 08 Jun 2020 14:25:29 +0000 https://unixutils.com/?p=2441 Lets assume that a class is a template which has data members without values assigned to it. When an object is created out of a class, values need to be passed, so that the data members of that class gets values assigned to it. This is made possible by a reserved method __init__ in python […]

The post python: constructors appeared first on UnixUtils.

]]>
https://unixutils.com/python-constructors/feed/ 0
How to: get current and parent process IDs in python https://unixutils.com/how-to-get-current-and-parent-process-ids-in-python/ https://unixutils.com/how-to-get-current-and-parent-process-ids-in-python/#respond Tue, 21 Apr 2020 14:12:54 +0000 https://unixutils.com/?p=2431 It is possible to get the process ID and parent process ID from with in the process itself. Python’s inbuilt ‘os’ module provides two methods namely os.getpid() and os.getppid() that returns the PID of the current process and the PID of parent process respectively. >>> import os >>> >>> # Get process ID of current […]

The post How to: get current and parent process IDs in python appeared first on UnixUtils.

]]>
https://unixutils.com/how-to-get-current-and-parent-process-ids-in-python/feed/ 0
Python: SSL Certificates with OpenSSL https://unixutils.com/python-ssl-certificates-with-openssl/ https://unixutils.com/python-ssl-certificates-with-openssl/#respond Fri, 20 Dec 2019 15:26:06 +0000 https://unixutils.com/?p=2416 OpenSSL python library extends all the functions of OpenSSL into python, such as creation and verification of CSR/Certificates. In this post, we present a simple utility in python to Create CSR & Self Signed Certificates in commonly used key formats namely PEM, DER, PFX or P12. We will have this built in such a way […]

The post Python: SSL Certificates with OpenSSL appeared first on UnixUtils.

]]>
https://unixutils.com/python-ssl-certificates-with-openssl/feed/ 0
Python: Building a REST Client with HTTP Requests https://unixutils.com/python-building-a-rest-client-with-http-requests/ https://unixutils.com/python-building-a-rest-client-with-http-requests/#respond Fri, 13 Dec 2019 17:35:15 +0000 https://unixutils.com/?p=2385 REST is an API that allows developers to perform a set of functions based on exchange of HTTP Requests. For example, Twitter allows you to retrieve tweets from your account without having to use the twitter portal, by means of REST API. Similarly Whatsapp business users can send and receieve messages from their business Whatsapp […]

The post Python: Building a REST Client with HTTP Requests appeared first on UnixUtils.

]]>
https://unixutils.com/python-building-a-rest-client-with-http-requests/feed/ 0
Deploy and manage services on docker swarm https://unixutils.com/deploy-and-manage-services-on-docker-swarm/ https://unixutils.com/deploy-and-manage-services-on-docker-swarm/#respond Wed, 02 Oct 2019 14:46:25 +0000 https://unixutils.com/?p=2372 A docker service is a group of containers running the same image, which can be scaled over multiple nodes in a swarm, updated with newer versions etc, thus easily distributed and managed. We will assume that we have setup a docker swarm with three nodes (single manager node and two worker nodes). ID HOSTNAME STATUS […]

The post Deploy and manage services on docker swarm appeared first on UnixUtils.

]]>
https://unixutils.com/deploy-and-manage-services-on-docker-swarm/feed/ 0
Setup and manage nodes on docker swarm https://unixutils.com/setup-and-manage-nodes-in-docker-swarm/ https://unixutils.com/setup-and-manage-nodes-in-docker-swarm/#respond Wed, 02 Oct 2019 11:22:31 +0000 https://unixutils.com/?p=2353 Docker swarm is a mode in which you can run containers as clusters over multiple nodes, thereby enabling features such as load balancing, scaling, in-built orchestration and so on. Initiating a swarm NOTE : we will assume that we have 3 nodes (with firewall off) on the same network with docker installed and running. A […]

The post Setup and manage nodes on docker swarm appeared first on UnixUtils.

]]>
https://unixutils.com/setup-and-manage-nodes-in-docker-swarm/feed/ 0
Docker Compose: Build and Manage multiple containers https://unixutils.com/docker-compose-build-and-manage-multiple-containers/ https://unixutils.com/docker-compose-build-and-manage-multiple-containers/#respond Mon, 22 Jul 2019 13:21:37 +0000 https://unixutils.com/?p=2323 docker-compose is used build to a project that involves building and running multiple containers. To be more precise, docker-compose can be used to define, build and bring up a stack of containers that can communicate with each other to collectively act an application. Clone demo from github In this example, we will build an application […]

The post Docker Compose: Build and Manage multiple containers appeared first on UnixUtils.

]]>
https://unixutils.com/docker-compose-build-and-manage-multiple-containers/feed/ 0