Getting input from the user in JavaScript

prompt( ) –

The browser provides a built-in function that can be used to get input from the user, named prompt. The prompt( ) method displays a dialog box that prompts the visitor for input.

Once the prompt function obtains input from the user, it returns that input.

Syntax: –

prompt(text, defaultText)

Ex

  • prompt(“Enter Your Name: “, “name”);
  • prompt(“Enter Your Roll No. : “);

Good Approach

  • Inline
  • External
  • Inside head Tag
  • Inside bodyTag

HTML: Heading tag

Heading defines the format and structure of a document. There are six heading tag: –

  • <h1>…………….. </h1>
  • <h2>…………….. </h2>
  • <h3>…………….. </h3>
  • <h4>…………….. </h4>
  • <h5>…………….. </h5>
  • <h6>…………….. </h6>

Any text inside these tags is displayed differently depending on the heading number.

Note : –

  1. <h1>……………. </h1> is largest heading tag and <h6>………… </h6> is smallest.
  2. Heading get their own line on the web pages by starting from a new line.
Tagged : / / / / /

CSS tutorial part-3

CSS Border:-

The CSS border is a property is used to set the border on an element.

The CSS border properties are use to specify the style, color and size of the border of an element. The CSS border properties are given below

  • border-style
  • border-color
  • border-width
  • border-radius

1.CSS border-style:- The Border style property is used to specify the border type which you want to display on the web page.

There are some border style values which are commenly used for boder-style property. Try it yourself:-

2. CSS border-width:- This property is used to set the border’s width. It is set in pixels. we can also use the one of the three pre-defined values, thin, medium or thick to set the width of the border. Example:-

3. CSS border-colour:- This property is used to set the border color. There are methods to set the color of the border.

  1. Name: It specifies the color name. For example:”red”.
  2. RGB: It specifies the RGB value of the color. For example: “rgb(255,0,0)”.
  3. Hex: It specifies the hex value of the color. For example: “#ff0000”

There is also a border color named “transparent”. If the border color is not set it is inherited from the color property of the element.

Tagged :

CSS tutorial part-2

CSS Selector:-

CSS selector are used to select those content which we want to style. CSS selector is used to select HTML elements according to its id, class, type, attribute etc.

Types of CSS selector:-

  1. CSS element selector
  2. CSS Id selector
  3. CSS Class selector
  4. CSS universal selector
  5. CSS Group selector
  1. Css Element selector:- CSS element selector selects the HTML element by name.
  2. CSS Id Selector:- The Id selector selects the id attributes of an HTML element to select a specific element. An id is always unique within the page so it is chosen to select a single, unique element.
  3. CSS Class Selector:- It select the HTML elements with a specific class attribute. It is used with a period character .(full stop symbol) followed by the class name.
  4. CSS Universal Selector:- The universal selector is used as a wildcard character. It selects all elements on the page.
  5. CSS Group Selector:- It is used on those elements which have same style definations. Grouping selector is used to minimize the code. Commas are used to separate each selector in grouping.

CSS Comments:- CSS comments are generally written to explain your code. It is very helpful fir the users who reads your code so that they can easily understand the code. Comments are ignored by the browsers. Comments are the single line or multiple line statements and written in /*……..*/ .

CSS Background:- This property is used to define the backgroud effects on elements. There are 5 CSS background properties that affect the HTML elements.

  1. background-color
  2. background-image
  3. background-repeat
  4. background-attachment
  1. CSS Background-color:- This property is used to specify the background color of element.

You can set the background color like this:

2.CSS background-image:- The background-image property is used to set an image as a background of an element. By default the image covers the entire element. Example:-

3. CSS background-repeat:- BY default,

the background-image property repeats the background image horizontally and vertically. Some images are repeated only horizontally or vertically.

The background looks better if the image repeated horizontally only.

4. CSS background-attachment:- Thisproperty is used to specify if the background image is fixed or scroll with the rest of the page in browser window. If you set fixed the background image then the image will not move during scrolling in the browser. example:-

5.CSS background-position:- The background-position property is used to define the initial position of the background image. By default, the background image is placed on the top-left of the webpage. we can set the following positions:-

  1. centre
  2. top
  3. bottom
  4. left
  5. right
Tagged : / /

