teleren/devto huggingface dataset:
Workflows Tips #9 – Control Flow Execution, Avoid Case Sensitive Errors, and Using Lookup Table
Tags: nocode, oktaworkflows, okta, automation
Published: 2022-08-18 20:37:00

Welcome to another Okta Workflows Tips post. [Read](https://dev.to/oktaworkflows/okta-workflows-tips-57bj) all other tips.

> These tips come from [Ylan Muller](https://www.linkedin.com/in/ylanmuller/), an avid Okta admin and certified consultant, member of the [MacAdmins Slack Community](https://www.macadmins.org), and the IT Manager at [FireHydrant](https://firehydrant.com/).

In this post:

- Use Return card to control workflow execution
- Normalize inputs to avoid case sensitive errors
- Convert one value to another using a lookup table

## Use Return card to control workflow execution

When building out a workflow and testing, you may want to stop the workflow before all steps are processed to isolate your testing to specific sets of cards. Add a **Flow**  **Control – Return** card after the point you want to test to stop the flow from processing.

For example in the flow below, the execution will stop at **Flow Control – Return** card. This allows to test cards before it ( **Okta Clear User Sessions** and **Okta – Reset Password** ) without finishing the entire flow execution.

[![Using Return card to control flow execution](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_flowcontrol_return-1.png?w=1024)](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_flowcontrol_return-1.png)<figcaption>Using Return card to control flow execution</figcaption>


## Normalize inputs to avoid case sensitive errors

When building bots in Slack or for other tools where conditions may be case-sensitive, use cards like the **Text – To Lower Case** before passing the user input into the conditions in your Okta workflow to avoid failures based on case sensitivity. 

[![Using To Lower Case to standardize inputs](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_inputs_to_lower_case.png?w=1024)](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_inputs_to_lower_case.png)<figcaption>Using To Lower Case to standardize inputs</figcaption>


## Convert one value to another using a lookup table

Use **Branching – Lookup** up card to convert a value in your workflow to one that can be processed by a downstream tool. An example of where you might use this is with converting values for use with Jira single-select lists, which are identified using an ID:

[![Using Branching – Lookup card to convert values](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_lookup_table.png?w=867)](https://katzmax.files.wordpress.com/2022/02/workflows_tips9_lookup_table.png)<figcaption>Using Branching – Lookup card to convert values</figcaption>


That’s all for now. Let me know if you have any tips you would like to share.

Thanks to [Ylan Muller](https://www.linkedin.com/in/ylanmuller/) for these great tips!

🍉 Try this step-by-step getting started tutorial: [Build Your First Automation With Okta Workflows: Notify When User Is Suspended](https://dev.to/maxkatz/build-your-first-automation-with-okta-workflows-notify-when-user-is-suspended-1l3p-temp-slug-2933517).
Amazon Halo View fitness tracker review
Tags: amazon, halo, fitness, tracker
Published: 2022-08-18 20:35:04

We are going to have an Amazon Halo View fitness tracker review today. It is a must-have product for everyone who likes bands on their wrists. Halo can assist you in better understanding, measuring, and enhancing your movement health over time, whether you’re exercising or simply going about your daily activities.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pplmxlisavzxyjak7o02.png)

Read more at: https://hecodesit.com/amazon-halo-view-fitness-tracker-review/
Understanding the React useState Hook
Tags: javascript, react, webdev, tutorial
Published: 2022-08-18 20:12:00

Before understanding what is a react `useState` hook, let us first know what is a hook?


**What is a hook?**
Hooks are a feature of react which allows us to use state and other React features without writing a class. React hooks can only be used in the functional components.

**What is `useState` hook?**
useState is a react hook which is used to add a state variable to our components. It means that we can now declare state variables to functional components.


**Syntax to declare `useState` hook**
```javascript
const [state, setState] = useState('Initial Value');
```

**Where to use useState hook**
Let us simply understand this using an example. Let say we are working on a hamburger menu.

```javascript
import React from 'react';

export const MyComponent = () => {
    // BAD ❌ - this way it won't work, We need to use useState hook in such situation
    let openHamburger = false;
    
    const toggle = () => {
        openHamburger = !openHamburger;
    }
    
    return (
        // ...
    )
}
```

Whenever we want to change the value of a variable and then after we want to use that, then we need to use `useState` hook.
```javascript
import React, { useState } from 'react';

export const MyComponent = () => {
    // GOOD ✅
    const [openHamburger, setOpenHamburger] = useState(false);
    
    const toggle = () => {
        setOpenHamburger(!openHamburger);
    }
    
    return (
        // ...
    )
}
```

**Where we can use `useState` hook?**
- We can use `useState` hook only in functional components, not in class components.
- We want to change the value of a variable and then after we want to use that.
- Every time a components run, the `useState` hook also runs in the exact same order in which it is written.
- We cannot put hooks inside if statements, or inside any functions or inside loops or it should not be nested in any things. It should be present in the top level of the functional components.

**How to use `useState` hook?**
- `useState` hook always returns an array with two values. The first is state and the second value is a function.
- The function which is `useState` returns is used to change the state.
- Every time we call the update function of the `useState`, it re-renders the components with the updated state value.
- Every time when we need to use the previous value to create the new value, we need to use the function version of setting the state.
```javascript
const [count, setCount] = useState(6);

const inc = () => {
  setCount(prevCount => prevCount + 1); // setCount(6 => 6 + 1)
}
```
- `useState` can also be used in other way by passing function in it. And this will run only once when the component is rendered first time.
```javascript
const [state, setState] = useState(()=> 6); // by doing this way, whenever we update the state value, the component will not re-renders.
```

I hope this blog will help you to understand `useState` hook.
Redis x DEV Hackathon Reminder ⏰
Tags: redishackathon, redis, meta
Published: 2022-08-18 19:55:03

---
title: Redis x DEV Hackathon Reminder ⏰
published: true
description: You still have time to participate in the Redis Hackathon on DEV! 
tags: redishackathon, redis, meta
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4iw23nfjnplbup1fzp6.png
---

### Reminder that submissions for the Redis Hackathon on DEV are due on August 29th at 11:59 PM UTC.

{% embed https://dev.to/devteam/announcing-the-redis-hackathon-on-dev-3248 %}

---

[Redis](https://redis.com/) is is the most loved open source database in the world! Over the last several years Redis has evolved from a caching database into a multi-model primary database. This means your cache is now your database, and your database is your cache!

The [Redis Hackathon on DEV](https://dev.to/devteam/announcing-the-redis-hackathon-on-dev-3248) is an opportunity to harness the power of Redis to build a new application, write a post about it on DEV (your "submission"), and share your work with the world! In doing so, you'll earn a limited-edition profile badge and a DEV sticker pack. You'll _also_ be eligible to win up to $2,200 USD in cash, up to $300 USD towards the Forem Shop, and lots more. 🔥 

Full details and rules for participating in the Redis Hackathon on DEV can be found [here](https://dev.to/devteam/announcing-the-redis-hackathon-on-dev-3248).

### Don't forget to submit your project by August 29 @ 11:59 PM UTC!

---

If you get stuck at any point, please refer to the [help thread](https://dev.to/devteam/redis-x-dev-hackathon-help-thread-a7b) which the DEV and Redis teams are monitoring. If you instead just want to connect or swap ideas with other participants, the [community discussion thread](lhttps://dev.to/devteam/community-discussion-thread-redis-x-dev-hackathon-4cl6) is the spot to do just that!

If you've already published your submission, great job! Our judges look forward to reviewing your project. Thanks for participating. You're also invited to submit multiple times if you wish!


Happy coding!

- - -

_P.S. Did you know that DEV x Redis recently announced brand new opportunities to win big in this contest? There are now:_

- _<mark>~~Four~~ FIVE Grand Prize Winners<mark> to receive $2,000 USD_
- _<mark>~~Ten~~ TWENTY Runners-Up<mark> to receive $200 USD_
- _<mark>TWENTY FIVE participants who included the optional video in their submission to receive $200<mark>_
Day 1 of getting back into Solidity Course
Tags: javascript, blockchain, devjournal
Published: 2022-08-18 19:26:30

Timeline until: 02:12:12

The worst part about starting over is actually having to admit and confess that you have to start over. However, this is like the 100 days of code like you go, I needed two months, basically, of just not doing this. And now I'm back. Fun fact, I had to change my password on my work computer. And now I'm giving myself 179 days to get through this course and find a job in web three, let's see if I can make the self imposed deadline. 

It's been a month and a half since I watched any of the Solidity course video, so I decided to restart the solidity coding section.

So, thankfully we were able to skip the first 2 hours of the video. 

I was able to refamiliarize myself with Remix, and I have a new goal of having a job in web3 by 174 days (February 8th, 2023) from today!
Create an asynchronous method in Spring Boot
Tags: springboot, async, spring, asynchronous
Published: 2022-08-18 19:17:54

Normally, a given program runs straight along, with only one thing happening at once. And a block of code that relies on the previous one, should wait for it to end executing, and until that happens everything is stopped from the perspective of the user.

Let’s say we want to make a call to an API, knowing that the service we are calling takes too much time. So we prefer to return a response, telling that the call was made and the processing has started.

You might be wondering either the process succeeded or not, so instead of waiting for a single call to end, you can log everything and check on it later or make another service that returns the result (if you are really interested).

# How to create an asynchronous method in Spring Boot

## 1. Enabling Async Support:

To enable asynchronous processing, with Java configuration, simply add the `@EnableAsync` to a configuration class:

```java
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

@Configuration
@EnableAsync
public class SpringAsyncConfig {
}
```

The enable annotation is enough, but there is more options you can add as well (like specifying the `ThreadPoolTaskExecutor`).

## 2. Making your service asynchronous:

We won't be touching the controller, so it will be something like:

```java
@GetMapping("/do-heavy-work")
    public ResponseEntity<MessageResponse> getTheWorkDone() {
				//this service is called, 
				//but the process does not wait for its execution to end
        someService.doWorkAsynchronously();
				//we return immediately ok to the client
        return ResponseEntity.ok(new MessageResponse("Executing..."));
    }
```

We will simply add the @Async to the called method:

> However `@Async` has limitations to keep in mind:
> - it must be applied to public methods only,
> - calling the method decorated with `@Async` from within the same class won't work,

### 

The method will be something like:

```java
@Async
public void doWorkAsynchronously() {
	try {
		// the nessesary work
		// log the success
	}
	catch (Exception ex) {
		// log the error
	}
}
```

And that's it 😎, you’ve got your asynchronous method readyyyyyy 😉.
![image](https://memegenerator.net/img/instances/84951610.jpg)

## 3. More options:

Other stuff not covered here, that Spring Boot offers:
https://spring.io/guides/gs/async-method/
#1 Kreative. Speak of technicality - Redis Hackaton
Tags: redishackathon, node
Published: 2022-08-18 18:43:00

I always daydreaming of creating a page with Redis, so we can serve the page blazingly fast. It started like months ago, but have no time (motivation) to start or even design it. And then, it's like universe just calling with a piece of email from no-reply@hello.redis.com

The stack itself actually simple, 
* **NodeJS** for backend server
* **VueJS** for frontend 
* **Redis** for database
* **Redis** for user cache
* **Redis** for page cache
* **Redis** for socket pub/sub mechanism

Yup, I'm planning to utilize Redis as much as possible. 

If you interested to follow my journey, consider following...

-g-
Speaker Free Pass Giveaway - DeveloperWeek Cloud 2022 (Sept 7-14)
Tags: programming, security, api, offers
Published: 2022-08-18 18:36:00

I'll be speaking at DeveloperWeek Cloud Sep 7-14, 2022, in Austin, Texas, on "API Security Testing Modern Best Practices."

You can attend live in-person and virtual. I'm giving away over a hundred free passes worth $150 each. 

You can claim your Pass from [here](https://www.developerweek.com/cloud-2022-speaker/?s=Intesar%20Mohammed&se=API%20Security%20Testing%20Modern%20Best%20Practices&img1=https://sessionize.com/image/c64b-200o200o2-56-afd1-45c1-9fb8-2b7df3f3b55a.90b6d158-6b6b-4c3a-9b02-0aa1b5d6cba2.jpg&utm_source=feathr&utm_medium=network&utm_campaign=Intesar%20Mohammed&discount=FTSPKOPEN&event=DeveloperWeek%20Cloud%202022)

Here is the API security testing tool I launched recently. Point to your public REST API and get an instant vulnerability report.
https://EthicalCheck.dev
A Case for SRE
Tags: devops, googlecloud, gads, sre
Published: 2022-08-18 18:33:00

For the past eight weeks, I started on a journey to acquire knowledge and skills in Cloud Platform for my career in DevOps. I started with Google Cloud Platform (GCP) when I got accepted into The Google Africa Developer Scholarship powered by Andela and Pluralsight.

I have been privileged with courses like Foundations in GCP Infrastructure, Core Services, GCP architecting principles in Design and Process and Scaling and Automation, developing Google’s SRE culture, and not forgetting Security.

In my experience as an IT Systems Operations Engineer, I have worked on numerous projects ranging from infrastructure, network, software, and application systems. Furthermore, I have worked with different functional units such as other operations teams, marketing teams, development teams, infrastructure, and solution architects.  

One thing I have observed is the conflicting priorities development and operations teams have in many organizations. Mostly stemming from no agreed standard of communication between these two teams. What's more, the organization’s culture and structure play a big role.

Development teams aim to work faster; agile, innovating, succeeding, and failing quickly while most operation teams work slower; keeping the system stable while focusing on reliability and consistency.

This difference in mindsets tends to put a lot of stress on the Ops teams because of increasing workloads and the effort to resolve service outages caused by some of these changes.

And that is where Site Reliability Engineering (SRE) comes in.

Site Reliability Engineering (SRE) is the practice of balancing the velocity of development features with the risk to reliability. Google’s Mission of SRE is “to protect, provide for, and progress software and systems with a consistent focus on availability, latency, performance, and capacity.”

SRE in DevOps promotes shared ownerships between Devs and Ops Teams. Effective communication is highly encouraged and maximized between both teams. Changes are rolled out effectively and productively ensuring high system reliability and assuring Service Level Objectives (SLOs) are achieved.

Developing a Google SRE culture incorporates and promotes the below technical and cultural practices within and between teams.
1.	Creating shared responsibility ownership using SLOs and error budgets.
2.	Failures are documented in blameless postmortems, which focus on systems and processes instead of people.
3.	Fostering psychologically safe environments is necessary for learning and innovation in organizations.
4.	Promoting automation of repetitive work (toil) as excessive toil is toxic to the SRE role.

Understanding SRE practices and norms will help you build a common language to use when speaking with your IT teams and support your organization’s adoption of SRE both in the short and long term.

For a comprehensive overview of the key differences between DevOps and SREs, this Spacelift article [https://spacelift.io/blog/sre-vs-devops] also explains what problems DevOps and SRE teams solve, ending with a quick list of tools used by both groups.
#0 Kreative. Your page, your style - Redis Hackaton
Tags: redishackathon, kreative
Published: 2022-08-18 18:32:58

---
title: #0 Kreative. Your page, your style - Redis Hackaton
series: Kreative
published: true
description: I join Redis Hackaton.
tags: #redishackathon #kreative
---

First of all, what is **Kreative** itself? etymologically it based on two words. Creative + Kreatif, word for creative in Bahasa (Indonesia). Such a creative name right?

So, what this all about? **Kreative** is a social-media/blog-like/your own portfolio. You are a writer? you can create as many articles you want. You are an artist? you can showcase your works. You are someone who need a beautiful CV, build with your own html+css? you can. 

Basically with **Kreative** everyone have their own unique pages, you can add your own style, element, etc. Oh, and it support markdown... so if you want to only focus on the content side. 
YOU CAN!

-g-
Create API Using AWS Rekognition to return detected faces in uploaded image - Nodejs & React
Tags: aws, node, react, opensource
Published: 2022-08-18 18:23:09

**Objective:** user can upload image and it will return the list of detected faces.


You can visit the repo [here](https://github.com/VLDCNDN/face-rekognition-app) and fork it and try it yourself!
or you can follow the instruction below


##### 1. Clone the repo by running in your cmd

```bash

$ git clone https://github.com/VLDCNDN/face-rekognition-app.git
$ cd face-rekognition-app
$ npm install

```

##### 2. Copy `.env.copy` file then paste it in the same level of the copied file, rename the file into `.env`
![step2 image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9yj6vssn33yw9wwxsph.png)
 
##### 3. Open `.env` file and make sure that the 2 value exist
![Step3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avqsz5waarakc10xg9bf.png)

Make sure that you already configure the [**AWS Credential** ENV](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) because the app will not run without it 

### Now you can run it's `API`
Here's the URL for the API
```
# REQUEST
POST /api/detect-faces
body {
   "image": "base64 image"
}

# RESPONSE FORMAT
{
  "data" : [
     "base64 image",
     ...
   ]
}
```

![Response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayztt2wl4ymq5uyl50g1.png)
 
---

### If you want to use the front end
within the same repo, run 
```cd client && npm install```

now try running ```npm start```
_make sure that you're under `client` folder_

now you can see this (localhost:3000) 
![Result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ao3128z3zidrs2tzvqse.png)

If you only want the backend, you can just delete the client folder

**NOTE:** Make sure that your nodejs/express is running in port of 3001 since the proxy set in reactjs is 3001 for backend, just change the reactjs proxy url if you wanted the backend running different port
![Port](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ahx39lkmb07er4jnrnz.png)
HAX: everything everywhere all at once
Tags: javascript, webdev, haxtheweb, lit
Published: 2022-08-18 18:07:00

All these articles lead up to this: I've just pushed out new releases of all our platforms and we're starting to use Vercel backed microfrontends 🥁🥁🥁, in production.

🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳

While I'm excited, I think it's important to walk-through the many implementations of our web components to fully understand how groundbreaking the following combo becomes:

1. we publish all our web components openly and distribute them via a CDN
2. Our CDN has a 1-line ["magic script" integration](https://dev.to/btopro/uwc-part-3-the-magic-script-122a)
3. We can begin to supply advanced Microfrontend architecture to any property connected to the web through that script ([simple-img in a codepen as example](https://codepen.io/btopro/pen/MWQZzoo))
4. All our CDNs just got updated, so all our sites just got access to everything discussed in this series!

## Video time
Here's me stepping through the implications of this and how this aligns with HAXTheWeb's vision of changing how the web works in order to maximize empowerment of users on the internet and having a voice to share and be creative free of cost.

{% embed https://www.youtube.com/watch?v=nqucMD_CpLk %}

### Concepts / linkage discussed in the rantcast
- [The magic script](https://dev.to/btopro/uwc-part-3-the-magic-script-122a)
- [simple-img](https://dev.to/btopro/simple-img-microfrontend-oc5)
- [Why do I need to go anywhere?](https://www.psu.edu/news/academics/story/new-system-revolutionize-online-course-authoring-education-technology/)
- [HAXcamp 2019, our mission](https://www.youtube.com/watch?v=f_tEA9O9pco&list=PLJQupiji7J5eTqv8JFiW8SZpSeKouZACH&index=10)