teleren/devto huggingface dataset:
How I Managed to Dual Boot Ubuntu on my Laptop with Optane memory
Tags: ubuntu, linux, beginners
Published: 2021-02-26 04:38:38

<p>I have been a Windows user from the beginning, But I wanted to taste the Linux as everyone was hyped about it, But having no experience with I decided to go with <a href="https://ubuntu.com/#download">Ubuntu</a></p>
<h4>Why Linux?</h4>
<p><ul>
<li>Linux offers you better control over your operating System</li>
<li>Linux is free to use, I used Windows before, and IOS would require me to buy a whole new hardware</li></ul>
</p>
<h4>Choosing Ubuntu</h4>

<p> Being someone who had no experience using Linux as searched up for the most beginner friendly Distro
<ul><li>Ubuntu had a number of active forums(official or unofficial), that meant a lot of resources to look at if I ever get stuck somewhere.</li>
<li>Ubuntu was the first was suggested by a lot of people in the DEV Community (again I came here because of the hype, so I wanted to go where the hype goes.</li></ul>
</p>
<p>
After choosing Ubuntu, Like any normal users I looked up for some articles to help me walk through the whole dual boot process.
Followed each and every step but couldn't find my Live USB in the boot order. I looked for it again, did the flashing process again, But nothing popped up in my Boot Order.  
</p>
<p><b>This happened due to the Intel's Optane memory!</b> What is Optane Memory? optane memory is Intel's product, that goes into your M.2 Nvme slot and efficiently caches all the programs and files that you use frequently, just in order to give you a performance boost. (Even though I have Intel optane in my device I would personally not recommend you Intel's Optane, just buy an Nvme SSD if you really want the speed. </p>
<p>The only way to Dual Boot a Computer with Optane Memory is to remove the Intel Optane from the device(or is it?).
</p>
<ul>
<p>
You can do it with a <a href="https://downloadcenter.intel.com/download/28992/Intel-Rapid-Storage-Technology-Intel-RST-User-Interface-and-Driver?wapkw=Rapid%20Storage%20Technology">Software</a>
Just disable the Optane memory from this application.
</p>
<p>Then go to your BIOS setting and change your file storage from RST(Intel Rapid Storage Technology) to AHCI. and then install the USB Stick back and now You are ready to Boot into Ubuntu and follow any other tutorial you found on the Internet.
</p></ul>
<ul><p>Yes you will lose the benefits of your Optane memory, But installing a light OS like Ubuntu won't require a lot of resources and work fast enough on your Mechanical Hard disk.</p>
<p>Booting into Windows always takes me 3-4 min, and that's why I am slowly shifting to Ubuntu as my main Operation System, Will get the SSD as soon as possible.</p></ul>
<p>
Brook v20210214 Released – cross-platform strong encryption, undetectable proxy. Open Source via GPLv3
Tags: github, proxy, vpn, network
Published: 2021-02-26 04:36:12

Brook is a cross-platform strong encryption and not detectable proxy.
Brook's goal is to keep it simple, stupid and not detectable.

Github: https://github.com/txthinking/brook
Document: https://txthinking.github.io/brook/
Handling Cross-Site Scripting (XSS) in Java
Tags: java, xss, owasp
Published: 2021-02-26 04:15:46

Cross-site scripting (XSS) is a type of security vulnerability in web applications where an attacker injects malicious scripts through some kind of user input (like input boxes, URL parameters, HTML headers, etc)
It is important to prevent XSS attacks to safeguard the confidentiality, integrity, and availability of the information of the web application. The two main cross-site scripting flaws are reflected and stored:

#Reflected XSS#
Malicious content from a user request is displayed to the user or it is written into the page after from server response. For instance, in the next screenshot, the credit card number field is vulnerable. After the number, there is a script to be injected: 
```javascript
<script>alert('my javascript here')</script>
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n29rwqfb4op6w5xjl17.png)
When the purchase button is clicked, the alert windows is displayed:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/femmo5nak56u32u0haxs.png)

##A patch to the flaw in Java##
When you have a String RequestParam, avoid handling it without sanitization:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/to69ldl3qqvb29d529em.png)

The [OWASP Java encoder](https://owasp.org/www-project-java-encoder/) has a method called forHtml for that purpose:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zv9qq39pa786kmxuv58n.png)

Now, the field is printed as text, but it is not executed:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcydqtsjs4mk8hwye99p.png)

#Stored XSS#
The payload is persisted. For example, in the next screenshot, you can see that a script is added as a comment. When the page is loaded the script is executed and printed as part of the code.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4qdjxnb1d1fpxzheag9.png)

##A patch to the flaw in Java##
The solution is to sanitize the RequestBody before handling it:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8q05u6sm70g4ctajym41.png)

Now, the comment is printed as text, but it is not executed:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2ekyxx1bka6v4z0vllu.png)
100 Bytes Of Wisdom: Day 12
Tags: career, journey, advice
Published: 2021-02-26 01:28:52

---
title: 100 Bytes Of Wisdom: Day 12
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37a3v6tvotn00h4ubyac.png
---


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37a3v6tvotn00h4ubyac.png)

Generally speaking, there's no "finished learning" in tech. By extension, there's no mastering of something because it is and should always be changing. So - focus on being less bad. Getting better and getting better at getting better. Learn to learn and you'll be set up for success in this constantly changing feel. 

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
Lets Talk Jobs, Skills and Future
Tags: career, hiring, 100daysofcode, eventsinyourcity
Published: 2021-02-26 04:13:54

The Career Fest is a virtual conference for students looking to explore all about career opportunities, new skills and technologies. Experts and leaders in Recruitment, Design, Business, Cyber Security, Programming, A.I, Machine Learning, Blockchain, Marketing are joining us live to conduct sessions and interact with students on Feb 27 & 28. Limited Slots Register Now www.thecareerfest.com
Some git command that you might never use it yet
Tags: github, tutorial
Published: 2021-02-26 04:00:05

As a developer we depend on git for our work, we might know and familiar with some of git command such as `git init` `git push` `git commit` `git clone` and bunch of other git command, but here I share you some git command that might be useful for you and I think some of you never use it before.

## 1 Switch to previous branch 

you can use `git checkout -` to switching from your current branch to previous branch, this command will make your work easier when working in multiple branch
```
git branch
    development
    *main

git checkout -
    *development
    main

git checkout - 
    development
    *main
```

## 2 Show manual page
If you forgot git command that you want, at least you have to remember this command as a life savior `git help everyday`, this command will show you manual page in minimum set format that will help with you, but if you want a full tutorial introduction, you can use `git help tutorial` command


## 3 Autocorrect 
If you put this configuration `git config --global help.autocorrect 10`, Git will automatically within 1 second (number 10 in the last configuration line mean 1 seconds) running correct command if developer make a mistake
```
git config --global help.autocorrect 10
git stats 
    WARNING: You called a Git command named 'stats', which does not exist.
    Continuing in 1.0 seconds, assuming that you meant 'status'.
    --- then running git status command
```
to deactivate this configuration use this command `git config --global help.autocorrect 0`



## 4 Show file content inside a branch
to preview content of a file in other branch you can simply use this command `git show <branch>:<path/to/file>`

```
git show development:README.md
    --- This is content README.md from branch development 
git show main:README.md
    --- This is content README.md from branch main 
```

## 5 Show graphical Alternative git commit 
Git command `git citool`, will give you a graphical interface to review modified files, stage them , put commit message and record new commit onto the current branch (git-gui required)
Automatically Start Scripts On Launch In VSCode
Tags: todayilearned, vscode, webdev, tutorial
Published: 2021-02-26 03:46:08

VSCode comes with the ability to [create tasks](https://code.visualstudio.com/docs/editor/tasks#vscode) that operate off of a variety of things. One option is to run one of your package scripts upon opening your project in VSCode.

For myself, I create a lot of sites with [Eleventy](https://11ty.rocks) so my `npm start` command runs Eleventy in `--serve` mode which means it includes creating a local server with Browsersync. Opening any of my Eleventy projects quite likely means I want to make edits and have that server running. So let's learn how to launch it automatically!

## Create A Task

To add the launch task, add the directory `.vscode` to the root of your project if it doesn't already exist.

Then, create the file `tasks.json`. _This is the required name_ to enable detection by VSCode.

Add the following as the content of that file:

```json
{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "start",
      "label": "Launch Site",
      "group": "none",
      "presentation": {
        "reveal": "always",
        "panel": "new"
      },
      "runOptions": {
        "runOn": "folderOpen"
      }
    }
  ]
}
```

Configure the following if needed:
- `script` - update to the name of your script if it's not `start`
- `label` - this can be whatever you want!

Leave the other options as-is. The `runOptions` enables running the command on start (`folderOpen`), and the `presentation` set of options means that a new Terminal will be opened to reveal the task running.

## Allow The Task To Run

There's one more step before this will work which is to manually run it once and allow permission for the auto run behavior.

To do this, use the VSCode menu for `Terminal` and select `Run Task`, then select "Launch Site" (or your custom name if you updated it). You will be prompted to make a selection on the type of scan (if unsure, choose the top option).

The task will then run. When the launch task completes, end it with `Ctrl + C`. 

You will receive one final popup message asking for your permission to run the task on open of the folder. Select "Allow and run".

![The previously described popup including the action of Allow and run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi37pm8nt3qf37jy1k2x.png)

Now, completely close and restart VSCode and your task should now run right after it opens!
February 25th, 2021: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2021-02-26 03:31:39

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

<center>

![Image of the brain](https://media.giphy.com/media/ojmB7lOn3VUU8/giphy.gif)
</center>

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{%link https://dev.to/devteam/what-was-your-win-this-week-1kg5 %}

<center>

![Little kid making a fist as if to say "Yes!"](https://media.giphy.com/media/6brH8dM3zeMyA/giphy.gif)
</center>
JSX and Babel In React
Published: 2021-02-26 03:23:44

I started diving into React and trying to get a deep understanding of everything and how it works. When using JSX it made me want to learn more about it and how the browser is able to understand it, so I started researching. Here is what I’ve learned!

JSX is short for JavaScript XML. We use HTML to write HTML in a React app. JSX provides us with an efficient way to utilize HTML in React with its syntactic sugar. Just to be clear, it is not required to write JSX in React but it is a common practice because of how much time and code it saves!

JSX lets us write crisp HTML/XML-like structures in the same file our JavaScript code lives. Babel’s job is to transform these expressions into actual JavaScript code so the browser can understand our code. Basically, JSX allows us to put HTML into JavaScript.
Now you might be wondering, what is Babel? 

According to the official Babel docs, Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. React uses JSX syntax. Babel is a JavaScript compiler, it converts JSX code into vanilla JavaScript. You can think of babel as the connector between your JSX  code and "executable"  JavaScript code that browsers can understand. React also uses ES6, which is not supported by a lot of browsers. Fortunately, Babel converts the ES6 code to a code which is compatible with the browsers.

So that's how JSX and Babel work in React! At first just seemed like magic but once I dove into how everything works, it started making sense. Thanks for stopping by!
Test receiving an email in 2 minutes
Tags: testing, javascript, tutorial, node
Published: 2021-02-26 03:13:27

{% youtube 9i-aVQo057o %}

QA Wolf provides a [getInbox](https://www.qawolf.com/docs/get-inbox) method that returns:

- email: your team's email address
- waitForMessage: function that waits for an email message to the test address

Let's use getInbox and waitForMessage in our test.

Below we 1) get an email address, 2) fill out the form, and 3) wait for a message and assert it's content.

```js
const { context } = await launch();
const page = await context.newPage();
await page.goto("https://ismyemailworking.com");
// use our test email to fill out the form
const { email, waitForMessage } = getInbox();
await page.fill("#verify_email", email);
await page.click("#content_cob_check");
// wait for a message and check it starts with "Congratulations"
const message = await waitForMessage();
console.log(message);
assert(message.text.startsWith("Congratulations"));
```

{% github qawolf/qawolf %}
StarHub - A chrome extension that tracks your GitHub stars so you don't have to.
Tags: javascript
Published: 2021-02-26 02:39:59

# StarHub

StarHub is a chrome extension that tracks your GitHub stars so you don't have to.

<img src="https://media.discordapp.net/attachments/706928005313855620/813477736399372378/unknown.png"/><br/>

## Features

- Quickly sign-in through your GitHub account to get started.
- The extension fetches all the repositories you have access over.
- Track stars and unstars on your repository by simply adding it your tracking list.<br><br/>
    <img src="https://cdn.discordapp.com/attachments/733943303493386282/813503938024177735/tempsnip.png"><br><br/>
- Know when and who unstarred your repository by clicking on the unstars icon on your repository's page or by going to ```https://github.com/(repo-owner)/(repo-name)/stargazers```.

  <img src="https://cdn.discordapp.com/attachments/706928005313855620/813498523605139466/tempsnip.png"/>
  
  <img src="https://media.discordapp.net/attachments/733943303493386282/813495741736943656/unknown.png?width=1248&height=676"/>