15 Reasons why you should have Kubernetes SKILS and Certification?

  1. Kubernetes is the fastest growing software engineering skill.
  2. Learning Kubernetes can help you land a great job, making it a high-in-demand skill for software engineers.
  3. If you have Kubernetes skills then you will almost certainly be in demand from employers, as a new survey from CyberArk has found that IT jobs with the container orchestration tool in the title have soared year on year.
  4. Employer demand for IT professionals with Kubernetes experience is growing faster than candidate interest, according to new data from job board Indeed.
  5. Kubernetes and containers have become virtually synonymous with cloud-native development, driving job market demand over the last four years.
  6. “Kubernetes does the things that the very best system administrator would do: automation, failover, centralized logging, monitoring. It takes what we’ve learned in the DevOps community and makes it the default, out of the box,” said Kelsey Hightower, staff developer advocate at Google Cloud.
  7. Indeed also noted that IBM, VMware, Microsoft, Verizon, and Cisco had the highest percentage of Kubernetes job listings on its job board.
  8. Between October 2015 and October 2019—a mere four-year timespan—the share of Kubernetes job searches increased by 2,125%. Kubernetes-related jobs per million also grew by 2,141% in that same time period, according to a blog post from Seen by Indeed.
  9. Kubernetes is the new Linux OS of the Cloud. Kubernetes is fast becoming the operating system for the Cloud, and brings a ubiquity which has the potential for massive benefits for technology organisations and developers.
  10. Kubernetes has the opportunity to be the servers of the serverless world. We’re already seeing with tools like Kubeless and Fission providing equivalents to functions-as-a-service but running within Kubernetes.
  11. Kubernetes, as a container orchestration system, is one of the best things to happen to DevOps to date.
  12. There is a massive ecosystem of tools developed around and for Kubernetes. Some of the top ones include Helm, which manages Kubernetes charts (pre-configured resources), and Kubectl, a command-line tool that controls the Kubernetes cluster manager.
  13. The open-source nature of the Kubernetes technology allows room for custom tools to be built by developers. This further helps in automating monotonous tasks and simplifying the process of DevOps.
  14. Cloud is undoubtedly the future of modern application development. Kubernetes is fully compatible with all the major cloud platforms (AWS, GCP, Azure, etc) and even has ready-to-use starters on many platforms for easy setup.
  15. Below are the most recent kubernetes salary reports.
    INDIA Average:- INR 969,990/-
    UK Average:- £49,888
    USA Average:- $145,000
    Autralia Average:- AU$110,011
    Canada Average:- C$89,434

Note:- These are just average – there are several factors which affect salary for like geography, skills, company, experience, it varies accordingly.

Day by day demand is growing for Kubernetes knowledge and skillsets, getting certified as a Kubernetes professional makes a lot of sense. However it’s not an easy task to prepare and claim the certification – you may ask for help from the DevOpsSchool team – they have programs available completely aligned with the certification agenda.

Introduction to HTML.

What is HTML?

HTML provides a way of displaying Web pages with text and images or multimedia content. HTML is not a programming language, it is a markup language. An HTML file is a text file containing small markup tags. The markup tags tell the web browser, such as Google chrome or internet explorer, how to display the page. An HTML file must have an htm or html file extension. HTML stands for HyperText Markup Language.

HTML Tags:-

A tag is a bit of text acts as a point demarcation. To create a tag, HTML gives certain characters special meaning: th e angle brackets <and>. putting characters within the brackets creates a tag.
types of tags:
there are two types of tags.

  1. Start tag
  2. End tag/Closing tag End tag is same as start tag except that it has an extra forward slash after opening angle bracket.

Element:-
The combination of start tag,end tag and things between the two tags are known as contents of teh element.
Attribute:-
Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts:- a name and a value, seprated by an equals sign. the attributes name indicate what type of extra information you are supplying about the element content.

HTML headings:-
HTML headings are defined with the <h1> to <h6> tags. <h1>defines the most important tags and <h6> defines the least important tags.

HTML paragraphs:-
HTML paragraphs are defined with the tag.

HTML links:-
HTML links are defined with the <a> tag.

It is also called anchor tag. The link destination is specified in href attribute.
example:- <a href=”https://www.facebook.com”>This is a link.</a>

HTML images:-
HTML images are defined with teh tag. The source file(src), alternative text(alt), width and height are the attributes used with the with this tag.
example:- <img src=”pic.jpg” alt=”facebook.com” width=”104″ height=”142″>

