teleren/devto huggingface dataset:
Update All Node Packages to Latest
Tags: npm, node
Published: 2021-08-13 03:39:40

---
title: Update All Node Packages to Latest
published: true
description: Update your old node projects!
tags: npm, node
cover_image: https://miro.medium.com/max/611/1*ufZwQfhVlVd6ZeTsaUfAlA.png
canonical_url: https://chektek.com/code/update-all-node-packages-to-latest/
---
# Update All Node Packages to Latest

We’ve all returned to an old project only to find all of our dependencies outdated. Motivation to write code outside the
workplace ebbs and flows, so I find myself reviving old projects frequently. Home projects are not typically all that
large, so it is easy to update the dependencies all at once and verify the functionality is not compromised.

## Warning

Do not use this on a large project! You are almost guaranteed to come across package incompatibility. Another thing to
note is that if you are doing this to a project using typescript and one of the big frameworks, there is a good chance
that typescript is ahead by a version or two, so you will have to drop it back down to be compatible.

## npm-check-updates

The tool we are going to use is called [npm-check-updates](https://www.npmjs.com/package/npm-check-updates). You can
find a full list of commands and flags [here](https://www.npmjs.com/package/npm-check-updates), but the quick steps are
listed below.

1. Install the tool `npm install -g npm-check-updates`
2. Verify that your package.json is checked in to version control (the next command will overwrite the package.json)
3. Update the package.json `ncu --upgrade`
4. Validate the changes to your package.json
5. Install the new packages `npm install`

Congratulations, your project now has the latest node packages!
How To Add Toastr Notification In Laravel
Tags: laravel, toastr, notification, php
Published: 2021-08-13 03:38:38

In this tutorial I will show you how to add toastr notification in laravel application. toastr is a Javascript library for Gnome / Growl type non-blocking notifications.

There are many types of notification available to dispaly diffrent messages in laravel or php like simple pop up notification using jquey, display messages using bootstrap modal, display notification using flash message, and toastr message notification.

So, let's start and add below code in your application to get output.

You will get output like below screenshot.

![How To Add Toastr Notification In Laravel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lahitqhx0lsffzzpkmhn.png)

---

> **_[Read More : How To Add Toastr Notification In Laravel](https://www.techsolutionstuff.com/post/how-to-add-toastr-notification-in-laravel)_**

---

You May Also Like To Read : 

1. **_[Read More : How To Add Bootstrap Modal In Laravel](https://www.techsolutionstuff.com/post/how-to-add-bootstrap-modal-in-laravel)_**

2. **_[Read More : How To Delete Multiple Records Using Checkbox In Laravel](https://www.techsolutionstuff.com/post/how-to-delete-multiple-records-using-checkbox-in-laravel)_**

---

Thank you for reading.
Deep Dive into Zooming and Panning Features in the Flutter Chart
Tags: flutter, dart, webdev, mobile
Published: 2021-08-13 03:36:25

Learn how to perform zooming and panning in Syncfusion [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) widget easily. This video explains how to enable pinch zooming, double tap zooming, selection zooming, customize the selection rectangle, enable panning, and setting zoom mode. Also explains how to enable mouse wheel zooming and set the maximum Zoom Level in the Syncfusion [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) widget.

SYNCFUSION FLUTTER CARTESIAN CHART
-------------------------------------------------------------
Product overview: https://bit.ly/3iAH8ae
Documentation: https://bit.ly/37E3nWt
API documentation: https://bit.ly/2Qw1JBa
Examples—GitHub: https://bit.ly/3cG5f57

{% youtube yVvRFanl820 %}
Automate VPN connection from the Command Line on Mac OS
Published: 2021-08-13 03:29:55

**Background**

At Rocketium, developers have to use two different VPN connections based on what they are working on. We can connect directly from the network tab in the status bar. But developers tend to forget to change VPN before SSH into the machine. They are a couple of ways to solve this. In this post, i will show how to automate VPN connection using OSA Script.

**Prerequisite**
VPN has to be configured in MacOSX network preference and knowledge on osascript. 

**Let’s Build**
First, we connect to our VPN and then SSH into the machine. 

**Automating VPN connection**
For this, we are using the apple script. In this script, we tell OSX to connect to System Preferences → Network. Now we will iterate through the pre-configured row and select our **VPN** and then connect our **VPN**. Here is the script 

``` 
repeat while true
	tell application "System Events"
		tell application process "System Preferences"
			if not (window 1 exists) then
				tell application "System Preferences"
					activate
				end tell
				repeat while not (menu bar 1 exists)
				end repeat
				repeat while not (menu "System Preferences" of menu bar 1 exists)
				end repeat
				repeat while not (menu item "Hide System Preferences" of menu "System Preferences" of menu bar 1 exists)
				end repeat
				delay 3
				click menu item "Hide System Preferences" of menu "System Preferences" of menu bar 1
			end if
			
			click menu item "Network" of menu "View" of menu bar 1
			
			tell window 1
				repeat while not (rows of table 1 of scroll area 1 exists)
				end repeat
				repeat with current_row in (rows of table 1 of scroll area 1)
					if value of static text 1 of current_row contains "VPN Name" then
						select current_row
						exit repeat
					end if
				end repeat
				
				repeat with current_button in (buttons in group 1)
					if name of current_button is equal to "Connect" then
						click current_button
						exit repeat
					end if
				end repeat
			end tell
		end tell
	end tell
	delay 60
end repeat
```

Replace **VPN Name** with your name.

Now we can put the above script and ssh address into a single utility file to make this process seamless.

**ConnectAndSSH.sh**

``` 
osascript -e 'tell app "Terminal" to do script "sleep 25; ssh -i sshPemFile username@ip"';
osascript /Users/gowthamkosaraju/Desktop/VPNAutomationScript.scpt; 
```

In the above script, we said the terminal app to open a new window to sleep for 25 seconds and then SSH into the machine. Meanwhile, our VPNAutomation.scpt file will execute and VPN will be connected.
Since most of the developers work terminal app. It wouldn’t be amazing if we can do all these through a single command? 

Let us use our favorite alias commands to do it. Go to the terminal app and type 

``` 
vim ~/.zshrc 
```

```
alias connectVPN=”/Users/gowthamkosaraju/Desktop/ConnectAndSSH.sh”
```

Reload your terminal app to make these changes effect. Now if you type connectVPN. You will connect to VPN and ssh into your machine with a single command.
DailyUI #002 - Credit Card Payment (CodePen)
Tags: codepen, css, design, 100daysofcode
Published: 2021-08-13 03:10:04

DailyUI Challenge #002 - a credit card payment checkout page. 

The "Place your Order" button will clear/reset all information entered.

Free vector illustration taken from [Delesign](https://delesign.com/free-designs/graphics/).

Font: 
- Roboto

[Color Scheme](https://coolors.co/4f7cac-333333-808080-2a94f4):
- #4F7CAC - main shade of blue
- #333333 - the shade of black
- #808080 - the shade of gray
- #2A94F4 - button hover shade of blue

{% codepen https://codepen.io/anniedotexe/pen/dyWarpR %}
Set min Date to Today in Date Input Field, By Tag Helper in ASP.NET Core
Tags: dotnet, aspnetcore
Published: 2021-08-13 02:59:07

Here I will show you how to set date input field's min date to today by **Tag Helper** in asp.net core.
Create a new class name it **InputDateTagHelper** (or any name you like it).
Update the **InputDateTagHelper.cs** class with the following code statements:

```c#
[HtmlTargetElement("input", Attributes ="is-accept-old-day")]
    public class InputDateTagHelper : TagHelper
    {
        [HtmlAttributeName("is-accept-old-day")]
        public bool OldDay { get; set; } = false;
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            if (!OldDay)
            {
                
                var dateTime = DateTime.Now;
                var dd = dateTime.Day;
                var mm = dateTime.Month;
                var yyyy = dateTime.Year;

                string newDay = Convert.ToString(dd);
                string newMonth = Convert.ToString(mm);

                if (dd < 10)
                {
                    newDay =  $"0{newDay}";
                }
                if(mm < 10)
                {
                    newMonth = $"0{mm}";
                }
                var today = $"{yyyy}-{newMonth}-{newDay}";
                output.Attributes.SetAttribute("min", today);
            }
        }
    }
```

The previous code is accept a boolean field **OldDay** if the field is false then set a **min** attribute to Date Input field and set it's value to date of today.

To test this new tag helper in your .cshtml file, you have to register it inside _ViewImport.cshtml file first, Here is the code:

```c#
@addTagHelper Platform.Infrastructure.*, Platform
```
The Platform is my ProjectName and the Infrastructure is the folder that I put the **InputDateTagHelper.cs** class inside it

So, now you can use the InputDateTagHelper like so:

```html
<input type="date" is-accept-old-day="false" />
```
Here I force the input field to accept the today as a min date by passing false to is-accept-old-day field

The HTML output is

```html
<input type="date" min="2021-08-13">
```
Create a Netflix clone from Scratch: JavaScript PHP + MySQL Day 18
Tags: php, javascript, webdev, tutorial
Published: 2021-08-13 02:48:14

Netflix provides streaming movies and TV shows to over 75 million subscribers across
the globe. Customers can watch as many shows/ movies as they want as long as they are
connected to the internet for a monthly subscription fee of about ten dollars. Netflix produces
original content and also pays for the rights to stream feature films and shows.

In this video,we will validate the Password

{% youtube 8o65ZiRN1ow %}


In this video,we will create insertData method

{% youtube 0z2Z308P7Ac %}


If you like my work, please consider
[![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm11knj7d8zwcvo150q2.png)](https://www.buymeacoffee.com/cglikpo)
so that I can bring more projects, more articles for you

If you want to learn more about Web Development, feel free to [follow me on Youtube!](https://www.youtube.com/c/ChristopherGlikpo)
August 13th, 2021: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2021-08-13 02:42:27

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

<center>

![Yoda wooping someone's butt](https://media.giphy.com/media/yDYAHbqe5DfyM/giphy.gif)
</center>

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{%link https://dev.to/devteam/what-was-your-win-this-week-46ik %}

<center>

![Little kid making a fist as if to say "Yes!"](https://media.giphy.com/media/6brH8dM3zeMyA/giphy.gif)
</center>
Running Azure Functions with .NET 5 on Docker
Tags: dotnet, docker, azure, csharp
Published: 2021-08-13 02:11:46

The  [Azure Functions .NET worker](https://github.com/Azure/azure-functions-dotnet-worker) has been out for a while, and it finally enabled developers to use C# 9 and .NET 5 on function apps. This is a new way to create C# function apps, it now has a `Program.cs` class, with the good old generic Host builder and all the extension methods that we're used to see on regular ASP.NET Core and Worker service projects. This is how it can look:

```csharp
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;

var host = new HostBuilder()
	.ConfigureAppConfiguration(builder => builder.AddJsonFile("appsettings.json"))
	.ConfigureFunctionsWorkerDefaults()
	.ConfigureServices(Startup.ConfigureServices)
	.Build();

await host.RunAsync();
``` 

Note that this is using [top-level statements](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements). This came with C# 9 and it basically hides the Program class and its namespace, removing some boilerplate and making it easier to understand for newcomers, looks nice!

If you want to run the .NET 5 function apps on Docker containers, as of the day of writing this, the Dockerfile generated by `func init --docker --worker-runtime dotnetIsolated` does not build correctly, you'll encounter the following error:

> The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.

This is because  [you'll still need .NET Core 3.1 installed](https://github.com/Azure/azure-functions-dotnet-worker/issues/297)  for it to work. I don't know why this wasn't fixed in the core tools template, but until it's fixed, you can use the following workaround: copying the 3.1 SDK into the image.

```
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS installer-env
# Add the line below and it'll build successfully
COPY --from=mcr.microsoft.com/dotnet/sdk:3.1 /usr/share/dotnet /usr/share/dotnet

COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
    mkdir -p /home/site/wwwroot && \
    dotnet publish src/functions/*.csproj --output /home/site/wwwroot

# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0-appservice
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true

COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
```

This will hopefully get fixed soon, it's very weird to see a build error on a template like this.

## Important: HTTP trigger authorization on Docker containers

If you're going to use Docker containers to run your function apps, you'll get 401 responses when testing your HTTP functions, there's a nice blog post by Martin Björkström explaining how to solve this problem, [check it out](https://martinbjorkstrom.com/posts/2020-02-12-testing-protected-azure-functions)!
Hot Tips to Get the Most from your Bootcamp
Tags: beginners
Published: 2021-08-13 01:56:00

This is for my students, and for anyone who is embarking on learning to code, whether in a bootcamp, self-taught, or university. 

- Make flashcards of core concepts/new vocab/code snippets you see again and again.  Use index cards, or better yet, [Anki](https://apps.ankiweb.net/)

- Go to office hours, even if you fully understand the material, or conversely, even if you are completely lost. 

- Write down every error message you get and how you solved it.

- Ask questions to the point of feeling obnoxious, then ask more questions.

- Read the error messages/stacktrace.  They are your guideposts. 

- Work on homework in groups.

- Write about what you are learning. Publish it on Twitter.

- Work in short sessions, 30 minutes at a time.

- Have a time where you turn your laptop off for the night.

- Do not allow yourself to be frustrated. Take a break before that happens. 

- Ask for extensions, if you need them! 

- Answer other people's questions. Concentrate on forming a collaborative dialogue with them, instead of having the 'right answer'.

- Do *not* procrastinate. Often the hardest part is getting started. Just work on the thing for five minutes. 

- Anything worth doing is worth doing poorly. Try the 70% rule: can you get this thing to work 70% of the way?

- Your new favorite phrase is 'I don't know.' Use it! 

- It is ok and expected to use Google, a lot. It is not cheating.

- Seek positive encouragement from friends, family, or even the internet. 

- There are often many right ways to do something. It is ok if your way is different than your colleague's. 

- There are pieces of code, and then there are finished projects. Programming is everything that happens in between. 

- The best way to learn to program is not 'to build projects', necessarily.  But that is a very efficient way. 

- Teach others.  Take on a mentee. 


Photo by <a href="https://unsplash.com/@baciutudor?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Tudor Baciu</a> on <a href="https://unsplash.com/s/photos/code?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
A JavaScript nodeJs repository to generate coordinates in real time.
Tags: node, react, machinelearning
Published: 2021-08-13 01:46:18

You can generate waypoints for your data from [here](https://drone-air-mission-planning.vercel.app). These waypoints can be used to generate coordinates along the waypoints in real-time.

This is a memory free solution, it uses less memory compared to others.

#### [Live](https://drone-air-mission-planning.vercel.app/)

#### [repo](https://github.com/ats1999/drone-air-mission-planning)

## Contibutions are welcomed and hit a start if you liked!
A monolithic success story
Tags: cicd, continuousdeployment, qa
Published: 2021-08-18 13:29:37

---
title: A monolithic success story
published: true
date: 2021-08-13 00:00:00 UTC
tags: cicd,continuousdeployment,qa
canonical_url: https://jhall.io/archive/2021/08/13/a-monolithic-success-story/
---

A few years ago I joined [Bugaboo](https://www.bugaboo.com/), makers of some of the best baby strollers (or prams) in the world, as the manager of software development for their eCommerce platform.

At the time, they were already over-schedule and over-budget on a re-platforming project. One of the things I was able to do to help get the project back on schedule was implement what I now refer to as [Lean Continuous Deployment](https://jhall.io/lean-cd/): the idea that we can deploy every change as soon as the developer hits the **Merge** button, even without automated testing.

Bugaboo’s core web site was effectively a monolithic CMS system written in Java. When I joined, there were _no_ automated tests, except for a few sparse unit tests for a few backend components. We did have a group of several manual QA testers, though.

A core concept of the Lean CD approach is to continue doing any existing manual checks, such as QA, but to do them before the developer presses the **Merge** button.

At Bugaboo, we accomplished this by scripting the creation of an automatic test environment on AWS for every pull request in Git. Every new pull request fired up a new environment. This environment could be used for manual QA, or any other manual testing or preview. When that pull request was merged or closed, the environment was deleted.

For an application that size, it did take 15 to 20 minutes to start the new environment. But it had a revolutionary impact on the development process:

- QA engineers were able to test each new feature in isolation, rather than all muddled together in a single staging environment.
- Developers knew that their feature was _done_ when they pressed **Merge**. There was no lingering question about whether it would pass QA and need more work later, or if it might even have to be reverted before release.
- Developers could demo their individual features during Sprint Reviews, or ad-hoc, without fear that some other developer’s experimental feature might break things.

* * *
_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 see all the password-related information of a user account in Linux?
Tags: resource
Published: 2021-08-13 00:00:00

---
  title: How to see all the password-related information of a user account in Linux?
  published: true
  tags: Resource
  date: Fri Aug 13 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/see-all-password-related-information-user-account-linux
  cover_image: https://melvingeorge.me/_next/static/images/main-66e777da9bbd2d8d2aeb7710634cd0fe.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/see-all-password-related-information-user-account-linux)
  
To see all the password-related information of a user account, you can use the `chage` command followed by the `-l` flag (list flag) and then the `user` account name in the Linux terminal.

```bash
# See all password related
# information of user account
chage -l <USERNAME_HERE>
```

For example, suppose we have a user account called `john` and we can view all the password related information for the user using the `chage` command like this,

```bash
# See all password related
# information of user account
chage -l john
```

The command shows the information on :

- Last password change date
- Password expiry date
- Password inactive date
- Account expiry date
- Minimum number of days between password change
- Maximum number of days between password change
- Number of days of warning before password expires

The output of the above command may look like this,

```bash
# OUTPUT

Last password change                                    : Aug 28, 2021
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
```

Try executing the above commands live on this [online Linux terminal](https://linuxcontainers.org/lxd/try-it/).

That's all 😃!

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

---
Object Oriented Programming
Published: 2021-06-30 16:22:42

   *"As humans, we’re constantly faced with myriad facts and impressions that we must make sense of. To do so, we must abstract underlying structure away from surface details and discover the fundamental relations at work. Abstractions reveal causes and effects, expose patterns and frameworks, and separate what’s important from what’s not. Object orientation provides an abstraction of the data on which you operate; moreover, it provides a concrete grouping between the data and the operations you can perform with the data—in effect giving the data behavior."
—Object-Oriented Programming with Objective-C, Apple Inc.*

OOP is exactly what an inexperienced programmer might guess...programming structure that is oriented around objects.  smaller functionalities(objects) that can have specific behaviors(methods/attributes) bundle up in a way that executes a larger logical functionality(classes). Each object has values defined in its class resulting in a simple structure with less duplicate code.

                         Basic structure of OOP:
   1. Classes --> the top structure of methods/attributes           
   2. Objects--> instances of a class with specific data             
   3.Methods--> behaviors/actions performed on data                                       
   4.Attributes--> information that is stored via the class       

                           Four pillars of OOP:
   1. Inheritance-->child classes getting data from a parent class   
   2.  Encapsulation-->displaying specific info from an object
   3.  Abstraction--> accessing a specific object 
   4.  Polymorphism--> shared behavior of methods     
   
	 
Object Oriented programming really just means to think about the structure of the program at the beginning of your projects. Planning ahead of how to create simple objects and reusable classes will help with maintaining an easier flow of logic when working on a project. OOP is just one way to build an efficient data structure with reusability.