teleren/devto huggingface dataset:
Progress Report - First half of Outreachy Internship
Tags: internships, outreachy, opensource, mozilla
Published: 2020-11-17 18:51:01

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

In this blog post, i want to share my experience and progress in the first half of my `Outreachy internship with Mozilla`. We are half way done ! But eh, I don’t want to end it, I am enjoying every part of this internship. In this, I am prototyping the next version of our in-browser reporting component in the form of web-extension.

With the help of my mentor, [Dennis](https://schub.wtf/), we divided the task into small steps : easy to manage, develop and gain clear understanding of the concepts involved with the coding side. On the start of this internship, I thought I’ll complete the basic prototyping till January but a lot has to be done and it will go long way. When we develop a new tool, write code for different functionalities, test them, handle the various scenarios involved, the formatting, it feels the tool will never be ready. It is bittersweet but when i look behind, it feels the sense of achievement.

I had weekly zoom meeting with my mentor and the [Webcompat](https://github.com/webcompat) team, where we focused and discussed to change the next steps a bit, re-prioritize the tasks, and make more progress on one task while cutting down on some things. During Christmas holidays, I spent most of time on researching and trying to implement advanced features that I could add to my extension tool. But that should be not be the initial task. It is important to learn how to re-prioritize the tasks otherwise you will be busy whole day but get nothing done.

Probably not as I planned or imagined, but it will work 😉

Currently, I am working on refactoring of code/writing more clean code : restructuring existing code, changing the factoring without changing it’s external behavior. It serves lot many advantages that include improved code readability, reduced complexity and source-code maintainability. Refactoring is a lot like solving a Rubik’s cube. There are lots of little steps required to achieve a large goal. Each step enables the next.

I code [@soniasingla](https://github.com/soniasingla/) and tweet at [@soniasinglas](https://twitter.com/soniasinglas)
Dustin Schau (Gatsby, Head of Product): Let's Make The Web Weird Again
Tags: podcast, gatsby, opensource, webdev
Published: 2020-11-17 18:36:13

Product Club Podcast: https://podcasts.apple.com/us/podcast/dustin-schau-gatsby-head-product-lets-make-web-weird/id1529620656?i=1000498892402

Gatsby is a fast growing React-based open source framework for creating websites and apps, with one of the most loyal communities in open source software. 

In this episode, we speak with Dustin Schau (Gatsby, Head of Product) about:

1. Open Source Communities: how to grow open source communities and make the transition from OSS (open source software) to COSS (commercial open source software)


2. Software Cults: creating a "software cult" of loyal contributors who want your product to succeed


3. Making the web weird again: the explosion of retro design ascetics on the web


Episode References:

Dustin Schau: https://twitter.com/schaudustin

Jeff Morris Jr: https://twitter.com/jmj

Gatsby: https://www.gatsbyjs.com

Github: https://github.com/gatsbyjs/gatsby

Space Jam Website: https://www.spacejam.com/

Josh Comeau portfolio: https://joshwcomeau.com/
Requesting an HTTPS resource using batch
Tags: batch, cmd, https, windows
Published: 2020-11-17 18:45:52

So, I'm trying to write a mini hacking tool that uses one-liners in cmd to do certain tasks like installing a virus for example. I need to be able to request things from a server. How would I do this with default Windows CMD? (if it is possible)
`sys.exit()`
Project workflow with Web Compatibility team of Mozilla
Tags: opensource, outreachy, internships, mozilla
Published: 2020-11-17 18:45:04

The theme for this week in **Outreachy** is `Think About Your Audience`. So I’m currently thinking about you 😉

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d4tw38ldt09k05kgppvh.gif)
<center><sub>Hmm, thinking about you 😉</sub></center></br>

We are provided with some goals and another amazing task to write blog post about elucidating the project in which we are interned.

I repeat, am working as Mozilla Web Compatibility Intern in this [Outreachy](https://www.outreachy.org/) Program.

If you want to know more about [Outreachy](https://www.outreachy.org/) and how to get involved, read my old blog posts 🙂

In this blog post, I am going to talk about my project : **Prototype an in-browser mechanism to report web compatibility issues**. So, I’ll start with the short-definition of `Web Compatibility` : Web Compatibility is the **compatibility** or **flexibility** of a website, web application, script or HTML design to function on different web browsers available. Different browsers read the website code differently and differs in the way in which a web page looks in different web browsers.

Across browsers, the web-form at webcompat.com is the primary source of web compatibility reports, but the team also manages `web compatibility reporter` module for Firefox. It offers various advantages as it’s easier to access, gathers more information about the issue, resulting, the fast-processing on that particular issue 🙂

The reporter is implemented as a standalone Web-extension, that leverages both standard Web-extension APIs as well as some Firefox-specific APIs that allows gathering more information, like taking a screenshot and collecting error messages from the JavaScript error console.

If you want to contribute in Web Compatibility team of Mozilla, check the GitHub repository.

The various different projects are enlisted on the above mentioned repository. If you want to contribute in any other Mozilla’s project, you can check [this](codetribute.mozilla.org)

---
“We grow because we struggle, we learn and overcome.”
---

<center><b>Hit me up if you need any help, happy to help you 🙂</b></center>
Do you make money online?
Tags: money, business, blog, productivity
Published: 2020-11-17 18:39:45

This question is not meant to be off-topic. I am a software developer, not a person who crashed into this platform to steal your secrets of how you make money online. I know the only way to do it is by working hard and getting involved. Rather, I would like to know what tools you can make money with, be it through your blog, selling software, courses, books, making YouTube videos, etc. I’m looking for a way to obtain income parallel to those of my work. Being part of this platform, I thought I could ask people who have the same passion as me: code. I thank anyone who answers!
How to Avoid Surprise AWS Bills
Tags: aws, cloud, cloudskills
Published: 2020-11-17 18:31:57

{% youtube MKNtSOQXFrY %}

I remember the 13th month after I opened a personal AWS account pretty clearly.

Why the 13th month? Because that's when the free tier benefits ended for that account and I got an email bill with charges for resources that were running on my account. 

Holy moley! That RDS database I hadn't touched in half a year was using up my video game money!

After I deleted anything running on my account, I did some research and found that I could set up a Billing Alert in CloudWatch to monitor my monthly bill. 

With a $5 threshold on the billing alert, I was safe to sleep at night, knowing I'd be notified if the bill got to high.

But that alert was way too simple, so AWS created AWS Budgets that lets you create very specific alerts for your bill.

You can set alerts on service type, region, tags, and many other vectors. 

With AWS Budgets you can have intelligent billing alarms that work well at any size organization.

Take a look at my video as I explain how AWS Budgets works and go through the process of setting one up.

---

🙏 Thanks for taking a look at my content!

📨 Join my newsletter for more: https://ryanlewis.dev

🎥 Subscribe to my [YouTube channel](https://www.youtube.com/channel/UCFqsAphTD7FXKYDCg5zdrOA) for more!

---

[YouTube](https://www.youtube.com/channel/UCFqsAphTD7FXKYDCg5zdrOA) | [Twitter](https://twitter.com/ryanmurakami) | [GitHub](https://github.com/ryanmurakami) | [Site](https://ryanlewis.dev)
How to profile Go with pprof in 30 seconds
Tags: go, performance, tooling, tutorial
Published: 2020-11-17 18:31:14

*If you are interested in developer trends you should check out my new newsletter at: [unzip.dev](https://unzip.dev)*

---

I was looking for a quick intro profiling in Go but everything was cumbersome, it seems that everyone points to `pprof`. 

Let's say this is the code you want to profile:
```
package main

import (
	"fmt"
	"sync"
	"time"
)

// Some function that does work
func hardWork(wg *sync.WaitGroup) {
	defer wg.Done()
	fmt.Printf("Start: %v\n", time.Now())

	// Memory
	a := []string{}
	for i := 0; i < 500000; i++ {
		a = append(a, "aaaa")
	}

	// Blocking
	time.Sleep(2 * time.Second)
	fmt.Printf("End: %v\n", time.Now())
}

func main() {
	var wg sync.WaitGroup
	wg.Add(1)
	go hardWork(&wg)
	wg.Wait()
}

```

Now let's profile it, to do that we need to:
1. Install dependencies:
`apt-get install graphviz gv` (debian) or `brew install graphviz` (mac)
2. Install pprof: `go get -u github.com/google/pprof`
3. Add an import: `import _ "net/http/pprof"`
4. Add a server for `pprof`: 
```
go func() {
  fmt.Println(http.ListenAndServe("localhost:6060", nil))
}()
```

It should look something like this:
```
package main

import (
	"fmt"
	"net/http"
	"sync"
	"time"

	_ "net/http/pprof"
)

// Some function that does work
func hardWork(wg *sync.WaitGroup) {
	defer wg.Done()
	fmt.Printf("Start: %v\n", time.Now())

	// Memory
	a := []string{}
	for i := 0; i < 500000; i++ {
		a = append(a, "aaaa")
	}

	// Blocking
	time.Sleep(2 * time.Second)
	fmt.Printf("End: %v\n", time.Now())
}

func main() {
	var wg sync.WaitGroup

	// Server for pprof
	go func() {
		fmt.Println(http.ListenAndServe("localhost:6060", nil))
	}()
	wg.Add(1) // pprof - so we won't exit prematurely
	wg.Add(1) // for the hardWork
	go hardWork(&wg)
	wg.Wait()
}

```

When you type: `go tool pprof http://localhost:6060/debug/pprof/heap` while the server is running (in a different terminal) and then type `png` you will get something like the following:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/58ozh4fcl7pp6gozt4aa.png)

As you can see, `hardWork` is consuming some memory.
If you want to check the goroutines you can replace the line to:
`go tool pprof http://localhost:6060/debug/pprof/goroutine`

You can choose between:
- CPU: `profile?seconds=10`
- Memory: `heap`
- Goroutines: `goroutine`
- Goroutine blocking: `block`
- Locks: `mutex`
- Tracing: `trace?seconds=5`
Week 02 - Progress Report with Community Bridge
Tags: internships, opensource, thanos, cncf
Published: 2020-11-17 18:23:37

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4pnmbedwzrkgltaqwl2d.gif)
<center><sub>I can eat more 😹</sub></center><br/>

I completed the second week of [my internship](https://soniasingla.com/cncf-intern-with-thanos/) at [Cloud Native Computing Foundation](https://www.cncf.io/) with [Thanos](https://people.communitybridge.org/project/f51284ab-f652-47b1-9819-cd4135e75c00) under the mentorship of [Bartek Plotka](https://www.bwplotka.dev/) and [Povilas Versockas](https://povilasv.me/) 🤗 💜

## WORK DONE :

It was again full week of learning new stuff. At the beginning of 2020, I wrote [my goals for this year](https://soniasingla.com/review-2019-goals-2020/), out of which getting healthier, taking care of my own self is one of the goal I want to achieve. For the major part of my day, I keep sitting on my chair, and even skip meals just because i don’t want to get out of it. I am happy to share that I am working on this and hopefully, this will go a long way 🏃🏻‍♀️

I had the weekly sync up meeting with my mentors, [Bartek Plotka](https://www.bwplotka.dev/) and [Povilas Versockas](https://povilasv.me/), where we discussed about the raw documentation I prepared on <i>**“Downsampling and unlimited metric retention”**</i> which was really vague. I spent most of my second week in reading Thanos documentation, blog posts, finding all possible user cases that are necessary for the tutorial. Get to know more about **[Thanos](https://thanos.io/)**, a set of components to make our Prometheus deployments a long-term TSDB solution with Highly Available setup. [Thanos](https://thanos.io/) has greatly enriched the metrics system, providing users with a single centralized query pane and a long term data storage, whilst making our Prometheus stack scalable and highly available! I am updating everything in GitHub as draft, you can view the pull request [here](https://github.com/thanos-io/thanos/pull/2757). Delivered 5 min short talk in our Mentees Hangout Meet, last Friday 😻💙. Apart from that, I got my first pull request merged 😍 (although, it was a small fix 😛).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p7d6mvq1xi17p6y5i7ee.gif)
<center><sub>Yeyyyyyyee🎉</sub></center><br/>

I managed to send 3 pull requests this week, out of which I need to update the two pull requests 👩🏻‍💻. I am very good at breaking things ䷪

## PLANS FOR THE NEXT WEEK :

1. Work on the pending pull requests. I am making changes in accordance with mentor’s review, on a rolling basis.
2. Focus more on the tutorial work and additionally, convert the draft into more of a tutorial (send good wishes to me🤞🏻).

Before signing up, a huge shout to my co-mentees, [Harshitha Chowdary Thota](https://twitter.com/ThotaHarshitha), [Uche Obasi](https://twitter.com/Thisisobate), [Yash Sharma](https://twitter.com/yashrsharma44), [Prem Kumar](https://twitter.com/prmsrswt), for being so amazing and supportive ❤️🔥

**Signing off for today, until next week 👻**

**:wq**
React or Vue.js
Tags: help, beginners, react, vue
Published: 2020-11-17 18:07:48

Hi, I am looking to add another programming language under my profile and I started with AngularJs and now Angular, but keeping up with the latest javascript frameworks can be a bit cumbersome I was wondering which programming language can I learn next Vue.js or react and what are the pros and cons. Thank you in advance. :)
Week 03 & 04 - Progress Report with Community Bridge
Tags: internships, opensource, cncf, thanos
Published: 2020-11-17 18:07:33

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7uslb3t7vgaqua6xvvsw.gif)
<center><sub>Excitement 😍</sub></center><br/>

In this blog post, I want to share my experience and progress report of the last two weeks. The past two weeks were most exciting and challenging at the same time. We are half way done ! It feels like I began just yesterday. When busy, I do not notice how fast time flies. But eh, I don't want to end it, I am enjoying every part of this [internship](https://soniasingla.com/cncf-intern-with-thanos/) ❤️

## WORK DONE :

Follow up from the [previous](https://soniasingla.com/week2-community-bridge-progress-report/) blog, my 4 pull requests got merged 💃🏻 and 2 are still under process 🕗. It's an adventurous experience till now, and it's pretty cool seeing what is behind [Thanos](thanos.io), and the feeling of having some patches landed ⛴.

However, it's pretty challenging at the same time. No matter how experienced or novice a person is, everybody experiences struggle at some point in their journey. The statement seems pretty easy to admit for many people. But when you are a beginner stepping your foot in the mammoth field of software development, it's very difficult to acknowledge that even your mentors or other senior developers would have ever struggled at basic problems like you do. This gap in acknowledgement creates an inferiority complex and makes your journey to the top much more difficult than it should be.

To be specific talking about the issue, I was badly stuck on running Thanos store gateway. I spent one whole week, reading documentation, debugging, running, trying again but badly failed (fear of asking a stupid question kicked in 😅).

Finally, I gave up and discussed about this problem with my mentors, co-mentees and they helped me out of this. Thanks all who contributed their time and knowledge for helping me 🤗

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oarhijr0xge4qj2oh5xk.png)
<center><sub>Running Store Gateway locally</sub></center><br/>

Coming to the tutorial **<i>"Downsampling and unlimited metric retention for Prometheus"</i>**, I'm adding multiple commits in single PR, you can subscribe to this [pull request](https://github.com/thanos-io/thanos/pull/2840) for all the updates. Please feel free to drop suggestions and review, let me know if something is missing 🤗

## PLANS FOR NEXT WEEK :

1. Add more commits to the tutorial **"Downsampling and unlimited metric retention for Prometheus"**
2. Work on the pending pull requests ⏳

**Signing off for today, until next week 👻**

**:wq**
[git notes] Fix `git push -u` The current branch has no upstream branch error

Tags: git, github
Published: 2020-11-17 18:06:46

The error bellow happens everytime that I need to push a brand new brach to a remote git server using the command `git push -u.`

```
fatal: The current branch <branchname> has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin <branchname>
```

Git needs to configure the push strategy to auto create a remote mirror of your new branch automatically. The command to do that is:

```
 git config --global push.default current
```

That's it!

For more details, you can check the docs [here](https://git-scm.com/docs/git-push)
GCP Automation using Ansible
Tags: googlecloud, ansible, devops, linux
Published: 2020-11-17 18:06:20

#Introduction#
Ansible provides different Google Cloud Platform modules for automating google cloud platform. In this blog we will be creating a Google Compute Engine Instance and deploy Apache Server on it using Ansible.

###Prerequisites###
- Create [Project](https://console.cloud.google.com/projectselector/compute/instances) on Google Cloud Platform. 
- Create a [Serviceaccount](https://console.cloud.google.com/iam-admin/serviceaccounts) with editor access. (Refer [Creating-service-account](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances))

###GitHub###
You can find the resources in [abhivaidya07/ansible_gcloud](https://github.com/abhivaidya07/ansible_gcloud)

###Getting Started !!###
- Install python version > 3.0
```
$ sudo yum install python3-pip
```
- The GCP modules require both the requests and the google-auth libraries to be installed.
```
$ sudo pip3 install requests google-auth
```
- Install Ansible
```
$ sudo pip3 install ansible 
```
- Download [.JSON credentials file](https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts) of created service account.
- Edit instance_name in [vars/main.yml](vars/main.yml), by default it is centos-7.
- Edit machine_type in [vars/main.yml](vars/main.yml), by default it is e2-micro.
- Edit zone in [vars/main.yml](vars/main.yml), by default it is us-central1-a.
- Edit source_image in [vars/main.yml](vars/main.yml), by default it is CENTOS-7.
- Give project id, .JSON file_path in [vars/main.yml](vars/main.yml) file. 
- Run the Playbook 
```
$ ansible-playbook gce.yml
```
- Your Google Compute Engine Instance is now created, with Apache Server installed in it.
- Browse to instance public ip address, and you will see HELLO WORLD !! is getting displayed.
LOCALIZATION WITH PONTOON - DIVE INTO OPEN-SOURCE
Tags: localization, opensource, pontoon, mozilla
Published: 2020-11-17 18:05:01

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nxm4aryr3lxawmandi55.jpeg)
<center><sub>Presenting talk on localization</sub></center><br/>

Few days ago, I got an opportunity to speak about `Localization with Pontoon` at the event `Dive into Open-Source` at **Jalandhar, India.**

Honored and excited to promote women in tech, I started thinking about what I could share. I wrote some notes on my non-technical journey into tech and how I get involved with [l10n](https://l10n.mozilla.org/) team at [Mozilla](https://www.mozilla.org/en-US/). Then, I started to think about how I could end my talk with specific guidance and a call to action for girls to contribute towards open-source.

I had talk with many attendees there. A common misconception, prevailed in almost of all the attendees that open-source is only about writing and testing code, fixing bugs. So that’s how I started with my talk 😉

I made the students familiar with the terms localization, it’s importance and what are the tools used for localization in the Mozilla Community. I took hands-on session of about one hour where the students from different teams `(Bengali, Hindi, Punjabi, Urdu etc.)` made at least minimum one contribution.

Coming up with importance, people who want to use the computer and advanced technologies must first learn English. In the area, with low literacy rates, this blocks access to information and communication technologies, especially for the rural poor and women who do not have equal access to education.

It helps the students to communicate in their own language. No need for local users to learn English first. The local programmers can gain expertise and experience expeditiously.

So, localization is top-priority contribution and an essential component in ensuring that our translation has the maximum effect on million of users.

A huge shout out to [l10n Mozilla Community](https://l10n.mozilla.org/) and [Peiying Mo](https://pbase.com/faerie_39/) for helping us with the event by providing such cool swags and much more ❤


If you need any help or want to ask any question, shoot mail at soniasingla.1812@gmail.com or [twitter](https://twitter.com/soniasinglas)
Javascript - Array.some() and Array.every()
Tags: javascript, beginners
Published: 2020-11-17 17:52:06

Javascript provides interesting tools to work with Arrays and Objects. In this article, we will talk about two array methods: `some` and `every`.

## Array.some()
If you want to check if your array has a value that matches a condition, Array.some() is your friend. It just takes a callback with 4 parameters:
- the current element
- the index of the item
- the original array
- and a value to use as `this`;

and returns a boolean. Note that only the first parameter is required for the callback, all the others are optionals.

As soon as the item makes the callback return a truthy value, Array.some returns true directly.

Let's take an example. Let's check if our array has an even number.

Here's our original arrays:

```js
const arr1 = [1,3,17,9,5];
const arr2 = [1,17,8,7];
```

Without using the `Array.some()` method, we'd probably did it like this:


```js
function hasEven(arr) {
    for (let i = 0; i < arr.length; i++) {
        if (arr[i] % 2 === 0) return true;
    }
    
    return false;
}

console.log(hasEven(arr1)) // false
console.log(hasEven(arr2)) // true
```

This is quite long for just checking if our array matches a condition.

With Array.some, we can make this in a single line:

```js
console.log(arr1.some(item => item % 2 === 0)) // false
console.log(arr2.some(item => item % 2 === 0)) // true
```

But wait, we're repeating some logic here, that's not DRY.

Okay, you're right. Let's refactor it.

```js
const isEven = n => n % 2 === 0;
console.log(arr1.some(isEven)); // false
console.log(arr2.some(isEven)); // true
```

Alternatively:
```js
console.log(arr1.some(n => isEven(n)))
```

We did it, now we have a shorter code, readable and DRY.

Readable? Yes, you can read it like:
- some element of arr1 is even => false
- some element of arr2 is even => true

## Array.every()
This array method is similar to Array.some, the difference is that it returns true only if each element of the given array makes the callback return a truthy value.


```js
const arr1 = [2,8,6,1,4,16];
const arr2 = [16,20,14,4,2];
const isEven = n => n % 2 === 0;

console.log(arr1.every(isEven)); // false
console.log(arr2.every(isEven)); // true
```

## Conclusion

`Array.some()` checks if the given array contains `some` value that makes the given callback return a truthy value.

`Array.every()` checks if `every` element in the array matches the given callback.