teleren/devto huggingface dataset:
Helm Rollback Command | How to use Helm Rollback Command
Tags: devops, kubernetes, aws, docker
Published: 2021-05-17 10:45:33

{% youtube HHjycvwTYhE %}

In this lab session, we are going to focus on how to use the "Helm rollback command". The rollback command is very useful if you want to go back to the previous revision of your helm chart. To roll back, you simply need to type the command - helm rollback your_release_name release_version and it will simply rollback to your previous version. 

Here are the main key areas which we will target in this session on "How to use Helm upgrade command?"

1. What is Helm rollback command?
2. Syntax of Helm rollback command?
3. How to create your first helm chart?
4. How to make changes to your existing helm chart?
5. How to run Helm upgrade command?
6. How to run Helm rollback command?
7. How to verify you have successfully rollbacked?
Helm Upgrade Command | How to use Helm Upgrade Command
Tags: devops, kubernetes, aws
Published: 2021-05-17 10:44:14

{% youtube 6ua2LBzPfxo %}

In this lab session, we are going to see how to upgrade your helm chart with a new revision. This command is really useful when you want to make some changes to your exiting helm chart which is already deployed inside the Kubernetes cluster. Helm upgrade command ease out the pain of doing the manual update, you can simply run the command "helm upgrade" and it will fix everything for you.

Here are the main key areas which we will target in this session on "How to use Helm upgrade command?"

1. What is Helm upgrade command
2. How to create your first helm chart?
3. How to make changes to your existing helm chart?
4. How to run Helm upgrade command?
5. How to verify your upgrade using the release version?
Terraform Output Values | How to use Terraform Output Values? 
Tags: terraform, devops, aws
Published: 2021-05-17 10:41:53

{% youtube G41EpGwh5JQ %}

Terraform output values are a kind of return value from the terraform modules. The output values can be used to print the information onto the terminal as well as return it to other modules within the terraform


In this session we are going to look at Terraform Output values and how to use them inside your terraform files. 
Apart from that, we will also look into - 
1. How to declare terraform output values?
2. What are the benefits of terraform output values?
3. How to use print message on terminal using terraform output values?
4. Print aws ec2 instance public ip using terraform output values
JavaScript Advanced: Explained in a Nutshell
Published: 2021-05-17 10:41:27

###JS Error
catch block is used to be executed when there is an error inside try block.
const x = 7;  
try {
    if(x < 5) throw "too low";
    if(x > 10) throw "too high";
  }
  catch(err) {
    console.log(err, 'x is ', x);
  }

###JS Arrow Function
In JS ES6 a function can be written in a shorter form.
`const multiply = (x,y) => return x*y;`

###JS Classes
A JavaScript class is not an object, rather a template for JavaScript objects.
`class Student {
  constructor(name, roll) {
    this.name = name;
    this.roll = roll;
  }
}`

###JS Callback
Callback is a function which is passed as an argument to a function. And it can be called inside that function in which function it was passed.
`function showResult(value) {
  console.log(value);
}

function Summation(num1, num2, callback) {
  let sum = num1 + num2;
  callback(sum);
}

Summation(5, 5, showResult);`

### JS Async Await
`async` makes a function return a Promise & `await` makes a function wait for a Promise.
`const x= 2;
async const multiplication = () => {
for(i=1, i<10000000, i++) {
x = x*2;
}
multiplication().then(console.log(x));`
Terraform Locals | How to use Terraform Locals?
Tags: terraform, devops, aws
Published: 2021-05-17 10:40:32

{% youtube xBb1uME8ZuU %}


