teleren/devto huggingface dataset:
Serverless NextJS/GPT-3 Template
Published: 2022-05-17 02:26:08

![Serverless NextJS/GPT-3 Template | Made with Javacript | Next JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1652671881/large_serverless_next_js_gpt_3_template_bbee28b2fe.png "Serverless NextJS/GPT-3 Template | Made with Javacript | Next JS")


### A serverless NextJS/React template to build GPT-3 apps

> This is a Open Source Template to build GPT-3 Apps
> Features
> - NextJS/React
> - Host on Vercel/Nerlify
> - Example API endpoint that calls GPT-3 API without exposing API key on the client side
> - Open Source, Free to use in commercial Apps.

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project


Simply Fill out this Google Forms page.

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Serverless NextJS/GPT-3 Template on Twitter](https://twitter.com/withjavascript/status/1526387657441521665?s=20&t=hzmDil0PPJpqVrKuzK9LmA)
 |
| Medium | [Serverless NextJS/GPT-3 Template on Medium](https://medium.com/@madewithjavascript/serverless-nextjs-gpt-3-template-47aeeb46c57c)
 |
| Facebook | [Serverless NextJS/GPT-3 Template on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0VKU47MmghX3yhsvEvP1yMwB42oed6wf8FMDmxwgpAEXNbRtkd3Z1s9r18waCAUjNl)
 |
| Tumblr | [Serverless NextJS/GPT-3 Template on Tumblr](https://madewithjavascript.tumblr.com/post/684462408820031488/serverless-nextjsgpt-3-template-made-with-next)
 |
| LinkedIn | [Serverless NextJS/GPT-3 Template on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6932153224539848704)
 |


Filled Under:


 - [Made with Javascript](https://madewithjavascript.club)
    
 - [Made with Next JS](https://madewithjavascript.club/categories/next-js)


`Make sure to give this post 50 hearts, click the unicorns and follow 
@madewithjavascript 
 for more such awesome showcases. Show you love for the people who have worked so hard!`

Tag us in your showcase, for a chance to get showcased!
What is HTML? My Vision as a Web Developer.
Tags: webdev, frontend, html
Published: 2022-05-17 02:25:57

Many in the world of information technology know HTML by its acronym: Hyper Text Markup Language to declare it as a language based on the use of tags to define a web document what systems and applications on the Word Wide Web are made of but really What does a web document mean for us developers?

The web has changed and this has brought with it changes in the structure of a web document, which means that the importance is focused on the management of the content of a website and towards the audience to which such content is directed. To this we must add the emergence of a series of elements, programming languages, CSS frameworks to generate a user experience and user interface in accordance with the need to address such information content that is devoured en masse through the Internet.

Hence, content management has become so important that the technologies and development applied to each web document are essential to present the visual way in which the content will be approached by millions of users around the world. Which brings us to the great responsibility of ensuring that we build a useful and reliable website for this great world digital library.

Today we developers ask ourselves in which language for the web should I program? maybe PHP or maybe Javascript or what CSS framework to use or what web template will be the most appropriate but the greatest responsibility should always aim to build a responsible content web that as a development community we are obliged to build with each step that we take. give us through our digital participation on the web.

Twitter: @ozzies_code
3 Extensions from chrome web store
Tags: javascript, webdev, beginners, tutorial
Published: 2022-05-17 01:27:34

if have one thing that help me day-a-day and I don't open my hand is my extensions, and always that i change my computer or browser, I install again they.

1. In first is the Wappalyzer, is it very interesting to know what type of tecnologys is used in a site, for it does so by you have a notion that how the market is using, as well as does from you get a reference for your projects.


![Wappalyzer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyrmc6cw95m427t3s9xk.jpg)

2. The JSON Viewer, this one I don't have words, simply awesome, it make it easy see JSON docs inside in your browser, as well as the dark theme that not make you blind while you open the archive. 🤣


![JSON Viewer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yysnmeg96bbuesmrzy29.jpg)

3. In finally the most be used for me, CSS Peeper, simply the best of all extensions in this post, completed, with loved designer, easily use, as well be extreme useful to capture colors, and sizes like a height and weight from a element.


![CSS Peeper](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g2a2mo24yb5vskwyuhqe.jpg)
.
.
.
.
.
From post in PT-BR
Instagram: @imatheus.max
Post: https://www.instagram.com/p/CdohttkhcBZ/
Best Designing Tools
Tags: design
Published: 2022-05-17 01:22:25

Here are a few designing tools that completely helped for my coding projects. If your someone that is focusing on HTML, CSS, or just like designing these designing websites are life changing.

The number one is Canva. It's because you can does so much on Canva. Such as: video making, posters, slideshows, sticker, anything you could imagine! [Here](canva.com) is the link for the website. And did I forget to mention that it is free (their is also a pro version, though you can survive without it.)

The second one has to be [pfpmaker.com](pfpmaker.com) it is very good and highly recommended. Even if you don't need a profile picture you can still test it out with their demo images you can use. And it's 100% free. 

The third website is [CSS gradient](cssgradient.io). If you want to make a website that stands out and is flashy, this is your go to website. It's fun fill designed (and I got to say the website it self is very well made.) You can get the CSS code, their are multiple different types of options such as a gradient button with a hover effect and also gradient text.

Last but not least, if their is any other website that you recommend please tell me i'll be more then happy to know! :)
Getting Started with PostGIS on Postgres App
Tags: database, postgres, gis, tutorial
Published: 2022-05-17 00:50:29

If you've worked with data before, you've probably heard of Postgres, but if you haven't, Postgres is a leading open source relational database started over 30 years ago. Amazon Redshift was famously built on it and now Google just released AlloyDB built on it. On version 14 with the open source version, it's incredibly easy to get projects set up on your Mac by downloading the [Postgres App](https://postgresapp.com/). You don't have to get the app and you can download only what you want, but if you want a quick way to get started with Postgis for geospatial analysis, go ahead and get the app, which comes with the files necessary for postgis.

What's [PostGIS](https://postgis.net/)? It's is a spatial extension to Postgres, which allows you to store data types like `point` and `polygon` rather than trying to store coordinates as decimals. You can then do geospatial analysis right from your database. For example, if you have a geographical area and you want to find the center, you can run a query with `ST_Centroid()` with an individual geometry or an entire column.

You can even develop a geocoder in your database. I'll dive into that in my follow up on this post.

So, once you have the Postgres App installed, how do you set up Postgis? First, create a new database (do not do this in the Postgres database).

```
CREATE DATABASE geocoder;
```
After you've granted all access and privileges to your user, all you need to do to make it into a Postgis-enabled database is to go into the database and type:
```
CREATE EXTENSION postgis;
```
If you want to different capabilities (including what we'll need for the geocoder), you'll need to add other extensions (also packaged in the Postgres App), but we can focus on that next time.

Now, if you have a .shp or .gdb file and want to put it in your database, you can easily do that with `ogr2ogr`, which again, [ships with the Postgres App](https://postgis.net/workshops/postgis-intro/loading_data.html#loading-with-ogr2ogr). `ogr2ogr` will create a table in your database that mirrors the attributes of the file you're loading. You may have to adjust some of the parameters, but the basic pattern is:
```
ogr2ogr Pg:'dbname=DBNAME host=HOST user=USER port=5432' YOUR_FILE.shp  
```
Next, I'll try to do a dive into how to convert this into a geocoder.
Day 38: Article 3 out!
Published: 2022-05-17 00:41:53

Hi!
I did it! the third article is about and is about `setting jest and react testing library in a react project` this was a challenging one because I got stuck with something I didn't expect and I could find any good documentation for it Until I realized there was an official documentation already in place, this may be related to the fact that Jest and RTL come preconfigured in `create-react-app` but the goal was to set everything from scratch and it's done. coming next will be along series about `GitHub actions`, which are not very complicated now by they will require a lot of writing to explain.
Today was good I was working on my CV and a presentation I had which ended perfectly
tomorrow will be a redux da, going to get back to the book for recap and work on article 4 if possible 
we will see
signing off
Recover from a disconnected remote `do-release-upgrade` session
Tags: ubuntu, linux, ssh
Published: 2022-05-17 00:39:15

# New Ubuntu Release

You log in over ssh and see this MOTD banner; woohoo new release!

```bash
481 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

New release '22.04 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
```

So you `do-release-upgrade` - it starts, spawns a new [screen](https://linux.die.net/man/1/screen) session, you accept the scary warnings, and you're off.

Then, the client machine from which you were doing the update crashes (BSOD, kernel panic, what have you) and your session is lost.

# Easy Recovery

Since `do-release-upgrade` spawned a screen session, you can simply reattach to it.

When you log in to your server and you will likely find a pts session open for root. This is the upgrader.

```bash
ubuntu@pi:~$ who
ubuntu   pts/0        2022-05-16 22:36 (192.168.0.x)
root     pts/1        2022-05-16 22:38 (192.168.0.x:S.0)
```

Switching to root, you see there is an attached screen session:

```bash
ubuntu@pi:~$ sudo su
root@pi:/home/ubuntu# screen -ls
There is a screen on:
        3915.ubuntu-release-upgrade-screen-window       (05/16/22 22:38:22)     (Attached)
```

Simply `screen -d -r` and you can take over the screen session and continue the update / follow its progress.
VS Code Tip of the Week: Refactor Markdown Headers
Tags: vscode, vscodetips
Published: 2022-05-17 00:19:08

This week's tip of the week is care of Matt Bierner from the Twitters. TIL you can refactor markdown headers so you don't end up with broken links.

{% embed https://twitter.com/mattbierner/status/1524074285744238592 %}

Thanks for the tip Matt and happy VS Coding!
Rose bushes and story points
Tags: agile, scrum, storypoints, estimation
Published: 2022-05-18 07:39:30

---
title: Rose bushes and story points
published: true
date: 2022-05-17 00:00:00 UTC
tags: agile,scrum,storypoints,estimation
canonical_url: https://jhall.io/archive/2022/05/17/rose-bushes-and-story-points/
---

Yesterday my wife asked me to dig a hole in the garden so she could plant a rose bush. No sooner had I grabbed the spade than my 16-month-old son came over to help.

A few minutes, and a scraped knee later, we had successfully dug a hole.

This got me thinking.

A task that normally would have taken me about a minute, tops, took about 3 minutes. And I probably exerted double the effort, since rather than just moving some soil, my concern was moving soil slowly and deliberately in a way that gave my son a sense of participation. And my son exerted significant effort of his own.

As I’ve been thinking about story points lately, I saw a parallel.

Had I estimated the hole-digging task before hand, perhaps I would have assigned it a value of 1 story point.

But with my son involved, how does that affect my estimate? Let’s consider three options:

1. **1 Story Point** It’s the same task, whether I do it alone, or with the help of a trainee
2. **3 Story Points** By involving a trainee, we can expect the task to take 3x longer
3. **8 Story Points** To reflect the aggregate effort and increased complexity that comes from involving a trainee

I find this an interesting thought experiment, because whatever answer I come up with, I can see it conflicting with common advice about story points. If I say 1 story point, because the task is the same, then I’m admitting that story points don’t really reflect effort or complexity—a trope we hear constantly.

If I say 3 story points, then I’m essentially saying that story points are just translated to time. While this makes a certain sense, especially when trying to estimate for the sake of business schedules, it also violates the common trope that “story points do not equate to time!”

So 8 story points it is, right? But this makes our estimates entirely subjective, depending entirely on who is doing the work. It also makes comparison of story points (whether over time, which is often an anti-pattern anyway), or just [relative estimation](https://jhall.io/archive/2022/03/20/story-points-means-relative-estimation-right-not-so-fast./) much harder, because like stories won’t have like story point values.

What do you think? I’m running a [poll on LinkedIn](https://www.linkedin.com/posts/tinydevops_storypoints-estimation-activity-6931910020607451136-ElxU?utm_source=linkedin_share&utm_medium=member_desktop_web), and your feedback is welcome!

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
How to easily make a new type by removing null or undefined values from the union type in TypeScript?
Tags: typescript
Published: 2022-05-17 00:00:00

---
  title: How to easily make a new type by removing null or undefined values from the union type in TypeScript?
  published: true
  tags: TypeScript
  date: Tue May 17 2022 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/easily-make-new-type-by-removing-null-undefined-values-from-union-type-typescript
  cover_image: https://melvingeorge.me/_next/static/images/main-ab15eb279e2ff9b3da5efd2608a7ff54.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/easily-make-new-type-by-removing-null-undefined-values-from-union-type-typescript)
  
To easily make a new type by removing all the `undefined` and `null` values from the union type in TypeScript, we can use the `NonNullable` utility type and pass the union type to remove the `null` and `undefined` as its first type argument.

### TL;DR

```ts
// a simple union type
type MyType = "Hi" | "Hello" | null | undefined;

// make a new type by excluding
// the `null` and `undefined` values
// from the `MyType` type
// using the `NonNullable` utility type
type RevisedType = NonNullable<MyType>; // "Hi" | "Hello"
```

For example, let's say we have a union type composed of some values including the `null` and `undefined` values like this,

```ts
// a simple union type
type MyType = "Hi" | "Hello" | null | undefined;
```

Now to make a new type by excluding the `null`, `undefined` values from the `MyType` type, we can use the `NonNullable` utility type and pass the `MyType` type as the first type argument.

It can be done like this,

```ts
// a simple union type
type MyType = "Hi" | "Hello" | null | undefined;

// make a new type by excluding
// the `null` and `undefined` values
// from the `MyType` type
// using the `NonNullable` utility type
type RevisedType = NonNullable<MyType>; // "Hi" | "Hello"
```

As you can see from the above code that `null` and `undefined` values are not present in the `RevisedType` type.

We have successfully made a new type by removing the non-nullable values from a union type in TypeScript. Yay 🥳!

See the above code live in [codesandbox](https://codesandbox.io/s/easily-make-new-type-by-removing-null-undefined-values-from-union-type-typescript-b0pnpy?file=/src/index.ts).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Day 562 : The Heart
Tags: hiphop, code, coding, lifelongdev
Published: 2022-05-16 23:57:00

_liner notes_:
- Saturday : Whew...it seemed like the day did not want me to do the radio show. haha Went to get food, waited for a long time only to be told it would take even longer, went to another place and still had to wait again. My folding workstation fell off. Luckily I had enough time to finish putting together the radio show when I got to the parking log of the station. Did the show and, as usual, had a really good time. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a photo of me standing the side with the Google I/O stage with a large screen, a podium and walls with shelves and random items and a seated crowd behind me with the words May 14th 2022 Stagnate The Magnate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cqionh4syo96ihwwt53g.jpg)

- Sunday : Got back to doing the https://untilit.works cyphers. Pretty excited and warms the heart that everything still worked after over a month since the last one when I started travelling. Got some stuff done. Did ALL the laundry that piled up. Fixed my workstation in my van. Paid some bills. Signed up for a new application. Not a bad day.

- Professional : So I updated some code on a project and installed it. It worked for the most part, but I think I may have thought of how to work around some things. Filled out some event reports for events I've attended recently. Had a couple of meetings. Pretty good day.

- Personal : Been getting acclimated to being back in the van for being away for like 2 weeks at events. This will be a quick stay because I'm headed back out in the beginning of next week. Ordered a new suitcase and backpack. Going to see if I can get some more packing room.

![Some tents on a lake in Zug, Switzerland at sunset with some mountains in the distance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6swcy22hwhvi9mn5qgkq.jpg)

Going to see if I can get the thing from work on the way to a good state. I've been catching up on the new season of Atlanta. Probably do more of that and go to sleep. Oh and I've been posting updates at https://doingstuff.in from my trips when I haven't been posting blogs.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube uAPUkgeiFVY %}
Application deployment design
Tags: devops, kubernetes, microservices, docker
Published: 2022-05-16 23:48:47

Hey folks

I have heard many times that deploying applications on Kubernetes can be a complex task for developers because it involves a lot of infrastructure related knowledge.

Because of that, I started building this side project:

[Project Demo](https://www.youtube.com/watch?v=eV1KIBlFjQk)

Would you use something like this in your team?
‘The client noticed that the server is not a supported distribution of Elasticsearch‘ error and solution
Tags: elasticsearch, django, python, aws
Published: 2022-05-16 23:44:19

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugjfmm1s9rzyyhorkafk.jpeg)
The django project is running very well, but suddenly the interface query error.

 ```shell
{
 “code”: 400102,
 “message”: “请求错误”,
 “data”: {
 “detail”: “The client noticed that the server is not a supported distribution of Elasticsearch”
 }
}
```
Search Baidu there is no result, just search Google Query to the news link

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkrikk8h92v63qoqhepg.png)
 Links:
https://www.theregister.com/2021/08/09/elasticsearch_python_client_change/

The main meaning is that in order to fight aws, es no longer supports the apach 2.0 open source protocol in the new version.
https://www.oschina.net/news/154014/aws-fork-clients-of-elasticsearch
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jghw84821yuha89drn3o.png)
 Therefore, it is necessary to reduce the dependency version of the es client of the python project or adopt the open source version of opensearch newly pulled by aws. However, opensearch can not be used in the production environment
https://aws.amazon.com/cn/elasticsearch-service/the-elk-stack/what-is-opensearch/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cy87315k6hvpjzs3dz9.png)
So modify the es version of the specified project in pipfile.rch can not be used in the production environment
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qz0jbicsawzrr1cxogv4.png)
Restart the build, the problem is solved!
Simple and stupid way to reload k8s pods regularly
Tags: kubernetes, docker, devops, simpleandstupid
Published: 2022-05-16 23:43:22

If you are not principal expert in kubernetes, someday you may find yourself struggled with question «how i can restart my pods regularly?».
This question may look very strange. And partially it is.
But before you close this article, i try to justify this need. 

Very often in our backend developer careers we write not so good code. It may look good, been validated via static analysis, covered with tests, covered with mutation tests, fuzzy tests, and also you team may consist of thousands of QA's and you have much more safety nets around. And all this things are failed miserably against one little bug, that can be reproduced in any environment no matter how hard you try. And it could be worse - this bug can only be reproduced after a certain period of time. This is nightmare of every software engineer.
But production services won't wait for your detective efforts. They simply can't wait unpredictable period of time.
And, here we are — staring at the weapon of last resort. Yep, this is shameful choice: you should restart you service on regular basis. And yes, this «solution» will easily fix this impudent irreproducible bug.

If you try to search possible ways of doing so in k8s cluster, you may find about 5 possible ways. And i personally choose only one of them. It also may look strange, but it's the easiest way: just use scheduled CI jobs (if you are using gitlab, for example) and run command `kubectl restart` in this scheduled job.

This is the easiest, fastest and bug free path.