teleren/devto huggingface dataset:
Information and Cyber Security - Be Aware of the Insiders
Published: 2021-10-04 20:02:10

The insider's part in the vulnerability of all sizes of organizations is huge and expanding. In the 2016 CSII (Cyber Security Intelligence Index), it is found that 60% of all breaks were placed into the execution by insiders. Of these information breaks, 3/fourth elaborate malignant goal, and 1/fourth elaborate accidental entertainers. By and by, while exchanges and fragments fluctuate discernibly in the value and size of their assets and in the innovation foundations they need to direct and get, what all ventures have in shared are individuals - every one of whom have the ability to be an insider threat. 
Prior managing the break, it's valuable to perceive the essential classifications of insider dangers for guaranteeing the data and digital protection of your organization: 
• We're simply human and human issue is a vital angle in breaks, and accepted however uninformed insiders are for the most part at risk. From wrong messages to filched gadgets to private information shipped off risky home frameworks, issues can be over the top expensive and can transform into the bumble whenever. The chanciest of these are good natured IT administrators, whose entire admittance to organization arrangement can curve a little blunder into a debacle. 
• few individuals unveil the passwords. With these accepted however purposive insiders, it's the assessment that matters. Noxious work force whose reason for existing is to take or mischief are an undeniable danger. A couple of remove practical information, some exchange data or insight, and some have a campaign against the affiliation. Along these lines, your organization's network protection faces an inquiry. 
Fortunately, investigation and the expansion of Artificial Intelligence (AI) convey perceiving planned insider intimidations simpler and less intrusive. By and by, even with movements in innovation, chiefs should be aware of what to look for and how to accentuation their security endeavors to get the most extreme profits from assurance: 
• Concentrate on the exact belongings. Miscreants desire for those you esteem most, which are frequently called your organizations' "royal gems." Recognize the most costly frameworks and data, and afterward give them the sturdiest protections and the most customary observing. 
• So when you read the following lascivious feature about some break by an outside programmer, recall that these assaults represent not exactly 50% of the information breaks out there. Also, remember that the programmer maybe used the personality of an unsuspicious specialist to pull it off. Find a way to guarantee your organization isn't the following one in these headings of the breaks in data and digital protection.

https://www.anacyber.com/about-us.php
https://goo.gl/maps/brx95sYFmcjmdNh19
Photomosh
Tags: html, css, javascript, devops
Published: 2021-09-07 19:53:32

# What is Photomosh?
Photomosh <b>let’s you glitch images, videos, and webCam using WebGL effects</b>. Save as a output as image, GIF or video.

```javascript
window.dataLayer = window.dataLayer || [];
function gtag() {
   dataLayer.push(arguments);
}
gtag(‘js’, new Date());

gtag(‘config’, ‘UA-249692-24’);
```

# Is PhotoMosh free?
PhotoMosh-Pro is a one-time purchase with <b>no recurring fees.</b>

