teleren/devto huggingface dataset:
Scheduling automated deletion of AWS Cloudformation stacks

Tags: aws, automation, typescript, cdk
Published: 2021-10-23 08:30:42

_Article preview: the full article can be found [here](https://medium.com/capmo-stories/scheduling-automated-deletion-of-aws-cloudformation-stacks-bffd58ec4cd7)._

When developers within a team are working on a feature, they are often faced with the situation that each developer is trying to work on a certain aspect of the feature that requires a different version of the infrastructure than we’ve deployed via a Cloudformation(CF) stack, be it an ECS(Elastic Container Service) cluster with multiple task definitions, or when using any other service provided by AWS.

We at Capmo also ran into a similar situation within our teams. The challenge was not the multiple versions of our infrastructure being deployed: It was how were we going to manage the clean up of the Cloudformation stacks once their work is done. That’s when the idea of auto-deleting the CF stacks came up. After doing some research on our side, we found out that the benefit of owning a piece of infrastructure stack for testing a feature makes the process more agile, flexible and reduces any dependency that might arise when subsequent infrastructure deployments take place, overwriting the previous version of the deployment.

Since our infrastructure deployments are taken care of by CDK, we wanted to have a solution in place which we can integrate with our existing Cloudformation stacks without any hassle. So we decided to package our solution that can be used in all our microservices if needed. And also with the possibility of making it open-source at some point in the future.

### Automating deletion of Cloudformation stacks
Now that we knew what we wanted, the question was how to build the solution. We would need a trigger that would initiate the auto-deletion of the Cloudformation stack. This can be achieved with the help of an event, for which we used an EventBridge rule. EventBridge rules have the ability to match an event pattern and trigger its targets. The target of choice was a Lambda function that would initiate the auto-deletion sequence. A serverless solution was a clear answer to this as it makes write and deploy easier, with no effort of managing the deployed resources. All of this was deployed within the same Cloudformation stack that we wanted to delete. Now let’s dig deeper into how we implemented this.

To read on, the full article is published on our [engineering blog](https://medium.com/capmo-stories/scheduling-automated-deletion-of-aws-cloudformation-stacks-bffd58ec4cd7).
Privacy & Personalization
Tags: privacy, dataprotection, personalization, data
Published: 2021-10-23 09:14:54

I think Privacy and Personalization could not go together. If we want a personalized experience, we need to sacrifice our privacy. Although I am an advocate of Privacy & data protection, I think we need to redefine personalization while protecting our data & privacy from any possible threat. We need to give more value & importance to our privacy.
Day 38/100 Build a Space
Tags: 100daysofcode, programming, 100daychallenge, challenge
Published: 2021-10-23 09:02:22

As for the design system is already done. Proceeding to the main challenge seems to be intimidating but venturing on new ways to learn is helpful.

![build a space](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bsu7xx4hus0hit6jr8lg.png)
4 Different Ways to Create High Quality Backlinks
Tags: guide
Published: 2021-10-23 08:53:54

There are several ways to <a href="https://www.blogtriggers.com/2021/06/create-high-quality-backlinks-in-website.html">Create High Quality Backlinks</a>, so you may wonder which is the best way to optimize the incoming flow of targeted visitors. Creating a good amount of backlinks can be a very costly affair, so you want to make sure you’re using the right tools and methods for your type of businesses. <b>Here are four different ways to create high quality backlinks</b>:

<h2>1) Write Guest Posts in High DA & PA Website</h2>
Write Guest Posts in High DA & PA Website is one of the best SEO technic that you can use to optimize your on page SEO elements on your website. Search engine love article with high quality writing that is relevant to the target keywords.

<h2>2) Add Helpful Comment on Other Blogs</h2>
One way to improve traffic on your blogs is by commenting on other blogs related related to your niche. This helps because other people will come to your blog to read your comment and they may become a reader. It may also helps you to build a good relationship with the blog owner and an exchange of link/backlinks 

<h2>3) Request backlinks Through Email OutReach</h2>
The best way to get quality links through email outreach is to find sites that cover your topic and then reach out to them making sure that you mention something unique about their content. This could either be something relevant or interesting that you found on their blog, a lesson that you learned from someone they featured, or it could be a unique way in which you found them and wanted to share it with them.

<h2>4) Answer all Questions in Different Platforms like Quora</h2>
Do you find it difficult to answer all questions in different platforms? I mean, Quora is a nice platform to get direct traffic from because it has a good domain authority. If you're willing to invest time in answering questions, you can utilize this platform to create high quality backlinks for your website.

