teleren/devto huggingface dataset:
Assigning a Namecheap Domain name to a Linode VM
Tags: cloud, github, tutorial, ubuntu
Published: 2022-10-31 15:18:24

A few days back I tried to map my VM's IP address to a domain name. Unfortunately my VM provider did not have a document that outlines the steps to do that (or in the spirit of sportsmanship, let's say it was difficult to find) . Their community had a few answers to the question but as with question-comment styled documents, there was no standard and in most comments, the detailing was not to the teeth. Luckily I found a slightly comprehensive post but I had to figure out a lot of things, so I decided the next Infrastructure Engineer shouldn't have to go through these. 
## Here's a straightforward guide to assigning a namecheap domain to a linode VM  
You'll have to do some setting on both sides so lezz go

### Linode Settings
- On the your dashboard, click **_Domains_**
- Create a domain
  - Enter the domain name and an email address
  - For **_insert default records_** select **_... from one of my linodes_** and select a linode
  - click **_Create Domain_**  

Now a domain name has been added, next connect to a Linode
- Go to your target linode and open **_Network_** tab
- copy the IPv4 and IPv6 addresses
- Go back to **_Domains_** and select the target domain name.
- Scroll down to find A/AAAA Record and add an A/AAAA Record
- For each record, add the IPv4 and IPv6 address as the IP address, leave **_Hostname_** empty and leave TTL as default; save

### Namecheap/Domain Settings
- Open the domain dashboard
- Set **_Nameservers_** to **_Custom DNS_**
- Add **_ns1.linode.com_** till **_ns5.linode.com_** to Nameservers
- Save  

You'll have to wait a while for the changes to take effect. According to articles I read during my research, it should take a maximum of 24 hours. It is usually faster in some cases.  

