teleren/devto huggingface dataset:
How to test Observables
Tags: webdev, rxjs, javascript, angular
Published: 2019-09-17 20:05:05

---
title: How to test Observables
published: true
tags: web-development,rxjs,javascript,angular
canonical_url: https://blog.angularindepth.com/how-to-test-observables-a00038c7faad
---

#### The ultimate guide — never again be confused on how to test Observables

![](https://cdn-images-1.medium.com/max/1024/1*owGWewkhtBP_xlXEoGXBog.png)

Reactive Programming is the new way of handling asynchronous code. And it is super powerful!

If you came across this blog post, I assume that you already wrote some lines of reactive code with RxJS if not a thousand. So I don’t have to tell you how it works and how cool it is. 😎

I guess we are all on the same page — writing productive code with RxJS is powerful and makes a lot of fun. But what about testing?

### What we’re going to learn 👨‍🎓

In this blog post, we are going to see the two different strategies on how to test an Observable.

The “subscribe and assert pattern” and “marble testing”.

We will apply those strategies in different scenarios to see their advantages and downsides. The comparison of those strategies in different situations leads us to a clear picture of how to test Observables.

[Find out more...](https://blog.angularindepth.com/how-to-test-observables-a00038c7faad)
How & Why to Implement Error Tracking in Web Applications
Tags: startup, technology, softwaredevelopment, javascript
Published: 2020-02-12 21:35:35

---
title: How & Why to Implement Error Tracking in Web Applications
published: true
date: 2019-09-17 12:06:01 UTC
tags: startup,technology,software-development,javascript
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/2600/0*teXZgzO2Ve0UUWCJ)](https://medium.com/javascript-in-plain-english/how-why-to-implement-error-tracking-in-web-applications-2a50390e02a9?source=rss-3a534b5053e6------2)

Catch and fix critical software issues faster

[Continue reading on JavaScript in Plain English »](https://medium.com/javascript-in-plain-english/how-why-to-implement-error-tracking-in-web-applications-2a50390e02a9?source=rss-3a534b5053e6------2)
Using GitHub as a Content Delivery Network
Tags: github, cdn, uses
Published: 2019-09-17 12:01:44

---
title: Using GitHub as a Content Delivery Network
published: true
description: Learn how you can use GitHub as a CDN
tags: github,cdn,uses
cover_image: https://www.amitmerchant.com/cdn/github-cdn.jpeg
canonical_url: https://www.amitmerchant.com/using-github-as-content-delivery-network/
---

This is a quick write up on how I've started utilizing [GitHub](https://github.com) as a [Content Delivery Network](https://en.wikipedia.org/wiki/Content_delivery_network)(sort of) and how you can do the same.

Usually, CDNs are used to have a content delivered on your website in a fast manner and to save some space on your server from resources such as images, documents etc. I've tried to use GitHub as a CDN for somewhat similar reasons. I'm running this blog on GitHub pages and as you might know GitHub only allows contents under 1 GB per repository. I didn't wanted to utlize my GitHub page's site's storage to store images that I end up using on the blog. So, I've figured out a way.

## Repository as a CDN (RaaC) [?]

I thought of creating and using an another GitHub repository where I would store all the image resources and which can act as a mean to deliver content on my blog whenever requested. I created a repository named [cdn](https://github.com/amitmerchant1990/cdn) which is actually a bare bone repository. I would add images and resources in here.

Now, as I've configured my GtHub pages site to work with my custom domain, I can easily access any content on this site using URL `https://www.amitmerchant.com/cdn/<resource name in the repos>`. For instance, There's an image called `bulb-min.jpg` exists in the repository which I can access using the following URL: [https://www.amitmerchant.com/cdn/bulb-min.jpg](https://www.amitmerchant.com/cdn/bulb-min.jpg)

And there you have it! Your free and instantly available CDN ready to use in few clicks. Easy-peasy! 
 
This way I can save up the space on my original GitHub pages site which I don't want to get exhauted under 1 GB of limit and in case if the "cdn" repository also gets exhasuted, I can always create an another repository named "cdn2" or something like that. ;)

## In closing

I'm sure many here will find this funny but trust me it's highly functional and one can surely use it as a CDN alternative which they can spin up in minutes. I hope this would be useful for someone who is looking for a quick CDN service. :)

Until next time!

> Originally published at https://www.amitmerchant.com/using-github-as-content-delivery-network/
Deploy an app into your personal cloud
Tags: kubernetes, docker, devops, gke
Published: 2019-09-17 11:39:47

As the final step in this long series of blogposts we are going to deploy a simple webapp in a docker container to my personal cloud. For context here is the personal cloud setup with Traefik/Let's Encrypt ([Run a personal cloud with Traefik, Let's encrypt and Zookeeper](https://heltweg.org/posts/run-a-personal-cloud-with-traefik-lets-encrypt-and-zookeeper/)).

In previous blogposts I also described how I built the app ([Build a PWA in docker](https://heltweg.org/posts/build-a-progressive-web-app-in-docker-with-nginx-to-deploy-to-kubernetes-or-docker-swarm/)).

# App deployment

The deployment runs the docker container. If you follow my personal cloud setup make sure to use more than one replica as the nature of preemtive VMs means one replica might randomly get shut down.

Note that the image will be set and updated by gitlab ci as described here: ([Deploy to google kubernetes engine using gitlab ci](https://heltweg.org/posts/deploy-to-google-kubernetes-engine-using-gitlab-ci/)).

```yml
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: ???-app
spec:
  replicas: 3
  template:
    metadata:
      labels:
        app: ???-app
    spec:
      terminationGracePeriodSeconds: 60
      containers:
      - name: ???-app
        image: "eu.gcr.io/???/app:latest"
```

# The service and traefik ingress
```yml
apiVersion: v1
kind: Service
metadata:
name: ???-app
spec:
selector:
    app: ???-app
ports:
- name: web
    port: 80
    targetPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ???-app
annotations:
    kubernetes.io/ingress.class: traefik
    traefik.frontend.passHostHeader: "false"
    traefik.frontend.priority: "1"
spec:
rules:
- host: app.???.com
    http:
    paths:
    - path: /
        backend:
        serviceName: ???-app
        servicePort: web
```

# Updating the traefik config
Updating the traefik config is important so traefik requests a new HTTPS certificate for the app from Let's encrypt. You will need to add this line to the traefik toml file that is described here ([Run a personal cloud with Traefik, Let's encrypt and Zookeeper](https://rhazn.com/posts/run-a-personal-cloud-with-traefik-lets-encrypt-and-zookeeper/)):

```yml
[[acme.domains]]
    main = "app.???.com"
```

# DNS
Now you can just point the A record of your domain to the traefik external IP and the rest will automatically be handled by your personal cloud :).

![The final result: The app runs in your personal cloud <3](https://heltweg.org/img/posts/deploy-an-app-into-your-personal-cloud/final-result.png)

# About Me
I am a full stack developer and digital product enthusiast, I am available for freelance work and always looking for the next exciting project :).

You can reach me online at [https://heltweg.org](https://heltweg.org).
Who inspires you in the industry and why?
Tags: discuss
Published: 2019-09-17 11:39:06

---
title: Who inspires you in the industry and why?
published: true
description: Which devs inspire you to keep working on that side-project when everything looks grey?
tags: discuss
---
There are tons of devs out there, sharing their work on a daily basis, which ones get to you the most? Which ones have managed to reach you to the point that you see them share their progress and think to yourself: "damn, I gotta get my sh*t together and start making progress myself".?

Share the love and if they're part of this community, [mention them](https://dev.to/jochemstoel/mention-people-on-devto-50bm) in the comments :)
I just used npkill to clean up 7 GB of disk space
Tags: npm, productivity, showdev
Published: 2019-09-17 11:32:42

You don't even know how much space your node_modules folders are taking up until you use this tool!

npkill will scour all subfolders from where you run it and allows you to easily clear out the node_modules folder. 

When you need to run the projects in the folders again, you can simple run npm install to restore the dependencies.

Here's what happened for me:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/z6qze3svw7d89wb34s1h.png)

For a longer introduction and description, see [Carlos Caballero's article here](https://dev.to/carlillo/npkill-the-solution-to-deleting-nodemodules-easily-with-style-1o70).
Why Python for Machine Learning? – Everything You Need Know!
Tags: machinelearningalgorithms, pythonmachinelearning, machinelearningwithpython, machinelearningapplications
Published: 2019-09-17 11:30:44

Python machine learning has changed the idea of living for us. From detecting bank fraud to enhancing transportation experience, it has upgraded everything. It is one of the major languages that are used for the development of both desktop and web applications. This language takes care of common programming tasks that are leading towards a better way of living. Python is widely used on the server-side. When it comes to technical aspects, this programming language C++ and Java, it requires the programmer to develop lesser codes.
read more:- http://bit.ly/30KJZC5
Keep your repository clean by automatically deleting GitHub branches
Tags: productivity, github, webdev
Published: 2019-09-17 11:10:27

---
title: Keep your repository clean by automatically deleting GitHub branches
published: true
description: How to keep your GitHub repository from having too many branches
tags: productivity, github, webdev
---

Have you ever found your GitHub repo having too many branches? Was it because you and your teammates keep forgetting to delete a branch after it gets merged?

You can fix this in 3 easy steps:
1. On GitHub, navigate to the main page of the repository.
2. Under your repository name, click  "Settings".
3. Under "Merge button", select or unselect "Automatically delete head branches"

Now, the next time you merge a branch, it will get automatically deleted. Keeping your repository from having too many branches.

Thanks for reading. Did this help you out? If it did, I hope you consider [sharing](https://twitter.com/intent/tweet?text=%22Keep%20your%20repository%20clean%20by%20automatically%20deleting%20GitHub%20branches%22%20by%20@rrjoson%20%23DEVcommunity%20https://dev.to/rrjoson/keep-your-repository-clean-by-automatically-deleting-github-branches-4d9g) it. You might help someone else out. Thanks so much!

Reference: https://help.github.com/en/articles/managing-the-automatic-deletion-of-branches
Best Interview Questions for Freshers with Answers | iSmartRecruit
Tags: ats, interviewquestionanswers, bestinterviewquestions
Published: 2019-09-17 11:00:00


Hiring new people is always been challenging work for HR professionals. Though recruitment is a long chain on processes each process is interconnected. <a href="https://www.ismartrecruit.com/features-interview?utm_source=dev.to&utm_medium=article">Interview management</a> can refer to the most lively process as it includes both the parties - Candidates and Interviewers.

If you are running a start-up and going to do your first hiring, you would probably need a fresher - who can work passionately and with complete dedication. To find this kind of candidates nowadays is a bit difficult task.

Here are the best interview questions that you can ask your fresher candidate.

<b>Question 1. Introduce yourself:</b>

This is one of the most common questions asked during an interview. Your candidate can highlight his qualification achievements, previous roles, skills of expertise, etc.

<b>Question 2. What are your strengths and weaknesses?</b>

If you are asking this question to your candidate, be specific with their roles and responsibilities. Some candidates showcase their personal strengths and weaknesses which could be irrelevant for this job.

<b>Question 3. How will you overcome your weaknesses?</b>

This kind of question can show their enthusiasm for changing their bad habits or lacking points. If a candidate is willing to turn his weaknesses into strengths, he can answer this very positively.

<b>Question 4. What are your hobbies?</b>

The purpose of asking this question is to know more about your candidates’ mindset and personality. 

<b>Question 5. Where do you see yourself in 5 years from now?</b>

Your candidate has to be optimistic and ambitious. If your candidate is not that excited about his future, he can not bring the change in your organization with his hiring!!!

<b>Question 6. Why should we hire you?</b>

This is also one of the most important questions you can ask your candidates during an interview. Your candidate can answer this question in such a way that you can find him more reliable and productive.

So these were some of the best interview questions you can ask your candidate if they are just starting with their career or fresher.
Global Climate Strike
Tags: watercooler, climatechange
Published: 2019-09-17 10:38:43

This **Friday, the 20th of September,** a global strike for the climate is taking place in order to urge governments around the worlds to finally act on climate change.

I won't go into any details here (we're all devs and know how to google) but the situation is dire and I urge you to inform yourself on whats going on with our climate and where to strike on Friday.
A good place to start is https://globalclimatestrike.net/, note however that the list of strikes on there is not complete so if in doubt just search for a strike in your area yourself.
If your workplace doesn't support participation try to change that or consider taking the day off, that's what unions here in Germany recommend.

Climate change is the most important issue of our time,it affects everybody and it will get worse the longer it takes us to act on it.
So I urge you again to **inform yourself**, your relatives, your friends and go **strike for action on climate change** this Friday!
VirtualBox: How To Pass Through USB Devices
Tags: virtualbox, usb, passthrough, connect
Published: 2019-09-17 10:22:05

---
title: VirtualBox: How To Pass Through USB Devices
published: true
description: This short guide shows how you can pass through USB devices
tags: virtualbox, usb, passthrough, connect
---
![VirtualBox](https://cdn1.radikalno.ru/uploads/2019/9/17/2d32550ae6cdd28008b35be287444d52-full.jpg)

If you work with virtual machines, there’s a good chance you'll got to know how to attach USB in VirtualBox at some point. [This article](https://www.net-usb.com/virtual-usb/virtualbox-usb-passthrough/) shows the way to connect USB devices to VirtualBox as well as sharing the connected devices with help [USB network Gate](https://www.net-usb.com/).
Magento 2 Custom Order Number
Tags: magento
Published: 2019-09-17 10:16:54

Customize the numbers and prefixes of store documents like orders numbers, shipment numbers, invoice numbers, and credit memo numbers, etc. using MageAnts [Magento 2 Custom Order Number](https://www.mageants.com/custom-order-number-extension-for-magento-2.html).This extension is fully compatible with the PDF invoice.

**Key Features**
	
1. Customize the order number, credit memos, shipment, and invoices.
 	
2. For customization, admin can use unique numbering formats with various 	variables.
 	
3. Prefixes, suffixes, letters, date, and time variables can be used in random numbering formats.
 	
4. Use custom padding to add the length of order numbers.
 	
5. For order numbers, use custom increment intervals.

According to the business requirements, admin can customize the order numbers or change order number prefix using Magento 2 Custom Order Number.
Full Stack Developer
Back-End (Laravel) and Front-End (VueJS)
Tags: laravel, php, vue, angular
Published: 2019-09-17 10:16:33

DonTouch (Switzerland) is a rapidly growing digital company. We develop creative marketing solutions, working in teams, integrating specific skills and researching unconventional ideas at the top level for your next challenge.

For our Headquarters in Chiasso (CH), We are hiring:


Full Stack Developer
Back-End (Laravel) and Front-End (VueJS)


At least 3 years of work experience:

Back-End
-PHP “Object Oriented”. Framework Laravel 5.x .
-Appreciated knowledge of frameworks like Cake, Symfony. 
-SQL database (like Maria DB).
-Internet protocols, web servicies RESTful, SOAP and version control like Git. 

Front-End.
-Framework Javascript like: VueJS, Angular e React.
-Framework Html like Bulma, Boostrap, Foundation.

We are looking for self-motivated individuals with a strong drive towards success and easygoing personality, ability to work under pressure to reach goals and meet deadline.

The offer is for a permanent employment contract according to Swiss Law (equals to 40 hours / week).

Job location: Chiasso (Switzerland)   

You can send your CV to hr@dontouch.ch  

The selection path will be made through various steps (individual and collective interviews, role games, theoretical and practical tests) only candidates who pass each step will have access to the next test.



*********************************************************************************
The company manages the marketing strategies of one of the most important websites in Europe for adults (escort / sex workers). The chosen candidate will be working for a company operating in the "adult entertainment" sector, if you have any objections with regards to this industry, are not comfortable or have (legitimate) moral issues with it, we invite you to refrain from applying.

*********************************************************************************
How do we declare multiple values to the same variable?
Tags: javascript, react, axios, saga
Published: 2019-09-17 09:31:24

Here's the code - 

```
import axios from "axios"

import { put, takeLatest } from "redux-saga/effects"

import { actions, t } from "./actions"

const baseUrl = "http://host:8082/user/phone"

function* loadUserData(action) {

const response = yield axios.get(`${baseUrl}/${action.name}`)

yield put(actions.loadUserDataSuccess(response.data))

}

export function* watchLoadUserData() {

yield takeLatest(t.LOAD_USER_DATA, loadUserData)

}
```

Here inline 8 in the response variable, I want to pass for both email and phone URL so that I can search for the result through one search box at once.

Please help!!
Restore character development in archero
Published: 2019-09-17 09:25:44

Character setting in Archero is very pleasant, background art is perfect to restore the scenery of the alien world, in contrast, to the beautiful world to offer blessings with half the merit. Design Archero game is not easy, if not from the national standpoint, this is actually a fantasy work of a military officer who takes the national army to the alien world to advocate the peaceful elimination of disasters and disseminate the idea of civilized world. Here you can see the long-awaited science and technology against the magical Knights of the alien world. Due to the low level of magic civilization, the other side is currently unilaterally hoisted by the Earth Army, and the title of the second season has been revealed, this season to slaughter dragons with RPG. As a light fiction adaptation animation, the main character's slightly strong aura is actually very interesting, setting is also very interesting, technology hangs the magic world. In the rest, the heroine's female partners satisfy the dead house's yearning for the elves of the other world. Magic makes Archero ios devopment easy, demigod Lori, Princess and so on, which are very eye-catching settings. This work maintained the excellent production quality of the first season. It is the best trend of BD game developmemt in ios in January. It is very popular in Japan. It is a work that meets the public's taste. It is highly recommended. In addition, because the author read the Archero game development, Archero tips in [cheatarchero.club](https://cheatarchero.club/) did not chase, a little regret, so if you see good-looking animation in the future, you must not help but look at the original ah! To put it bluntly, the sense of percussion is to serve the game, ignoring the game and forcibly pursuing the excessively refreshing sense of percussion, then it is possible to put the cart before the horse and make a lost wife and a lost soldier. You can also brainstorm about your different views on the sense of shock, and welcome your exchanges and discussions.
Decentraland SDK Workshop Series - 101: Decentraland SDK 
Tags: gamedev, tutorial, typescript, dapps
Published: 2019-09-17 09:18:33

As part of The Decentraland Global Bootcamp online series, today, our very own SDK guru Nico will be live on Twitch, running you through all you need to know about the building blocks of the Metaverse. 

![ImageJudge-Nico.jpg](https://cdn.steemitimages.com/DQmcmMqmZmMuwsryuyboJ52npf5jTjm6WPbFAy8YBpfEFjr/ImageJudge-Nico.jpg)


Be sure to tune in! 5pm UTC.
https://www.twitch.tv/decentraland
Refactoring is not Rewriting Code
Tags: discuss, programming, tips, advice
Published: 2019-09-17 09:10:33

---
title: Refactoring is not Rewriting Code
published: true
description: It's important to draw a line between refactoring code and rewriting it when you make a pull request, communicate the need to your manager or PM, or plan the implementation.
tags: discussion, programming, tips, advice
cover_image: https://oleggromov.com/refactoring-vs-rewriting-code/refactoring-cover.png
---

Hello, folks,

How do you distinguish between _refactoring_ and _rewriting_ code? 

Would you usually refactor code because you have to implement a new feature or just because _it smells_? 

What's your justification for spending time on refactorings for those who prioritize, be it your engineering manager or PM? 

I have made my short notes about [Refactoring vs Rewriting](https://oleggromov.com/refactoring-vs-rewriting-code?utm_source=devto) but I would love you to share your experience, too.
Nuxt, Next, Nest! Confused?
Published: 2019-09-17 08:50:54

Programming is the method to innovate something new and amazing. Being a coder, it is important to be aware of every new upcoming technology. “Nuxt”, “Next”, “Nest” a little confusing, right? They might sound similar but their practical application is different from each other.

The coders who aren’t familiar with these frameworks might get confused in the beginning, these are the perplexed and complex words. I’m going to explain all concept of Nuxt, Next, and Nest so stay tuned with me, in this article you may explore the uses and the installation of these frameworks. Surely, this article will help you to know about these frameworks in depth.

Do you ever think why do we actually need a framework? What are the uses of framework?

A framework is a platform which provides a foundation on which software developers can create programs. It allows the coder to make robust applications.

Also, the framework provides diversified support for developing robust applications with pace and ease because it provides a standard way to build and deploy applications.
Before starting with these frameworks, let’s have a short briefing of CSR (client-side rendering) vs SSR (Server-side Rendering).

By these platforms, it is important to understand that Vue and React are client-side Rendered (CSR) framework, which makes the page interactable and viewable.

For more details about this Concept click here:- https://codersera.com/blog/nuxt-next-nest-confused/