## Getting Started 

1. Install the extension from [here](https://github.com/techsyndicate/starhub).
2. Once you have it, you'll need to login through GitHub to start tracking.
3. On completing the authentication, you can add a repository for tracking by clicking on the "Add Repository" button on the home screen.<br/><br/>
<img src="https://cdn.discordapp.com/attachments/733943303493386282/813504195293347905/tempsnip.png">

4. And that's it. You can now track stars on any of your GitHub repositories!

Check out the backend API [here](https://github.com/techsyndicate/starhub-api).
What is an Embedded JS Template Engine?
Tags: javascript
Published: 2021-02-26 02:37:55

Simply put, embedded JS template engines are template engines that allow you to write JS within delimiters of the template engine to control the data that is rendered.

## Example

Take a look at this Eta template.

```ejs
<% if (it.displayName) { %>
    Name: <%= it.displayName %>
<% } %>
```

You can see how we are writing JS in the appropriate delimiters to control what data is rendered and how it is rendered.

That's really all an embedded JS template engine is, so see you next time!
Day 26: Merge Sort
Tags: 100daysofcode, java
Published: 2021-02-26 01:57:24

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

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class MergeSort {

    // Function to merge the two sorted arrays
    static void merge(int[] array,int low,int mid,int high){

        int i,j,k;
        int[] c= new int[high-low+1];
        k = 0;
        i=low;
        j=mid+1;

        while(i<=mid && j<=high){

            if(array[i]<=array[j]){

                c[k++] = array[i++];

            }

            else{

                c[k++] = array[j++];

            }
        }

        while(i<=mid){

            c[k++] = array[i++];

        }

        while(j<=high){

            c[k++] = array[j++];

        }

        k=0;

        for(i = low; i<=high; i++){

            array[i] = c[k++];

        }
    }

    // Function implementing the merge sort
    static void mergeSort(int[] array,int low, int high){

        if(high-low+1>1){

            int mid = (low+high)/2;
            mergeSort(array,low,mid);
            mergeSort(array,mid+1,high);
            merge(array,low,mid,high);
        }
    }

    // Function to read the input and display the output
    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int size;

        System.out.println("Enter the size of the array");
        try {
            size = Integer.parseInt(br.readLine());
        } catch (Exception e) {
            System.out.println("Invalid Input");
            return;
        }

        int[] array = new int[size];

        System.out.println("Enter array elements");

        int i;
        for (i = 0; i < array.length; i++) {
            try {
                array[i] = Integer.parseInt(br.readLine());
            } catch (Exception e) {
                System.out.println("An error Occurred");
            }
        }

        System.out.println("The initial array is");
        System.out.println(Arrays.toString(array));
        mergeSort(array,0,array.length-1);
        System.out.println("The sorted array is");
        System.out.println(Arrays.toString(array));
    }
}
```
Building my first package - Vue FormBuilder
Tags: vue, javascript
Published: 2021-02-26 01:23:34

Hi, have you ever used a 3rd party package that didn't work the way it was supposed to and it became so frustrating that you decided to build a better one yourself. Well....that's why I built my first package.

# The Need
I run a Saas business and in the software, I have a form builder that allows the users to create forms such as contact forms that they can then embed onto their website and capture leads. But the form builder that I am currently using has issues such as when using a checkbox field if you have the checkboxes checked by default so the user can uncheck them, the values won't save properly. This is a problem! Because my user isn't able to use the form the way they would like to. Instead, we had to try a workaround.

# Vue FormBuilder
I decided to build a form builder myself that would be built with Vue.js. The form builder I'm currently using is built with jQuery, I know, gross 🤮! Anyway, I'm hoping to be able to solve the issues I had with a new and improved form builder. With my package, there are two components `<form-builder />` which renders the form builder and `<form-render />` which will render the form that you build with the form builder.

# Looking for contributors
I'm currently looking for contributors for the project so if you're interested in making this form builder amazing come check it out on GitHub at https://github.com/jringeisen/vue-formbuilder
How to Create AR Wall Art [Tutorial]
Tags: tutorial, programming, beginners, augmentedreality
Published: 2021-02-26 00:40:45

Say hello to 2D to 3D image conversion! With  [echoAR](http://www.echoar.xyz/)  you can upload **any picture** to the [echoAR console](http://console.echoar.xyz/) and instantly showcase it on your wall in AR!


![1.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1614299752071/KuD4jRIVI.gif)

Users of can now build an entire artwork gallery in 15 minutes or less.

Follow these simple steps to create your AR wall art:

*  **[Register](https://console.echoar.xyz/#/auth/register)** for a FREE echoAR account
*  **[Add](https://docs.echoar.xyz/quickstart/add-a-3d-model)** an image to the console (2D file formats include .jpg, .png, and more!)
*  **[View](https://docs.echoar.xyz/scene-viewer/deploy-experience)** it in AR.
*  **[Share](https://docs.echoar.xyz/quickstart/share-it-with-others)** it instantly with friends, family, and on social media!

**That’s it!** 🎉

> Users of the **Business** and **Enterprise plans** can also access **2D to 3D conversion** through our RESTful API.

> Reach out to enterprise@echoAR.xyz to learn more.

Refer to our  [documentation](https://docs.echoar.xyz/unity/) to learn more about how to use echoAR.

![2.jpeg](https://cdn.hashnode.com/res/hashnode/image/upload/v1614299893691/j4Ifbq-w4.jpeg)

---

> **echoAR** (http://www.echoAR.xyz; Techstars ’19) is a cloud platform for augmented reality (AR) and virtual reality (VR) that provides tools and server-side infrastructure to help developers & companies quickly build and deploy AR/VR apps and experiences.


![3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1614299914517/kdR6LO_Qc.png)
How to abort the whole git stash process if a merge conflict has occurred in Git?
Tags: git
Published: 2021-02-26 00:00:00

---
  title: How to abort the whole git stash process if a merge conflict has occurred in Git?
  published: true
  tags: Git
  date: Fri Feb 26 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/abort-git-stash-process-if-merge-conflicts-git
  cover_image: https://melvingeorge.me/_next/static/images/main-a04e6bf1e165cd1c10ca36845d8a24f3.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/abort-git-stash-process-if-merge-conflicts-git)
  
When popping out commits using the `git stash pop` command, you will have some merge conflicts sometimes, you can move to resolve those conflicts or abort the whole process.

To abort the whole process when a merge conflict has occurred during the `git stash pop` process is to use the,

```bash
# Stop Git stash on merge conflicts
git reset --merge
```

command.

This has worked for me. I hope this works for you too! Cheers 😃.

### Feel free to share if you found this useful 😃.

---