teleren/devto huggingface dataset:
Change GitHub Repo origin from https to SSH - Day 3
Tags: github
Published: 2022-01-17 17:36:25

Yesterday I set up Git and GitHub on my PC to work on my dev-playground project.

I was connecting to the remote origin with **https**.

I soon found out that every time I wanted to push to GitHub I had to enter my personal access token. Yikes!

A better way is to use **SSH**.

1. [Check for existing SSH Keys on your computer](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)
2. [Generate a new SSH key and add it to the SSH agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
3. [Add the new SSH key to your GitHub Account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)
4. [Change GitHub url from https to SSH](https://peter-whyte.com/change-git-url-to-ssh-from-https/)

##🤦‍♀️ Ah-ha Moment

If you use the SSH agent you don't have to enter a passphrase every time you connect with GitHub. I need to do this on my Mac! I have been wasting a lot of time entering that passphrase... 😳
5 Articles every WebDev should read this week (#03)
Tags: webdev, tutorial, javascript, programming
Published: 2022-01-17 17:32:45

A curated list of the top five web development must-reads from last week. Don't miss out on the latest web development stories and insights. Read all about the cutting edge in web development, working in tech and the new tools and frameworks while learning a few new tricks.

---

## free-for.dev

> Developers and Open Source authors now have a massive amount of services offering free tiers, but it can be hard to find them all to make informed decisions.

This is a list of software (SaaS, PaaS, IaaS, etc.) and other offerings that have free tiers for developers.

https://free-for.dev/

---

## How not to learn TypeScript

> “TypeScript and I are never going to be friends”. Oh wow, how often have I heard this phrase? Learning TypeScript, even in 2022, can be frustrating it seems. And for so many different reasons. People who write Java or C# and find out things are working differently than they should. Folks who have done JavaScript most of their time and are being screamed at by a compiler. Here are some mistakes I’ve seen people do when getting started with TypeScript.

## https://fettblog.eu/how-not-to-learn-typescript/

---

## Being the DRI of Your Career

> At DuckDuckGo, there’s an expression: “You are the DRI of your career” (DRI: Directly Responsible Individual). I like this, both as an individual who has always felt like the DRI of my own career, and I like it as a manager because I think it makes the boundaries of what you can and can’t do for people clear.

https://cate.blog/2021/09/20/being-the-dri-of-your-career/

---

## How to Stack Elements in CSS

> If you want to create fantastic and unique visual experiences on the web, you will eventually need two elements to overlap or exist in the same place. You may even just need them to be positioned near or next to each other. Let’s go over two different ways to accomplish this, one with the position property and one with CSS Grid.

https://css-tricks.com/how-to-stack-elements-in-css/

---

## The New Vue by Evan You

> In this session, Evan You talks about the new Vue 3 experience: from new syntax to new docs, build tools, devtools, and TS/IDE.

https://www.youtube.com/watch?v=2KBHvaAWJOA

---
 
Follow me on [Twitter: @martinkr](http://twitter.com/_martinkr).

Photo by [Alex Kulikov](https://unsplash.com/@burntime) on [Unsplash](https://unsplash.com)

---

[![Subscribe to the weekly modern frontend development newsletter](https://modernfrontend.dev/banner/banner_583-111.png)](https://modernfrontend.dev/)

---
Javascript Promise Basic Things
Tags: javascript, programming, react
Published: 2022-01-17 17:30:41

Promise- 
Sometimes we needed asynchronous javascript behavior. suppose when we are want to get data from the internet server but we know if we want to get some data, it needs some time but javascript working synchronously it gives an error when it does not find any things.
promise just help to javascript asynchronous behavior like if have any true value it's going for resolve otherwise its return rejects call back function.I need to catch the resolved value you need to use then and if need to catch the reject message, need to use the catch function with an arrow function as a parameter.
```javascript
// promise syntext
let x =10;
const promises = new Promise((resolve, reject) => {
	if (x ==10) {
		resolve('workin');
	}
	else {
		reject('working');
	}
});
promises.then((w) => {
	console.log(w); 
});
```
How to create GitHub account for beginners?
Tags: github, beginners, git
Published: 2022-01-17 17:30:23

Hello World :)

This is the first article from [the series](https://dev.to/iatharva/series-on-github-by-iatharva-57a8). In these article we gonna see how to create GitHub account as a beginner.

## Follow the below steps to create your account:

- Go to [github.com](https://github.com).
![GitHub homapge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4l27xb5nhd8vs8y4z6a.png)

- Click on "Sign up for github" button
![Button image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e09vn8ayjsctpezgcequ.png)

- Enter your valid email address and password which you want to give.

- Enter username of your choice 
(you can change your username later) 
(choosing a name which is easily remembered, short and professional looking is useful)
(in the end it's your choice to pickup your username)

- Enter y or n in next field according to your choice if you want to receive promotional emails from GitHub (I prefer to choose n)

- Resolve a captcha and click on create account
![Form image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ii3vncastozcxl8ijap9.png)

- Next you will need to add the code received on your entered email address

![Enter your code screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzy50br5eb9so1ltsbnn.png)

- After that you will be prompted to answer some question
- Choose just me or 2-5 option & Student (as we are student right now, you can choose developer if you are not student)
![screenshot of question](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3pi7difvdwg81mbvp6da.png)
- Choose some features which you are interested in using? or looks interesting to you.
![screenshot of the question](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19nwfe0tkl1ti8qagohg.png)
- After that choose the free option
![plan screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pumb6kqttemcciv1wdws.png)
![plan screen 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcenxev3n3dir5y9v1we.png)

- Once you see the similar screen as below then it means you have created your GitHub account successfully.
![GitHub homepage after sign up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uoui5jp1hhi3k9mmz0n1.png)

- ( Now whenever you want to share your github profile just add your username after github.com/ )

Hope, it was easy!
See you all in next article.

In case of any questions or query you can be reach me here : [github.com/iatharva](https://github.com/iatharva)
[Video] Outbox meets change data capture (feat. .NET, PostgreSQL, Kafka and Debezium)
Tags: dotnet, microservices
Published: 2022-01-17 17:52:20

---
title: [Video] Outbox meets change data capture (feat. .NET, PostgreSQL, Kafka and Debezium)
published: true
date: 2022-01-17 17:30:00 UTC
tags: dotnet, microservices
canonical_url: https://blog.codingmilitia.com/2022/01/17/outbox-meets-change-data-capture-feat-dotnet-postgresql-kafka-debezium/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/roclqq0n0jdyfu0cfzcm.jpg
---

Hey folks!

Quick video with an interesting approach to implement the publisher part of the outbox pattern.

Using change data capture (often referred to as CDC), we hook up something to the database transaction log, forwarding incoming entries to the outbox table.

In this example, we’ll make use of Debezium, hooked up into a PostgreSQL database, forwarding messages to Kafka.

{% youtube WcmLvoxs9ps %}

Here come a bunch of related links:

- [GitHub repository](https://github.com/joaofbantunes/DebeziumOutboxSample)
- [Intro to the transactional outbox pattern](https://dev.to/joaofbantunes/event-driven-integration-1-intro-to-the-transactional-outbox-pattern-aspf02o-e040-1koh)
- [Debezium](https://debezium.io/)
- [Debezium PostgreSQL connector](https://debezium.io/documentation/reference/stable/connectors/postgresql.html)
- [Debezium outbox event router](https://debezium.io/documentation/reference/stable/transformations/outbox-event-router.html)

Thanks for stopping by, cyaz! 👋
Quick Tip: DNS lookup issue – Docker Container | Business Central
Tags: dynamicnavbc, api, dns, docker
Published: 2022-01-20 18:32:01

---
title: Quick Tip: DNS lookup issue – Docker Container | Business Central
published: true
date: 2022-01-17 17:03:09 UTC
tags: DynamicNAVBC,API,DNS,Docker
canonical_url: 
---

Recently, due to some Integration REST API tests, I faced an error during my request HTTP attempt. The error was:

_An error occurred while sending the request. The remote name could not be resolved:_

![](https://toolgbrmaker.files.wordpress.com/2022/01/image-10.png?w=632)

After a search on some blogs I was able to correlate the error with a DNS issue and gave it a try the following commands on Container Command Prompt:

```
ping google.com
```

With the result of…

![](https://toolgbrmaker.files.wordpress.com/2022/01/image-11.png?w=652)
_Ping request could not find host google.com. Please check the name and try again._

```
ping 8.8.8.8
```

With the result of…

![](https://toolgbrmaker.files.wordpress.com/2022/01/image-12.png?w=454)
_Success_

After been identified the issue I was able to fix it by adding the following lines on Docker Settings – Daemon configuration file:

```
{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": true,
  "dns": [
    "8.8.8.8"
  ]
}
```

![](https://toolgbrmaker.files.wordpress.com/2022/01/image-13.png?w=1024)

The above solution was taken from the following blog **[post](http://www.robertbird.co.uk/development/docker-networking-tips-and-tricks)**. Thank you Robert Bird for sharing it!

Stay safe!
Looking for Compiler Developers
Published: 2022-01-17 17:05:28

---
title: Looking for Compiler Developers
published: true
description:
tags: 
//cover_image: https://direct_url_to_image.jpg
---
Hey, so, I'm looking for people to help me with compiler for my open source programming language. I don't have a source of income so you would just be working out of interest in the project. Please let me know if you want to help out :)
Heres a link to the github repository:
https://github.com/omnit3a/Jenny
GitHub Tips and Tricks
Tags: github, git
Published: 2022-01-17 16:58:22

I wanted to share some GitHub tips and tricks that I have picked up lately. I hope they can help you out!

## Octotree
[Octotree](https://www.octotree.io/) is a browser based extension that you can install to help you navigate through GitHub repositories file and folder structure in an easy to read tree-based file structure. 

## Create a repository with your own name
If you create a repository with your own name and create a README.MD file then everything in there will appear on your public profile.  It's a great way to introduce who you are, your projects and work to people who are visiting your profile. 

I have [mine](https://www.github.com/weeyin83/weeyin83) setup to display a bit of a bio and share some links to new blog posts and YouTube videos through some GitHub Actions created by [https://github.com/gautamkrishnar/](https://github.com/gautamkrishnar/). 

## Mention Highlighter
Is it hard to spot if you are mentioned in a comment or an issue?  Install the browser based plugin [GitHub Mention Highlighter](https://github.com/benbalter/github-mention-highlighter).  It'll make it easier to spot if you are quickly scrolling through and hopefully avoid missing something you need to answer or action. 

## Keyboard Tags
Did you know you can use a tag to insert little keyboard icons into your files or comments etc?  This is great if you are trying to give someone instructions on what key presses or combos work with your application or game or whatever. 
If you use the <kbd></kbd> syntax like below:
```bash
Press <kbd>A</kbd> that will make you go left, which <kbd>D</kbd> will make you go right. 
```

![Keyboard Tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xndxc7363w92x5t5tspq.PNG)

It will end up looking like this within GitHub!

## Video Uploads
In May 2021 the ability to upload .mp4 and .mov files to issues, pull requests and discussion comments meaning you can share reproduction steps or ideas with GitHub repo owners or other contributors.  The video file has to be less than 100MB though.

I hope these suggestions have helped sparked your imagination and please do share any that you think might be useful. 👌
Bubble sort
Tags: javascript, algorithms, tutorial, 100daysofcode
Published: 2022-01-17 16:56:04



## Bubble sort algorithm

Bubble sort will sort an array by passing through the array and swapping the adjacent elements. It will keep passing through the array until all elements are in order. 
Think of it as moving along the array and always asking is my current number bigger than the next number and if it is then it will swap them but it can only swap in the same position twice in each pass. 

Notice bellow how the numbers are being ordered with each loop iteration and a single pass is 6 loop iterations for this array size. 

![number sorting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/638vj1psl0z039ls2os1.png)

## How to implement bubble sort

First we will have a do while loop that keeps looping while the array is un sorted. 

```javascript
let keepSwopping;
    do{
        keepSwopping = false;
 }while(keepSwopping)`
```
Secondly we have a for loop within the do while that will pass through the array.


```javascript
for (let i = 0; i < length; i++) {
if (array[i] > array[i + 1]) {
 let temp = array[i];
 array[i] = array[i + 1];
 array[i + 1] = temp;
 keepSwopping = true;
                console.log(array);
            
            }
        }

```

Thirdly within the for loop we have an If statement that makes a check to see if the current element is larger than the next element in the array.

If it is larger we store the current value in temp. Then we assign the value of the next element[i+1] in the current element[i] and the value of temp in [i+1]. The value of keepSwopping is set true to keep the do while looping. 


  

```javascript
 if (array[i] > array[i + 1]) {
 let temp = array[i];
 array[i] = array[i + 1];
 array[i + 1] = temp;
 keepSwopping = true;
```





```javascript
const unSorted = [3,6,4,7,1,5]
const bubble = (array) => {
    console.log(array)
    length = array.length;
    let keepSwopping;
    do{
        keepSwopping = false;
        for (let i = 0; i < length; i++) {
            if (array[i] > array[i + 1]) {
                let temp = array[i];
                array[i] = array[i + 1];
                array[i + 1] = temp;
                keepSwopping = true;
                console.log(array);
            
            }
        }
    }while(keepSwopping)
}

bubble(unSorted)
```

## Best and worst case run time

O(n) The best case is when array has already been sorted so we only pass through the loop for the size of the array once. 

O(n² ) The worst case is when we have to loop through the array for every item.

O(1) Auxiliary Space
A lightweight framework for Material Design 3
Tags: webdev, css, html, pwa
Published: 2022-01-17 16:54:13

Hello devs,

I am super excited to share with you the new release of [https://www.beercss.com](https://www.beercss.com) guided by Material Design 3. Oh, sorry for the shy post, ok?

Hope you enjoy it! 🍺🍺🍺
How to make HTML content editable?
Tags: html, beginners, tutorial, firstpost
Published: 2022-01-17 16:48:48

Ever wondered? Can we make HTML content editable when it runs on a browser? The answer is **YES**. 
By using `contenteditable` attribute we can specify whether the content of an element will be editable or not.

Syntax:
`<element contenteditable="true or false">` 
We can give any of two values 'true' or 'false'.
'True' tells that element is editable while 'false' specifies that element is not editable.

Let's see: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovroqdffjwbukrmwjtan.png)

This is my first post. I would document my learning journey on this platform and I hope it will prove helpful for beginners as I, too, am a beginner.

**HEART IT**
Jupiter Integration
Published: 2022-01-17 16:20:08

I am trying to integrate jupiter api in my frontend
and I added @jup-ag/core module(npm package)
I use typescript to build nuxt.js project
but when I run yarn start

I got this error below

foreach try we got this error for the Jupiter integration:
4:44
ERROR  in ./node_modules/@jup-ag/core/dist/core.esm.js                                                              friendly-errors 13:59:56
Module parse failed: Unexpected token (1401:73)                                                                  friendly-errors 13:59:56
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  }
| 
>  remainingAccounts.push(...prepareRemainingAccounts(amount, platformFee?.feeAccount));
|  return JUPITER_PROGRAM.instruction.mercurialExchange(amount ? new BN$1(amount) : amount, new BN$1(minimumOutAmount), platformFee?.feeBps ?? 0, {
|   accounts: stableSwapNPoolIntoMercurialExchange(stableSwapNPool, userSourceTokenAccountAddress, userDestinationTokenAccountAddress, user),
                                                                                         friendly-errors 13:59:56
 @ ./node_modules/babel-loader/lib??ref--12-0!./node_modules/ts-loader??ref--12-1!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/swap.vue?vue&type=script&lang=ts& 44:0-39 178:25-32
Prettier vs ESLint
Tags: programming, javascript, react, node
Published: 2022-01-17 16:17:34

**Prettier**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctsvitfi85rhjpflyyjk.jpg)
Prettier is an opinionated code formatter with support for many languages such as Javascript and many other languages.
In fact, this tool removes all original styling and ensures that all outputted code conforms to a consistent style. Prettier takes your code and reprints it from scratch by taking the line length into account.


Suppose you have a function that receives 4 arguments.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fb5pg483df511cp05yd0.png)

You agree, it is not very attractive if you are lucky like me and uses this tool, the code will be much more beautiful

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1v5sqfvjqbfz3suyid9.png)

This tool has a configuration file in which the entire code profile is customizable.

Why should every developer use Prettier?
	- Building and enforcing a style guide
	- Helping Newcomers
	- Writing code
	- Easy to adopt
	- Clean up an existing codebase
	- Ride the hype train
	- Supports many languages
	- Integrates with most editors


**ESLint**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myui49so86pooxsrntlx.png)
But the hand ESLint is a static code analysis tool for identifying problematic patterns found in JavaScript code. It was created by Nicholas C. Zakas in 2013. Rules in ESLint are configurable, and customized rules can be defined and loaded. ESLint covers both code quality and coding style issues. ESLint supports current standards of ECMAScript and experimental syntax from drafts for future standards. Code using JSX or TypeScript can also be processed when a plugin or transpiler is used. in another word ESLint Find and fixes problems in your JavaScript/Typescript code.
The above description is taken from Wikipedia, which clearly explains the work of ESLint. ESLint requires Node.js and works on Windows, Mac and Linux.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fh6vosflauesgyu53ts1.jpg)

**Conclusion**
Prettier is a style code formatter that support many languages but ESLint is a tool that finds javascript/typescript issue and gives some special hint to solve them.
Paracetamol.js💊| #16: ¿Qué imprime este código JavaScript?
Tags: javascript, webdev, beginners, spanish
Published: 2022-01-17 16:05:47

## **¿Qué imprime este código JavaScript?**

```js
const obj = { 1: "a", 2: "b", 3: "c" };
const set = new Set([1, 2, 3, 4, 5]);

obj.hasOwnProperty("1");
obj.hasOwnProperty(1);
set.has("1");
set.has(1);
```

-     A: `false` `true` `false` `true`
-     B: `false` `true` `true` `true`
-     C: `true` `true` `false` `true`
-     D: `true` `true` `true` `true`

Repeusta en el primer comentario:

---
Paracetamol.js💊| #15: ¿Qué imprime este código JavaScript?
Tags: javascript, webdev, spanish, beginners
Published: 2022-01-17 16:04:47

## **¿Qué imprime este código JavaScript?**

```js
console.log(typeof([] + []));
```

- A. `undefined`
- B. `number`
- C. `object`
- D. `string`

Respuesta en el primer comentario.

---
[GDB-Quick] BreakPoints - Log/Source
Tags: gdb, cpp, c
Published: 2022-01-17 16:00:43

---
title:[GDB-Quick] BreakPoints - Log/Source 
published: true
description: same old Breakpoints but with productive debugging
tags: gdb,Cpp,C
---

For debugging, most obvious way to start is adding print. Second obvious is putting breakpoints and printing. While as simple as it sounds, it may not useful with large scale software variety of architecture.

While each debugging can take several runs, we need efficient setup, hence following post.

### Save Your Breakpoints for future.
Save breakpoints in file with command.
```
(gdb) save breakpoints bpt_file
```
Rookie stuff!
Here is more,  What is right time to save breakpoint?  :P
For System level debug, create local breakpoints files is efficient, at times multiple ones, depending on debugging flow.

This save is similar as gdb commands, so edit bpt_file in text editor is required. 

### Load Breakpoints from history
bpt_file is gdb commands, source it with command line or in gdb, it works!

```
(gdb) source bpt_file
```
### For VIM users
You can avoid writing breakpoint descriptions like file:line or class::function with few key strokes. Assign KeyMap from VIM to log current file:line_num in bpt_file 

```
break file:line
```

Now VimScript to do that is 

```
function! Brkpt(message, file)
  new
  setlocal buftype=nofile bufhidden=hide noswapfile nobuflisted
  put=a:message
  execute 'w ' a:file
  q
endfun

function! BrkLog(fileName,lineNum)
  let msg = 'break' .a:fileName . ':' . a:lineNum
  echo msg
  call Brkpt(msg,'~/gdb.txt')
endfun
```

copy content into say brk.vim file and source in vim. call this function on keystroke.
```
:nomap <C-G> :call BrkLog(expand('%:t'),line('.'))
```

Last While sourcing breakpoints, libraries that are not loaded will default error then just 

```
(gdb) set breakpoint pending on
```

Happy Hacking!