Creating High Quality Backlinks in <a href="https://www.blogtriggers.com/2021/05/full-seo-guide-for-beginners.html">SEO</a> will Increase your site ranking in google search.
First Hacktoberfest and open source contributionand ,How I am start 
Tags: hacktoberfest, beginners, opensource, showdev
Published: 2021-10-23 08:50:04

#How I started open source
This is started 3 months ago when I was watching a video on YouTube by Kunal Kushwaha and Eddie Jaoude They talked about open source and how a college student start contributing to open source.
If you are beginner and want to start contribute to open source then you have to join any organization. There you will get step by step guidance about how to get started.and it's help you to grow in this field.

I was started my First time  contribution in EddieHub organization repository after that some day I listen about hacktoberfest before this I don't have any idea about Hacktoberfest then I starts asking question in community and search on google about this.

Hacktoberfest is a month-long celebration of open-source software by DigitalOcean that encourages participation in giving back to the open-source community. Developers get involved by completing pull requests, participating in events, and donating to open source projects. During this event, anyone can support open source by contributing changes and earn limited-edition swag.

This is the beginner friendly so any can participate no matter you are a coder pro level coder or a newbie even you can start by contributing in documentation.

###every participation get the existing Gift.

Here, I also provide the Link of the hacktoberfest.
#[Hacktoberfest](https://hacktoberfest.digitalocean.com/)
.
.
.
###Conclusion
####I hope you found this article useful, if you need any help please let me know in the comment section.💯
How to find length of an Object in Vue.js
Tags: beginners, codenewbie, javascript, webdev
Published: 2021-10-23 08:45:25

Hello artisan! 

In today’s blog post we will see how to find length of an object in vue.js

Object.keys(variable-name).length

In the above example variable-name is the name of the variable of which we want find the length.

Thank you for reading
:unicorn:
:heart:

Happy Reading…
Install apache2 on ubuntu and configure user home as webroot
Published: 2021-10-23 08:37:12

### Step 1: Install apache2 server on ubuntu server
```
sudo apt update
sudo apt install -y apache2
```
### Step 2: Add user to the ubuntu server.
```
sudo adduser <username>
```
### Step 3: add below line at `/etc/apache2/apache2.conf`
```
<Directory /home/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
```
Example file
```
DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>
<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>
<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>
<Directory /home/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
```

### Step 4: Update the default virtual host of the apache2 `/etc/apache2/sites-available/000-default.conf`.
Update the `DocumentRoot /home/<username>/`

### Step 5: Restart the apache2 server.
```
sudo systemctl restart apache2
```
Additional steps to enable basic authentication, here your username: `admin` and password: `gotechnies`.
```
htpasswd -cbs /etc/global.htpasswd admin gotechnies
```

Update the virtual host file `/etc/apache2/sites-available/000-default.conf`

```
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /home/arvind/

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	<Directory "/home/username">
        AuthType Basic
        AuthName "Restricted Content"
        AuthUserFile /etc/global.htpasswd 
        Require valid-user
    </Directory>
</VirtualHost>
```

Restart the apache2 server.
```
sudo systemctl restart apache2
```
By-products as products
Tags: beginners, codenewbie, coding, decodingcoding
Published: 2021-10-23 08:05:43

---
title: By-products as products
published: true
description: What if the mini-projects that I made while learning to code can become products in themselves?
tags: beginners, codenewbies, coding, decodingcoding
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x6zdv6w58d5s4klkxm82.jpg
---

### *What if the mini-projects that I made while learning to code can become products in themselves?*

---

I got an idea. Since I’m learning to code, what if the mini-projects that I made along the way can become products in themselves? 

Usually these class projects—a to-do app, a shopping cart, a blog, etc— are byproducts or throughputs which don’t do anything much after you completed the lesson. In and of themselves, yeah, they are not much, to be honest. Not good enough to be products in themselves. But with a bit of polish and finding the right use case, it just might. 

Case in point: I was learning Vue, and I love how easy it is to use it. At it’s simplest,  you just copy-paste a Vue script into your HTML page, and you can already start building out sleek user interface features. Vue can be used for prototyping in the browser, so there’s a lot of interactivity you can do with it. With data-binding, it’s also great at handling animations, interactive graphics.

