teleren/devto huggingface dataset:
Achieving a Seamless User Experience with Refresh Token Inactivity Lifetimes
Tags: security
Published: 2021-04-08 16:20:27

## Summary

* Refresh tokens can be effectively used for maintaining a seamless user experience in browser-based apps without suffering the limitations imposed by ITP2
* Configuring absolute lifetimes for refresh tokens helps reduce the risk of using RTs in single-page applications
* Inactivity lifetime enables refresh token lifetimes to be extended as long as the end-user interacts with the client within the configured period, resulting in less end-user friction
* **Auth0 now provides both absolute and inactivity lifetimes for refresh tokens, along with more secure refresh token defaults, as of December 16, 2020** 

## Balancing Security and User Experience

Most businesses want to afford a friction-free experience for end-users when using their applications. Requiring people to manually enter credentials every time they visit a commerce site or open an app can yield frustration and hurt the business bottom line. A common request in business-to-consumer (B2C) industries is to only require users to log in once and then to never require them to log in again unless they are explicitly logged out, either by choice or necessity.

The practice of using long-lived refresh tokens paired with short-lived Access Tokens is a common solution to delivering an uninterrupted experience, particularly in native mobile apps. With additional security capabilities such as Refresh Token Rotation and Automatic Reuse Detection, refresh tokens can safely be used in Single Page Applications (SPAs) to afford continuous access on the web.

