teleren/devto huggingface dataset:
When do you think is the best time to post on DEV? 🤔
Tags: discuss, data, meta
Published: 2022-10-25 20:27:46

Since we released article scheduling as a new feature (props to @lightalloy 🙌), I've been wondering when the best time to post on DEV might be...

{% embed https://dev.to/devteam/this-post-is-scheduled-for-1130am-299k %}

So, I figured I'd ask y'all. When do you think the optimal time to post on DEV is? Has anybody dug into the data to figure out when they can get the best visibility on their articles?
Access Denied after Deploying NuxtJs on AWS Amplify
Tags: aws, amplify, nuxt
Published: 2022-10-25 20:26:46

If you are getting similar error after deploying NuxtJs on AWS Amplify:

```
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>69F14474972D101F</RequestId>
<HostId>
...
</HostId>
</Error>
```

Here is the solution that might work for you.

**Step 1. Update Build Settings**

Login to `AWS Amplify > Select the App > Build settings > Click on Edit`. 

- Set the build commands to `npm run generate`
- Set the `baseDirectory` location to be `dist` or `dist/` whichever works for you.

Your `amplify.yml` will look like:
```yml
version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run generate
  artifacts:
    baseDirectory: dist/
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
```

**Step 2. Rewrites and redirects**

Click on `Rewrites and redirects > Edit > Open text editor` and enter following:

```json
[
    {
        "source": "/<*>",
        "target": "/index.html",
        "status": "404-200",
        "condition": null
    }
]
```

Then click on `Save`.

After completing these steps, redeploy the app, it should work.
Enhance Next.js with Vercel Analytics: A Step-by-Step Guide
Tags: analytics, vercel, nextjs, webdev
Published: 2022-10-25 20:13:02

> " This article is published using [Lamento](https://www.lamento.in/)🍋

We have a new player entered the field of analytics.
Just by taking a quick glance at Vercel Analytics it looks somewhat similar to plausible analytics, but beauty should be admired no hard work should go unnoticed.
First let's set up an exiting Next.js v-12 application with this analytics.

## 1. Enable Vercel Analytics
Go to your [vercel dashboard](https://vercel.com/dashboard) and choose your project which you need to enable analytic.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4spvjiswrtjbq9len0rl.jpg)

Open analytics tab then select Audiences tab if it's your 1st time it will ask you to enable from the dialog.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6yuodoz0pwfmlj5sg5f.jpg)


## 2. Install Dependencies 
In your project, install this package to monitor the application from Vercel dashboard.
[@vercel/analytics](https://www.npmjs.com/package/@vercel/analytics) allows you to track page views in your Next.js app or any other website that is deployed to Vercel. All page views are automatically tracked in the app.
```
npm install @vercel/analytics
```
or
```
yarn add @vercel/analytics
```


## 3. Inject the Analytics script

Import the Analytics component which is a wrapper around the tracking script, offering us more seamless integration with Next.js.

`pages/_app.ts`
```
import { Analytics } from '@vercel/analytics/react';

function MyApp({ Component, pageProps }) {
  return (
    <>
      <Component {...pageProps} />
      <Analytics />
    </>
  );
}

export default MyApp;
```


## 4. Deploy

Push your code to your version control and By deploying the application to Vercel we can see all the analytics instinct.

> To see the updated visible, open your domain and preview the dashboard. The changes will be visible.


## Finally
Vercel have provided a minimal and primary use case where it
check our site traffic and get all the essential insights.

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

#### Notable Features
 * Visitors count
 * Page Views
 * Top Pages (Pages which are the most visited)
 * Top Referrers (Sites refer the most traffic)
 * Countries
 * Operating Systems
 * Browsers


> Vercel says this feature will be free only at beta stage in the future it may offer in paid tires.
Remember to enjoy it
Tags: personal, devjournal
Published: 2022-10-25 20:07:56

It’s always been important to me to enjoy whatever I’m doing. Whether it’s work, a side project, writing on this blog, recording videos, going for a run or learning new stuff, simply enjoying it is the single most important factor that keeps me motivated.

I don’t recall exactly when but a few months ago an idea popped up in my head - I wanted to decorate the wall above my desk with the quote “Remember to enjoy it” as a little reminder that I must enjoy whatever I’m doing. And to make it extra special, I wanted to cut each letter out of wood.

So I got to work making small progress over time but enjoying it nonetheless (see 😉).

I found a nice font on the Internet and printed each letter in the desired size. I transferred the letters on a piece of wood and used a jigsaw to cut them. Then I used small wood files to smoothen the edges. Finally I applied a couple of coats of dark stain to make the letters darker.

And finally today I put the letters on the wall using double-sided tape. It’s beautiful. I like it a lot 🙂

![“Remember to enjoy it” wooden letters](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9cwqdlm1m7y4mxtvi0z1.jpg)
Git: Renaming a Branch
Tags: webdev, beginners, git, github
Published: 2022-10-25 19:49:47

Git [branches](https://fjolt.com/article/git-branches) are an easy way to manage our code, and separate our copies of our code when we want to work on specific features. We can then merge our code back into our main branch, or even rebase it. 

Sometimes, though we make a mistake in the naming of our branch. Maybe you wrote `fea-ui-design` instead of `feat-ui-design`, or maybe you just want to rename your branch completely. Fortunately, it's easy to rename a branch. First switch to the branch you want to rename using `checkout`:
```
git checkout my-branch
```

And then use the `-m` option on `branch` to rename it.
```
git branch -m new-branch
```

Now `my-branch` has been renamed to `new-branch` - it's as easy as that!
StairCase | HackerRank Solution in JavaScript
Tags: javascript, hackerrank, solution, staircase
Published: 2022-10-25 19:48:45

Let's look at the Problem Statement :

Input Format
A single integer, n, denoting the size of the staircase.

Constraints: 0 < n <= 100

Output Format :

Print a staircase of size using # symbols and spaces.

Note: The last line must have spaces in it.

Example:
Sample Input : 4

Sample output

```
   #
  ##
 ###
####
```

Solution 1. in JavaScript.

```
function staircase(n) {
    // Write your code here
    let str = '';
    for(let i = 1; i < n + 1; i++) {
        str += Array(n - i).fill(' ').join('')
        str += Array(i).fill('#').join('')
        console.log(str)
        str = ''
    }

}
```

Solution 2. in JavaScript.

```
function staircase(n) {
  for (let i = 0; i < n; i++) {
    let str = Array(i + 1)
      .fill("#")
      .join("")
      .padStart(n);
    console.log(str);
  }
}
```


OR

// without the padStart it will still give same result.

```
function staircase(n) {
  for (let i = 0; i < n; i++) {
    let str = Array(i + 1)
      .fill("#")
      .join("")
     console.log(str);
  }
}
```

but in this case, the element flows to the left

```
#
##
###
####
```
Must-Haves for Second Life Scripting
Tags: lsl, metaverse, secondlife, beginners
Published: 2022-10-25 19:42:46

So, you want to get into scripting for Second Life, one of the most-popular virtual worlds? Need to pizzazz that plywood cube, or create something a little more complex such as a HUD for texturing mesh clothing? Let's discuss what has helped me with scripting with Linden Scripting Language (LSL).

## IDE:
For this, I greatly prefer the editor and external editor options that exist in the Firestorm or Alchemy viewers. You can customize the UI, insert things, and get error messages and test immediately. You also have the option to use a pre-processor in both viewers.

If you want to use something like Visual Studio Code, I recommend using one of these extensions: 
https://github.com/Minuit-Ferina/vscode-lsl
https://github.com/jyaoma/vscode-lsl

Other popular IDEs include Sublime Text and NP++.

## Optimizer:
I recommend using PyOptimizer. You can download it and even use it in your browser here: http://lsl.blacktulip-virtual.com/lsl-pyoptimizer/

It is written in Python 2.7, and supports supports code memory optimization for Mono. There are many reasons to use it, check out their website above for the full details.

Alchemy and Firestorm also include optimizing in their pre-processor.

## Wikis, Documentation, and Free Scripts:
There are many places to learn about LSL and how it works.

First, you need the official and most up-to-date documentation that's found on the SL wiki here: https://wiki.secondlife.com/wiki/LSL_Portal 

You can also get many free scripts online. I'll link to some of my favorite websites:

- LSL Library: https://wiki.secondlife.com/wiki/Category:LSL_Library
- SL Forums: https://community.secondlife.com/forums/forum/305-lsl-library/
- OutWorldz: https://www.outworldz.com/cgi/freescripts.plx
- DigiWorldz: http://lslwiki.digiworldz.com/lslwiki/wakka.php?wakka=scriptlibrary

You may also be able to find other LSL code or snippets on GitHub or other code-sharing sites.

## In-World Groups:
You can also make use of groups in-world. I recommend searching for these inside the viewer, as it is otherwise hard to link to them outside of SL. There are many groups out there, so feel free to search for others as well.

- Builder's Brewery
- Script Academy

## Ideas:
So, let's get down to business. The best way to learn scripting is to script, so let's look over some ideas. And feel free to put your own spin on things!

- A painting that looks different depending on which day of the week it is, or perhaps on holidays (texturing, date checking)
- An object that alerts you when the simulator hosting the region is rebooted
- A HUD that changes the appearance of furniture in a home, and the listener inside the furniture (texturing, contacting other objects)
- A pet that you can wear, and interacts with other people on a touch event (anti-spam measures, chat or hover text)

## What's Next?
I'll be writing more posts on how to make various things with this language, so stay tuned!
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2022-10-25 19:42:20

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## Building a Fast URL Shortener

You could just search “URL shortener” on your favorite search engine and find one to use right now, but there are tons of benefits to making your own. Follow this tutorial from @mahadevans87 to get started with your project today.

{% embed https://dev.to/mahadevans87/building-a-fast-url-shortener-with-go-and-redis-31b9 %}


## The Dissonance of a Strong Developer

@jenc critically reflects on [this Patrick Kua talk](https://youtu.be/CjgWwmBW-bc) explaining why & how "strong developers" commonly run into friction with their teammates and what they can do differently to avoid it. 

{% embed https://dev.to/jenc/things-strong-developers-do-that-drives-the-team-around-them-crazy-437a %}


## What is CORS? 

Here, @jpomykala explains what CORS and CORS errors are and how this mechanism keeps your APIs and browsers secure. 

{% embed https://dev.to/jpomykala/what-is-cors-11kf %}


## Personal site on T-3 Stack!

A portfolio site is something that you are likely to build at some point if you’re a web developer. Check out @asheeshh’s portfolio made on the t-3 stack!

{% embed https://dev.to/asheeshh/i-made-a-full-stack-portfolio-site-using-nextjs-and-tailwind-366d %}


## Lazy Loading with React JS 😴

Lazy loading is pretty commonplace nowadays in web development. Take a look at @franklin030601’s tutorial on how to load in images with React JS.

{% embed https://dev.to/franklin030601/lazy-loading-in-images-with-react-js-4enm %}

Or, if you prefer, read it in Spanish ([#spanish](https://dev.to/t/spanish)) because Franklin is awesome and regularly posts under both languages. 🙌

{% embed https://dev.to/franklin030601/lazy-loading-en-imagenes-con-react-js-10ip %}


## Run README.md like a notebook in VS Code 

Rdme has evolved to Runme! See @sourishkrout's announcement to check out all of the new features in this extension and execute your README.md with one button.

{% embed https://dev.to/sourishkrout/run-your-readmemd-in-vs-code-50l7 %}


## Non-Code Contributions in Open Source 

In this article, @blackgirlbytes highlights the many different ways one might contribute to open source without writing any code at all!

{% embed https://dev.to/github/contribute-to-open-source-without-knowing-how-to-code-2li9 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
The Functional, Usable, Delightful of... Ketchup
Tags: ux, design, webdev, delightful
Published: 2022-10-25 18:49:57

## <center>Functional</center>
![Classic glass tomato ketchup bottle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obq7tquce0x492wfdspw.png)
<center>It's not coming out! _Just hit it!_ It's still not - oh.
_The nostalgic taste of frustration._</center>
<hr />
## <center>Usable</center>
![Sueezabl plastic tomato ketchup bottle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v0ncd5rsfia2jngvhbai.jpg)
<center>Let gravity do the hard work for you.
_If your planet doesn't have enough gravity, it's squeezable too._</center>
<hr />
## <center>Delightful</center>
![Bottle cap in the shape of a cartoon vampire, dispensing tomato ketchup through fangs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6dep3qzmf07bqgogjckb.jpg)
<center>_I vant to dispense zis ketchup_</center>
Trend: Devs and Anxiety
Tags: productivity, programming, beginners, news
Published: 2022-10-25 18:39:15

It's important to take a step forward. Read through to know why...

**Therapeutic benefits of journaling?**
Journaling has both physical and emotional benefits. Studies show that, physically, the benefits of expressive writing range from strengthening immune cells to lowering blood pressure and enhancing wound healing. Because it releases physical tension from our bodies, journaling can help to keep us in better general health all around.
In the mental/emotional realm, writing out thoughts and feelings can help us to calm and clear our minds, release pent-up feelings and everyday tension and stress, and let go of negative thoughts. It can also help us manage anxiety and depression, increase self-awareness, and enhance our overall sense of well-being. In fact, evidence tells us that writing can produce a therapeutic benefit close to that of sessions with a psychotherapist.**

**Why is journaling so effective for Developers in particular?**
Writing in a journal affording a safe space for questioning, observing, and exploring likes and dislikes, passions and motivations, fears and apprehensions, dreams and desires. It offers a place to practice assertiveness, find self-compassion, and build healthy self-esteem by developing a nurturing relationship with one’s authentic self. It provides an outlet for the emotional highs and lows, overwhelm, and confusion that mark the developers' experience phase (Learning Curve). While working in journaling, a developer can develop coping skills, empowerment, and a healthy inner anchor to enhance maturation and carry them into their work experience.


**How can journaling help with Devs anxiety?**
Anxiety is also released when we let our thoughts and feelings out. It changes them from an abstract to a concrete form, and helps get them “outside of us.” This makes them feel less overwhelming, and us feel more balanced and stable. 

[Devjour](https://www.devjour.com) is a guided journaling tool that care about the mental health and productivity of developers, designers and product managers. 

Because we are devs, designers and PMs who found it important to create a tool to enable us and our colleagues to be mentally stable and boosting our productivity. 

Please check [Devjour](https://www.devjour.com) and tell us what we need to improve.



** Edward J. Murray (1991), professor of psychology at the University of Miami
Join the DeSo Labs CRYPT0WINTER 2022 Community Hackathon!
Tags: web3, hackathon, blockchain, decentralization
Published: 2022-10-25 18:35:31

****This is an open, community organized event, for all to have fun and improve the decentralized social ecosystem!
Registration open until November 7th
[https://desolabs.org/hackathon/2022]
[https://discord.gg/t4UEpqnJ7j]
Share Securely
Tags: lambda, aws, security, serverless
Published: 2022-10-25 18:34:19

Securely sharing confidential information between team members is one of the critical tasks we have to perform during our day-to-day life.

There are platforms we can use to share passwords or sensitive data. Such as onetimesecret.com, scrt.link and etc. Primarily they provide a one-time link to access your secret. The link will be disappeared once you access it.

In this article, I’ll be illustrating how we can implement a similar application via the AWS Serverless ecosystem.


![Architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnj65hax5rivs0m3rr87.jpeg)

As shown above in the diagram, the web application has been hosted in AWS Amplify. It allows users to store and read their secrets.

The web application is backed by two lambda functions. They manage the DB operations. (For demo purpose I have used lambda functionalURL.)

The data will be stored in DynamoDB.


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

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

**Add a Secret**
Adding a secret has three steps,

- Enter the Message.
- Enter a secret key to protect your message.
- Select the expiration time for the secret.

After the submission, the web application will invoke a Lambda functional URL to insert the data into DynamoDB.

**Read a Secret**

- Access the shared link
- Enter the provided Secret Key
- Your secret will be displayed.


![read_secret_1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0r8cuyillh885no6pclr.png)

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

After a successful retrieval of a secret. The secret will be deleted from the database immediately.

**Workflow**


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

DynamoDB has 4 attributes. _SecretID (PK) and ExpirationTime (SK), Message, _and_ SecretKey_.

The TTL has been enabled on the ExpirationTime attribute. DyanmoDB deletes the record once it reaches the TTL value. **This operation doesn’t consume a write capacity**. However, DynamoDB TTL is not real-time. It’d take 24H-48H to remove a record from the DB. The lambda that reads the data has a logic to validate whether the requested secret is expired or not.

**Demo**

URL : https://secretshare.forexample.link

https://www.youtube.com/watch?v=q4W8R18ItzI

**Source**
https://github.com/harik8/temp-secret-share
Provisioning Auth0 resources with TypeScript and Pulumi
Tags: typescript, devops, programming
Published: 2022-10-25 18:21:49

> Original post written by [Juan Cruz Martinez](https://auth0.com/blog/authors/juan-cruz-martinez/) for Auth0 blog.

### Use Pulumi to provision Auth0 resources using your familiar programming languages.

### <br>

Pulumi is a fantastic solution for IaC (Infrastructure as Code). It allows you to manage your cloud services with high-level SDKs for popular programming languages like TypeScript, C#, GoLang, and Python. The familiarity and characteristics of those programming languages make it easier to set up, maintain and write code for your cloud services, including your friendly authentication provider Auth0.

This blog post will show you how to provision Auth0 resources using TypeScript and Pulumi. We will use the Pulumi tool to create and manage our infrastructure as code which is a great way to keep your infrastructure in a safe, version-controlled repository.

Let's get started!

## What Is Pulumi

![Pulumi](https://images.ctfassets.net/23aumh6u8s0i/1B42BPCAgRpINA6tClMT0O/36c34bd180b6eccb98c57b431e028b5e/logo-on-white.png)

Managing your cloud infrastructure can be a daunting task. When even automated, you need to learn a new programming language (or multiple languages) to write code for your cloud services.

Pulumi is a tool that enables developers to write code for their cloud services using familiar programming languages like TypeScript, C#, GoLang, and Python. This makes it easier than ever to get started with Infrastructure as Code.

Pulumi also abstracts away the cloud provider-specific resources and provides a unified view of all your resources in one place. This makes it easy to see what changes need to be made when you want to migrate to a different cloud provider.

## What Is Auth0 and the Auth0 Marketplace

Auth0 is a cloud-based identity and authentication management platform. It provides a platform for developers to add user authentication to their applications and supports a variety of authentication methods, including social login, username and password, and SSO.

The [Auth0 marketplace](https://marketplace.auth0.com) is where developers can find and use pre-built integrations for their applications. These integrations provide user authentication, management, and security features. The Auth0 marketplace offers a variety of integrations, including social login, enterprise federation, and developer tools.


[Read more...](https://auth0.com/blog/provisioning-auth0-resources-with-type-script-and-pulumi/?utm_source=devto&utm_medium=sc&utm_campaign=devto)