teleren/devto huggingface dataset:
Commited to building the open source community at home. 
Tags: watercooler, opensource
Published: 2020-03-06 05:30:36

**A pledge to building an open-source community at home.**

I have been a bystander for such a long time, a beneficiary of the open-source community since, the dawn of my dev career, unaware from day one just how much it had contributed to who I am today.

There is just one flaw with this picture-perfect story, I never felt like I needed to contribute, it never occurred to me that I could contribute, I felt like an outcast. 

_We could even say the reason I stayed in my darkroom coding all day alone was because I felt like there was no reason to interact with anyone since I did not feel welcomed anywhere, the internet was full of people I felt like I could not interact with, everyone thought I was playing games, what a lonely time that was._ 

**I am still to blame for most of the things I did not do to find a dev community**

**I am still to blame for not trying everything possible to find a mentor**

_The internet is a very distracting place for a teenager_ 

[Everyone has a plan for Africa](https://youtu.be/UoOc8FnS7qE) what is our plan for Africa

There is nothing wrong with being helped, however, are we ready for when they help us, _Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime._ They have no time to teach us, it is time we teach ourselves, and that is what we have been doing.

For some reason the still feels like there is a disconnect,

**If you want to go fast, go alone. If you want to go far, go together.** is this really an African proverb we seem to really not live up to this.

Now we could say I have not done enough research, and there are communities out there, and hopefully, I find them on this new journey I have decided to embark on, _I am tired of being the problem_.

Open Source is the bread and butter to being a dev, it is most probably one of the biggest reasons we have so many devs's in the world, however, can we really consider ourselves developers, born to code, if we cant even create a community of developers that can help each other, that build each other, and push the boundaries of what is possibile, I have seen, **alone** boundaries have been pushed now imagine, if we worked together, we might have already had our own ride sharing app, our own travel app, this is not about creating the next uber, airbnb, vue.js and react, this is about creating a home for ourselves to nuture our love for code, the biproduct is one of the above mentioned, and that would be something nice to see happen, honestly right now I just want to be able to interact with dev's at home, and not feel like their ego's are in the way of the conversation, that their hustle is blinding them to the fact that they complain more then they help.


_We all have individual goals, however, I do belive our individual goals have one thing in common, we want to see a better world, from us achieving our goals_


I pledge to build an open-source community

![alt text](https://raw.githubusercontent.com/GreyWolfLab/devPortal/master/images/oscdev%20signature.png "OSC Signature")
Amazon Coding Interview Question - Find The Sum Of Contiguous SubArray with Largest Sum
Tags: computerscience, javascript, webdev, tutorial
Published: 2020-03-06 05:37:10

# Problem Statement 
**Find The Sum Of Contiguous SubArray with Largest Sum**

**Description** -  for a given array lots of subarrays are possible but we have to find a sub-array which gives us the largest sum

arr = [-2,-3,4,-1,-2,1,5,-3]

In this particular array arr, subarray [4,-1,-2,1,5] gives us the maximum sum `7` out of all the subarrays possible.


**Expected Output** : `7` 
The above sum is the sum of the subArray `[4,-1,-2,1,5]`


# Efficient Implementation
**Time Complexity**  - O(n) // as we are traversing the array only once where `n` is the size of the array
**Space Complexity** - O(1) // as we are just using two variables `maxSum` and `curSum`

#C++ Implemention

```javascript
 
#include<iostream> 
#include<climits> 
using namespace std; 

int findSubArrayMaxSum(int a[],int n){

  // currSum keeps track of the sum of the current subArray
  // maxSum keeps track of the maximum sum that has occurred till then
  // intially both will be 0 and as I traverse through the array these variables
  // will get changed
  int maxSum = 0,currSum = 0;
  for(int i=0;i<n;i++){
    // Calculate the current sum
    currSum+=a[i];
    // if the current sum changes to a negative value I will set it back to 0
    // that way I can keep track of the maximum sum
    if(currSum <0){
      currSum = 0;
    } else if(maxSum < currSum){
      // assign currSum to maxSum  if maxSum is less than currSum and currSum is 
      // greater than 0
      maxSum = currSum;
    }
  }
  return maxSum;
}

int main() 
{ 
    int a[] = {-2, -3, 4, -1, -2, 1, 5, -3}; 
    int n = sizeof(a)/sizeof(a[0]); 
    int max_sum = findSubArrayMaxSum(a, n); 
    cout << "Maximum contiguous sum is " << max_sum; 
    return 0; 
}


```

If you found this article helpful, please tap the <img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/emoji/emoji-one-unicorn-695106da1194513bfa0092f1a75943f59089be7d6addbc7459bdfab80f5709e6.png" alt="drawing" width="30" height="30"/> Follow this channel for more articles on data strucures and algorithms.
Something I learnt more about const keyword
Tags: cpp, const, learning, new
Published: 2020-03-06 05:03:06

const keyword has multiple usages in c++ as per the position of the keyword. While going through my project code const captured my attention again, being placed at the end of function declaration. Something like this: 

ReturnType FunctionName (FormalParameters...) const;

While discovering its use case I found it quite helpful. This type of function is called a "const function". Such function restricts changing it's class variable inside it. It is a compilation error for const function to change it's member class variable. 

Well the restriction can be loosened by the storage class specifier mutable. However it can be used efficiently for getter methods.

![Compiler error](https://dev-to-uploads.s3.amazonaws.com/i/havmej8lxfdrhq8lfn3m.JPG)
Setting up redirect on firebase
Tags: seo, firebase, redirect, webdev
Published: 2020-03-06 04:53:49

---
title: Setting up redirect on firebase
published: true
description: Redirect your old URL
tags: SEO, firebase, redirect, webdev
canonical_url: https://irian.to/blogs/setup-firebase-redirect
---

I recently redid my [nuxt](https://nuxtjs.org/) [personal site](https://irian.to/) (hosted on [firebase](https://firebase.google.com/)) and changed some URLs. One of them are links to my blogs. Before, I had my blogs at `/blog/my-blog`, now it is spelled `/blogs/my-blog`. 

![New URL](https://dev-to-uploads.s3.amazonaws.com/i/nasofmcdebmk81c5xu99.png)

*For example, my old redux URL was https://irian.to/blog/redux-101/.*

# The problem 

When I search for my article for `"site:irian.to redux 101"`, google shows the old URL instead of the new one. When user clicks at the link google provides about that redux article (or any blog I made), they will go to incorrect `/blog/redux-101` URL.

![Old Google Result](https://dev-to-uploads.s3.amazonaws.com/i/cdvyqii59dfg61xbjryb.png)


# The Solution

Here are the steps I did to configure redirect on firebase, where I host my site. The solution is very simple and I hope it will help others in the future!

First, per [firebase docs](https://firebase.google.com/docs/hosting/full-config#capture_url_segments_for_redirects), I need to add a redirect attribute in my `firebase.json`. So here is what I did:

```
// firebase.json
    ...
    "redirects": [
      {
        "source": "/blog/:slug",
        "destination": "/blogs/:slug",
        "type": 301
      }
    ],
```

The 301 is for [redirect](https://moz.com/learn/seo/redirection).

Then I deployed it (`firebase deploy`). The code above takes the old URL (source) and redirect it to correct one (destination). So whenever user goes `irian.to/blog/some-blog`, he/she will be automatically get redirected to `irian.to/blogs/some-blog` instead. 

That's it! 

Whenever I click on google link (the old link with `/blog`), it now redirects to the new one.

![URL redirects 301](https://dev-to-uploads.s3.amazonaws.com/i/og4mpn919j476mh5y2y9.png)

# Other firebase redirects

In addition to redirection above, firebase allows several redirect configs. Here are some:

- Basic redirect: whenever user goes to `mysite.com/old`, they will be redirected to `mysite.com/new` using:

```
{
    "source": "/old",
    "destination": "/new",
    "type": 301
}
```

- Different URL: If you decided to give a URL a new domain, you should use [302](https://en.wikipedia.org/wiki/HTTP_302) to redirect and inform user that this address is in a new URL.

```
{
    "source": "/myproject",
    "destination": "https://myawesomeprojectsite.com/",
    "type": 302
} 
```

- Multiple redirects: If you have multiple URLs, like: `mysite.com/menu`, `mysite.com/menu/sushi`, `mysite.com/menu/beverage`, etc., and want to redirect *all* of them o `mysite.com/foodie`. You can do it with `**` and `{/**}`.

```
{
    "source": "/menu{,/**}"
    "destination": "/foodie"
    "type": 301
},
```


Thanks for reading. Happy coding! 💻

# Source:
- [Firebase config](https://firebase.google.com/docs/hosting/full-config)
iMac 4k 21.5inch performance
Tags: discuss
Published: 2020-03-06 04:42:53

Hi do you guys also had a performance issues regarding the iMac Retina 4k?

https://support.apple.com/kb/SP789?locale=en_US&viewlocale=en_US

Its slow that even when browsing through different tabs in chrome, the loading ball always appear.
About My First Sinatra Project
Tags: sinatra, ruby
Published: 2020-03-06 04:31:05

It was tough. I initially planned to start this project ON TIME with my cohort, but it was rough because I was so burnt out from the first project, literally the CLI Data Gem... 

I started to doubt myself, and if this is even something that i should be doing, but I remembered that the learning curve is usually higher if it's your first time. I had to keep reminding me self that. 

ANYWAYS, so here it is. Find A Band. It's everything that I imagined it'd be!

Not really. 

It was a combination of learning learning about SQL, how to query, etc. Then we were introduced to ActiveRecord, an object relational mapping database. I think it's pretty cool, and I see why it's used in Ruby. It's very easy to update the attributes of a specific table. 

The site was basically a meeting place for solo players to look for a band to join, or if they had a band, they could post about looking for new members. 

I implemented CRUD functionality, and I think that while it looks okay now I'll need time to refactor it a bit. That goes for the front end design as well. 

Anyways, thanks for reading!
How to Upgrade and update Nodejs via NPM Centos 6
Tags: centos6, linux, node, javascript
Published: 2020-03-06 04:30:32

Steps to Upgrade Node.Js and install

install latest depedency 

    yum install gcc gcc-c++ make
make sure already install node js 
    
    yum install epel-release
    yum install nodejs

Lets first check our Centos 6.x VPS’s GLIBCXX versions for compatible version

    strings /usr/lib64/libstdc++.so.6 | grep GLIBC


Current NodeJs Version – First check current nodejs version on your system using following command. In my case it is v0.10.48

    node -v 

    v0.10.48

Clean Cache Forcefully – Now clean all npm cache from your system forcefully.

    sudo npm cache clean -f 

you can bypass https using below commands:

npm config set strict-ssl false

or set the registry URL from https or http like below:

npm config set registry="http://registry.npmjs.org/"
 
Install n Module – After cleaning all cache from your system, now install n modules using npm command.

    sudo npm install -g n 

Install Nodejs – Let’s install or update latest nodejs version on your system using n module.

    sudo n stable 
    or 
    sudo n [version.number]

Setup Binary Link – Now link your node binary with latest nodejs installed binary file using following command.

    sudo ln -sf /usr/local/n/versions/node/11.8.0/bin/node /usr/bin/node

Check Nodejs Version – Finally recheck your nodejs version. You will find that it showing latest version on your system.

    node -v 

    5.4.0
Announcing the new Real-World Serverless podcast
Tags: aws, lambda, realworldserverles, serverless
Published: 2020-03-06 22:14:09

---
title: Announcing the new Real-World Serverless podcast
published: true
date: 2020-03-06 04:17:17 UTC
tags: AWS,Lambda,Real-World Serverles,Serverless
canonical_url: https://theburningmonk.com/2020/03/announcing-the-new-real-world-serverless-podcast/
---

I’m excited to announce that my new podcast [**Real-World Serverless**](https://www.realworldserverless.com/) is LIVE!

It’s a brand new podcast where I discuss real-world use cases and challenges with serverless technologies with engineers who are building stuff with them and get their stories from the trenches.

[![](https://theburningmonk.com/wp-content/uploads/2020/03/img_5e61ce17d948a.png)](https://www.realworldserverless.com/)

The first episode is already live, where I spoke with [**Ricardo Espirito Santo**](https://twitter.com/ricardoespsant) at **Zoopla** about the state of serverless adoption in their organization, why they decided to adopt serverless, the challenges they face and the areas where AWS can improve to make life better for their customers.

And next week, we’ll have [**Joe Emison**](https://twitter.com/JoeEmison)to talk about building a fully serverless insurance company with a small team, and his view on monorepos, hiring junior frontend devs and why GCP is falling behind AWS and MS in the cloud market.

On this podcast, you’ll hear stories from companies from around the world on their journey to serverless and the joys and pains they experience along the way so we can all learn and move forward together. Give us a lesson on [**realworldserverless.com**](https://www.realworldserverless.com/)and follow us on Twitter **[@RealWorldSls](https://twitter.com/RealWorldSls)** for updates.

 ![](https://theburningmonk.com/wp-content/uploads/2019/10/img_5dab0c477fc72.png)

Hi, my name is **Yan Cui**. I’m an **[AWS Serverless Hero](https://aws.amazon.com/developer/community/heroes/yan-cui/)** and the author of [**Production-Ready Serverless**](https://bit.ly/production-ready-serverless). I specialise in rapidly transitioning teams to serverless and building production-ready services on AWS.

Are you struggling with serverless or need guidance on best practices? Do you want someone to review your architecture and help you avoid costly mistakes down the line? Whatever the case, I’m here to help.

You can contact me via [Email](mailto:theburningmonk.com), [Twitter](https://twitter.com/theburningmonk) and [LinkedIn](https://www.linkedin.com/in/theburningmonk/).

[Hire me.](https://theburningmonk.com/hire-me)

The post [Announcing the new Real-World Serverless podcast](https://theburningmonk.com/2020/03/announcing-the-new-real-world-serverless-podcast/) appeared first on [theburningmonk.com](https://theburningmonk.com).

 ![](http://feeds.feedburner.com/~r/theburningmonk/~4/w7AM7RUUBDU)
IAM vs PIM vs PAM vs HashiCorp Vault vs Skub in 20 seconds
Tags: identity, hashicorpvault, pim, privilege
Published: 2020-03-06 04:01:50

---
title: IAM vs PIM vs PAM vs HashiCorp Vault vs Skub in 20 seconds
published: true
description: What's the difference between Vault Enterprise and Traditional Privilege Access Management Platforms?
tags: identity, hashicorpvault, pim, privilege
---

![This image has nothing to do with PIM vs PAM, but it's funny, I guess. And dammit my blog post needs an image!](https://dev-to-uploads.s3.amazonaws.com/i/966ged2tw2j382gz6lnq.gif)

Here's the answer in 10 seconds of video (2:03 to 2:13): https://youtu.be/cVYSc2d6Gco?t=123

But, because that's not long enough for a "real" blog post, I'll ramble on a bit more. 

The big difference is machine identity vs human identity. And Dynamic Secrets Management vs Password/Privileged Access Management.

In a couple of sales conversations I've come across this question: 

"What's the difference between Vault Enterprise and Traditional Privilege Access Management?"

Those of us who call ourselves Vault Nerds should all have a quick answer to this, because it's a high level question involving addressable markets for Services companies, and HashiCorp's product placement.

And here's a 5 minute talk by the HashiCorp founders about the difference between Identity and Access Management (IAM) and Privileged Access Management (PAM): https://youtu.be/x4Wf2W3Wl4w?t=117

Again, that link will jump you to the most important 10 seconds of video.

Anyway, now that I've told you where they're different, where's the overlap?

Why isn't there one tool or platform capable of handling both?

Well, perhaps changing direction from the clear distinctions set by Armon, HashiCorp Vault has feature-creeped further into the PIM game: https://www.vaultproject.io/use-cases/identity-based-access/

HashiCorp Vault's still not directly competing with the likes of Thycotic, CyberArk, or CA PAM.

And I wrote up an example of where a platform for "brokering" machine identities can also cover one PAM use case, namely SSH access to a sensitive machine: https://dev.to/digitalonus/vault-pim-2bp6
Expose Who’s Liked You on Tinder with js
Tags: chrome, javascript
Published: 2020-03-06 03:33:57

I just saw this article.

https://thenextweb.com/apps/2020/03/04/its-painfully-easy-to-see-whos-liked-you-on-tinder-without-paying-for-gold/


According to the article, Tinder is using CSS, `filter: blur(12px;)`.

This totally makes sense for a web application since generating masked images would need some work.


I checked the web app and knew that Tinder is using `react` and it prevents accessing the Who's Liked page directly.



1. Go to https://tinder.com/app/recs
2. Go to https://tinder.com/app/likes-you by clicking the photo in the sidebar
3. Open Chrome `Developer Tools`
4. Paste the following code on your console

```js
const getPiclinks = () => {
  const all = document.querySelectorAll(".StretchedBox");
  const start = all.length/2; // divide by 2 because StretchedBox class is also used by the div in the side bar 
  const end = all.length;
  for(let i=start; i<end; i++) {
    const url = all[i].style.cssText.replace('background-image: url("', '').replace(")", '');
    console.log(url);
  }
}
```
5. Run the function
type `getPiclinks` on your console

6. Click the links console shows
You will see links to the image.
How do you screen share with a 4k display
Tags: mac, remote, tips, discuss
Published: 2020-03-06 03:25:30

---
title: How do you screen share with a 4k display
published: true
description: 
tags: Mac,remote,tips
---

Does anyone have some tips about screen sharing with a 4k display? (I.e.: in slack) 

I'm currently moving stuff to my MBP screen otherwise it's way to small for anyone who doesn't have a 4k screen and with my desk configuration it's a little awkward. I would much rather share a part of my main screen or something like that.
Today, I almost forgot why I love programming.
Tags: wecoded, codenewbie, bootcamp
Published: 2020-03-06 03:06:44

I'm not sure if I can still call myself a recent coding bootcamp graduate - I've hit 9 months of code, and today I had a burnout baby. I had a lengthy stare at the screen, had an existential crisis in the bathroom, and realized that coding just isn't for me. 

### Then I got my shit together. 

This task had to be done. I couldn't just not do my job and tell my boss "Sorry, that's too hard." This may be fine for a tricky bug fix, but blowing off documentation is a good way to go from junior developer to former developer. 

### I'm not saying I was ready to throw in the towel over documentation. 

I enjoy writing. That's how this post happened. 

I don't enjoy things I can't figure out. 

A majority of my task was taking screenshots of the happy path. Problem was, I didn't know the full happy path. A large part of it was setting up [kinda] complex charts and graphs using a library that we'd been implementing. I was familiar with the UI well enough, but I didn't understand how to use *any* of the tools. 

### I wasn't frustrated with code. I was frustrated with graphs. 

I got myself caffeinated, pulled up my bootcamp straps, and Googled my soul out. I tried different data and different settings and different filters until *it worked*. I was spinning in my chair. 

This is when I remembered that I loved writing code - if I loved graphs, I would have gone into accounting. **Development is hard**. We all know it. However, we also all live for the rush of *"I did it - it works!"*. 

That's why nevertheless, I code.
Looking for a partner in starting my new project (MEMEMOD)
Tags: newproject, question, partner
Published: 2020-03-06 02:54:43

Hi, I'm a junior web developer with React skills, and today I'm thinking to build a new project, not side small projects but yeah, maybe make it <b>big</b>? But the thing is, I am a junior with big ideas, hence, I need a senior/experienced web developer to guide me, to be my partner in building this project.

I'm currently using React to build this project but if you guys are senior/experienced developers and have something else in mind that much better than React, feel free to let me know.

You know what, maybe I'm mainly targeting senior devs but yeah, I think, juniors like me are welcome as well to join this project, just let me know then we strive together along with others.

<center> <h4> PLEASE JOIN ME, THIS IS GONNA BE A 
GREAT OPPORTUNITY FOR US ALL </h4> </center>

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