How to view HTML source?
To see the source code of the html page, right click on the HTML page and then select view page source, or we can use a shortcut key ctrl+u.

Some important attributes:-

  1. src attribute:– Ths attribute id used in img tag. The src attribute specifies the path to the image to be displayed.
    Example:-<img src=”img_girl.jpg”>

    There are two ways to specify the URL in the src attribute:
    • Absolute URL-Links to an external image that is hosted on another website. Example: src=”https://www.facebook.com/images/img_girl.jpg”.
    • Rekative URL- Links to an image that is hosted within the website. Here, the URL does not include the domain name. If the URL begins without a slash, it will be relative to the current page. Example: src=”img_girl.jpg”. If the URL begins with a slash, it will be relative to the domain. Example: src=”/images/img_girl.jpg”.

2. Width and height attribute:- the tag contain the width and height attribute, it defines the width and height of the image diaplayed.

  1. The Alt attribute:- The required alt attribute for the tag specifies an alternate text for an image, if the image for some reason cannot be displayed. This can be due to slow connection, or an error in the src attribute, or if the user uses a screen reader.
  2. The style attribute:- the style attribute is used to add atyle to the elment, such as colour, font, size etc.
    exmple:-This is a red paragraph.
  3. The lang attribute:- The lang attribute is used inside the tag, to declare the language of the web page.

HTML styles:-

The HTML styles attributes is used to add styles to an element, such as color font size etc.
Background color:- The CSS background-color property defines the background color for an HTML element.

example:-

<body style=”background-color:powderblue;”>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

Text color:-The CSS color property defines the text color for an HTML element.

example:-

<h1 style=”color:blue;”>This is a heading</h1>
<p style=”color:red;”>This is a paragraph.</p>

Fonts:-The CSS font-family property defines the font to be used for an HTML element.

example:-

<h1 style=”font-family:verdana;”>This is a heading</h1>
<p style=”font-family:courier;”>This is a paragraph.</p>

Text size:- The CSS font-size property defines the text size for an HTML element.

example:-

<h1 style=”font-size:300%;”>This is a heading</h1>
<p style=”font-size:160%;”>This is a paragraph.</p>

Text allignment:-The CSS text-align property defines the horizontal text alignment for an HTML element.

example:-

<h1 style=”text-align:center;”>Centered Heading</h1>
<p style=”text-align:center;”>Centered paragraph.</p>

Tagged : /

forem Install Error: Transpile Butane YAML into JSON

TASK [butane : Copy Butane YAML into temporary file] *******************************************************************************************************************
changed: [forem]

TASK [butane : Transpile Butane YAML into JSON] ************************************************************************************************************************
fatal: [forem]: FAILED! => changed=true
  cmd: |-
    butane  --strict "/tmp/butane_input_ajt1wc2f.bu"
  delta: '0:00:00.061281'
  end: '2021-07-18 00:11:02.752356'
  msg: non-zero return code
  rc: 1
  start: '2021-07-18 00:11:02.691075'
  stderr: 'Error translating config: Error unmarshaling yaml: yaml: line 501: found character that cannot start any token'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

PLAY RECAP *************************************************************************************************************************************************************
forem                      : ok=14   changed=4    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0
- name: Copy Butane YAML into temporary file
  ansi- name: Transpile Butane YAML into JSON
  ansible.builtin.shell: |
    butane  --strict "{{ butane_temp_input_file.path }}"
  args:
    executable: /bin/bash
  register: butane_transpiled_ignition_json