This guide is also open source. Its available on [Github](https://github.com/ACAnyasodor/assigningDomainName). I'm expecting feedback to make this guide more helpful. I also intend to widen the scope of the project, so i'm accepting contributions with regards to other Domain name services and other VM providers.
WordPress Comment Bot
Tags: php, wordpress, opensource, github
Published: 2022-10-31 15:06:18

I coded bot that posts comments on the posts of WordPress based system

View: [https://github.com/v4r1able/wordpress-comment-bot](https://github.com/v4r1able/wordpress-comment-bot)

I specified examples and trials in repo

Simple example:
```php
$singlecomment = \wpcomment\bot::sendComment("https://leventemre.com/test/example-post/", array(
    "comment" => "test comment",
    "author" => "v4r1able",
    "email" => "test@example.com",
    "site_address" => "example.com"
));
```

Don't forget to star if you like it :)
What You Need To Know About Design Rules And Principles
Tags: design, principles, rules, product
Published: 2022-10-31 15:05:25

Have you ever heard that design is literally everything around our existence? 
As humans of diverse traits, behaviours, perspectives, we tend to engage with design on a daily basis. Virtually, everything natural or non-natural in which we continually lay our fingers on was already designed.

However, for more clarity purpose, some of the following [design rules](https://books.zuri.team/design-rules) indicate the fundamental aspects of what makes design appealing to the eye, engaging and useful for our everyday use.


1. Pattern
Repetition of specific visual elements such as a single unit or multitude of forms. It can be used to create balance, organize surfaces in a consistent manner, or create contrast.

2. Rhythm
This is how the eye moves throughout the composition; leading the attention from one aspect to another. This can be achieved by using repeating or alternating elements or patterns.

3. Unity
The way elements are arranged so that the image is seen as a whole and overall, creates a visually compelling composition is unity.

4. Balance
How the elements within a composition are arranged either symmetrically, asymmetrically, to create the impression of equality in weight or importance.

5. Scale
Scale affects how something is balanced. The phrase “Bigger is always better” is not always the case in design. Sometimes tiny elements can call attention just as effectively as something large.

Kindly share your thought in the comment section and learn more on the rules of designs at no cost [here](https://books.zuri.team/design-rules).
WhatsApp Photo and Video Downloader Extension
Tags: extension, chrome, javascript, opensource
Published: 2022-10-31 15:04:15

I shared the self-destructing photos and videos download extension via WhatsApp Web

View on Github: [https://github.com/v4r1able/wa-downloader](https://github.com/v4r1able/wa-downloader)

Test video: [https://www.youtube.com/watch?v=PZVEi1Zd9l0](https://www.youtube.com/watch?v=PZVEi1Zd9l0)
Angular standalone router providers: an update
Tags: angular, webdev, news
Published: 2022-10-31 15:00:00

Since `standalone` is still in preview, the documentation gives you no hints. You have to excavate to find some. On medium, [Andrew Scott](https://blog.angular.io/advancements-in-the-angular-router-5d69ec4c032) blogged about advancements made by Angular team on the router, when in standalone.

### Alternative to `importProvidersFrom`

In our previous attempt to tear down the `AppModule`, the `main.ts` was rewritten

```ts
// main.ts bootstrap passing all providers from an existing NgModule
// using importProvidersFrom
bootstrapApplication(AppComponent, {
  providers: [
    importProvidersFrom(RouterModule.forRoot(AppRoutes)),
  ],
});
```

The new proposed way is to use `RouterModule`

```ts
// new way with providerRouter in main.ts
bootstrapApplication(AppComponent, {
  providers: [
    provideRouter(appRoutes),
  ]
});
```

### Rewriting our App Routes with options

Let's revisit our `app.route` in [StackBlitz](https://stackblitz.com/edit/angular-standalone-app-full?file=src%2Fapp%2Fapp.route.ts) project and rewrite it.

```ts
// app.route rewriting the router providers using provideRouter
export const AppRouteProviders = [
  provideRouter(AppRoutes,
    // this is in place of scrollPositionRestoration: 'disabled',
    withInMemoryScrolling({
      scrollPositionRestoration: 'disabled',
    }),
    // in place of initialNavigation: 'enabledBlocking'
    withEnabledBlockingInitialNavigation(),
    // same configuration
    withRouterConfig({
      paramsInheritanceStrategy: 'always',
      onSameUrlNavigation: 'reload'
    }),
    // in place of  preloadingStrategy: PreloadService,
    withPreloading(PreloadService),
  ),
  // ...
];
```

### Bundle sizes

The article claims that when not using the sub features of the router, treeshaking should result in reduction in bundle size. I could not reproduce that. As a matter of fact, the `provideRouter` almost always generated a slightly larger main bundle. The lazy loaded and common bundles were not affected.

Donno. You be the judge.

### RESOURCES

-   [Angular providerRouter documentation](https://angular.io/api/router/provideRouter)
-   [Advancements in the Angular Router](https://blog.angular.io/advancements-in-the-angular-router-5d69ec4c032)
Pitching Raku
Tags: raku, pdf, text, documentation
Published: 2022-10-31 11:36:15

My favorite programming language is **Raku** (formerly known as Perl 6). Most of my code is public, and I use auto-generated Markdown a lot for READMEs on [github.com/tbrowder](https://github.com/tbrowder).

Yesterday, I successfully finished a good code workflow for producing documentation, using **Raku**, by converting text in **Markdown** to **Rakudoc** to **PDF**, thanks to the Raku modules produced and published by my friends in the Raku community. 

The final product needs some tweaking for sure, but it's a reasonable proof-of-concept for a very valuable tool for developers. (Its final form is part of my Raku Advent article for 3 December 2022: [Day 3: Santa and the Rakupod Wranglers](https://raku-advent.blog/category/2022/page/3).)

To learn more about Raku, visit [raku.org](https://raku.org) and check IRC **\#raku** for online discussions and help--it's a very welcoming community.
QuickStart option is missing!!!
Tags: mongodb
Published: 2022-10-31 14:59:39

Some of us may have some issues to find **Mongodb Atlas Quickstart option** & so today we are going to discuss how to dind it.

After doing signin & creating a project, when you first enter into the mongodb atlas website, the page looks like something below picture.
![After sign in & creating a project, when you first enter into the mongodb website, the page looks like something below picture.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9g68sxmhr3eiszsv0zy7.JPG)

There is no Quickstart option. Actually this option is being **disabled by default**. If you wanna see this in the above page, then **go to the top option of sidebar (Project_name)**. Then click on the **3 dots (...)** and you will get a dropdown menu. From the options select **"Project Settings"** option. Follow the picture below:
![
There is no Quickstart option. Actually this option is off by default. If you wanna see this in the above page, then go to the top option of sidebar (Project_name). Then click on the 3 dots (...) and you will get a dropdown menu. From the options select "Project Settings" option Follow the picture below:](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bik4u08fhajoen6nnsal.png)


Then you will be redirected to the project settings page. Scroll Down & you will get an option called **"Atlas Security Quickstart"**. By default the button for it is disabled & so you are unable to see this. Follow the picture below:
![Then you will be redirected to the project settings page. Scroll Down & you will get an option called "Atlas Security Quickstart". By default the button for it is disabled & so you are unable to see this. Follow the picture below:](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xthzyw1a9c7g8fmak141.png)


Now enable this button like below:
![Now enable this button like below:](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98e14gbcoivczj0s7nc0.png)


**Hurray! Now you have "Quickstart" option.**
![**Hurray! Now you have "Quickstart" option.**](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iao70nfn93mk5dcgj4se.png)
Promises em JS
Published: 2022-10-31 14:40:45

Uma promise é um objeto usado para regatar valores assincronamente.

Declarando uma Promise

```javascript
let dados = new Promise(function(sucesso, falha) {
    const map1 = new Map();

    map1.set('a', 1);
    map1.set('b', 2);
    map1.set('c', 3);

    sucesso(map1.get('a'))

    return map1
});

```

Resgatando valor após promise acabar

```javascript
dados.then((valor) => console.log("Isso aqui sera executado quando promise acabar:" + valor), () => "Promisse falhou")

```


Utilizando Async

```javascript
let dados = async() => {
    const map1 = new Map();

    map1.set('a', 1);
    map1.set('b', 2);
    map1.set('c', 3);

    // sucesso(map1.get('a'))

    return map1
};

console.log(dados) // retorna uma promise pendente

dados().then((valor) => console.log("Isso aqui sera executado quando promise acabar:" + valor.get('a')), () => "Promisse falhou")

```
Simple data emitter and subscriber from scratch in JS
Published: 2022-10-31 14:31:03

**Have to ever used a Reactive setup in JS?Lets try to make it from scratch**

So if you have used any reactive stuff in JS, it mainly contains two methods, one for emitting the data and one for listen the changes by subscribing to it.

Lets say we have a class CustomRxm, So it should have two methods emit and subscribe

```typescript
class CustomRx{
   constructor(initialData:string){
      this.data = initialData;
   }
   emit(data:string){
   }
   subscribe(callback:Function){
     
   }
}
```
We will going to use these methods like:

```typescript
const rx = new CustomRx('tushar');
rx.subscribe((data:string)=>{
   console.log(data)
})
rx.emit('new name');
rx.emit('some new data');
```

**Lets code these methods:-**

See we are getting a callback function as an argument in subscribe method.The trick is to store this as class variable and call this in emit method with new data as argument.
(Since this is a simple example this will only work with one subscriber)

```typescript
class CustomRx{
   constructor(initialData:string){
      this.data = initialData;
   }
   emit(data:string){
      this.data = data;
      this.callback(this.data);
   }
   subscribe(callback:Function){
      this.callback = callback;
   }
}
```

In action:-

```typescript
const rx = new CustomRx('tushar');
rx.subscribe((data:string)=>{
   console.log(data)
})
setInterval(()=>{
  rx.emit('new name');
},1000)

// 'new name' will be printed out in console each 1 second
```
My Fourth Hacktoberfest PR
Tags: opensource, beginners, javascript, webdev
Published: 2022-10-31 14:23:31

## What Did I Work on?
This week, I worked on a new repo [word-cloud-generator](https://github.com/JianLoong/word-cloud-generator). This project allows the user to generate a word cloud based on a body of text provided to it. This word cloud can be generated using different methods and with different stylings and can be saved as a `.png` file.

[The issue](https://github.com/JianLoong/word-cloud-generator/issues/4) I worked on was adding a feature that allowed for selecting the capitalisation of the words in the generated word cloud. This allowed for all words in the word cloud to be all lower-case, all upper-case, or have only the first letter capitalised. 

## What Changes did I make? 
[My pull request](https://github.com/JianLoong/word-cloud-generator/pull/13) involved making changes to both the front-end and back-end. The front-end changes I made were relatively simple, just placing radio buttons and labels on the settings panel of the page.
![Front-end changes](https://user-images.githubusercontent.com/61764259/198921781-019ddc60-2484-4304-8f24-b8e895a206ce.png)
On the back-end, the default capitalisation was all lower-case, which was where I started. I had to first check the radio button that was checked, then modify the words received in the corresponding way.

![All upper-case](https://user-images.githubusercontent.com/61764259/198922214-3fbbb074-536e-4ca0-80b7-1c35f34833b3.png)

There was not a built-in method to capitalize the first letter in every word, so I had to find my own solution. This involved iterating through every word, and modifying them to a value built from appending the capitalised first letter to the remainder of the word.
![First letter upper-case](https://user-images.githubusercontent.com/61764259/198922248-35947387-1907-46e5-b6c8-b29fe6cecccf.png)

## Difficulties
This project used webpack, which caches the page. This also made it so that my changes were not being made when I reloaded the page. It took me a few hours to figure out, but once I found a workaround the process of finding the solution to the issue was only a matter of time.
The new YugabyteDB gflags page
Tags: yugabyte
Published: 2022-10-31 14:15:51

Starting with [YugabyteDB](https://www.yugabyte.com) version 2.15.3.0, the gflags (server parameters) page shows the values grouped into a number of categories.

# Current situation
In versions below 2.15.3.0, the gflags are shown in the following way at the HTTP management page of the tablet servers and the masters:
![HTTP management page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thwrkx8dywex2iwwe1b7.jpg)
This is the list of gflags, with no ordering, and no indicators about the gflags, such as whether they are changed from their default value or not.

# New situation
In versions starting from 2.15.3.0, the gflags screen looks like this:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jz44vyidzrckvedezyc1.jpg)
In the new gflags screen, the output starts with 'NodeInfo Flags', and these are ordered alphabetically.

The new situation shows the gflags in a few categories:
## NodeInfo 
NodeInfo flags are flags that are tell important per node information. These flags can be default, but nevertheless the information tells vital information about the node and process' configuration on that node.

## Custom
Custom flags are flags that are explicitly changed from their default value. So if you are looking for specific configuration or oddities in case of troubleshooting, this is where to look.

## Auto
Auto flags are flags that get a value automatically set based on the node or process specifics.

## Default
Default flags are flags that did not change from their default value.

# Using the gflags page with tools
If you are using tools to read the gflags HTTP page, then the different page might mean you need to rewrite your tool. But this might not be the case!

If any tools wants to 'scrape' the gflags HTTP page, you can add `?raw` to the URL, and it will output the gflags without HTML tags, simply as a list of gflags. This works both with current versions and the new 2.15.3.0 version.

But there is a better way!

# The gflags JSON page
Another addition for the gflags information is the `api/v1/varz` endpoint. This outputs the gflags as JSON:
```
curl http://192.168.66.80:7000/api/v1/varz | jq
{
  "flags": [
    {
      "name": "log_filename",
      "value": "yb-master",
      "type": "NodeInfo"
    },
    {
      "name": "placement_cloud",
      "value": "local",
      "type": "NodeInfo"
    },
    {
      "name": "placement_region",
      "value": "local",
      "type": "NodeInfo"
    },
    {
      "name": "placement_zone",
      "value": "local",
      "type": "NodeInfo"
    },
...etc...
```
This makes it very easy for anything that can use JSON to parse the gflags information.
Hacktoberfest - Part 3
Published: 2022-10-31 14:11:27

For part three, I decided to take on a different kind of issue - [to improve transcript for a podcast episode](https://github.com/mgreiler/se-unlocked/issues/112). The process was similar to what I had done for my previous PRs. I forked the project and created a branch for the issue. However, since the work involved editing a markdown file, I decided to use GitHub's built-in editor to work on it instead.
The improvement process involved listening to the episode while reading through the existing transcript. I would pause as needed and fix any issues which I notice. These mostly involved a few missing words, missing pronunciation, incorrect pronunciation, and some incorrect words. For example, `git pull` was transcribed as `git poll`, `O'Reilly` as `a Raleigh`, `abstraction` as `obstruction`.
Though I was quite surprised by how accurate the auto generated transcript was. The only places where it would mess up was when there was a slight overlap in conversation, or when terms specific to software development, or names of publishers were being said.
Throughout this process, I learned a bunch about transcribing - what may be ignored (phrases such as um), when to be exact, how and when to transcribe laughs, background music, etc.
And once I was finished with the changes, I created a [PR](https://github.com/mgreiler/se-unlocked/pull/172).
Jira Automation
Published: 2022-11-15 11:10:57

---
title: Jira Automation
published: true
date: 2022-10-31 14:08:36 UTC
tags: 
canonical_url: https://krishnavamsi.hashnode.dev/jira-automation
---

Jira is the most common bug-tracking tool used across the software industry. There are tasks that need to be done on a daily/weekly/sprint basis, and **Jira provides APIs** to perform many actions on the **issue/user story**.

After I had learned the basics of Python, I was looking for ways to use the knowledge acquired. Since Python is a general-purpose programming language, I thought of automating some repetitive tasks and found Jira.

In this article, we will be looking on, at how to automate some Jira tasks using Python. You can **use any software/language** to perform the same.

Before proceeding further you need to **identify** whether you are using Jira on **Jira Cloud** or on your **company-hosted** server. Company-hosted Jira would typically have a company name in the domain.

I am using Jira on my company-hosted server. Typically the URL would be

```
https://jiracompanydomain.com/browse/jiraid

```

Python code snippet for a simple GET request to fetch the given Jira Issue id related details.

```
import requests
import json
auth = ('username','password')
r = requests.get('https://companydomain.com/rest/api/2/issue/' + jira_id, auth=auth)
summary = r.json()['fields']['summary']
subtasks=r.json()['fields']['subtasks']
print(summary)
print(subtasks)

```

To add a comment in a Jira Issue.

```
import requests
auth = ('username','password')
json_body={
'body':'Need further clarification on this issue'
}
r = requests.post('https://companydomain.com/rest/api/2/issue/' + jira_id +'/comment', auth=auth,json=json_body)

```

These are a few examples that could be done. Personally, I use around 6-7 endpoints to perform/automate my tasks and explore furthermore to see what could be automated.

The most common actions which can be automated are:

- Fetch Jira issue details.
- Fetch Sub-tasks details.
- Adding comments.
- Adding Work log (Time Spent).
- Attaching a file.
- Creating Fisheye + Crucible Reviews (Uses a different base URL)

You can explore more on Jira APIs in the below links.

[Jira server API documentation](https://docs.atlassian.com/software/jira/docs/api/REST/9.3.1/)

[Jira Cloud API documentation](https://developer.atlassian.com/cloud/jira/software/rest/api-group-issue/)

I wish this would be helpful to automate at least some of your Jira tasks. I would be glad to know if you can add any more to this.

What things did you automate in your life?
What are your goals for this week?
Published: 2022-10-31 14:07:00

What are your goals for this week? 

It's the last day of Hacktoberfest, any last minute contributions?

- What are your goals for the week?   
- What are you building? 
- What will be a good end result by week's end?
- Did you meet your goals last week?

**Last Week's Goals**
 How did I do?

- [:white_check_mark:] **Continue Job search.** Filled out a few applications, chatted with some people.  
- [:x:] **Create CSS art.** 

- [:x:] **Blog on any CSS art.** No art so no CSS blog, I did an update on my Hacktoberfest progress. I had my 4th PR mature last week.
- [:x:] **Decorate for Halloween** Not yet, busy then rain. It's soggy out there. Will throw out some stuff just so the trick or treaters know they can stop here.
- [:white_check_mark:] **Process photos from trip.** done
- [:white_check_mark:] **Update content on a web site.** done

**This Week's Goals** 

- Continue Job search.
- Do some code challenges.
- Write blog posts. Virtual Coffee has a blogging Challenge for the month. Inspired by NaNoWriMo we're trying to as a group hit 100,000+ words for the month. I plan to write at least one blog post a week. 
- Secondary monthly goal is to beat my word count for last year. It was 3,511. 


```
-$JarvisScript git push
```
UK Global Talent Visa Course is out 🔥
Published: 2022-10-31 14:04:40

Hey friends,

Exciting news! My FREE nine part video course on how to get the UK Global Talent Visa is now [available](https://www.youtube.com/playlist?list=PLOuFAJN39xtmhu7Fy2eHti_XU-3bL8mnH) on YouTube.


You will learn:

- 
what is the mandatory criteria for the Global Talent Visa

- 
how you can prove you have been recognized as a leader in digital tech

- 
whether your work is innovative enough to meet the innovation criteria

- 
how you can prove you have made significant contributions to tech

- 
whether your community work and open source contributions will be enough to meet the "outside contribution" requirement of Tech Nation

- 
whether you have a chance of meeting the academic criteria

- 
whether you are eligible for the visa despite your consultancy experience

- 
how to get strong letters of recommendation and which mistakes to avoid

It's the most detailed series of explainers on the topic I've seen on YouTube so far, so make sure you educate yourself before you start preparing your case:

{% embed https://youtu.be/ks8SKnbMY8Q %}

Watch the full video course [here](https://www.youtube.com/playlist?list=PLOuFAJN39xtmhu7Fy2eHti_XU-3bL8mnH).