How to test sendmail from the terminal

Sendmail is an open source smtp server. Many different languages and frameworks interface with sendmail, and when debugging it’s good to be able to quickly test whether or not sendmail is working. The following is a quick way to verify that sendmail is working. echo “Subject: test” | /usr/lib/sendmail -v [email protected]

WordPress display the_meta() of in custom page

I have some meta values on my wordpress custom page that I need to be displayed in a table. Is there any way I can do that. Here’s the code I’m using now: <?php the_meta(); ?> And this is what it shows: I want to do something like: I found out that: the_meta() is located in…

How to Find the ID Facebook Page

Facebook requires you to input the Page ID when creating social plugins and chat widgets for the Messenger platform but they do not offer any easy way to determine the ID of Facebook pages. This simple guide should help. Find Facebook Page ID Step 1: Open any Facebook Page in your desktop browser and right-click the…

Ansible task executed if file not exists condition

In this post, I will share an ansible task that is executed only if a condition is matched, the condition here is to check if file NOT exists on the system. — – name: run the playbook tasks on the localhost hosts: 127.0.0.1 connection: local become: yes vars: vhost_domain: “wpdemo.com” tasks: – name: ensure aptitude is…

Up and running kubernetes cluster on aws eks in 10 minutes

In this post, I will share the post Up and running kubernetes cluster on aws eks in 10 minutes with cli tool called eksctl. eksctl is cli tool written in GO by weaveworks and based on Amazon’s official CloudFormation templates. Install eksctl In our example, we will use wget, so make sure it is installed before you proceed. curl…

Ansible structure layout – the best approach

This is called Ansible structure layout – the best approach that we used to use it as a template for our projects. This may be not the best but you can customized it as to fit your own. Directory Layout The top level of the directory would contain files and directories like so: production.in #…

Bash script recursively find all files in directory

Bash script recursively find all files in current and subfolders based on wildcard matching, you can use find normally but tree with -P option is easier to read. find will find all files that match a pattern: find . -name “*foo” However, if you want a picture: tree -P “*foo” Hope this helps!

Ansible template module for wordpress nginx vhost

In this post, I will share a simple playbook that run on localhost to demonstrate ansible template module with  nginx vhost for WordPress. playbook-wp-vhost.yml — – name: run the playbook tasks on the localhost hosts: 127.0.0.1 connection: local become: yes vars: vhost_domain: “test.com” tasks: – name: ensure aptitude is installed command: echo “Hello World” – name: Nginx…

Bash script arguments example

In this post, I will shortly share Bash script arguments via an easy example so it can help you understand how it works and write a bash script with parameters input from command line in terminal. Let’s imagine the following command line: [[email protected] me]$ your_bash_program word1 word2 word3 If your_bash_program were a bash shell script, we could read…

Kubernetes Objects Tutorial – The Easy Way

Kubernetes Objects Tutorial – Let’s understand it in an easy way. In this blog post, I will help you to understand kubernetes objects and how we can express those in the .yaml file. Let’s enjoy our post. Kubernetes Objects Kubernetes Objects are persistent entities in the Kubernetes system. Kubernetes uses these entities to represent the state…