# What Output Formats do?
Output saves with same size & duration as input with the following limits: 
- JPG - 2048 x 2048 px max size.
- GIF - 640 x 640 px max size. 4 seconds max duration. 20 FPS.
- WEB- 1280 X 1280 px max size. 4 seconds max duration. 10 MBPS Data Rate.
    - WEBM output required with only Chrome or      Firefox.
    - WEBM videos may be viewed in the browser or Using [VLC](https://www.videolan.org/vlc/index.html).
    - Convert WEBM to MP4 using [Handbrake](https://handbrake.fr).

# What Requirements?
- PhotoMosh requires a recent device with good WebGL capabilities.
- Render quality is only limited by our devices and an GPU speed. Processed large images or videos may make your computer unresponsive or even crash the browser.
- [Chrome](www.google.com/chrome/fast-and-secure/) recommended.
Take Chances and Push Forward.
Tags: productivity, discuss, motivation
Published: 2021-10-04 20:00:20

##Lessons from the final frontier…
</br>
I’m a big Star Trek fan. I started watching *Star Trek: The Next Generation (TNG)* and *Star Trek: Voyager (VOY)* with my father when I was a child in the 90s and grew to like all of the other series. I’ve always been fascinated by the life lessons and philosophy that many episodes present. However, there is one particular episode from TNG that stuck with me: it’s the episode called *Tapestry*.
</br>
##“The tapestry of my life…”##
</br>
In the episode **Tapestry**, Captain Jean-Luc Picard is killed on a mission. He then awakens to find himself in a sort of “afterlife” with Q, an omnipotent being who makes appearances throughout the *Star Trek* series. Picard expresses life regrets to Q, who then gives him a chance to restart his life and make different choices. In the alternate life, Picard no longer takes risks or chances, and subsequently experiences a dreary life unnoticed by others. Picard tells Q that he would rather die the man he was than live the life he had just seen.
![404 - Not found.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icvcdpcino5163zu6qli.png)
######*“There were loose threads, untidy parts of me that I’d like to remove. But when I pulled on one of those threads, it had unraveled the tapestry of my life.”*######
</br>
Imagine yourself 5, 10, even 15 years from now. What would you tell your past self? Will you **regret** stepping up, taking risks and chances to get noticed? Will you regret voicing your concerns or having your questions be heard? Would you have preferred to live a life of near-silence and solitude, not having reached your full potential? Had you gone back and undid some of the things that made your future self successful, you’d be unraveling the tapestry of your life.
</br>
##Reach for the stars.##
</br>
It is imperative to take leaps if you want to push forward and have your work get recognized. It’s also important to understand that we have to face failure in order to grow, and that’s okay. We’re not here to be perfectionists. We’re here to learn and grow together. As my mentor at [Perpetual Education](perpetual.education), **Derek**, says, *“the goal isn’t to do it right the first time; the goal is to see the different ways people think about it.”*
</br>
Keep this in mind as you pursue your programming path, or whichever path you choose. Get out there and give it your best. Make mistakes and learn from others. **You can do this.**

Andrew
Terminal 101 cheatsheet
Tags: bash, beginners
Published: 2021-10-04 19:57:25

Terminal/Console/Command Line cheatsheets like this is everywhere on the internet, however I am still going to make my own in the spirit of learning in public :)
Also please do let me know if I didn't get something quite right the first time!

---

```bash
pwd
```
Print Working Directory, this will show you where you currently are

---

```bash
.
```
A dot means your current directory, so the location shown when you type your pwd

---

```bash
..
```
Your parent directory, this is one folder above your current directory

---

```bash
~
```
This is your home directory

---

```bash
cd <folder_name>
```
Change directory, this will move your position into the folder name, you can also cd into a path so that you can move a few folders in. You can also do cd .. to go back a directory

---

```bash
ls
```
This will show all the files and folders in your current directory

---

```bash
ll
```
Another way of checking all files and folders in your current directory, it will return a table format

---

```bash
mkdir <folder_name>
```
Make directory, this will create a new directory at your current directory (This creates a folder within your current folder)

---

```bash
touch <file_name>
```
This creates a file, for example, `touch index.html` creates `index.html` within your current directory

---

```bash
mv <file_location> <file_location2>
```
This moves the file from location one to location 2.
For example:
```bash
mv index.html tmp/index.html
```
moves the file index.html from the current directory into a directory called tmp within the current directory

---

```bash
rm <file_name>
```
Remove, but **PLEASE MAKE SURE YOU NO WHAT YOU"RE DOING WHEN YOU USE THIS**. Sometimes a stack overflow answer might ask you to use this to clear a roadblock. **THINK TWICE** before blindly using rm because once you've removed your file. It's gone, you can't revert back the change unless you use version control.

When you use `rm`, sometimes your command prompt will have a safe gate message, this is because `rm` is so dangerous your terminal is asking you whether you are sure you wanna remove that thing. If you are 100% sure you want to rm something, do the following:
```bash
rm -rf <file_name>
```

---

That's it for the Terminal 101 cheatsheet. These are the most basic command line tools you might use. I recommend trying to play around with this, create new files and folders, move things into different folders, and as much as possible try to navigate your files and folders using terminal only to get good.

For extra resource, try [learn enough command line to be dangerous](http://www.learnenough.com/command-line/)

Hope that helps and let me know what other command line tools you use daily :) Happy coding!
How to play a video with VideoPlayer in SwiftUI
Tags: ios, swiftui, swift, avkit
Published: 2021-10-04 19:27:22

**VideoPlayer** - is a view that displays content from a player and a native user interface to control playback.

> Available iOS 14.0+, macOS 11.0+, Mac Catalyst 14.0+, tvOS 14.0+, watchOS 7.0+, Xcode 12.0+.

How to use the VideoPlayer view?  Go to the code below:

```swift
import AVKit // 1
import SwiftUI

struct ContentView: View {
    
    // 2
    let videoUrl = URL(fileURLWithPath: Bundle.main.path(forResource: "PexelsSea", ofType: "mp4")!)
    
    var body: some View {
        VideoPlayer(player: AVPlayer(url: videoUrl)) // 3
            .frame(height: 320)
    }
}
```

1. The first step is to import the ``AVKit`` framework.
2. The second step is create video ``URL``. The ``URL`` can be created for local video or remote. In our code case, a URL was created for local video from the bundle. 
3. Final step is to pass  ``AVPlayer``, as the first parameter to  ``VideoPlayer`` view. 

> The ``VideoPlayer`` view has playback controls.

Result:

![VideoPlayer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzw9mb7s0wqgnlhsh7xr.png)
![VideoPlayerLandscape](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/811ndh9kxnqx4r5jwew4.png)

### Video Overlay (Watermark)

A  ``VideoPlayer `` has another  ``init `` function with two parameters:

```swift
init(player: AVPlayer?,
     @ViewBuilder videoOverlay: () -> VideoOverlay
)
```

1. First parameter is ``AVPlayer``. 
2. Second parameter is  ``videoOverlay`` closure. The closure returns a  ``VideoOverlay `` view to present over the player’s video content. The important thing is this overlay view is fully interactive, but is placed below the system-provided playback controls, and only receives unhandled events. 

Let's go to the code.  As an example, will add a simple text in the lower right corner.

```swift
import AVKit 
import SwiftUI

struct ContentView: View {
    
    let videoUrl = URL(fileURLWithPath: Bundle.main.path(forResource: "PexelsSea", ofType: "mp4")!) 
    
    var body: some View {
         VideoPlayer(player: AVPlayer(url: url), videoOverlay: {
             VStack {
                 Spacer()
                 HStack {
                     Spacer()
                     Text("Code sample by ToniDevBlog")
                         .foregroundColor(.white)
                 }
             }.padding()
         }).frame(height: 320)
     }
}
```

Result:

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

[Full source code available on GitHub](https://github.com/Toni77777/VideoPlayerSample)

Article originally published at [ToniDevBlog](https://tonidevblog.com/posts/how-to-play-video-with-videoplayer-in-swiftui/)

Thanks for reading! See you soon. :wave:
python developper road-map
Tags: python, webdev, beginners, programming
Published: 2021-10-04 19:17:46

Here i will show you how you can learn and master Python in just some months.
This road map helped me as a developper to become a good desktop application developer, yes i'm not perfect but helped me to do things by following so routes.
The plan

1. history of python
  Read the begin of each thing you want or language you whant to learn it helps to get a solid base of information even in interviews you will know what to respond if you get a question about that.

1. variables, conditions, loops

There are the basic of each programming language logic make sure you get real information about it, the are the real world you will never pass them.

3. Lists, Dictionaries, sets, tuples

Out of simple variables these are more large storage variables in python. Learn and practice on these.

4.Function

They are ones those makes programs more readeble and more indented, they return values for a given instruction, learn to make function in python, and learn how to use built-in functions

5. File Handling

Python is one of the language that manipulates files simply, so learn how to read, write from files, this will add to your storing data, files store a huge of data.

6. OOP (object oriented programming)

The good thing in python is that you can do better programs just by using procedural programming , but python comes with another way of programming wich reduces the DRY (don't repeat your self). By there learn Classes, attributes, getters,setters, decorators, inheritance, polymorphism etc.

6. Error handling

Learn how to handle error by using some tools debugger and make awesome programs.

7. Read Documentation


Python is one of the languages with a big community, and alot of documentation are wrote on top of it.

8. Practice and make simple projects


The only way to learn and master a programming language is by practing and making simple projects, so with this road map learng how to read list, dictionaries,tuples by using loops. practice on how to handle errors.

Thank you!!!

Next Post .....
invite friends and let's build a big community
Electron Adventures: Episode 72: NW.js
Tags: javascript, electron
Published: 2021-10-04 19:15:32

When I started this series I mentioned that I also want to explore some alternatives to Electron, but so far I didn't.

Let's try one now - [NW.js](https://nwjs.io/).

It's very similar idea to Electron - it's node + packaged chromium. It's just organized a bit differently, without clear divide between frontend and backend.

### You need SDK version

The first problem I found, and that's not explained in any way whatsoever by the website, is that you absolutely need to install `-sdk` version.

If you install the regular version, trying to open dev tools will crash your app. I'm not sure if it's a bug and it was supposed to ignore this command, or actual security feature. Either way, it's impossible to develop anything this way.

[The website says nothing about it, and it strongly implies that you need to compile your own `sdk` version from source](https://nwjs.readthedocs.io/en/latest/For%20Users/Advanced/Build%20Flavors/). Fortunately that's not actually necessary.

### `package.json`

So this is the `package.json` we need. Notice hardcoded `-sdk` version. Just `npm install` and we'll go on from here.

```javascript
{
  "name": "nwjs-app",
  "main": "index.html",
  "scripts": {
    "start": "nw"
  },
  "devDependencies": {
    "nw": "0.57.0-sdk"
  }
}
```

### Entry point

NW.js supports either JavaScript entrypoint like Electron, or HTML entrypoint. As we already did the JavaScript one so many times, let's try the HTML one with `"main": "index.html"` in `package.json`.

It's also possible to adjust the parameters of that window like size by tweaking with `window` properties in the `package.json`, but we're fine with the defaults.

### `index.html`

Nothing special here, we just load CSS and JS.

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="app.css">
  </head>
  <body>
    <header>Hello, World!</header>
    <ul></ul>
    <script src="app.js"></script>
  </body>
</html>
```

### `app.css`

Just some stardard Dark Mode starter:

```css
body {
  margin: 0;
  background-color: #333;
  color: #fff;
}

header {
  text-align: center;
  font-size: 400%;
  font-family: monospace;
}
```

### `app.js`

```javascript
nw.Window.get().showDevTools();

let ul = document.querySelector("ul")

for (let k in process.versions) {
  let li = document.createElement("li")
  li.append(`${k} = ${process.versions[k]}`)
  ul.append(li)
}
```

This does two things. The first is open DevTools. Unlike Electron, these are opened in a separate window. This step crashed the app before I figured out I need to use `-sdk` version.

The second thing is printing some `process.versions` data in the document.

### Results

Here's the results:

![Episode 72 Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gj3jhojkl04kbdg8271.png)

Now that we have NW.js setup, in the next episode we'll try to write some app with it.

As usual, [all the code for the episode is here](https://github.com/taw/electron-adventures/tree/master/episode-72-nwjs).
Installing minikube,kubectl with chocolatey - windows
Tags: minikube, kubectl, windows
Published: 2021-10-04 19:00:49

In this blog we will try to learn how to install minikube and kubectl for windows.

The easiest for any software to be installed on windows would be to use [chocolatey](https://community.chocolatey.org/)

One instance chocolatey immense helped us was in a situation where we were asked to switch laptop with better configuration. In an enterprise you would need to download software from 'software centre' or ask IT teams to install it for you. In this case we provided this case we provided the chocolatey script to admin team to run it as a script! it helped both the teams i.e. dev and IT team.

Coming back on how to install minikube..., it's very easy, run below command.
```
choco install minikube
```
make sure you run the above command in **powershell with admin privileges**.

Similarly you can install kubectl using below command.
```
choco install kubernetes-cli
```

Basically you can install any software for windows easily using chocolatey, above are just example.

https://community.chocolatey.org/
Move your AWS Lambdas to Graviton2 easily with Cloudformation/SAM
Tags: aws, lambda, awssam, cloudformation
Published: 2021-10-04 18:53:03


Yesterday, Amazon Web Services (AWS) shared [AWS Lambda Functions Powered By Graviton2 Processor](https://aws.amazon.com/blogs/aws/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/).

At a high-level AWS claim:

* Up to 19% better performance
* At 20% lower cost
* Also applies to functions using provisioned concurrency.

All supported Lambda runtimes, including the custom runtime are supported. You just need to be careful with any binaries or functions packaged as containers to ensure they are built to support the architecture.

To help with performance testing, you can create two versions of a function, one in x86 and one for Arm. You can then use an alias with appropriate weights to distribute traffic between them. Once your test is complete, you can compare the performance difference within CloudWatch.

When migrating from x86 to Arm in production, you can use the same function version and weighted alias approach. This will allow you to slowly start ramping up, e.g. from 1%, gradually up to 100%. If something looks wrong, or you are experiencing errors, then adjust the weights down to zero to force traffic back to the x86 function.

Everything I deploy to AWS is via Cloudformation or AWS SAM. Below we will look at how to configure those to use the new architecture.

## Update CLIs

If you use a CLI tool to deploy, it is probably a good idea to update to the latest one for your setup. That will ensure it's compatible with the new changes.

* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)
* [AWS SAM CLI](https://github.com/aws/aws-sam-cli)

## Template Changes

The example below shows the changes required for an `AWS::Lambda::Function` and an `AWS::Lambda::LayerVersion`. The changes are the same if you are using an `AWS::Serverless::Function`. 

```yaml
exampleLambdaFunction:
  Type: AWS::Lambda::Function
  Properties:
    # OTHER ITEMS REMOVED FOR EXAMPLE
    Layers:
      - !Ref exampleLibrary
    Architectures:
      - arm64

exampleLibrary:
  Type: AWS::Lambda::LayerVersion
  Properties:
    # OTHER ITEMS REMOVED FOR EXAMPLE
    CompatibleArchitectures:
      - arm64
```

Now the change is made, you are ready to deploy using your preferred mechanism, whether thats CLI or via the console.

## Summary

There is really no reason not to try out the changes. They perform better, cost less, and the changes are minimal. There are also mechanisms in place by using the function versions and alias to do a gradual rollout until you have the confidence to switch over fully.

## Further reading

* https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
* https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html
* https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
Mentoring for junior JavaScript developers
Tags: javascript, mentoring
Published: 2021-10-04 18:52:57

Learning to program can be an overwhelming project, especially when one is alone in navigating all the available options. There are so many:
* languages to choose from
* multiple frameworks in any of the languages
* many other layers to consider, as I wrote in my [framework post](https://how-to.dev/when-should-you-learn-a-javascript-framework)

Some lucky junior developers have access to mentoring in their day job - may be nothing formalized, but one helpful colleague that helps them improve their skills. For sure, I benefited a lot from the support of more experienced developers in my team. In some cases, it was just a short discussion, but it helped me improve a lot in a short time.

On this blog, I'm primarily focused on stuff that could be helpful for javascript developers. I want it to be a resource that is useful on its own, and at the same time let me connect to people who could be interested in products I'm creating - video course for [esbuild](https://bit.ly/esbuild-course) & [webpack](https://bit.ly/webpack-course).

It's one thing to promote a product, but it's much more important to understand the challenges of our potential customers. I'm interested in understanding better people like you, so my article & my course will help solve real problems you guys face. 

So as you see, I believe strongly in mentoring; and I want to understand better people who read this blog. Because of that, I opened a profile at [codingcoach](https://bit.ly/coding-coach). It's is a community where people offer free-of-charge technology mentoring.

I'm looking forward to finding 2~3 people with whom we will help each other in our projects - me helping them navigate their programming journey, them allowing me to know my market better.