teleren/devto huggingface dataset:
Deploying with the Click of a Button
Tags: netlify, development, workflow
Published: 2022-01-03 04:26:50

---
title: Deploying with the Click of a Button
published: true
description: Create a 'Deploy To Netlify' button for any project to make deployment silly simple and ever so easy.
tags: Netlify, Development, Workflow
cover_image: https://pbs.twimg.com/media/EJqexv4WwAcojgg.jpg
canonical_url: https://www.netlify.com/blog/2021/12/26/deploying-with-the-click-of-a-button/
series: Netlify - a feature a day 2021
---
> Throughout December we'll be [highlighting a different Netlify feature each day](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=snippet-injection). It might just be the thing you need to unlock those creative juices, and [dust off that domain](https://www.netlify.com/blog/2021/12/01/dusty-domains-your-forgotten-domains-raise-money-for-charity/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=snippet-injection) you registered but never deployed! Keep an eye [on the blog](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=snippet-injection) and on [Twitter](https://twitter.com/netlify) for each feature!

If only there was a way to help people (and/or pets) deploy your amazing projects with a click of a button. Well, funny you should mention that, Tara, because indeed there is! Adding the link to your project repo to this snippet of code here:

```html
https://app.netlify.com/start/deploy?repository=<your repo right here!>

example: https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter
```

Then you can add the button to your website, repo, blog post, etc with this code:

```
markdown: 
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter)

html:
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter"><img src="https://www.netlify.com/img/deploy/button.svg"></a>
```

Would ya look at that, we have a button. Just look at it!

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter)

When someone clicks the button it will start to walk them through the deployment process. Have a click and try it yourself. Happy coding 👩🏻‍💻!