Terraform is OpenSource infrastructure as a code software tool. 
With the help of Terraform you can provision infrastructure on cloud platform such AWS(https://aws.amazon.com/), Google Cloud(https://cloud.google.com/), Azure(https://azure.microsoft.com/en-us/), DigitalOcean(https://www.digitalocean.com/), OpenShift(https://www.openshift.com/) and many more...cloud provider

In this session we are going to look on terrafrom locals and how to use it inside your terraform files.
Terraform local can really help you to - 
1. Improve your terraform file configuration
2. Terraform local helps you to centralized local varible configuration, so that you can change and update the values at one places.
3. It can be really useful to simplify the complex terrafrom file
TIL that creating Markdown from HTML is hard
Tags: todayilearned, html, linux, markdown
Published: 2023-05-19 20:39:40

---
title: TIL that creating Markdown from HTML is hard
published: true
date: 2021-05-17 10:39:00 UTC
tags: TIL,html,linux,markdown
canonical_url: https://www.zufallsheld.de/2021/05/17/til-that-creating-markdown-from-html-is-hard/
---

Today I wanted to take the text of a Confluence page and convert it to Markdown.

Getting the text was rather easy (after some duckduckgoing): Confluence provides a REST-API that returns among other things the content of pages in json. Here’s the curl-command to do this:

`curl "https://$CONFLUENCE/rest/api/content/343109903?expand=body.view" | jq .body.view.value > text.html`

This curl-command gets the contents of the page with the id 343109903 and shows the whole content of the json key body.view (that contains the actual documentation I want).

Opening the html file shows the expected contents, however without images or styling. And some suprising newline-characters before and after code blocks. Also the code inside the code blocks has no line breaks.

I then converted the Markdown file with the help of the python package html2text:

`html2text tex2.html > text.md`

The result was… just like the html-file. The things broken in html were broken in Markdown, too: the code-blocks, the newlines and the images. Also all tables except the most simple tables were completely broken, too.

Repairing this was not worth the hassle so I decided I could live without Markdown-documentation in my code.
Terraform variable.tf | terraform.tfvars |  Terraform command line variables
Tags: terraform, devops, aws
Published: 2021-05-17 10:38:41

{% youtube oB7l8GOpVaY %}

Terraform is OpenSource infrastructure as a code software tool. With the help of Terraform you can provision infrastructure on cloud platform such AWS(https://aws.amazon.com/), Google Cloud(https://cloud.google.com/), Azure(https://azure.microsoft.com/en-us/), DigitalOcean(https://www.digitalocean.com/), OpenShift(https://www.openshift.com/) and many more...cloud provider

But before you start working with Terraform you must understand different types of variables provided by the terraform - 
1. variable.tf - This file is used for declaring and defining variables 
2. terraform.tfvars - It is also used for declaring and defining variables but can be used for multiple environment like staging, production
3. commandline vars   - If you want to pass the variable using terraform commandline
JavaScript Fundamentals: Explained in a Nutshell
Published: 2021-05-17 10:34:52

### JS Variables
JS variables usually declared by `var`
`var x = 5;`
Using ES6 (JS version 2015) variables are declared by `let` or `const`
`let x = 5;` //Can be changed
`const y = 10;` //Can't be changed

### JS Operator
`+	Addition`
`-	Subtraction`
`*	Multiplication`
`**	Exponentiation (ES2016)`
`/	Division`
`%	Modulus (Remainder)`
`++	Increment`
`--	Decrement`

### JS Data Types
JS has basically 4 types of data and more...
`var length = 16;` // Number
`var lastName = "Johnson";` // String
`var x = {firstName:"John", lastName:"Doe"};` // Object
`var cars = ["Saab", "Volvo", "BMW"];` // Array

### JS Condition
To different action based on different condition we need to use conditional statements.
`if (time < 10) {
  greeting = "Good morning";
} else if (time < 20) {
  greeting = "Good day";
} else {
  greeting = "Good evening";
}`

### JS Loop
To execute same code again & again, loops are used.
`for (i = 1; i < 6; i++) {
  console.log("Number: "+i);
}`
Terraform Input Variable (string, number, bool, list, map...) | How to use Terraform Input Variable
Tags: terraform, devops, aws
Published: 2021-05-17 10:28:46

{% youtube AY8EsCRsQcU  %}


Terraform is OpenSource infrastructure as a code software tool. With the help of Terraform you can provision infrastructure on cloud platform such AWS(https://aws.amazon.com/), Google Cloud(https://cloud.google.com/), Azure(https://azure.microsoft.com/en-us/), DigitalOcean(https://www.digitalocean.com/), OpenShift(https://www.openshift.com/) and many more...cloud provider

But before you start working with Terraform you must understand different types of variables provided by the terraform - 
1. string - It will hold string values
2. number - It will hold number values
3. bool   - It will hold boolean value .i.e. true, false
4. list   - It is used for the collection of values. Collection can be of type string, number
5. map    - When you need to create key-value pair then need to use map variable type
Git: Rewrite history on user.name or user.email
Tags: git, vcs, commandline, howto
Published: 2021-05-17 10:24:34

## Summary 

I rewrote the history of one of my [Git](https://git-scm.com/) repositories for security reason last year.
This post is about how I did, referring to [the official documentation](https://git-scm.com/book/id/v2/Git-Tools-Rewriting-History#_changing_e_mail_addresses_globally).
Besides, if it had been a public repository shared with or used by several people, I should have considered more about how to do, especially in communication.

## Description

The primary command is below. Well, `<*-username>` and `<*-user@e.mail>` are due to environment.

```bash
# bash
git filter-branch --commit-filter '
        if [ "$GIT_AUTHOR_NAME" != "<old-username>" ] || [ "$GIT_AUTHOR_EMAIL" != "<old-user@e.mail>" ];
        then
                GIT_AUTHOR_NAME="<new-username>";
                GIT_AUTHOR_EMAIL="<new-user@e.mail>";
                git commit-tree "$@";
        else
                git commit-tree "$@";
        fi' HEAD
```

It is Git's [`filter-branch`](https://git-scm.com/docs/git-filter-branch) action, a module to "rewrite branches", with [`--commit-filter <command>`](https://git-scm.com/docs/git-filter-branch#Documentation/git-filter-branch.txt---commit-filterltcommandgt) filter "for performing the commit", targeting `HEAD`.
It detects history lines whose username or email isn't valid and rewrites them. Well, of course, you can change the `if` condition and so on in it.

Then I pushed the rewritten history to hosting service (which was [Gitea](http://gitea.io/)) I used.

```console
$ git push --force origin main
```

Here, __`--force` or `-f` option is necessary__ for the original lines __not to be duplicated__. Besides, If they were duplicated unfortunately, you might have to run `git reset --hard HEAD^` and then `git push --force origin HEAD` in order to delete all of the duplicated by restoring the previous commit.

## Reference

- https://git-scm.com/book/id/v2/Git-Tools-Rewriting-History
How Important E-learning Mobile Apps be in the Future
Tags: elearninmobileapps
Published: 2021-05-17 10:12:21

2020-2021 was an eventful year for eLearning study. If something, it cemented the fact that trainers and development specialists should consider eLearning solution because the manner ahead for the entire training and development industry. However that doesn’t mean in-person training is out of the question. The education industry has seen a substantial change in its approach as additional resources are created accessible to make confortable. Among these resources, E-Learning Mobile Apps have their own value in gold.

E-learning Mobile Apps have get trend over the last 4-5 years and since their arrival, the general Scenario of education sector has changed forever. It also praise from students and parents globally for the methods of e-learning. We predict some blended learning should undoubtedly be thrown into the mix. So, once revising, we think blending eLearning and a few styles of traditional ways of training is that the manner forward. So, consider e-learning as an exact a part of the combo.
Why should you Hire a Flutter Developer?
Tags: flutter, dart, android, ios
Published: 2021-05-17 10:01:08

<b>Why Flutter development?</b>

Flutter can be considered a cross-platform framework that enables a Flutter <a href="https://www.rlogical.com/hire-dedicated-developers/hire-mobile-app-developer/">mobile app developer</a> to produce outstanding applications for Android and iOS. It is also possible to use Flutter for backend development and desktop app development so that you will be able to create an app that will be working seamlessly on Windows, Linux, Mac OS, iOS, Android, and other platforms.

Presently, companies are making use of Flutter for creating iOS and Android apps. Flutter helps them save cash since they have to create an application only once, and it is going to work effectively on both platforms while conserving the development logic and native feel. This is not the case with the majority of the other cross-platform frameworks out there.
All these factors help to make Flutter the most in-demand framework for mobile app development right now.

You will come across three primary advantages of Flutter, which we have mentioned below:
• Affordable
• Quick development
• Outstanding performance

Flutter makes use of widgets that the developers can reuse across an application, and this helps to make the process of development much faster, unlike other cross-platform technologies such as React Native. Flutter’s performance is almost similar to that of the native languages such as Swift and Kotlin.


<b>Why hire a Flutter developer?</b>

If you are trying to know the main reasons for <a href="https://www.rlogical.com/hire-dedicated-developers/hire-flutter-app-developer/">hire Flutter developer</a>, it is imperative to comprehend Flutter technology and how the developers can use it. Initially developed for the Android OS, it pursued the primary objective of supporting both mobile platforms. The framework had been so much success in achieving this objective that Google made several updates and enhancements. Right now, companies are using Flutter for advancing both web as well as mobile development. It is possible for them to either add the app to existing applications or even build it from scratch.

Furthermore, Google has declared its ability to produce desktop apps using this particular framework. It happens to be in the early development phase. Even though desktop support for this framework already enables the developers to compile the code to native Mac OS desktop and native Linux apps, the support of the Windows platform is not available yet.

Learn more here: https://www.techdirectory.io/articles/why-should-you-hire-a-flutter-developer
Find odd even using Bitwise operator.
Tags: java, programming, codenewbie, computerscience
Published: 2021-05-17 09:44:05

Here we'll use & operator to find thae number is Odd or Even.

    public class JavaOneWorld {
    public static void main(String 
         args[]) {
         int x= 7;

       if((x&1)==0){
         System.out.println("even");
     }else{
        System.out.println("odd");
        }
       }
      }



The idea behind using the & operator !!!!!

As we already know binary works only on 1 and 0.
and a number is either odd or even,
so if a number is even then the last bit of that number must be 0 and if odd then the last bit must be 1.

i.e.-

5     odd
101 last bit is 1.

4 even

100 last bit is 0.

so here we have to use this property to find out the odd/even

Deep dive in this post...

https://www.javaoneworld.com/2021/05/find-odd-even-using-bitwise-operator.html?m=1
among the flowers
Tags: devjournal, ruby
Published: 2021-05-17 09:40:42

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqcfjwew0gcstutzrrhs.jpg)

*“The Zone is enjoyable. But when that joy becomes an obsession, one becomes disconnected from life.” (Moonwind from Soul, 2020).*

Interesting feeling being in the zone. Things are getting crossed-out and done - like you are where you’re supposed to be. It makes you forget. And sometimes, it is a detriment. May we find a way to remember that the best part of living is living every minute of it. Come smell the flowers, why don’t we?
Global notification bar : Best shopify notification app to increase sales and conversion rate.

Tags: shopifydeveloper, shopifyappdevelopment, shopifythemedevelopment
Published: 2021-05-17 09:36:12

We at Tecksky focus on client satisfaction and transform their project into Revenue Generating Business around the Globe.
Here, we share the happiness of creating something fresh and new that keeps us composed. If you have any online service to offer, this is for you.



Want to boost🚀 your Business? 

Don't know how?

Here it is, 

The key to any successful business is a healthy sales funnel🛒💰. It is especially true for eCommerce stores whose survival relies on transforming their site visitors from casual browsers into committing customers. 


So, We develop a Global Notification bar based on Shopify. 

Find new leads with us and transform them into clients for your product or service. 

And send them customized messages like promotional offers/sales/special events with customized text, color, font, position, and size.

Make your visitors getting engaged. So, you can collect more emails and do email marketing to increase sales.

To attract more customers with the focus, we have added a new feature. You can customize the background of the image for every notification.

Here, we provide you a live preview so you can manage how it looks like

Easily manage everything through the admin panel. 

It's an easy one-step installation and setup.

Businesses Are Struggling, They Need Digital Services.

Never Pay For Leads Again.


📱 Get more info and Download App from here 👉

https://apps.shopify.com/global-notification-bar
Vim, the best tool for Programmers
Tags: vim, linux, productivity, programming
Published: 2021-05-17 09:06:43

Vim is the best text editor/IDE out there. It is the "editor of choice of old-time [Unix](https://en.wikipedia.org/wiki/Unix) hackers". 

Vim is one of the most popular programming editors out there. It's loved by geeks for its speed, extensive feature set, and flexibility.  

Vim is very powerful, and very efficient. It is fast, lightweight. It has been around for nearly 20 years, and when I'm editing text files on a remote server I always reach for vim first .

## Does learning vim make sense?

Vim can be used anywhere. In the terminal, in GUI (gvim) and inside your IDE (Jetbrains, VSCode etc). It increases your productivity when writing code.

vim isn't going away either: it has grown in popularity over the last 10 years or so thanks to the efforts of a small group of dedicated developers who are working tirelessly to keep vim alive and relevant.

Since its creation in 1990 by Bram Moolenaar, a Dutch programmer who continues to develop it today, vim has evolved to be one of the most flexible text editors out there. The name vim is an acronym for "Vi IMproved" because Vim was forked from an earlier text editor called vi.

If you are new to vim, I recommend these [exercises](https://vim.is)

![productivity with vim](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlawo5ozdl132ooq1yjf.jpg)

### What can I do with vim?

Vim is a text editor that’s more powerful than notepad. It can do anything from editing small files to programming software. It’s been optimized for speed and efficiency which makes it great for developers.

You can do many things with Vim. Some of these features include:

* Available on every OS you can imagine
* Supports most popular programming languages
* Syntax highlighting and folding
* Unlimited Undo/Redo
* Edit files over SSH
* Record and replay keystrokes
* Jump cursor through code in ways that are not possible with other editors
* Super fast, super small editor
* Excellent file browser built-in, with easy navigation and file operations
* Supports plugins like [NerdTree](https://github.com/preservim/nerdtree)

Vim includes a GUI, visual selection mode, Unicode support, fast browsing, flexible syntax highlighting and search patterns and regular expressions. 

![vim](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12hnzp4mucw17zmpjrz7.gif)

Most importantly, Vim uses a natural keyboard-oriented interface for all commands.

Some commands include:

```
:e filename - read file
w - jump to next word
:w - write file
:q! - quit a file without saving it
:q - quit, saving changes
:wq - write (save) and quit
```
Laravel 8 Authentication Tutorial example

Tags: laravel, php, programming, tutorial
Published: 2021-05-17 08:59:59

Hi Dev,

In this blog, I will learn you how to implement authentication in your Laravel 8 project with example Alright, let’s dive into the steps.

Laravel 8 provide septate composer package for engendering auth scaffold in laravel 8 application. Whenever you require to engender auth in laravel 8 then you must have to install laravel/ui package in laravel 8.

Next, Utilizing laravel/ui you can engender simple view with auth as same you did afore you do. But you have to utilize vue js or react js with auth view in laravel 8. But they does not provide as default you have to follow few step to do auth.

You have to follow few step to make auth in your laravel 8 project.

First of all you need to install laravel/ui package as like bellow:

more..
if you want to see full example follow this link..

https://codingtracker.blogspot.com/2021/05/hi-dev-in-this-blog-i-will-learn-you.html
Update to the latest version of many npm dependencies at once
Tags: javascript, awk, npm, shell
Published: 2021-05-17 08:49:22

I couldn't find a `npm` command to update a subset of my dependencies to their latest version based on a name pattern, so here's a one-liner to do it with pipes and `awk` (to be modified for your needs).  

In this example, I want to update all the dependencies containing the string "babel".

```shell 
npm outdated |awk 'BEGIN{OFS="@"} $1 ~ /babel/ { print $1, "latest" }'| xargs npm install
```

# Explanation of each command

`npm outdated` lists your outdated dependencies.  

`awk`:  

* `BEGIN{OFS="@"}` sets `@` as the output field separator (will be used by `print`)
* `$1 ~ /babel/` will match the lines containing "babel" in their first column
* `{ print $1, "latest" }` will output each selected lines concatenated with "latest" (using "@" as the `OFS`)

`xargs npm install` will give the output of `awk` as input arguments to `npm install`, like so : `npm install dependency1@latest dependency2@latest ...`

# Tweak it

The beauty of the command line: you could tweak this for different dependency managers, such as Composer for PHP.