I was browsing Vue on Codepen when I found a calculator made using Vue, and that got me thinking, what if I made some customizations and embedded this in my [Carrd](https://carrd.co) sites? Wouldn’t that extend the functionality of Carrd sites by multiple factors? I always liked making functional Carrd sites that work a bit more like ***mini web apps*** than the static landing pages that Carrd is usually used for.

So imagine not just calculators but animated graphics, charts, date picker calendar, timers. Imagine if I made these things for practice learning, but also sold them as little code snippets for Carrd site owners who don’t code, to add a little bit of extra functionality to their Carrd sites. Wouldn’t that be awesome? 

Byproducts as micro-products in themselves. Throughputs becoming outputs. Just like how in nature, every byproduct from one organism is actually an input for another organism. Shed leaves become organic material for other bacteria and fungi to break down. Fallen logs are homes for countless insects. There is no waste in nature. 

So why not for coding?!

---

Follow my daily writings on [Lifelog](https://golifelog.com/goals/30), where I write about learning to code, goals, productivity, indie hacking and tech for good.
Kubernate: generate k8s YAMLs with code
Tags: kubernetes, typescript, devops, opensource
Published: 2021-10-23 07:37:48

![Kubernate Simple deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44b3ax1ff5ukp2awd9sp.png)

So what is Kubernate?

Think of it as a mix between Helm and Pulumi. It is a library that is used to generate Kubernetes YAML files with ease. Think like Helm but with actual code instead of templates. You have the power to generate anything you want while using any kind of input you want. Everything is evaluated at "build" time and the output is 100% static valid Kubernetes YAML. You also get to leverage the tooling built for Typescript (which is actually very good) while building and DEBUGGING your deployments. You can also publish "libraries" built with Kubernate to NPM and other Kubernate-based projects can use them as building blocks.

There is no programming model to speak of :) just write code and use it. In the end, the tool runs the code :) You can even skip this step and just build the Typescript into javascript and run it with Node. You can even make your own app on top of Kubernate to manage your deployments.

It is written in Typescript and it is very easy to use. It is also very easy to learn and understand. Everything is typed! Just follow the IntelliSense.

