teleren/devto huggingface dataset:
How to change the origin of my repository?
Tags: git, github
Published: 2020-11-30 20:05:40

Usually you need change the remote target of your repository when you download a template project, the url of remote target are change or something like that...

In this post we take the example of [vscode-stories-api](https://github.com/ide-stories/vscode-stories-api), because all need stories in ours apps or not?

# What is origin

Origin is only one aliases for remote repository url, like environment variable in your OS.

# What is the remote origin of repository

Get remote origin
```bash
$ git remote -v
```

![git-remote-v](https://dev-to-uploads.s3.amazonaws.com/i/t396rf99veudf3f8xv6l.png)

# Remove remote origin

```bash
$ git remote remove origin
```

![git-remote-remove](https://dev-to-uploads.s3.amazonaws.com/i/figcep9afra76lqz7fqy.png)

## Verify origin

```bash
$ git remote -v
```

 ![git-remote-remove-verify](https://dev-to-uploads.s3.amazonaws.com/i/2mu0wd5n2h9g2gujm73d.png)

# Add remote origin

```bash
$ git remote add origin [repository url]
```

![git-remote-add-origin](https://dev-to-uploads.s3.amazonaws.com/i/z0l96qg88oy1deo02avw.PNG)

## Verify the new origin

```bash
$ git remote -v
```

![git-remote-add-origin-verify](https://dev-to-uploads.s3.amazonaws.com/i/c0cu5uubf3mhy0ve481w.png)
 
# Conclusion

Now our origin repository it's the repository of vs-code-stories extension new owner!
Deploying a Go (golang) app to GKE
Tags: kubernetes, cloud, googlecloud, go
Published: 2020-11-30 20:02:05

Hey Everyone,

I did a mini 3-part Kubernetes and Go series, which I wrapped up this morning. The last video is all about deploying to GKE.

Enjoy and if you have any questions, feel free to reach out :) Twitter at TheNJDevOpsGuy

https://www.youtube.com/watch?v=tIK54ZFveLA
Debugging over WiFi on a physical Android Device.
Tags: android
Published: 2020-11-30 19:51:58

While developing and compiling Android apps, I usually use an emulator but there is this urging feel that makes me want to run my app on a physical device just to get the hang of it, so I connect my device via USB and debug on it. But at times, the cable can get really annoying, while coding. Hence I discovered a really cool way to run and debug apps on my physical device and that is via WiFi and I also figured out that you can use this same way to run a Dockerized application on a physical device.

Most of you might already know how it works and how to do it right away because it's that easy to set up and use it.

## Getting Started

* Make sure that your PC and Android device are connected to the same WiFi network.
* Now connect your device to your PC via a USB cable and run ``adb devices`` on your terminal. You should be able to see your device in the device list.
**Make sure you have enabled USB debugging on your Android device**

* Now that your device is visible on your ADB list, run ``adb tcpip 5555``. This will restart your ADB and switch it to the TCP you mentioned.

* Go into your phone's WiFi settings> Advanced and then get your current device IP address.

* Now run ``adb connect {your ip address}``.
**Example: ``adb connect 192.168.1.9``**

* Once you are done connecting, disconnect your device connected via USB and then run ``adb devices``. You should be able to see your device connected via WiFi.

#### Voila! Now that you are connected, you can run, debug your application on your physical device connected via WiFi.
What are Dapps?
Tags: blockchain, discuss, devops, beginners
Published: 2020-11-30 19:25:21

##**A Dapp, or decentralized application, is a software application that runs on a distributed network. It's not hosted on a centralized server, but instead on a peer-to-peer decentralized network.**

##Features of Dapps :
*1. Open Source*
*2. Decentralized*
*3. Incentivized*
*4. Protocol*

#*Dapp = frontend + smart contract backend*

##⭐ Fun Fact: Bitcoin is itself a Dapp.

So, basically, Dapps are the applications that are made on a decentralized platform, they are the backbone of web 3.0.

They run on a decentralized platform that makes the data involved in the process very secure as there is no centralized agency that is having an eye on it. 

Platforms like Ethereum, EOS, NEO are some of the best platforms to make Dapps and run it.

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

Ethereum is a network protocol that allows users to create and run smart contracts over a decentralized network.

*A smart contract contains code that runs specific operations and interacts with other smart contracts, which have to be written by a developer.* 

Unlike Bitcoin which stores a number, Ethereum stores executable code.

Because Ethereum removes the need for a third party to handle transactions between peers.

Since the middle man is replaced by 
code, all kinds of costs are reduced, including time and money.

# *Dapps are one of the most exciting technologies that will be coming through in the next years or so.*


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yyq0ihfany2jg26jg12f.jpg)
The myth of C#'s *is* operator (== null or is null)
Tags: csharp, dotnet
Published: 2020-11-30 19:04:38

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/a8u5hjufdgzgac7lgtkm.png)

> This relates to the current roslyn compiler at 30.11.2020 

After two years as C# Developer I almost never see C#'s *is* operator in code reviews or tutorials.

Most developer sticks to the always known comparison operators (==, !=).

But there definitely also myths like the *is* operator does not act like a good old == or is less efficient. 

That's why i tested it with a decompiler and here are my results!

## Compile == and is

```c#
var a = "test string";

if (a == null) throw new InvalidOperationException();

if (a is null) throw new InvalidOperationException();
```

Results in:

```c#
string text = "test string";
if (text == null)
{
    throw new InvalidOperationException();
}
if (text == null)
{
    throw new InvalidOperationException();
}
```

both is compiled to the same result with the current version of the Roslyn Compiler. 

## Compile != and C#'s 9 is not

```c#
var a = "test string";

if (a != null) throw new InvalidOperationException();

if (a is not null) throw new InvalidOperationException();
```

Results in:

```c#
string text = "test string";
if (text != null)
{
    throw new InvalidOperationException();
}
if (text != null)
{
    throw new InvalidOperationException();
}
```

both is compiled to the same result with the current version of the Roslyn Compiler.

## Compile != and !(a is null) (< C#9)

```c#
var a = "test string";

if (a != null) throw new InvalidOperationException();

if (!(a is null)) throw new InvalidOperationException();
```

Results in:

```c#
string text = "test string";
if (text != null)
{
    throw new InvalidOperationException();
}
if (text != null)
{
    throw new InvalidOperationException();
}
```

both is compiled to the same result with the current version of the Roslyn Compiler.

## Result:

Both results in the same when your code compiles so its up to you with operator you prefer.

## Question:
What is the way you prefer?

> for more C# or dev related Posts follow me on [Twitter](https://twitter.com/mirobehninger) :)
CAATs
Tags: audit, computer, tools, caat
Published: 2020-11-30 18:39:07

---
title: CAATs
published: true
description: Computer-assisted audit tool (CAATs) or computer-assisted audit tools and techniques (CAATs)
tags: audit, computer, tools, caat
cover_image: https://cdn.pixabay.com/photo/2015/05/15/15/00/building-768815_960_720.jpg
---
Herramientas de auditoría asistidas por computadora (CAATs) o herramientas y técnicas de auditoría asistidas por computadora (CAATs) es un campo en crecimiento dentro de la profesión de auditoría de TI. CAAT es la práctica de utilizar computadoras para automatizar los procesos de auditoría de TI.

Los CAAT normalmente incluyen el uso de software básico de productividad de oficina, como hojas de cálculo, procesadores de texto y programas de edición de texto, y paquetes de software más avanzados que implican el uso de herramientas de análisis estadístico e inteligencia empresarial. Pero también hay disponible software especializado más dedicado.

Los CAAT se han convertido en sinónimo de análisis de datos en el proceso de auditoría.

Por eso me gustaría listar algunas de estas CAATs y abrir un hilo para compartir en los comentarios otras CAATs que conozcan.

# Lista
- [Lynis 3.0.0 - Security Auditing Tool for Unix/Linux Systems](https://www.kitploit.com/2020/06/lynis-300-security-auditing-tool-for.html)
- [NERVE - Network Exploitation, Reconnaissance & Vulnerability Engine](https://www.kitploit.com/2020/09/nerve-network-exploitation.html)
- [
vPrioritizer - Tool To Understand The Contextualized Risk (vPRisk) On Asset-Vulnerability Relationship Level Across The Organization](https://www.kitploit.com/2020/10/vprioritizer-tool-to-understand.html)
- [Nmap 7 - Security Scanner For Network Exploration & Security Audits](https://www.kitploit.com/2015/11/nmap-7-security-scanner-for-network.html)
- [Bulwark - An Organizational Asset And Vulnerability Management Tool, With Jira Integration, Designed For Generating Application Security Reports](https://www.kitploit.com/2020/11/bulwark-organizational-asset-and.html)
- [Threagile - Agile Threat Modeling Toolkit](https://www.kitploit.com/2020/11/threagile-agile-threat-modeling-toolkit.html)

En resumen [Kitploit](https://www.kitploit.com/) parece un buen lugar para buscar estas herramientas y se encuentra bien explicada el uso de cada una.
Back to start again - Week 4
Tags: learning, webdev, react
Published: 2020-11-30 18:09:41

*Hey guys!!* Again I am back with my learnings of **Week 4**. You can see my *previous week blogs* (*[Week 1](https://dev.to/riyaagrawal17/back-to-start-again-2gja) , [Week 2](https://dev.to/riyaagrawal17/back-to-start-again-2gja) , [Week 3](https://dev.to/riyaagrawal17/back-to-start-again-week-3-41da)*) to see the improvement in my journey of starting again from basics.




This week I learnt about the *props, functional component, creating multiple component and use to build single application, usage of Import, export and other ES6 features* from **[React Documentation](https://reactjs.org/docs/getting-started.html#learn-react)** and the **[sessions](https://www.youtube.com/channel/UCDgDpLyyUII3tko2ECrekzw)** organised by our mentors.




And using these react concepts I have made two mini projects i.e. a *[Stopwatch](https://gx6g3.csb.app/)* and updated the code of my *[portfolio](https://p22tb.csb.app/)*. This portfolio code can be used as a **template** by anybody, if you need to update any info , it can be just done by replacing/updating data file.




I have faced many difficulties during these projects but solved it by the help of our mentors *[Sagar Choudhary](https://twitter.com/sa_choudhary)* and *[Deepak Kumar](https://dev.to/dipakkr)*. I also took help from some of my peers. As I have told earlier, this is the *beauty of our community*. Everyone is ready to help!!




I have to do some more updates in the stopwatch project as suggested by our mentor *[Sagar Choudhary](https://twitter.com/sa_choudhary)* . I will be making this project *more better* and will *update* the link in my *next blog*.




I am really **happy** to learn this much in *React*. I remember those days when I always used to escape from React, I was so wrong!! Now I feel React is really very *interesting* and easy to learn. And I am very **excited** to *explore* this technology at much more higher level.




I am really **thankful** to *[Frontbench community](https://twitter.com/frontbenchHQ)* for providing me this great *opportunity*. *I learn everyday, became consistent, started learning in public, and many more, this all started after joining this community*.



I am following all the *basic* and *necessary* steps to become a **successful Software Engineer**. *Please stay tuned with me* for further updates in this **beautiful journey**.




*You can follow me* on **[Twitter](https://twitter.com/RiyaAgr02106010)** or *connect with me* on **[LinkedIn](https://www.linkedin.com/in/riya438/)**.
Illustrated Notes on Web Security Essentials
Tags: security, infosec
Published: 2020-11-30 18:03:02

---
title: Illustrated Notes on Web Security Essentials
published: true
description: Illustrated notes all about the essentials of web security
tags: security, infosec
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/dfuq3wi25tt8p9679077.png
---

Between IoT botnet attacks, Bitcoin ransomware, and the weekly cadence of high-profile data breaches, doing anything on the internet feels like playing Russian Roulette.

And that's just for normal people using it.

As a developer, you're partially responsible for protecting all those normal people from the horrors of whatever LulzSec are up to right now. The least you can do is make sure your website isn't an accessory to their nefarious activities.

So what does the current landscape of internet risk looks like. How, exactly, is LulzSec going to hack into my mainframe in 2020?

Here's my illustrated notes from Mike Sherov's egghead course on '[Web Security Essentials](https://bit.ly/39tzKth)' that should give you a big picture overview of what to should look out for.

![web-security-1](https://dev-to-uploads.s3.amazonaws.com/i/cpvahacov3gsz0hnaxpm.png)
 
Turns out there's a small set of fairly well-known and easy to defend attacks that we can protect ourselves from:

- Man in the Middle (MITM)
- Cross-Site Request Forgery (CSRF)
- Cross-Site Scripting (XSS)

Shielding yourself from these three is a great starting point. It's at least enough to keep the script kiddies out.

![web-security-2](https://dev-to-uploads.s3.amazonaws.com/i/wtiuqo47g17t3qzwjfqp.png)
![web-security-6](https://dev-to-uploads.s3.amazonaws.com/i/ravw48zq7vq5r9wsrv6h.png)
![web-security-7](https://dev-to-uploads.s3.amazonaws.com/i/sn3clruyzcohbzie3z68.png)

---

![web-security-3](https://dev-to-uploads.s3.amazonaws.com/i/wya3k4ucpcesp5s16ihm.png)
![web-security-4](https://dev-to-uploads.s3.amazonaws.com/i/o6df0lif283qvoc7n5wz.png)

---

![web-security-5](https://dev-to-uploads.s3.amazonaws.com/i/zordhyjxh7fzmpb27ifj.png)

---

Keeping out this trio of attacks will go a long way. Thankfully, you do not have to brave the black hat darkness alone.

[Mike Sherov's course](https://bit.ly/39tzKth) covers a whole range of ways to mitigate your risk and protect against them. 

![web-security-essentials-mitm-csrf-and-xss](https://dev-to-uploads.s3.amazonaws.com/i/5oir528fi51jqdwkqzna.png)

---

👁‍🗨 If these are hard to read, you can download a free high-res PDF version on the course itself.
Dev.to limits image sizes a lot and it's hard to make it readable on here. Apologies!
How to update a forked repository to match with the origin repository on Github
Published: 2020-11-30 18:01:57

When you want to contribute to open source, one of the most important things is understand, forking and branching.

Once you have updated some code and made a pull request, you might not do anything with your forks for a lot of time. So the next time you do something, you will have to update it. But how?

## Add an upstream remote
We'll add a remote to our repository called upstream with the follow command:

```shell
git remote add upstream https://github.com/OriginalRepo/OriginalProject.git
```
Make sure to use the link of the origin repository

Now you canverify by running

```shell
git remote -v
```

## Fetch branches and commits from upstream
Run the following command in order to fetch all the updated banches and commits from upstream

```shell
git fetch upstream
```

## Checkout your fork’s local master

```shell
git checkout master
```

## Merge changes from upstream/master into it

```shell
git merge upstream/master
```

## Push changes to update your fork master'

```shell
git push origin master
```

> Note that you might have a different base branch that master.

That's it.. Have fun!

I have started my own blog platform at https://blogs.livecode247.com
Have taken this content from there
We all know, and Love, JSON-to-Go but did you know ...
Tags: go
Published: 2020-11-30 17:31:45

If you're not already aware, Matt Holt hosts the go-to site for converting JSON to Go structs: https://mholt.github.io/json-to-go/.

But did you know he also has a site to convert CURL to Go? https://mholt.github.io/curl-to-go/
Python Zero to Hero - Ep.28 - Quick Look at FastAPI
Tags: python, tutorial, beginners, webdev
Published: 2020-11-30 17:27:00

---
title: Python Zero to Hero - Ep.28 - Quick Look at FastAPI
published: true
description: In this episode, we have a quick first look at what FastAPI offer and how to compose the API of an app (with free docs) with just very simple Python code.
tags: python, tutorial, beginner, webdev
---
In this episode, we have a quick first look at what FastAPI offer and how to compose the API of an app (with free docs) with just very simple Python code. If you have any questions or any suggestions about which Python topics to cover, please leave your comment at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

You can get the slide deck [here](https://slides.com/cheukting_ho) and the example code and homework form [GitHub here](https://github.com/Cheukting/python02hero). Ask questions at my [Twitch channel](https://www.twitch.tv/cheukting_ho)
Email validation using JavaScript and Bootstrap
Tags: html, css, javascript, validation
Published: 2020-11-30 17:23:09

Email validation made with HTML and JS. They are usually used to validate E-Mail for you. It is very usefull and Important for a site as It can decrease spam.
<a href="https://codewithbishal.com/example/validate-email-address-using-javascript">View it on our website</a>

At first, on our webpage, there is the overview of our blog then there is the example of JS validator . You can view the whole code on our website, there is a also a button to copy the codes (HTML, CSS and JS).

You can view and copy the source code files through the link given below. <a href="https://codewithbishal.com/example/validate-email-address-using-javascript">View and Copy Source Code</a>
Creative group for Artists and Coders to Collaborate and find other talents...
Published: 2020-11-30 17:10:17

😜🤪.@deviantart .@html5gamedevs .@ania_kubow .@norfolkgamedevs .@webdev_102 .@sacgamedevs .@pexels .@traversymedia 💚new Group for Artists and coders💚 .@CodePen .@jsfiddle .@thecodingtrain .@techsith1 .@dylanbeattie .@devconf_cz .@devconfpl #anime #art

Two DeviantArt Groups Are 
 https://www.deviantart.com/art4coding-official
 https://www.deviantart.com/coding-artists
How to Auto Reload Golang Applications?
Tags: go, node, npm, autoreload
Published: 2020-11-30 17:02:02

You wanted to develop quick, you wanted to develop fast and there is
nothing more tedious for a developer than doing the same thing again
and again.

I really _HATE_ doing repetitive work.

## Foundation (a server)

I have been exploring Go, you might be aware since my previous post was
written for itself. You can spin up a simple Go server with the following
code.

```go
package main

import "net/http"

func handler(w http.ResponseWriter, r *http.Request) {
  fmt.Fprintln(w, "hello")
}

func main() {
  http.HandleFunc("/echo", handler)

  http.ListenAndServe(":3000", nil)
}
```

The above code creates a simple server which listens on port 3000 and if
you hit `http://localhost:3000/echo` you will receive "hello" as a message.

To run the go server we should run the command below

```sh
go run .
```

I call this the "tedious code". I don't care about it but I care what it
does for me, it runs my application.

## I want changes, right now!

Now, if you do any changes to the code you have run the "tedious code" again, and again, and again...

You get it 🙄

If you are a lazy developer you must be thinking what is the
the better way to do it?

Your computer can help you will that for sure.

Firstly, you need to install [Node.js](https://nodejs.org/en/download/).

I know, you must be thinking about how Node.js can help you to reload your Go code?
Just bear with me and you will know how.

Once Node.js is installed on your system you will be able to run the
command below.

```sh
npm install -g nodemon
```

It will install a package called nodemon in your system and you will be
able to run it from the command line.

## Command to Auto Reload

Now you can start you Go application with the command mentioned below.

```sh
nodemon --exec go run . --ext go
```

Let's break it down.

It will watch for any files with `.go` extension in the current directory and if
any change in the go files it will execute the `go run .` command again.

## Summary

By using nodemon you can reload your any application, not just Go, by providing the command
to run in the `--exec` command and specifying which extensions to watch and
if there is any change in the provided extensions, nodemon will execute the command specified in the `--exec` again.
Closures in Swift ( Intro)
Tags: swift, apple, beginners, basics
Published: 2020-11-30 16:52:17

# Brief Introduction About Swift

Swift is a language developed by Apple which is made using modern approach, include safety features and software design patterns. As the name suggests swift is fast, safe and easy to use. It is basically made a replacement for c-based family(C, C++ and Objective-C). It can be used to make apps and can be also used for cloud services and it is among the fastest growing languages.

# Closures in Swift

Closures are self-contained blocks of functionality that can be passed around and used in your code. Closures are similar to block in C ( Block Statements are the one in which multiple statements of code are defined inside **Curly Braces** ( **{ }** ) and are treated as single statement ). We can also say that closures are similar to functions.

# General Syntax

```swift
{ (<#parameters#>) -> <#return type#> in
    <#statements#>
}
```

# Syntax Difference between Closure and Functions

## Functions
Let's say we want to add two numbers then we will define a functions as:

```swift
func addTwoNumbers(numberOne: Int, numberTwo: Int) -> Int {
    return (numberOne + numberTwo)
}

addTwoNumbers(numberOne: 2, numberTwo: 3)
//Output : 5
```

## Closures
Now let's see how closure with same functionality can be defined:

```swift
let additionOfTwoNumbers: (Int, Int) -> Int = { (numberOne, numberTwo) in
    return (numberOne + numberTwo)
}

additionOfTwoNumbers(2,3)
//Output : 5
```

# When To Use Closures

Closures are although similar to functions but we generally use them when we want to carry out heavy and time consuming tasks like **API Parsing** as **Closures** carry out the process simantaneously alongside other code and returns data when completed.


That's it for this post see you all next time.