teleren/devto huggingface dataset:
GSoC 20: Week 11
Tags: gsoc, python, opensource
Published: 2020-08-19 13:01:35

Hello guys, I hope you all doing well and today I am going to share my code contribution of the 11th week of the GSoC program.

## What did I do this week?
I have been working on documentation this week. I have added a guide about [how to scan docker image with the CVE Binary Tool](https://github.com/intel/cve-bin-tool/blob/master/doc/how_to_guides/scan_docker_image.md) since a user has requested it and this will be super useful to devops guys. I have researched different ways to do this and I have mentioned two easy way to scan a docker image in the documentation:
1. Install `cve-bin-tool` inside a docker instance and scan the directory just how you would normally and export report to the host.
2. Export directory you want to scan from container to host and scan it on the host.

Both of the above mentioned methods can help one to scan a docker image and one can choose one over another. Second method is comparatively easier than first but has overhead of copying all data from container to host while first method requires you to install cve-bin-tool in docker container which can take around 10 minutes.

I have also noticed that when directory we are scanning have multiple file contains same product, CVEScanner perform unnecessary database IO and It can be performance bottleneck. So, I have short-circuited the flow in case product has already been scanned. This will save us significant time introduced due to redundant work. I have also fixed filename generation bugs mentioned by Harmandeep Singh. I have also reviewed PR of other contributors.

## What am I doing this week? 
I have some documentation part left to do and I am also going to improve tests for module I have created and will also go through entire code base and add appropriate *comments* and *docstrings* for new contributors in these last 2 weeks.
What the Commit!
Tags: actionshackathon, github, opensource, javascript
Published: 2020-08-19 12:59:42

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[What The Commit](https://github.com/marketplace/actions/what-the-commit) is a github action I created and it can be used in any github repository. I currently use it in the same repo I used to create the action. It changes the commit in the code and replaces it with a commit message from http://whatthecommit.com/

[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)


### Submission Category: 
Wacky Wildcards

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


### Yaml File or Link to Code
{% github dephraiim/whatthecommit-action no-readme %}

To use the action, **Add a workflow file** to your project (e.g. `.github/workflows/commit.yml`) with this:

   ```yml
   name: Prettify Commit

   on:
     push:
       branches:
         - main
         - master
     pull_request:
       branches:
         - main
         - master

   jobs:
     build:
       runs-on: ubuntu-latest
       steps:
         - uses: actions/checkout@v2
         - name: Use Node.js
           uses: actions/setup-node@v1
           with:
             node-version: '12.x'
         - name: Prettify Commit
           uses: dephraiim/whatthecommit-action@v1
   ```

### Info

Check out http://whatthecommit.com for the commit messages.

This action changes the commit messages which can create conflicts especially for repos with a lot of contributors. 

Projects Using the Action.
{% github dephraiim/whatthecommit-action no-readme %}
Suggestions for a certification or project that would increases my chances of getting into a great university?
Published: 2020-08-19 12:59:13

Hey Everyone, I am new to the Dev community and it's been great so far, I've been reading all these wonderful posts and it's great to see everyone contributing so much. I am a CS student, even thought I never intended to be one I have decided that this is what I would like to do. 
I have been figuring out lately on what I would stick to and I found myself completely confused because I realized I wanted to do a bit of everything that interests me, right from front end to being an AI Developer. I wouldn't really say I am great at coding but I'm getting there. 
I do not have any work exp yet and, have been thinking of taking the "AWS CERTIFIED ML SPECIALITY" to help increase my chances of getting into a great university, But I was wondering if there were any other certification or project that would really give me an edge and confidence to apply and get in. I've been working on all areas of my resume and I feel this is what I'm lacking in. I'm reaching out as I'm hoping to find some resources or work along on a project.
I am looking for someone who can help me.
Published: 2020-08-19 12:57:49

Hello, I want to cooperate with you. If you are interested in my offer, please contact me.
I am waiting for good news from you.
Please kindly find the document.
https://docs.google.com/document/d/1KvCai1vaA63YigXKZHEnT_BRmb43E7ai7BgKNQJL-DI/edit?usp=sharing
Coding Stats on your Github profile
Tags: actionshackathon
Published: 2020-08-19 12:30:54

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow

My use case was to show our coding stats from wakatime to our GitHub profile which is updated every day.
I created a [custom GitHub action](https://github.com/marketplace/actions/wakatime-coding-statistics)
Action Name: WakaTime Coding Statistics
Usage: 
`https://github.com/tariksahni/tariksahni`

[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)


### Submission Category:  Wacky Wildcards

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


### Yaml File or Link to Code

Action Link -> [Action](https://github.com/tariksahni/coding-stats-wakatime)

Action Name -> WakaTime Coding Statistics

Usage -> [Workflow yml file](https://github.com/tariksahni/tariksahni/blob/master/.github/workflows/update-graphs.yml)

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)


### Additional Resources / Info

This is a github action for those who uses Wakatime to track their coding activity. You can add the stats from wakatime in your github profile's README or any other repository.

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )

[Reminder]: # (Submissions are due on September 12th (11:59 PM PDT) and winners will be announced on September 23!)
Disable SSL certificate validation in Spring RestTemplate
Tags: java, security, ssl, codenewbie
Published: 2020-08-19 12:30:24

We often run into certificate issue while using Rest Template.

**RestTemplate can give any of the below error if SSL certificate of the target host is not valid :**

1. **PKIX path building failed** : sun.security.provider.certpath

2. **PKIX path building failed** : sun.security.provider.certpath.SunCertPathBuilderException : unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: PKIX path building failed
______________________________________________________________
**Reasons for invalid SSL certificate could be any of the below :**

1. Expired certificates.
2. Self-signed certificates.
3. Wrong host information in certificates.
4. Revoked certificates
5. Untrusted root of certificates.
______________________________________________________________
**How we deal with it in production and non-production environment ?**

In *production* environment, we usually add the required certificates to our application key-store, which allows us to make the HTTPS request successfully.

In *non production* environments, while developing an application, we often need to disable ssl certificate validation (self-signed, expired, non trusted root, etc) 
as we don’t want to go through the hassle of generating appropriate certificates and managing the key-store for testing purpose. 

So, We configure *RestTemplate* to disable SSL validation (non-prod environment), and thus trust all kind of certificates whether valid or not in Spring Boot RestTemplate and allow http requests to the hosts without throwing exception.

```
public RestTemplate restTemplate() 
                throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException {
    TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;

    SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom()
                    .loadTrustMaterial(null, acceptingTrustStrategy)
                    .build();

    SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);

    CloseableHttpClient httpClient = HttpClients.custom()
                    .setSSLSocketFactory(csf)
                    .build();

    HttpComponentsClientHttpRequestFactory requestFactory =
                    new HttpComponentsClientHttpRequestFactory();

    requestFactory.setHttpClient(httpClient);
    RestTemplate restTemplate = new RestTemplate(requestFactory);
    return restTemplate;
 }
```

> Note : Avoid SSL Validation for RestTemplate for development environment only. 

For production environment, we must do certificate management and SSL verification as disabling SSL verification might lead to security risks.
Rails 6 added Array#including/excluding and Enumerable#including/excluding
Tags: rails
Published: 2020-08-19 12:18:01

---
title: Rails 6 added Array#including/excluding and Enumerable#including/excluding
published: true
description: Rails 6 added Array#including/excluding and Enumerable#including/excluding
tags: rails
//cover_image: https://direct_url_to_image.jpg
---

[Rails 6 added Array#including/excluding and Enumerable#including/excluding](https://blog.bigbinary.com/2020/08/18/rails-6-adds-array-including-excluding-and-enumerable-including-excluding.html)
Eduthon:Hack for better Education
Tags: hacktoberfest, hackathon, development, education
Published: 2020-08-19 12:12:43

Greetings to the Developers and Hackers,

We have something exciting for you.


We are delighted to inform you that Axios, the technical society of IIIT Lucknow has devised **Eduthon**  - An Education Based Hackathon. Eduthon has been brought into existence to give those designing, building, and maintaining a built environment the opportunity to collaborate with cutting edge technologies and its developers and designers to hack for a better education. This year marks the first edition of EDUTHON, IIIT Lucknow presented by Axios sponsored by title sponsor GitHub and platform partner, Devfolio and powered by Equinox 2021.


The Hackathon shall take place from 4th-6th September 2020 virtually on Devfolio platform.

**Goal & Theme :**

The COVID-19 pandemic has affected educational systems worldwide, leading to the near-total closures of schools, universities and colleges. Most governments around the world have temporarily closed educational institutions in an attempt to contain the spread of COVID-19. The structure of schooling and learning, including teaching and assessment methodologies, was the first to be affected by these closures. The education sector is facing unprecedented challenges and needs to adapt and find solutions to keep children motivated and in their route to learning.  In this time of crisis, a well-rounded and effective educational practice is what is needed for the capacity-building of young minds. It will develop skills that will drive their employability, productivity, health, and well-being in the decades to come, and ensure the overall progress of India. To tackle the numerous issues that cross our minds on a daily basis we have chosen **Education** to be the theme of our hackathon.


**Challenges :**

- Mental Health
- Examinations
- Tools to support homeschooling
- Mobile-first education
- Tools for making learning visible
- Effect of coaching centres and tuition classes
- Find a challenge from your surroundings!

Register your application at https://eduthon.devfolio.co/ till 30th August, 2020.
For more information visit us at https://eduthon.tech/


"Let's find solutions faster than the virus spreads!”
Announcing my portfolio/blog website.
Tags: showdev, javascript, webdev
Published: 2020-08-19 12:12:39

Hello everyone!

I have recently built this blog/portfolio website using [11ty(eleventy)](https://www.11ty.dev/) .

You can check it out here on [siddhant.codes](https://siddhant.codes/). 

You can see the source code [here](https://github.com/siddhantk232/portfolio)

I have not added any social media links right now but I will add them soon. For now, you can follow me [here](https://twitter.com/siddhantk232) on twitter :)

# Assets used.
1. I got the illustration on the homepage from [pixeltrue](https://www.pixeltrue.com/free-illustrations). 
2. Fonts used are Luckiest Guy and Montserrat. Available from google fonts
3. For blogs, I have planned to use images from pexels or Unsplash. 
4. For code blocks, I used [prism.js](https://prismjs.com/) with the monokai theme. I am planning to create a custom gruvbox prism css as I did not find it on the internet.

Other than this I have also used some useful eleventy plugins for code blocks and image optimization which you can check out in the source code mentioned above.

# Things I am planning to add.

1. **comments section**. For this, I am thinking of using Github issues. So the plan is whatever you comment for a certain blog will be stored as a GitHub issue on my repo. I got this idea from [here](https://os.phil-opp.com/freestanding-rust-binary/)

2. **monthly newsletter**. I may use SendGrid for this as it is quite easy to use.

# Deployment
This project is hosted on netlify with a custom domain from name.com. Also, the SSL certificate is auto issued from netlify which is quite nice.

I would love to know what you guys think. Please share how I can improve this :)

Bye devs!
FIXED: Azure - Resource provider not registered for the subscription
Tags: azure, cloud, bots
Published: 2020-08-19 12:01:00

##The Problem
If you have been following any tutorial around creating bots on Azure, and you hit the weird roadblock that tells you;

```
Resource provider Microsoft.BotService not registered for the subscription
```

!['Resource Provider error'](https://github.com/bashirk/azure_webapp_node/raw/assets/Screenshot%202020-08-19%20at%2011.57.24%20AM.png)

Fret not, 'cause you have just stumbled on the fix!


##The Solution
Now, let us walk through the fix together. 

First off, head over to *Subscriptions* (you can search for this from the Azure [portal](https://portal.azure.com)), then you should select the specific *Subscription* that shows you that error.

Now that you're inside that subscription, search for **Resource Providers**. There would definitely be a lot of providers here, so just do a **filter by name** for ***Bot***, now should see the sneaky cause of the bug;

!['Microsoft.Bot'](https://dev-to-uploads.s3.amazonaws.com/i/r2zalil5ras1kvg6hhh3.png)

In my case, the Microsoft.BotService Request Provider already indicates *Registered* - and yes, I still see the bug. If it shows *Unregistered*, you do have to register the provider by clicking the *Register* button above the Request Provider. And if it already has a **Registered** green tick (like mine), what we both want to do here is unregister the provider, then register it again. That should work. Simple, innit?


##The Conclusion
And there you have your fix to the *Resource provider not registered bug*. This fix is the way to hard-refresh Request Providers in Azure, works for all Request Providers - not just the Microsoft Bot Service.
Daily Developer Jokes - Wednesday, Aug 19, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-08-19 12:00:03

---
title: "Daily Developer Jokes - Wednesday, Aug 19, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Aug%2019%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125896e0846.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why was the developer unhappy at their job?

___A:___ They wanted arrays.
 -->
LocalCoinSwap Launches First Multi-Custodial API
Tags: blockchain
Published: 2020-08-19 11:54:07

Just launched by LocalCoinSwap is an API that provides a range of features for developers looking to get involved with P2P trading of cryptocurrency.

Using the new API you can trade bitcoin (BTC) and Dash using custodial trading, while also allowing for non-custodial trading of bitcoin (BTC), ethereum (ETH), ERC-20 tokens, and Kusama (KSM).

**You can Grab Your API Token Over at:**
[LocalCoinSwap.com](https://localcoinswap.com)

**The [Docs](https://localcoinswap.com/api-docs/) Provide Examples for Using the API With:**
* Python
* Javascript
* cURL

**For More Information Check Out the Launch Announcement:** 
[LocalCoinSwap API: Relaunched & Refactored](https://blog.localcoinswap.com/localcoinswap-api-relaunched/)
Magento store audit
Tags: magento, audit
Published: 2020-08-19 11:51:12

Here are the steps need to be done to audit your website
- Magento performance audit
Make sure your website is speedy both on desktop and mobile. If you don’t focus on delivering the fastest user experience, Google may rank your competitors’ websites above your own. To accurately troubleshoot the issue of slow loading time,look at frontend performance, backend environment, and server-side elements. The most common factors that slow down ecommerce websites are fonts, images, JavaScript files, or poor custom code. Sometimes you might also need a better server to increase your website performance.
- Magento code review
Decrease the cost of software maintenance. Poor code quality makes websites expensive to maintain. When you need to add new features or integrate a third-party system, with poor code quality, you will face technical problems. The goal of the code review is to find mistakes overlooked in the previous development phase and improve the overall quality of the custom code. After you find the defects in code, fix them and test the functionality to make sure modifications in the code didn’t cause any new issues.
- Magento security audit
Prevent the risk of cyber-attacks and manage vulnerabilities. Check if your web servers got the latest patches and security software installed and if not, install it. Also control and limit the IP addresses that are allowed in your area, review all usernames and passwords on your site, and remove trading and customer data from a publically accessible web server. Read more https://elogic.co/services/magento-store-audit/
What Is the Next Step in Your Software Developer Career?
Tags: career, leadership, management, architecture
Published: 2020-08-19 11:51:11

You're working as a software developer for a few years and wonder what will be the next step in your career?

Let's review the different paths, the options you may choose to continue to progress and grow your impact.

The Technical Expert Path
-------------------------

You're interested in designing and mastering complex architectures, in teaching technical aspects to your teammates. You like to explain different designs, their pros/cons in the given context, and support solid tech decision making.

The technical expertise path could be a good fit! It leads you to design some larger systems by taking into account architecture, scalability, and security concerns.

The Lead Developer Path
-----------------------

You're interested in leading a technical team and animating this team to collaborate efficiently together. You like to organize the work and to follow the progress on your project. You enjoy making or supporting relevant technical trade-offs. The ones that balance well the business & technical aspects.

This lead dev path could be an excellent fit! It requires to balance strong technical leadership with an excellent team animation to make the project a success. If you wonder what aspects you need to work on to follow this path, I published an extensive article on [How to Become a Lead Developer?](https://www.nidup.io/blog/how-to-become-a-lead-developer)

The Engineering Manager Path
----------------------------

You're interested in mentoring your teammates and supporting the development team to grow its impact. The business attracts you, and you like to tie the business goals with the technical strategy. You enjoy thinking about team organization. You love to get involved in hiring, onboarding, and training.

The engineering manager path could be a great fit! It's a significant shift, almost a new career. It requires changing your focus from tech leadership to people leadership, to working a lot on communication and organizational topics. If you wonder what aspects you need to work on to follow this path, I published an extensive article on [How to Become an Engineering Manager?](https://www.nidup.io/blog/how-to-become-an-engineering-manager)

Last Thoughts
-------------

Each developer's journey is different; there is no one-size-fits-all. What matters is to choose a path that matches what you like to do and who you'd like to become.

Moving into a different position is, first and foremost, a choice. Once you've decided, you'd raise your chance to reach this role with proper preparation. Your current job already offers plenty of opportunities to train yourself, what matters is to identify them, and to be ready to catch them.

Do you envision any other paths to progress in your developer's career?
why are there so many programming languages when they all do the same thing?
Tags: discuss
Published: 2020-08-19 11:48:48

You want to code for android? You need to know java or kotlin
you want to code for ios? you need to know swift or objective c
you want to code for the web? you need to know php or js or ...

In order to code for multiple platforms, you need to learn so many languages when they all do similar things.

For example: 'print()' prints text to the console in java, swift and php.  It does the same thing everywhere. But its interpreted by different compilers.

Don't you think it would be great if we could cross compile our code to different platforms? Thanks
Develop, build, and run in a production like cluster
Tags: kubernetes, minikube, dockerdesktop, roost
Published: 2020-08-19 11:37:47

Because of environment and tools gap: When a service is moved to a staging or production environment, the service may behave in a different way. We might have to spend multiple dev cycles before we get to a stable version.

These differences can be close to zero if we can have a multi node cluster on the desktop. Or, we would have to run the code in dev or staging cluster with a different namespace. 

There are options like Minikube or Docker Desktop; they create a single node cluster on your desktop. But actual need is to have multi node production like environment.

##Roost
It creates a multi-node Kubernetes cluster on your desktop based on your system resources. It also provides a single click option to change cluster sizing, memory, CPU cap etc. as per your system or application requirements.

Check my video for details:
https://youtu.be/SGF4NGX0Jmw