teleren/devto huggingface dataset:
Mass Insertion in Redis
Tags: redis, database
Published: 2020-07-08 19:29:19

We require a huge chunk of dummy data for Load Testing or Volume Testing and it's always a headache to create a dataset for testing. I am just going to show you an example to insert mass data in Redis.

In version 2.6 or later, redis-cli provides a new utility mode known as **Pipe Mode**. This pipe mode was designed to perform Mass Insertion. Redis provides functionality to insert huge chunks of data through the file.

## Creating the txt File
We need to create a txt file that contains the complete chunk of data we need to insert in redis. As an example, I have written a Python Script to write all the data in a txt file that I need to insert in Redis.

{% gist https://gist.github.com/kaus2595/80f9271c330357f36065678506d90145 %}

The above script will produce a *data.txt* file that contains all the data we need to insert.

## Redis Command
Go to the file location once the txt file is created and run the following command

{% gist
https://gist.github.com/kaus2595/83491c58672d592d4e63cd61563102a4 %}

If everything worked correctly you can see the file data in your Redis
Reagent 101 / why square brackets?
Tags: clojure, react, tutorial
Published: 2020-07-08 19:25:05

Ever wonder why we use `[my-component]` instead of `(my-component)`. After all components are just functions, right? This blog post aims to address why we wrap a component name with `[]` instead of `()`. This is Clojure after all - where are the `()`?

The answer lies in how Reagent processes a Hiccup vector.

### How Reagent Interprets Hiccup 

```clojure
(defn child []
  [:h1 "WAAAAH"])

(defn parent []
  [:div
   [child]])
```

This is what Reagent is thinking when it encounters `[child]`.

> Hmm... `child` is not a valid symbol (e.g. :div, :img), which means that `child` is a function. I shall call this function if I need to render. If you're curious about what makes a component re-render, check out this [post](https://dev.to/icncsx/reagent-101-when-does-a-component-re-render-3461).

If you're coming from a React background, this is the equivalent idea.

```jsx
conts Child = () => <h1>Hello, world!</h1>
const Parent = () => {
  return (
    <div>
      {Child()}
      <Child />
    </div>
  )
}
```

It is true that both `[fn]` and `(fn)` will ultimately produce the same DOM just as it is the case that in React, it's the same outcome if we `Fn()` vs `<Fn/>`. But the key distinction is that `[]` does not force a render, whereas `()` does. Square brackets are efficient.

Here is a beautiful quote from Pratley's [blog](http://timothypratley.blogspot.com/2017/01/reagent-deep-dive-part-1.html
):

> If our components called sub components directly, it would force them to always compute a result. We don't want that. Instead we leave the task of calling the component up to Reagent. Reagent will figure out when it needs to evaluate a component.

In React, use `<>`. In Reagent, use `[]`. Simple as that.

Warmly,
DH
Previewing Hidden Content in an Unpublished Shopify Theme
Tags: shopify, tutorial
Published: 2020-07-08 19:22:42

## What's the Issue?
You're working on a brand new product for your Shopify store, it's set to unavailable and you & the team are working on a launch for it later this month. 

You're also working on a new theme that will launch alongside your product, **how are you supposed to see how that new product looks with your new theme?** 

You can preview the new product, but it opens in the published theme, not the new theme you're working on... 

So do you have to make your new product available and just hope no one notices? 😥 

## The Solution!
Thankfully, there's a way we can get around this! 

1. Open your Shopify admin to your hidden product, and click "Preview" at the top of the page
2. From the product's preview page, copy the part of the URL that looks like this: `/products_preview?preview_key=your_key_goes_here`
3. In a new tab, open the new theme you're working in as a preview. 
4. In the URL bar, paste the portion of the product URL we copied earlier. your new URL should look something like this `https://mystore.com/products_preview?preview_key=your_key_goes_here`.
5. Hit enter and you should be able to preview your hidden product in your new theme ✨🎉

## Not just for Products
This will work for hidden pages, and articles as well! Which is great when you're working on a landing page or a fancy new blog template! 

This has been a huge pain for me when working on themes, and I just recently found this quick fix so I thought I'd share! Hopefully it helped you as well.

Thanks for reading 👋
Mentor-Mentee and Community Relations in the times of WFH 
Tags: discuss, news, contributorswanted
Published: 2020-07-08 19:13:52

With a general remote work environment due to the pandemic, most of developers as well as student developers have shifted completely to an online mode of work. This pretty much changes up our mode of development, interactions and lifestyle. 

My college also had to shift events to be conducted entirely online, such as [BIT Summer Of Code](https://bitsoc.github.io) which aims to minimize the gap of mentors and mentees.

While the mentor-mentee relations have been strained due to the absence of Face-to-Face conversations, it also opens up a whole new world of interaction where everybody can mentor each another and be mentored similarly; thus attaining FOSS in terms of human knowledge and human interactions. 

I would love to discuss upon the instances, the relevance, the importance and the practicality of such a remote mentorship.
Difference between Azure Backup & Azure Site Recovery.
Tags: azure, siterecovery, backup
Published: 2020-07-08 19:09:46

Azure Site Recovery
Azure Site Recovery (ASR) is a disaster recovery solution for physical servers. The physical server–based environment can be replicated to Azure using ASR. The same approach can be used for migration, where the replicated environment is failed over and then continues to run from Azure. An additional VM or physical machine should be available on-premise to set up the ASR components.
Azure Backup does scheduled backup of VMs at specified time intervals to address the data and application resiliency concerns of environments hosted in Azure. If you have stringent recovery time objectives (RTOs) and recovery point objectives (RPOs) defined in a business continuity and disaster recovery (BCDR) strategy, Azure Site Recovery (ASR) could be the better choice because it replicates data continuously to a different region in Azure. Note that this service is in preview at the time of writing this book. It is recommended to include ASR in the architecture to enable environment-level resiliency once the service becomes generally available. ASR for Azure VMs can be enabled directly from the Azure portal with minimal configuration steps. While Azure Backup requires the vault be in the same region as IaaS VMs, ASR mandates that to enable replication of IaaS VMs, the vault should be in a different region. This helps ensure the availability of the vault in the event of a disaster affecting Azure datacenters in a specific region.
Tostart ASR configuration for an Azure VM, open the Recovery Services vault ➤ Get started ➤ Site Recovery ➤ Step1: Replicate Application. Select the source, location, and resource group
Image for post
2. Select the VM to be replicated
Image for post
3. Select the target region from the drop-down menu
Image for post
4. Select the target resource group, network, and storage if required. By default, new storage accounts and networks are created for the replicated VMs, but you can customize these settings to select the storage and the network of your choice
Image for post
5. You can also customize the replication policy settings to change the number of hours for which the recovery point should be retained, or the number of app-consistent snapshots to be taken in an hour Here is some policy for different Replication Policy
Azure VM
Image for post
6. If you want to replicate and failover multiple VMs, select the option to create a replication group and select the VMs that are part of the replication group. This replication could impact workload performance and should be opted only when a multi-VM consistent snapshot is a requirement
Image for post
In the subsequent steps, the target resources are created and replication is enabled. Once the replication is completed, the VM is listed at Recovery Services vault ➤ Protected items ➤ Replicated items. From this interface, you can initiate a test failover or planned failovers for the VM to the Azure destination region and resource group. This ensures VM and application resiliency against Azure datacenter region failures.
React Hook for Handling Boolean State
Tags: react, javascript
Published: 2020-07-08 19:00:33

`useBoolean` hook. [Check out the source](https://github.com/mykolaharmash/use-boolean), it does exactly the thing you would be doing yourself when dealing with the visibility of pop-ups, dropdowns and alike. No more no less.

Just a small convenience which I use in my code, made it into a standalone package in order to avoid duplication across projects.

And here is a live example.

{% codesandbox summer-sun-44zj2 view=editor %}

...

* [useBoolean on GitHub](https://github.com/mykolaharmash/use-boolean)
* [My Twitter](https://twitter.com/mykola_harmash)
a new way to download hashicorp tools
Tags: devops, hashicorp, terraform, go
Published: 2020-07-08 18:53:54

---
title: a new way to download hashicorp tools
published: true
description: a new way to download hashicorp tools
tags: 
  - devops
  - hashicorp
  - terraform
  - golang
//cover_image: https://www.datocms-assets.com/2885/1588890753-hashicorpprimarylogorgb.svg
---

Have you ever found yourself distro hopping, or supporting a large cluster of servers/workstations that all need certain hashicorp tools on them?

Have you ever started to make up curse words from having to go to the downloads section of each tool and/or build them from source every time?

Well folks, I have the tool for you. In an abundance of laziness, I created this tool to grab any/all of the hashicorp tools for you and put them in normal places.

{% github j4ng5y/hashi.up %}

Feel free to check it out and if you find a bug, I'm very interesting in making that a good tool, so I'll fix it in a jiffy.
The "other" reason to learn niche languages
Tags: discuss, career, firstyearincode, motivation
Published: 2020-07-08 18:30:14

I have a confession to make. I started learning Clojure and Rust because of a not-so-worthy reason: because people told me to.

> Wait isn't that following the herd? Is that ok?

I think that's OK (feel free to argue), and here is why. The majority of people developing in Clojure and Rust are senior developers. They have worked with numerous languages in the past, and they have made a conscientious decision to work with those niche languages. Doesn't that mean something - possibly that Rust and Clojure are exceptional?

## Signal or noise?

Sure it could all be noise. After all, causal inference is incredibly hard. 

There are other data points you can factor in. Developer surveys seem to suggest that those two languages are some of the most beloved. 

And the mere fact that Clojure and Rust were created recently (2007, 2010 respectively) is reason to think that the language creators contextualized the programming landscape and address some of the prevailing faults. For example, Rust is marketed as a safe alternative to C++. 

## Newer is not better

But new things are built with the intention of vastly improving on the older things. And that counts.

Ultimately, I want to ask the crowd if they have considered a similar reason when deciding to learn a niche language. 

PS: So as not to inadvertently offend anyone, I'll add these comments. I am not implying that:
- Other languages are less worthy.
- Correlation is causation. But it is a necessary condition (necessary but insufficient).


Warmly,
DH
How to boost your productivity as a Developer 
Tags: productivity, career, watercooler, codenewbie
Published: 2020-07-08 18:00:28

Nowadays, it's really challenging to stay productive in today's environment. Thus here are some of the tips that I am following too to boost my productivity.

###1.  Minimize Distractions:
This one seems quite obvious but is really important. Don't check social media or news when you're supposed to work. All the this does for you is to waste your time. If you constantly get distracted, you will definitely pulled out from your zone and productivity goes to __ZERO__.

###2. Don't Multi-task:
Don't review some other developer's code or other kind of work while your are in the middle of writing your own. Focus on the task at a time. What really happen when you are trying to multi-task is task-switching. And it task more time of switch between tasks than to stick with more time than to stick with one task until it's finished. 

###3. Optimize your Code:
There are plenty of great IDEs available. Some of them come with a lots of tool out of the box. Others have possibility to install plugins. These plugins can increase your productivity. For example, you could install plugins for syntax highlighting that makes your code more readable and help you find syntax errors more easily.  

###4. Take More Breaks:
The trick to getting more things done is taking more breaks? Although it sounds counterintuitive, it's actually true. If you really want to get more things done, you should take a break more often. Working too long without breaks will eventually make you less productive and tired.

###5. Learn To Say NO: 
Most people feel the need to be liked by other people, which often translated into saying yes to everything. This kills productivity. You need to say no to whatever isn't leading you to towards your goals. This includes saying no to distractions. Saying no saves you time in future, precious time that you may could use to work on your goals.

####Suggest your ways to STAY PRODUCTIVE IN THESE DAYS 

###IF YOU LIKE THIS POST, DO REACT AND FOLLOW ME FOR MORE INFORMATIVE STUFF LIKE THIS.
Commitment dread: what keeps me hyper motivated
Tags: discuss, career, firstyearincode, motivation
Published: 2020-07-08 17:58:48

## Commitment Dread

Let me preface by saying that I hate owing people anything - especially money - which is why I dread unemployment. Being unemployed means that I don't owe anything, and sometimes you need to feel indebted to get sh** done.

## When I left my job...

I had tons of cool ideas and side projects I wanted to try out. But through the course of incubating my various startup ideas, I got incredibly lazy on many occasions, and I stopped shipping anything.

But then things changed when I took on paid projects. I felt uncomfortable. I owed someone. This newfound energy from debtorship transferred to my personal projects, and I started to push things again.

## In an ideal world...

We wouldn't need to rely on external motivation. But sometimes we just do, and I argue that owing someone is the best way to recharge and start living actively again.


What do you do to keep yourself motivated?

Warmly,
DH
Do this and have your code never rejected by an employee after it has been reviewed 
Tags: react, css, webdev
Published: 2020-07-08 17:51:11

Hello i made a 10mins video on YouTube on some patterns you need to follow when writing your React.js code

watch video using the link below

<a href="https://youtu.be/C6RQPvSgspU">YOUTUBE VIDEO LINK</a>
You're learning frontend wrong.
Tags: tutorial, html, css, javascript
Published: 2020-07-08 17:30:05

Quit watching videos.

Quit reading 'ultimate guides'.

## Start writing code on your own:
1. [FreeCodeCamp.org](https://freecodecamp.org)
2. [FreeCodeGame.com](http://freecodegame.com)
3. [FrontEndMentor.io](https://frontendmentor.io)

- 15 minutes per resource
- with 5 minute breaks in between
- equals one hour of critical thinking and practice each day

## Stop scouring Udemy and YouTube for the next self-proclaimed video that will teach you 'everything you need to know' in record time.

Those don't work.

These will. Start now.

They're free. They're bite-sized. You've got nothing to lose.
Responsive Image Slider using Pure HTML & CSS only | Full Screen with Navigation Buttons [Video Format]
Tags: css, html, tutorial, beginners
Published: 2020-07-08 17:13:24

{% youtube 9JxIEXOiDUk %}

In this Tutorial, we'll build a Full Screen Image Slider using Pure HTML & CSS only | Responsive with Navigation Buttons. This Project-based Tutorial is suitable for all especially Beginners.

📕 Concepts covered in this video:
 - Modern Web Design
 - CSS Transforms
 - Animations 
 - CSS transitions
 - Box Shadows

[**SUBSCRIBE**](https://www.youtube.com/channel/UCBF2LIwr2Odb3-pRnNBRegA?sub_confirmation=1) our [**Youtube channel**](https://www.youtube.com/channel/UCBF2LIwr2Odb3-pRnNBRegA) if you want to get notified for more real-world **project-based tutorials**

Share this [video](https://youtu.be/9JxIEXOiDUk) with a friend

Let’s connect:
[Twitter](https://www.twitter.com/codeleague7) 
[Instagram](https://www.instagram.com/codeleague7)
What is Heroku and why should you use it?
Tags: machinelearning, heroku, deployment, devops
Published: 2020-07-08 17:04:12

This is my first post on dev.to and so I decided to write a short post on Heroku.

Heroku was a startup found in 2007 and had been funded $13 million in funding. But it went on to be bought by salesforce.com in the year 2010 for whopping cash of $212 million.

Heroku is used by the developers to deploy the apps on the web.  It is a simple and easy way to make your app enter the market. It frees us from going behind the tasks of maintaining servers, hardware or framework. Heroku provides great tools and services for the developer.

Heroku is a Platform as a Service (PaaS).  That is it is a platform which helps the users to develop, run and maintain their projects without worrying much about the framework or infrastructure.

One of the frequently asked questions is why Heroku costs more than AWS. A simple answer to this is that Heroku rules out the cost of DevOps staff. It offers us a subscription-based pricing structure.

## Why developers go for Heroku?
• Heroku helps the developers focus on their main application and its functioning, thereby increasing their productivity.

• Simple yet efficient design.

• Heroku helps in fast app deployment by enabling the app to update with every git push and helps in running the app smoothly.

• Heroku also has free plans and helps millions to test and experiment their project.

• Heroku supports eight development languages and frameworks, which are Ruby, Java, PHP, Python, Node, Go, Scala and Clojure.

• It rules out the need to maintain our own server and hardware.
Heroku also gives us the add-ons support thus making the app development easy.

## When is Heroku or PaaS ideal?
**⇒** It is extremely handy when we have to deploy a product in the early stages.

**⇒** It is helpful when we have to test our app and get quick feedback from the users.

**⇒** It is a boon when our project has large hardware and computational requirements.
Sleep or read?!
Published: 2020-07-08 16:54:52

<p><strong>Sleepiness as an unrecognized hindrance to reading</strong></p>
<p>The first thing people notice when they come into my apartment is a book breakthrough. Yes, I love reading and I do it for a living. Few readers immediately have the inner question "Why don't I read so much?". Basic answers:</p>
<p>- I'm too busy;</p>
<p>- I can't concentrate;</p>
<p>- I can't read;</p>
<p>- I fall asleep from books.</p>
<p>The first three reasons are quite universal, they tend only to personal discipline. As Stephen King remarked: "... if a man really wants to find time, he will find it."</p>
<p>The fourth reason may seem to be a lack of concentration, but it is not. Sleepiness comes to everyone, and even to me! The habit of reading is just a skill that everyone can learn if they want to. And do not think that books are smarter than us, they may just not fit your current feelings.</p>
<p>&nbsp;</p>
<p>The first three reasons can be overcome through willpower, and sleepiness refers to the physiological obstacles that you can not easily cope with.</p>
<p>&nbsp;</p>
<p>I often catch myself in the fact that my eyes do not close freely, and there is still a lot of work ahead. I used to try to hold myself together, but I gave up. Now if the dream overcomes me, I give myself some time to take a nap, and then with renewed vigor I return to reading.</p>
<p>&nbsp;</p>
<p>Agree that reading is not always easy, sometimes it takes a lot of mental effort, but if you consider the static position. That's why most <a href="https://bestessaysservices.com/reviews/hirewriters-com-review/">hirewriters</a>&nbsp;are keen on sports: Haruki Murakami is a runner, Arthur Conan Doyle was keen on cricket, Vladimir Nabokov played tennis. Sport gives a charge of vigour. I, for example, skateboard and take long walks with my dog.</p>
<p>&nbsp;</p>
<p>Most people who read will be skeptical, sleep is not a real reading companion. Although sleepiness may not arise from the books themselves, but from general fatigue. Try <a href="https://www.bloomberg.com/markets/watchlist">reading</a>&nbsp;in the morning, when you are at your peak of activity, it should help. And do not think that reading is not for you, develop this skill and know that even well-known critics sometimes fall asleep from books.</p>
<p>&nbsp;</p>
<p>Interesting books - a good fiction, detective, novel - forced to follow the story, think and assume the outcome, and then you will not fall asleep. You can swallow a book like that in three days.</p>
<p>&nbsp;</p>
<p>So when you need to master a large amount of "useful" information, alternating it with fiction - as a lesson and change. That's a great help.</p>
🔥 🔥 How to run Selenium Grid in less than 5 min with Step by Step?
Tags: testing, tutorial, beginners, webdev
Published: 2020-07-08 16:52:52

✅ Join us - https://sendfox.com/thetestingacademy
✅ Master API Testing - https://learnapitesting.com.

In this video, We are going to learn about the Selenium Grid, What is is and How to run Selenium Grid in less than 5 min with step by step.

[![ Selenium Grid](https://i.imgur.com/M2MGR4P.png
)](https://youtu.be/U1jJsV_YKC8 "Selenium Grid") 


🚀 Day 30 Task :  JavaScript Executor in Selenium
🚀 All Task List : https://scrolltest.com/automation/task
🚀 Watch Full Playlist : https://apitesting.co/30days
🚀Download MindMap : https://scrolltest.com/automation/day28

✅ What is Selenium Grid?
- It is Part of Selenium Suite.
- It Provides running multiple tests across different browsers, operating systems, and machines in parallel.
- It has a concept of Hub and Node.
 Hub :  Where you run the Test.Hub Passes Execution to Nodes
 Node :  Where Execution Happens

✅Why we need Selenium Grid?
 1. Multiple tests across different browsers
 2. Parallel Testing
 3. Speed and Decrease Execution Time

✅ How to Setup Selenium Grid?

 - 🟢Step 1 - Download the Selenium Server
 - 🟢Step 2 - Run Server as Hub Role
   java -jar selenium-server-standalone-3.4.0.jar -role hub
  http://192.168.1.2:4444/grid/console
  http://localhost:4444/grid/console
 - 🟢Step 3 - Connect Node in Same Network.
  java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.1.106:4444/grid/register
 - 🟢Step 4 :  Verify the http://192.168.1.2:4444/grid/console


--
Be sure to subscribe for more videos like this!

[![ TheTestingAcademy](https://dev-to-uploads.s3.amazonaws.com/i/r7vcy6wbvyjbk1y1uu0o.png
)](https://www.youtube.com/TheTestingAcademy?sub_confirmation=1 "TheTestingAcademy")