![screenshot of the first step in the deployment processes](https://cdn.netlify.com/139476aa52306ca797183171f9e499c906829398/23fd5/img/blog/screen-shot-2021-12-28-at-12.04.54-pm.png "first step")



### Resources for the Road

* [Deploy to Netlify Docs](https://docs.netlify.com/site-deploys/create-deploys/#deploy-to-netlify-button)
* See it in the wild in [the Next.js template repo](https://github.com/netlify-templates/next-netlify-starter)
How to sort a list in Python
Tags: python, datascience, machinelearning, programming
Published: 2022-01-03 17:26:40

In this post we will discuss how to sort list in Python. 

There are mainly two ways to sort a list in Python.

1. `sorted` function
2. `sort` method 

## 1. `sorted` function: 
This sort the given list and generate a new list, which means existing list won't be modified.

```
In [1]: numbers = [23, 42, 12, 121, 45, 9, 8]

In [2]: sorted(numbers)
Out[2]: [8, 9, 12, 23, 42, 45, 121]

In [3]: numbers
Out[3]: [23, 42, 12, 121, 45, 9, 8]
```
As you can see in the above example `Out[3]` has the same numbers list. 

## 2. `sort` method:
This method applies the sorting on the list and updates the existing list. This is called in place sorting. 

```
In [4]: numbers.sort()

In [5]: numbers
Out[5]: [8, 9, 12, 23, 42, 45, 121]
```

## Key param: 
`sorted` and `sort` methods takes an extra parameter called `key`. Using this `key` param we can control the sorting. 

Example: `names = ['Bob', 'Charles', 'James']`. Let's say we want to sort the above list of `names` based on length of the each time. 
Solution: 
```
In [7]: sorted(names, key=len)
Out[7]: ['Bob', 'James', 'Charles']
```
We can pass any function we want to this `key`. Let me know which method you like in the comments. If you like this content consider following me.
#Frontend or #Blackened
Published: 2022-01-03 20:27:51



My first challenge : 100 Days of Code - DEV Community 👩‍💻👨‍💻




My first challenge : 100 Days of Code
#100daysofcode
#javascript
#devops
#PHP
#webdev
#Python

Hello, With 2021 just ended and 2022 started i feel like i have doing nothing in 2021 for improving my self. So i decided to try to make the 100 days of code challenge .

What i want by doing this :

Making me able to be a freelance dev
Becoming a backend developer.

My objective are prettie simple:

Improve my basic notion in HTML & CSS
Improve my knowledge in PHP and Python
Improving my DEVOPS Skills.
Gain on regularity and rigor.


My motivation :
I want to be a Devops engineer but i love developing. So i decided i am going to do both. DevOps Engineer as my full time job. Fullstack Dev as a freelance

PS:

if you see any errors in my spellings, This is my first post on the site, if you have any advice, I'm interested
Day 501 : Goodnight
Tags: hiphop, code, coding, lifelongdev
Published: 2022-01-03 22:58:26

_liner notes_:
- Saturday : First show of 2022! Felt good to be back at the station. I don't like the long drive though. haha. Had a good time and got to play some new music and talk with some folks. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of Michael from "Good Times" holding a painting of Black Jesus that JJ painted with the words Jan 1st 2022 20](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dc1plzgz7i40cc4csinp.jpg)

- Sunday : Did my Sunday Study Session over at https://untilit.works . Actually had someone create a HACO (Help A Coder/Creator Out) room and it actually worked. I think I was able to help the person with their issue even though I've never really used React Native. Got some other stuff done. Pretty productive day.

- Professional : Today is the first day back to work after vacation. Not too bad. Helped out with a question from the Community channel. Replied to some messages. Spent most of the day preparing for a workshop that I'll be holding in a couple of days. Good news is that I already made the demo applications and just need to put together some slides. It won't be too many slides. I want to focus more on getting everyone set up with demos that they can use/refer to later during the hackathon.

- Personal : During the holiday break, I was pretty productive. I launched an application for Netlify's Dusty.domains charity event. It's https://xoXR.games. Right now, it has the WebXR tic-tac-toe game with voice chat I created earlier in the year. The plan is to include Mixed Reality games from other developers and some more that I make as I learn more about the topic and technology. I also recreated https://doingstuff.in using Astro and Svelte. Added an about page and store. I'm still working on the live stream capability that I'm adding to it. Did a couple of live stream test runs and it's working. Just need to refine some things and add a couple of more pages. I also did some work on the van and put the storage units back up that fell, strengthened some connections and made another shelve extension. Oh and I watched the 'Hawkeye' series on Disney+.

![A field filled with tall green grass and red and yellow flowers with a lake and a mountain range in the distance at sunset in Wallowa, OR, United States](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3z6lxl99fn1rbiwu50m.jpg)

Got some stuff coming in that I think I'll be able to keep the doors of the cabinets closed. I tried gluing magnets, but they wouldn't stick. Going to try some elastic bands. I also want to get some work done on my side project. I want to work on the layout of the live page. Going to eat dinner and get back to work.

Goodnight!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube LJYMRNsDyhA %}
Longest Substring Without Repeating Characters – LeetCode Solutions
Tags: leetcode, leetcodesolutions, python, datastructures
Published: 2022-01-04 09:04:20

LeetCode has a coding Problem in Its’ Algorithm Section: Finding “Longest Substring Without Repeating Characters in a String”

Question
Given a string s, find the length of the longest substring without repeating characters.

Example 1: Input: s = “abcabcbb” Output: 3
Explanation: The answer is “abc”, with the length of 3.


 
Example 2: Input: s = “bbbbb” Output: 1
Explanation: The answer is “b”, with the length of 1.

Example 3:Input: s = “pwwkew” Output: 3
Explanation: The answer is “wke”, with the length of 3.

To read the Solution Visit https://hecodesit.com/longest-substring-without-repeating-characters-leetcode-solutions/
A Rust macro which will derive Bytecode for you
Tags: rust, showdev, computerscience, programming
Published: 2022-01-04 11:43:40

Hello!

I made a Rust proc-macro which will compile and parse your enums and structs to and from a bytecode for you!!!

{% github YJDoc2/Bytecode no-readme%}

Check it out and star it if you think it is interesting!

## Why
Consider you are writing a VM, and need a bytecode representation for your opcodes, to store it in the VM's memory. You might consider something like this :
```rust
pub enum Register{
    AX,
    BX,
    ...
}

pub enum Opcode{
    Nop,
    Hlt,
    Add(Register,Register),
    AddI(Register,u16),
    ...
}
```
If you try to write functions to compile and parse these two enums to a simple bytecode, it would be something like this :
```rust
impl Register{
    ...
    fn compile(&self)->Vec<u8>{
        match self{
            Register::AX => vec![0],
            Register::BX => vec![1],
            ...
        }
    }
    fn parse(bytes:&[u8])->Result<Self,&str>{
        match bytes[0]{
            1 => Ok(Register::AX),
            2 => Ok(Register::BX),
            ...
            _ => Err("Invalid opcode")
        }
    }
    ...
}

impl Opcode{
    ...
    fn compile(&self)->Vec<u8>{
        match self{
            Opcode::Nop => vec![0],
            Opcode::Hlt => vec![1],
            Opcode::Add(r1,r2) => {
                let mut v = Vec::with_capacity(2);
                v.extend(&r1.compile());
                v.extend(&r2.compile());
                v
            }
            Opcode::AddI(r1,v1) =>{
                let mut v = Vec::with_capacity(3);
                v.extend(&r1.compile());
                v.extend(&v1.to_le_bytes());
                v
            }
            ...
        }
    }
    fn parse(bytes:&[u8])->Result<Self,&str>{
        match bytes[0]{
            1 => Ok(Opcode::Nop),
            2 => Ok(Opcode::Hlt),
            3 =>{
                let r1 = Register::parse(&bytes[1..])?;
                ...
            }
            ...
            _ => Err("Invalid opcode")
        }
    }
}
```

Even for the two instructions I have shown, this is pretty long, tedious and boring. 

And now consider doing this for at least 25 to upto 100-ish opcodes, as you might need. :worried: :cold_sweat: 

And now consider you want to remove a variant or add a variant in the middle of an enum :cold_sweat: :scream:

You will need to shift all the values accordingly, manually. 
Not Fun.

The macro will do this for you, and let you concentrate on implementing your VM.
Fun. (hopefully).

## Links

The GitHub contains more information and detailed example of usage, so go check it out and :star: it !

{% github https://github.com/YJDoc2/Bytecode %}

Thank you!
Wrapping up 2021 and what's in store for 2022
Tags: opensource, javascript, webdev, node
Published: 2022-01-04 12:57:31

2021 has been quite overwhelming with all the interest we have received from the developer community - thanks a ton to all of you for that! Read below for a quick review of 2021 and a short glimpse into 2022.

## Highlights of 2021 :zap:️

###Product highlights:
- Fully open-source; from core and admin to starters and design system
- Created an onboarding flow that gets you up and running with only 2 commands
- Developing starters that allow you to spin up a full store with a Gatsby or Next.js frontend
- Building an extensive plugin library with integrations to Stripe, Contentful, Strapi, Algolia, Paypal, and many more
- Building out our documentation, incl. deployment guides, setup tutorials, plugin guides
- Migrating the project to Typescript

###Community highlights:
- Growing from 10 to +5,500 GitHub stars since our official launch 6 months ago
- Launching our community Discord and welcomed ~700 amazing members
- Hosting our first Hackathon and got 85 contributions to the core project

## What is to come in 2022 :crystal_ball:
###Medusa 2.0
We aim to launch Medusa 2.0 by the end of Q1. A first core foundation for this will be released with our new [Admin dashboard in January](https://www.medusajs.com/post/admin-redesign). We will share more details about the roadmap as we progress on our [Discord](https://discord.gg/F87eGuwkTp).
###Doubling down on community
Hackathon, conferences, merch store, video tutorials, and a heck of a lot more; community is king and we want to give back for all the contributions we have received through many more activities addressed specifically to our community.
###Medusa Cloud
It should not take much to deploy Medusa and although our product will always remain open-source and available for self-hosting, we want to make it a one-click experience to get started with a Medusa store - and don’t worry you will always own the code that powers your store so that when it is time to customize your can quickly take over.
Plenty of exciting things to happen. We cannot wait to show it all to you!
Is 99% Good?
Tags: devops, sre, monitoring, performance
Published: 2022-01-05 03:24:15

If you ever took at test at school, you’d probably be really happy with getting a 99 grade. After all, it’s almost a perfect score.

But when you’re talking about software systems, is 99% availability good?

Well, if your system needs to be available 24/7 everyday, 99% won’t cut it.

## Downtime Table

Take a look at the below table. It shows how much downtime (in time) equals a given percentage.

| Availability &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|    Annual Downtime     |
| ------ | ----------- |
| 99%   | 3 days, 15 hours, 40 minutes |
| 99.9% | 8 hours, 46 minutes |
| 99.99%    | 52 minutes, 36 seconds |
| 99.999%    | 5.26 minutes |

## What's this Mean?

If your system should be available at all times, a 99% availability means that your system can have almost 4 days of downtime per year! For a system that needs to be available, that is a terribly long time.

Imagine if you have a business critical system that fails. If it was down for almost 4 days, your company could lose millions/billions of dollars! Take for example, when [Facebook was down in 2021](https://en.wikipedia.org/wiki/2021_Facebook_outage) for about 7 hours. Their stock dropped 5%, or $40 billion dollars! This was only for a 7 hour outage. Can you imagine if they had just 99% availability and Facebook was down for 4 days?

## What should you aim for?

This depends on your system, and usually a probability or downtime measurement (rather than percentage) should be given. "Five 9's" is a common "standard" that systems try to aim for. **That is 99.999% availability (hence five 9s)**. Standards is in quotes because it really isn't a standard, it's just what's commonly mentioned in the industry as a goal to achieve.

Check out this [Wikipedia article](https://en.wikipedia.org/wiki/High_availability) for more information. 

Thanks for reading!
Visit [anthonydellavecchia.com](https://anthonydellavecchia.com) for more articles!
AWS Community ASEAN - Quarterly Awards for Contributors in 2022
Tags: aws, devrel, cloud, community
Published: 2022-01-25 13:20:15

## Happy New Year, everyone!

To celebrate the new year, our editorial team has worked with AWS to launch the AWS Community ASEAN Dev.to Awards! These awards will recognize writers who have contributed to the AWS Community ASEAN publication in 2022. Cool prizes await the quarterly winners!

With these writer awards, we hope to encourage community members to pursue writing articles to deepen their understanding of a topic and give back to the community at the same time.

## Awards 🏆

Without further ado, here are the awards:

![Image description](https://media.giphy.com/media/26u4exk4zsAqPcq08/giphy-downsized.gif)

1. **Most Insightful Content** - This award goes to the post's writer with the most insightful content. The editorial team will serve as judges for this award.
  - Prize: Echo Dot
2. **Most Engaging Content** - This award goes to the writer of the post with the most engagements (like, post, share) posted during the quarter
  - Prize: 100USD AWS Credits
3. **Promising New Author** — This award goes to newly joined authors with breakthrough content or surpassing average engagements. 
  - Prize: 100USD AWS Credits

## Criteria 🏵

- For now, we would include only content written in English and must be posted with the user's registered Dev.to account and under the AWS Community ASEAN publication.
- The winner must be a member of the AWS Community ASEAN publication. Join us by following the instructions in [this post](https://dev.to/awscommunity-asean/welcome-to-dev-to-aws-community-asean-ao9)
- The content must adhere to the community standards of both Dev.to and of [the publication](https://dev.to/awscommunity-asean/welcome-to-dev-to-aws-community-asean-ao9)
- The content must feature technical content related to AWS.

## When will we award?

The winners of each quarterly award will be awarded during the AWSUGPH AWS Community ASEAN Livestream and will be featured in the newsletter to be sent to the contributor's newsletter:
- Q1 - April 2022
- Q2 - July 2022
- Q3 - Oct 2022
- Q4 - Jan 2023

## Let's get writing! :D

If you need any form of support (i.e. editorial or technical), let us know! We'd love to help <3

![](https://media.giphy.com/media/26h0poAzDM5h8gHWE/giphy.gif)

Photo by <a href="https://unsplash.com/@austinchan?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Austin Chan</a> on <a href="https://unsplash.com/s/photos/blog-award?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Day 503 : Time Flies
Tags: hiphop, code, coding, lifelongdev
Published: 2022-01-05 22:34:50

_liner notes_:
- Professional : Did my workshop this morning. I kept getting up doing the night. I think I was excited/nervous about the workshop. Next thing I knew, it was time to start. The timeslot was 1 and a half hour. The time flies! Next thing I knew, it was over. Had a really good crowd that asked great questions. All my demos worked on the first try so that was a plus. Also got some really good feedback about the workshop. Afterwards, I had to take a nap. When I woke up, had a meeting about a new project that led into another meeting about working on the project. I helped out with a community project. Added links from the workshop to the hackathon's Discord. Then it was time to call it a day.

- Personal : Last night, I went to bed early because I had the workshop in the morning. I was able to add the ability to log into the side project using Twitter. Pretty much all I had a chance to do.

![View from a beach at sunset looking out into the ocean with a palm tree stretching out into the sea in Nananu-i-Ra Island, Fiji](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okmrmyw4263qyq0dpa4k.jpg)

Going to eat dinner and start working on my side project. I also need to start putting together the radio show together. Short update, I'm still tired. haha.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube OdZ1WH8rSOc %}
Open Port Check Tool
Tags: webdev, beginners, programming
Published: 2022-01-06 06:52:15

## What is Port Checker?
Port Checker is a simple and free online tool for checking open ports on your computer/device, often useful in testing port forwarding settings on a router. For instance, if you're facing connection issues with a program (email, IM client etc) then it may be possible that the port required by the application is getting blocked by your router's firewall or your ISP. In such cases, this tool might help you in diagnosing any problem with firewall setup. You could also find this useful for security purpose, in case you're not sure whether a particular port is open or closed. If you host and play games like Minecraft, use this checker to make sure the server port(25565) is configured properly for port forwarding, then only your friends will be able to connect to your server.

## Most Commonly Used Ports
Port numbers ranges from 1 to 65535, out of which well known ports are pre-defined as convention by IANA.

- 0-1023 - Well known ports (HTTP, SMTP, DHCP, FTP etc)
- 1024-49151 - Reserved Ports
- 49152-65535 - Dynamic/Private Ports

## Well known Ports

- 20 & 21 - FTP (File Transfer Protocol)
- 22 - SSH (Secure Shell)
- 23 - Telnet, a Remote Login Service
- 25 - SMTP (Simple Mail Transfer Protocol)
- 53 - DNS (Domain Name System)
- 80 - HTTP (Hypertext Transfer Protocol)
- 110 - POP3 (Post Office Protocol 3)
- 115 - SFTP (Secure File Transfer Protocol)
- 123 - NTP (Network Time Protocol)
- 143 - IMAP (Internet Message Access Protocol)
- 161 - SNMP (Simple Network Management Protocol
- 194 - IRC (Internet Relay Chat)
- 443 - SSL / HTTPS (Hypertext Transfer Protocol Secure)
- 445 - SMB
- 465 - SMTPS (Simple Mail Transfer Protocol over SSL)
- 554 - RTSP (Real Time Stream Control Protocol)
- 873 - RSYNC (RSYNC File Transfer Services)
- 993 - IMAPS (Internet Message Access Protocol over SSL)
- 995 - POP3S (Post Office Protocol 3 over SSL)
- 3389 - RDP (Remote Desktop Protocol)
- 5631 - PC Anywhere
- 3306 - MySQL
- 5432 - PostgreSQL
- 5900 - VNC
- 6379 - Redis
- 11211 - Memcached
- 25565- Minecraft

[Check Open Port Here](https://techvblogs.com/tools/port-checker)
What is in your bag?
Tags: watercooler, gear
Published: 2022-01-06 19:25:40

As a new year article, I decided to write up some words about what are the daily drivers I have in my bag. 

## Bag
 
I use a top-loaded HP bag for 15-inch laptops. My 17 inch Mac Book fits it well and it's pretty nice. But nothing special. 

## Laptops

I have multiple laptops. For my work, I mostly use Macbook Pro 17" - 16GB RAM, 2019 model. I also have Macbook Air 13" M1 model I use for my personal projects. I also got a few Windows and Linux machines but those are rarely used.  

## Other electronics

I carry Kindle Whitepaper 4 with me almost everywhere. I love reading.
I also carry Jabra Evolve 75 I use it for work meetings. It's a really great headset. I also have Marshall Mode II true wireless for music and or audiobooks on the go. I love the Marshall sound. 

I also have some USB/USB-C cables and some USB-C dongles. Fully embracing that Mac dongle life. 

## Drug store

I have deodorant in spray, hand sanitizer, mouth deodorant, and glass cleaning gel. Nothing special. 

## Various 

I have my Moleskin notebook, Parker pen, FFP2 respirator, chopsticks, and set of lockpicks. I have lockpicking as one of my hobbies I rarely use those but saved me calling locksmith more than once. 

---

If you like this article you can follow me on [Twitter](https://twitter.com/pavel_polivka).