task path: /var/home/core/selfhost/roles/butane/tasks/butane.yml:26
<forem> ESTABLISH LOCAL CONNECTION FOR USER: core
<forem> EXEC /bin/sh -c 'echo ~core && sleep 0'
<forem> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/home/core/.ansible/tmp `"&& mkdir "` echo /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110 `" && echo ansible-tmp-1626568627.02572-3630-156247917244110="` echo /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110 `" ) && sleep 0'
Using module file /var/home/core/.local/lib/python3.9/site-packages/ansible/modules/command.py
<forem> PUT /var/home/core/.ansible/tmp/ansible-local-34470mm69b8p/tmp2b46wd4o TO /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110/AnsiballZ_command.py
<forem> EXEC /bin/sh -c 'chmod u+x /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110/ /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110/AnsiballZ_command.py && sleep 0'
<forem> EXEC /bin/sh -c '/usr/bin/python3 /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110/AnsiballZ_command.py && sleep 0'
<forem> EXEC /bin/sh -c 'rm -f -r /var/home/core/.ansible/tmp/ansible-tmp-1626568627.02572-3630-156247917244110/ > /dev/null 2>&1 && sleep 0'
fatal: [forem]: FAILED! => changed=true
  cmd: |-
    butane  --strict "/tmp/butane_input_j_o0qcjf.bu"
  delta: '0:00:00.013172'
  end: '2021-07-18 00:37:07.312244'
  invocation:
    module_args:
      _raw_params: |-
        butane  --strict "/tmp/butane_input_j_o0qcjf.bu"
      _uses_shell: true
      argv: null
      chdir: null
      creates: null
      executable: /bin/bash
      removes: null
      stdin: null
      stdin_add_newline: true
      strip_empty_ends: true
      warn: false
  msg: non-zero return code
  rc: 1
  start: '2021-07-18 00:37:07.299072'
  stderr: 'Error translating config: Error unmarshaling yaml: yaml: line 501: found character that cannot start any token'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

How to install butane libvirt qemu virt and podman in Fedora CoreOS?

sudo rpm-ostree install butane
sudo  rpm-ostree install libvirt-client libvirt-nss 
sudo  rpm-ostree install --idempotent qemu-system-aarch64
sudo  rpm-ostree install --idempotent virt-manager virt-install virt-viewer
sudo  rpm-ostree install --idempotent podman
sudo systemctl reboot

forem Self Host Install issues – Failed to parse setup.yml

$ ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml
[WARNING]:  * Failed to parse /var/home/core/selfhost/inventory/forem/setup.yml with ini plugin: Invalid host pattern '---' supplied, '---' is normally a sign this is
a YAML file.
[WARNING]:  * Failed to parse /var/home/core/selfhost/inventory/forem/setup.yml with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors
we got from each: JSON: Expecting value: line 1 column 1 (char 0)  Syntax Error while loading YAML.   could not find expected ':'  The error appears to be in
'/var/home/core/selfhost/inventory/forem/setup.yml': line 85, column 11, but may be elsewhere in the file depending on the exact syntax problem.  The offending line
appears to be:            $ANSIBLE_VAULT;1.1;AES256           62376137383864393461613561353234643230666431643935303533346631393537363564366334           ^ here
[WARNING]: Unable to parse /var/home/core/selfhost/inventory/forem/setup.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Deploy Forem to AWS] *********************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP *************************************************************************************************************************************************************

Solution: Two Space for Vault key

How to install pwgen in Linux all versions and Mac & Docker?

The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as completely completely random passwords. In particular, passwords generated by pwgen without the -s option should not be used in places where the password could be attacked via an off-line brute-force attack. On the other hand, completely randomly generated passwords have a tendency to be written down, and are subject to being compromised in that fashion.

The pwgen program is designed to be used both interactively, and in shell scripts. Hence, its default behavior differs depending on whether the standard output is a tty device or a pipe to another program. Used interactively, pwgen will display a screenful of passwords, allowing the user to pick a single password, and then quickly erase the screen. This prevents someone from being able to “shoulder surf” the user’s chosen password.

When standard output (stdout) is not a tty, pwgen will only generate one password, as this tends to be much more convenient for shell scripts, and in order to be compatible with previous versions of this program.

In addition, for backwards compatibility reasons, when stdout is not a tty and secure password generation mode has not been requested, pwgen will generate less secure passwords, as if the -0A options had been passed to it on the command line. This can be overriden using the -nc options. In the future, the behavior when stdout is a tty may change, so shell scripts using pwgen should explicitly specify the -nc or -0A options. The latter is not recommended for security reasons, since such passwords are far too easy to guess.

Debian		$ apt-get install pwgen
Ubuntu 		$ apt-get install pwgen
Alpine		$ apk add pwgen
Arch Linux	$ pacman -S pwgen
Kali Linux	$ apt-get install pwgen
Fedora		$ dnf install pwgen
OS X		$ brew install pwgen
Raspbian	$ apt-get install pwgen
Docker		$ docker run cmd.cat/pwgen pwgen