Checkout the [Github repo](https://github.com/laurci/kubernate) or the [homepage](https://kubernate.dev/?utm_source=devtopost) for more.

You can join our Discord Community server (https://discord.gg/4mzndma4SN) to get new updates about development and also talk to the contributors for any questions you might have :)
Python for Finance - a NEW course live on Sololearn!
Tags: python
Published: 2021-10-23 07:37:13

Why did we launch Python for Finance?

Coding is moving into new disciplines and Sololearn is bridging two fundamentally different curves to meet the demand of the future. The finance industry is in need of a technological overhaul, and it’s time to revolutionize it with your coding skills!

Our Python for Finance course will teach you how to solve real-world financial problems and perform calculations, all while learning how to integrate coding into finance. The course will teach you data scraping and manipulation and how to plot charts and data using Python. 

If you’ve completed Beginner Python, this course is for you. You’ll need the skills you learned to  complete this course.
Hacktoberfest #4
Tags: hacktoberfest, opensource
Published: 2021-10-23 07:25:01

The last PR that I have contribute is [ChatSociety](https://github.com/swapnilsparsh/ChatSociety) & [PR](https://github.com/swapnilsparsh/ChatSociety/pull/14). The ChatSociety is simple chat application that user can join and have communication like Discord channel and Slack room. The [issue](https://github.com/swapnilsparsh/ChatSociety/issues/13) is the scroll-view on holds very top of message even there are new message on the bottom when user joins the chat room after log-in 
![issue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1h7pq9emljwa6nu0vi28.PNG)

This issue is very familiar to me because I have chance to use React and Hook on the [Hacktoberfest#1](https://dev.to/mkim219/hacktoberfest-1-m88). As soon as I reviewed the code, there is no `useEffect` for controlling scroll-view side-effects in functional components like `componentDidMount` and `componentDidUpdate` in React class. But the project maintainer has created `useRef` called `dummy` for updating the scroll-view when user enter the new message. Therefore instead of having duplicate code for same functionality. I have create a function called `scrollToBottom` which scroll to bottom with smooth animation. I have placed `scrollToBottom` function inside of `useEffect` and replace `ScrollToBottom` to `SendMessage` function where the update scroll-view when user enters the new message.

![Issue-After](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dikne0b2kdwqcpdr5yx5.gif)

[Sample Site](chatsociety.netlify.app)

All the processes of fixing the issue are very straightforward. The only part that I have little stuck is how to implement auto scroll to bottom of the page.  It is always good practice that research on the Mozilla MDN website first if I have concern with JavaScript.

After I have done 4 pull requests during the Hacktoberfest, it is kind of sad that I only used React, JavaScript, HTML, and CSS. There are many open-source project written with Python and other programming language. I intended to join the open-source project that involves web development because I want to focus on web. Next year I would like to learn different languages and challenge myself to join open-source project.
Lead: This code is shit. Unpopular opinion: it's not.
Tags: leadership, codequality, codereview, discuss
Published: 2021-10-23 07:24:31

##Really.
Have you said this before? Don't talk like that to a developer: in a code review or, pair programming, or help resolve a bug, etc.
Don't get me wrong, I know many people are gonna say: "yeah but look at it! I mean, this is too much".
I'm saying that because, saying code is shit is not helping. We developers tends to appropriate our code. We should not. It's your company's code. Even you are an independent, you have to depersonalize it. I think the best way to modify code is to consider it is not our own. The more you think like that, the more you will be open minded to find solutions.


##Saying it's shit, doesn't do good.
You know, be kind with others. As a lead, don't forget that what you're saying has an impact on people mindset. If you're saying a code is shit, you are maybe hurting someone. Saying shit don't help the person who wrote it. Saying that we can write in other way helps because it's faster, more open, etc.


##Empathy
If you're saying "your code", "the code is shit", you're just making yourself and people have a bad day. The developer may asking himself a lot of questions, feel bad, etc. And for you, because you don't want to do that all day long, it's put you on a bad mindset - and it's exhausting.


And remember, as a lead you're here to help. Ask yourself that question: what do you want in your day? Helping the team, the project or judging things?
So please, help yourself and others. Be kind ;-)
POSTMAN | API Testing with Post Man | Test Get Post Put Delete requests.
Tags: postman, restapi, api, begi
Published: 2021-10-23 07:12:04

POSTMAN | API Testing with Post Man | Test Get Post Put Delete requests.

* What is PostMan ? 

* Installation of PostMan

* API testing with PostMan 

* Creating Collection of requests and reuse them. 



{%youtube YhTIFI7UzyM%}
What is PKCE?
Tags: auth, pkce, oauth2
Published: 2021-10-23 07:04:13

PKCE or Proof Key Code Exchange (often pronounced "Pixie") is an acronym you may have seen around when looking into how to authenticate users in modern web apps.  

_So what is PKCE?_
PKCE is an extension to the Authorization Code Flow grant that is part of the OAuth 2.0 spec. The problem that PKCE solves is that native mobile applications and Single Page web apps are not able to securely store a client secret in order to prove it's identity. 

_What problem are we solving by ensuring that a client can prove it's identity?_ 
The problem is with the way that Authorization Code Flow works. It works by: 
1. The Client Application redirecting the user to the Authentication Server
2. The user logs into the Authentication Server
3. The user is redirected back to the Client Application with a code as a query parameter
4. The Client Application sending a POST request to the Authentication Server with the code. 
5. The Authentication Server responding with an Identity Token an optionally an Access Token and Refresh Token. 

_So where is the problem?_ 
The problem is that anyone who gets the code from that query string can exchange it for tokens. 

_And how does PKCE address this?_ 
PKCE adds an extra parameter into both the initial redirect and the code exchange POST request. This request takes the form of a challenge in the initial call and a verifier in the subsequent one. The verifier is a string of randomly generated characters. The challenge is a SHA 256 hash (Base64 Url Encoded) of the verifier. The Authorization Server receives the challenge with the initial login request and stores the challenge along side the code. When the request comes in to exchange that code the for a token the original verifier string must be sent along with the request. The Authorization Server then performs the same hashing function on the verifier that has been passed by the client. If the generated hash matches then the challenge sent in the initial request server returns the tokens, otherwise the request is rejected. 

This means that by using PKCE the client provides a Key that can be used as Proof that it was the requester of the authentication during the Code Exchange. 

_How do you implement PKCE?_
I plan to post a follow up to this with code examples of how to implement the client side of of PKCE. That is really just for anyone who is interested in how it works under the hood. 
The reality, like anything in Identity and Security, you should use a library to take care of it for you. [Auth0](https://a0.to/signup-for-auth0) provide fantastic and easy to use libraries that are known to work.
#Solved - ValueError: The field admin.LogEntry.user was declared with a lazy reference.
Tags: django, abstractuser, migrations, migrate
Published: 2021-10-23 06:53:23

**Here is the error happened when we want to try Abstract User model in the middle of the project**

Here is the Error look like 👁
```bash
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'core.user', but app 'core' doesn't provide model 'user'.
```

We have to remove all migrations from our project by

```bash
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
```

```bash
find . -path "*/migrations/*.pyc"  -delete
```

Then delete the database.Then run migrations & migrate again.

```py
python manage.py makemigrations 
python manage.py migrate
```   
👊 Voila problem **Solved..**