[Continue reading...](https://auth0.com/blog/achieving-a-seamless-user-experience-with-refresh-token-inactivity-lifetimes/?utm_source=content_synd&utm_medium=sc&utm_campaign=ux-refresh-token)
Live coding - Jekyll sites
Tags: jekyll, livecoding, beginners, livestream
Published: 2021-04-08 16:13:11

Hi fellow developers.

## Live coding

I've started giving coding sessions using YouTube live stream.

This weekend I'm doing a beginner-friendly session on **Jekyll** - a static site generator in the Jamstack area.

See the 1-hour event on Saturday a 3pm GMT+2.

https://youtu.be/6v5vEBUmkGs

I'll do a screenshare and cover some topics like how to convert a plain HTML theme into a Jekyll site. 

Plus I'll cover questions that come up in the live chatroom. Or if you have a question you want to add to this post so I can prepare it for that session.

## Samples of Jekyll

If you want to see what a basic Jekyll site looks like, I have samples, including links to the source code. They have has content as markdown and a configured theme.

https://michaelcurrin.github.io/jekyll-blog-demo/

Here's a GitHub portfolio site built with Jekyll:

https://michaelcurrin.github.io/


## How do I stream?

If you're interested in how to setup a live stream yourself, I wrote a short tutorial [here](https://michaelcurrin.github.io/coding-blog/2021/02/28/how-to-livestream-on-youtube.html) on my blog.
How to get SOC 2 Certified
Tags: security, compliance, soc2, rudderstack
Published: 2021-04-08 15:49:33

---
title: How to get SOC 2 Certified
published: true
description: SOC 2 is an audit conducted by third-party certified auditors who check an organization on five trust principles and is considered the Gold Standard for security compliance. 
tags: security, compliance, SOC2, RudderStack
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j577nmnr96d79evptvkb.jpeg
---
*cover image: [Ninad Chitnis, CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0)*

# What is Soc 2?

SOC 2 is an audit conducted by third-party certified auditors who check an organization on five trust principles and is considered the Gold Standard for security compliance. This audit process and certification is developed by the American Institute of CPAs (AICPA).

# Why should you get certified?

If you deal with highly sensitive customer data (such as financial companies), the SOC 2 certification makes your life easier and reduces your effort in auditing your company before buying. The certificate means that we follow industry-standard security compliance for your sensitive data.

# How did do you do it?

Obtaining SOC 2 certificate means ensuring each employee, as well as each piece of infrastructure, adheres to the guidelines as suggested by AICPA.

# The human side: training

At Rudderstack, we needed to get every single person on the team to have the knowledge necessary to maintain security.

To get started, each person from the RudderStack team (all of our teams - engineering, sales, marketing, content, etc.) completed online training with modules on security concepts, threats, best practices, and protocols. After each module, there were multiple-choice knowledge tests that we all had to pass.

Once the training was complete, each employee had to ensure their work machines and accounts were protected using antivirus software, password protectors, and two-factor authentication.

Finally, each RudderStack employee agreed to the terms and conditions for keeping all data secured.

# The Infrastructure

Securing the infrastructure of our production environment is crucial in obtaining the SOC 2 certification. The production environment cannot have public/unauthorized access, and access control is of ultimate importance.

To protect our production environment, we used Vanta agents that help monitor vulnerabilities on infrastructure machines.

After securing the machines, the next was code-level security. For GitHub and AWS access control, we enforced two-factor authentication.

The final task was to secure the communications. We secured our GSuite with two-factor authentication.

# What it means

To read about what this certification means for Rudderstack and our team, [read our full post on how we got there](https://rudderstack.com/blog/rudderstack-is-now-soc-2-certified-your-trust-is-our-treasure).
Preventing YAML parsing issues in Java
Tags: java, yaml, security
Published: 2021-04-08 15:45:25

YAML is a human-readable language to serialize data that’s commonly used for config files. The word YAML is an acronym for “YAML ain’t a markup language” and was first released in 2001. You can compare YAML to JSON or XML as all of them are text-based structured formats.

YAML files are often used to configure applications, application servers, or clusters. It is a very common format in Spring Boot applications and, of course, to configure Kubernetes. However, similarly to JSON and XML, you can use YAML to serialize and deserialize data.

Most importantly to note, manually importing YAML in your Java application with an outdated version of snakeyaml might get you into trouble.

For instance, do you have any idea what this code below does and how it can affect your Java application?

![yaml lol](https://thejavacafe.s3.amazonaws.com/uploads/articles/6wm7vl0ha3xbagwi060y.png)

[Read the full article](https://snyk.io/blog/java-yaml-parser-with-snakeyaml/) to understand what it does and how to prevent it in your Java application.
#CodepenChallenge Click: Subscribe Call to Action
Tags: codepen, react, javascript, showdev
Published: 2021-04-08 15:30:56

<p>A micro interaction of a subscription card. When clicked, the card will become a circle, and then a check mark will be drawn.</p>

<p>This time, I didn't make a separate function for the other functionality of a React component. All are just in a nested function.</p>

<p>I used GSAP to animate the elements.</p>

<p>The bell icon came from FontAwesome. I only used one icon from them this time.</p>

<p>I used the Open Sans font. I directly took it from the Assets part of this pen. Though, the font is uploaded on Google Fonts.</p>

{% codepen https://codepen.io/takaneichinose/pen/RwKLzEG %}
Liman 1.7 Sürüm Duyurusu
Published: 2021-04-08 15:21:21

HAVELSAN tarafından geliştirilmekte olan Liman MYS 1.7 sürümü 8 Nisan 2021 tarihinde Havelsan Açıklab Ekibi tarafından duyuruldu.

Değişim Günlüğü
-Command injection ve XSS gibi güvenlik açıklarına karşı önlem alındı.
-Kullanıcı giriş ekranına Captcha koruması eklendi.
-Kullanıcı giriş ekranında yanlış parola denemeleri için throttle eklendi.
-Form validasyon hatalarının kullanıcıya detaylı gösterilmesi sağlandı.
-Hata düzeltmeleri yapıldı.
-Build operasyonları Github Actions'a taşındı.

Kurulum için:

https://rehber.liman.dev/liman-kurulum/
Unbeatable Tic Tac Toe in C++
Tags: minmaxalgorithm, c, html, css
Published: 2021-04-08 15:10:45

---
title: Unbeatable Tic Tac Toe in C++
published: true
description: Create a unbeatable tic tac toe using min-max algorithm
tags: #MinMaxAlgorithm #C #HTML #CSS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9652oc9jro68hf5bv3ft.gif
---

What is a min-max algorithm?

Minimax is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for minimizing the possible loss for a worst-case scenario.

In this set, there are two players one is going to be the Winner **(Maximizer)** and the other is going to be the Loser **(Minimizer)**.

In our case, we want to create the computer that is always the winner so it is supposed to make the best move always?

How does the computer decide on the best move?

After the player has made its turn the computer simulates every possible move on the board. The computer assumes that the player will always make the worst move and reach the end case. 

```
If (Computer Wins) {
   return 10; // Winning moves gives 10
} else {
   return 0; // Losing moves gives 0
}
```

Every time we get 10 that's the move computer is going to make in order to win.

There can be multiple 10 values then what to choose?

Let's say we have a value called "DEPTH" - which tells you how fast the computer is going to win. 

Suppose 2 moves, Depth = 2;

```
If (Computer Wins) {
   return 10 - Depth(2); //  Distinct values
} else {
   return 0; // Losing moves gives 0
}
```

Now the values will become distinct and the computer will always make the move where it gets the highest value after subtracting the depth.

Watch my youtube video on Biased Dice UI.

{% youtube ln8Qoo_MYwo %}

Unbeatable Tic Tac Toe code available at 

{% github salRoid/UnbeatableTicTacToe %}
First open source implementation of the Google Zanzibar
Tags: opensource, security, cloud, github
Published: 2021-04-08 15:09:31

Hey,

I just wanted to show you our open source implementation of the Google Zanzibar paper.
We just released the first working version:

https://github.com/ory/keto/releases/tag/v0.6.0-alpha.1

We spent a lot of time and effort to read, learn, and analyse the paper (https://research.google/pubs/pub48190/) and the release brings that all together.

There are still many things missing, but with a great community we hope to build the “Kubernetes” of permissions and access control!

I quote a bit from the paper to make clear what Ory Keto is:
"Determining whether online users are authorized to access digital objects is central to preserving privacy. [...]. Zanzibar provides a uniform data model and configuration language for expressing a wide range of access control policies from hundreds of client services at Google, including Calendar, Cloud, Drive, Maps, Photos, and YouTube. Its authorization decisions respect causal ordering of user actions and thus provide external consistency amid changes to access control lists and object contents. Zanzibar scales to trillions of access control lists and millions of authorization requests per second to support services used by billions of people. It has maintained 95th-percentile latency of less than 10 milliseconds and availability of greater than 99.999% over 3 years of production use."

If you have any questions, I am happy to answer them.
Developer Marketing does not exist with Adam Duvander
Tags: devrel, podcast
Published: 2021-04-08 15:09:02

**Theme of the week:**
*Does developer marketing exist?*

I know what you are thinking: what kind of a question is that?
Especially after 30 podcast episodes under that title!
You are right. Developer marketing does exist and is in fact the great challenge and mystery we are trying to explore in this podcast series.

The question is inspired by today's guest Adam Duvander., who makes a valid argument:
What we do, in our effort to empower and help developers move forward is not really "marketing". And that's a valid point.
Adam Duvander joined us and we discussed:

* Developer marketing
* Why developer marketing is not marketing and what he loves most about it
* His biggest challenge
* Designing a developer marketing strategy
* Content
* Community
* Events and more!

Listen to this episode to better understand developer marketing:

{% spotify spotify:episode:09Pxx2onmXbEfHxVkGsPwI %}

**Let’s talk Data**
This is the graph we discuss with Adam: [How developer program leaders segment their audience](https://www.devrelx.com/trends?lightbox=comp-kisqhm6d3__item-kisqtq21_runtime_dataItem-kisqhm6e). 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01hiyelnoxt66rru6my6.jpg)

**Adam Duvander** helps developers be productive and creative. Call it "developer marketing" if you must, he works with the best developer-focused companies through his consulting practice. He has held full-time roles at API juggernauts Zapier, SendGrid, and ProgrammableWeb (where he served as the first editor). Before that, he wrote the book on map scripting and covered developer topics for Wired.
Mortgage Calculator Python
Tags: python, programming, codeacademy, mortgage
Published: 2021-04-08 15:06:04

I've done this portfolio project in Computer Science course CodeAcademy

### **Project Objectives:**

- Build a terminal program using Python
- Add at least one interactive feature using `input()`
- Use Git version control
- Use the command line and file navigation
- Write a technical blog post on the project

I've chosen to build Mortgage Calculator. It's not so fun but pretty useful.

### Functionality of the terminal program

Take user's input:

- Duration of loan programm
- Loan Amount
- Interest Rate per year

Mortgage calculation Implementation

Output:

- Total Monthly Payment
- Total Interest Paid
- Total of n-months Payments
- Show monthly amortization table.

### Work on the project consists of three parts:

1. Project Brainstorming
2. Exploring subject area
3. Program implementation


The project have been implemented in two versions. With python packages and without it.

In the **first version** I use [numpy_financial](https://pypi.org/project/numpy-financial/) 1.0.0 package. It contains a collection of elementary financial functions. In particular pmt() function that computes the payment against loan principal plus interest (a monthly mortgage payment). As well as ipmt() and ppmt(). The interest portion of monthly payment and the payment against loan principal. This two functions return an array of Interest/principal portion of payment  for every month.

The total payment is made up of payment against principal plus interest.

pmt = ppmt + ipmt

The **second version** uses mortgage formula for calculating monthly payment.

Code consists three parts:

- Variables-Input part
- Functions part
- Output part

In Functions part we have paidEveryMonth(interestRate, months, borrowed): 
```
def paidEveryMonth(interestRate, months, borrowed):             #fixed monthly payment
    return (borrowed * true_rate * ((true_rate + 1)**months)) / ((true_rate + 1)**months - 1)#Mortgage formula
```

There is the logic of the Mortgage function:

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

def fullReport(total_pem, borrowed) function forms monthly amortization table. 
```
def fullReport(total_pem, borrowed):
    print("||||||||||||||||||||||||||||||||||||||||")
    print("MONTH -> P&I   " + "= PRINCIPAL + INTEREST| PRINCIPAL REMAINING")
    fmt = '{0:2d} -> {4:8.2f} = {1:8.2f} + {2:8.2f} | {3:8.2f}' # Format our table
    for index in range(1, months + 1):                          #for every month
        interest = borrowed * interestRate / 12                 #interest to the end of the month
        principal = total_pem - interest                        #principal repayment
        borrowed -= principal                                   #balance      
        print(fmt.format(index, principal, interest, borrowed, total_pem))
```
A link to my code on [GitHub](https://github.com/zibiv/Mortgage_project).
Learn how to add a simple dark/light mode switcher!
Published: 2021-04-08 15:03:56

Don't forget to subscribe to my YouTube channel! https://www.youtube.com/channel/UCFzeA3xC-_i4ZT-XwcwsJxQ/featured

```HTML

<!DOCTYPE html>
<html>
<head>
	<title>Light/Dark mode</title>
</head>
<body>
<header>
	<label id="dark-change"></label>

<style>
body {
	margin: 0;
	padding: 0;
	font-family: sans-serif;
}
main {
	margin: Svh 15%;
		align-content: center;
	align-items: center;
}
h1 {
	font-size: 40px;
	font-weight: 400;
	text-align: center;
}
img {
	width: 50%;
	height: auto;
}
p {
	text-align: justify;
	font-size: 18px;
}
label {
	position: absolute;
	width: 45px;
	height: 22px;
	right: 20px;
	top: 20px;
	border: 2px solid;
	border-radius: 20px;
}
label:before {
	position: absolute;
	content: "";
	width: 20px;
	height: 20px;
	left: 1px;
	top: 1px;
	border-radius: 50%;
	cursor: pointer;
	background: #000;
	transition: 0.4s;
}
label.active:before {
	left: 24px;
	background: #fff;
}
body.night {
	background: #000;
	color: #fff;
	transition: 0.5s;
}
</style>
</header>
<main>
	<h1>Easy Light/Dark mode</h1>
	<div id="respon">
		<img src="https://www.universityofcalifornia.edu/sites/default/files/night-sky-purple.jpg">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec malesuada tortor. Ut pharetra, velit ut facilisis scelerisque, tortor ligula imperdiet metus, et ultrices nisi erat at enim. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vestibulum et erat in ultricies. Vivamus id nulla elementum, sagittis felis id, aliquet ligula.</p>
	</div>
</main>
<script>
var content = document.getElementsByTagName('body')[0];
var darkMode = document.getElementById('dark-change');
darkMode.addEventListener('click', function() {
		darkMode.classList.toggle('active');
		content.classList.toggle('night');
})
</script>
</body>
</html>
How to Create a React.JS Application
Tags: react, createreactapp, javascript
Published: 2021-04-08 14:59:16

Want to set up a local development environment for React.JS? Then this is the blog for you.

This blog is for MAC and WINDOWS users.

# Here are the steps:

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

# 1. Checking whether Node.JS is up-to-date

First, open your terminal and type <code>node --version</code>:

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

Check if it Matches with the Node.JS <a href="https://nodejs.org">website</a>:

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

# 2. Install Visual Studio Code

For this tutorial, I will be downloading Visual Studio Code because it is much easier to develop React Applications. If you would like to use another text editor, feel free to do so.

Head over to <a target="_blank" href="https://code.visualstudio.com"> Visual Studio Code's </a> website and choose the operating system that you use

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

Then, wait for some time for the ZIP file to download.

After the ZIP file is completed downloading, double click on it.

It will take a couple of seconds to do so.

After that, Drag VSCode to your Applications Folder.

# 3. Using <code>create-react-app</code>

Open a terminal and type the following:

```CLI
$ npx create-react-app my-app
```

This will take a few minutes, so grab a cup of tea or coffee :)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2i6bw6wqlnhmme7amphi.png)

If it is successful, you should get an image like this. If not, comment down in this blog post.

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

Then, <code>cd</code> into the directory by using:

```cli
$ cd my-app
```
Now, open it in VSCode by using

```cli
$ code .
```

It should look something like this:

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

Then, use the command

```cli
$ npm start
```

You should get something like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9gjd9om8idwz4qkxf5qo.png)

Finally, Open <code>localhost:3000</code> in your browser and VOILA, it opens:

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

As the page says, if you want to write your own react code, edit the <code>src/App.js</code> file.

Thanks for reading the blog.

And remember...

# Keep Coding Y'All 👨🏻‍💻
Learn Front End Easy And Fast By Watching This!
Tags: html, css, javascript, youtube
Published: 2021-04-08 14:44:43

Hello! If you want to learn Front End you can watch this YouTube channel:https://www.youtube.com/channel/UCFzeA3xC-_i4ZT-XwcwsJxQ/featured
Don't forget to subscribe! A new video every week!
SharePoint 2019 Pre-Migration Check
Tags: sharepoint, migration
Published: 2021-04-08 11:32:37

**Get Your Free Copy Now! https://bit.ly/3t0pjEl**

There are several reasons why you should migrate to SharePoint 2019. It introduces modern user experience, team sites, communication site improvements, OneDrive, as well as improved support for business processes. But upgrading to SharePoint 2019 can be daunting if you do not have the correct migration plan in place. Additionally, migrating from an older version of SharePoint to SharePoint 2019 can be a difficult process and can even end up damaging your company’s data in many ways. 

This is why our SharePoint experts have developed a pre-migration checklist to help you understand the process for a smooth and error-free migration.

##What you will get from the report:

* Get the summary of content size and item count
* Analyze all your data intended for migration
* Find out potential migration complexities
* Ensure a seamless migration process
Azure function: app setting"WEBSITE_RUN_FROM_PACKAGE" to the rescue!
Tags: azure, azurefunctions, iac, arm
Published: 2021-04-08 14:44:42

Recently came across a scenario, Azure function .netcore package files went missing after redeploying the underlying infra using `arm template`.

Root cause analysis discovered that when redeploying the underlying infra using `arm template`, it will clear out `wwwroot` folder in azure function.

To prevent the `wwwroot` folder from being emptied out, just need to add an app setting!
```
WEBSITE_RUN_FROM_PACKAGE: 1
```
Running java programs from the terminal
Published: 2021-04-08 14:39:38

Here's a few basic commands for executing standalone java programs.
I have been a Java developer for almost 5 years but I rarely execute Java programs from command line and am not very fluent at it. I just thought I'll note it down here for myself and others.


### Compiling a java class
```console
javac -cp /project/classes -d /project/classes /path/to/File.java
```
-cp -> classpath - path where other compiled dependencies are present.
-d -> destination of the generated .class(bytecode) file from the operation.

### Executing the program
```console
java -cp /project/classes ClassFileName(or package.ClassFileName) 
     arg1 arg2 ...
```
package.ClassFileName is required if the classpath contains sub-folder structure.
From **Java 11**, you can also specify a single source file and compilation and execution can be done in a single command. 
**This will not generate a .class file.**
**This works only if the source file contains all the source and does not require other compiled classes to run.** E.g. a typical Hello world scenario
```console
java /path/to/package/ClassFileName arg1 arg2 ...
```

### Creating javadoc
```console
javadoc -d /documentation/path 
        -sourcepath /path/to/java/files
        -subpackages /path/to/root/package
```