teleren/devto huggingface dataset:
How to get all the cookies from a webpage using JavaScript?
Tags: javascript
Published: 2020-08-31 00:00:00

---
  title: How to get all the cookies from a webpage using JavaScript?
  published: true
  tags: JavaScript
  date: Mon Aug 31 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/get-all-cookies-from-webpage-using-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-65e232e5a665b94fc3702f78fb38afa9.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/get-all-cookies-from-webpage-using-javascript)
  
To get all the cookies associated with a webpage, you can use the `document.cookie` property in JavaScript.

```javascript
// cookies as string
const cookiesAsString = document.cookie; // eg: 'key=value key=value key-value'
```

This will return all the cookies as a string type.

If you want to get those cookies separately, then we have to first split this long cookie string using the `split()` method.

```javascript
// cookies as string
const cookiesAsString = document.cookie; // eg: 'key=value key=value key-value'

// splitting cookies
const cookiesArray = cookiesAsString.split(" "); // ['key=value','key=value', 'key-value']
```

The `split()` string method split the string into an array of strings using a separator, in our case we used whitespace as a separator to separate strings.

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

---
Email Verification API (EVA)
Tags: freetool, developerresources, verification, email
Published: 2020-09-01 10:53:23

---
title: Email Verification API (EVA)
published: true
date: 2020-08-31 00:00:00 UTC
tags: Freetool,DeveloperResources,Verification,Email
canonical_url: https://www.loginradius.com/engineering/blog/email-verification-api/
---

Email authentication, being the traditional way of authentication and used most widely. Increase in the spams has also increased the disposable email registrations. To reduce and identify such unwanted users, EVA(Email Verification API) is the tool, developed by LoginRadius developers.

   
[Read On](https://www.loginradius.com/engineering/blog/email-verification-api/)
SQL vs NoSQL... Why do they differ?
Tags: webdev, sql, devops
Published: 2020-08-30 23:49:12

#About me
Hey everyone! This is my first post, I'm HanSolotech. I am a sophomore student at Penn State University. My my interests are club lacrosse and the Star Wars franchise which inspired my username. This post is presented for my IST class at PSU but is open for all to read. I hope you enjoy! 

#A quick word before I begin
This is my first experience with technology research at this level. As time goes on I will get better but starting from little to no knowledge of databases starts me off at a knowledge disadvantage. I will do my best to be accurate and descriptive. Thank you for understanding!

#SQL
**What is SQL?**
SQL is the Standard Query Language for inquiring and changing data. It is currently seen as the universal language for relational databases since 1980. 
**Query method**
Querying a database is to request information from it. SQL uses specific clauses to select desired information and this is done with the "Select" method.
**Structure**
SQL databases are relational and use a table-based system.They are also vertically scalable.

#NoSQL
**SQL now NoSQL? What's going on?!**
NoSQL is much different than SQL. It limits the old conventional SQL into a system that is much faster and more flexible.
**Query method** 
Different than the SQL relational database, NoSQL allows flexibility when querying data and this ultimately helps developers store mass amounts of data.
**Structure**
NoSQL uses key value pairs and are horizontally scalable. 

#The Difference between SQL and NoSQL

{% youtube GoZ2Tdf83GA %}
Who Am I? (And SQL vs NoSQL)
Published: 2020-08-30 23:40:00

#My Background

I'm a student at Penn State University in the college of IST. I'm currently studying cyber security, but I'm also interested in app/web development. I don't have very much experience other than some general programming classes, but now I'm starting to branch out into more specific areas. Most of the experience that I do have is in java, but I have done some work with python. I also worked with a small team to build an app in android studio which gave me exposure to an IDE that is used to make tons of mobile apps and to collaboration tools like GitHub.

#Why Cyber Security

I chose to study cyber security because I want to help prevent data breaches and protect people's information. Cyber security is also particularly interesting because you get experience from both sides of the fight. You can try to break into systems to find weaknesses and then you use that information to try to stop other people from breaking into the system. It also is necessary in nearly every industry because of how important companies' digital assets are. Everyone from NASA to Pepsi needs someone who knows cyber security which gives a lot of options for what industry to work in.

#Job Goals

I'm not sure exactly what kind of job I want after I graduate. Penetration testing seems interesting, but I won't really know until I have more experience in that area. Maybe I'll try to combine my interests by doing security as part of an application development team. Mostly though I just need to try more things before I decide what area I want to ultimately go into. Regardless of what specific area I got into, I still want to help protect people's information and finances. 

#Personal Interests in Tech

##App Development

I would like to develop some small applications that save people time. If an app saves someone even just 10 seconds a day, then eventually it starts to add up. Applications that manage small annoying tasks for people or keep them organized have a lot of potential to provide a big return for a relatively small investment, and it's very satisfying to make things that are immediately useful. Also, even if no one ever uses it other than yourself it can still provide you enough benefit to have been worth the time. 

##Programming competitions

I have participated in a few programming competitions and I always find them enjoyable. During my time in college, I will definitely seek out more to participate in to gain experience and just to have fun. They provide a good way to work with a team towards a very tangible goal, and it's very satisfying to finally get a program working. Another added benefit is that when a company runs the competition, there is often an opportunity to get an internship if you do well. Internships obviously have the possibility of turning into a job, so it can be a very worthwhile thing to do with your time. 

#SQL vs NoSQL Video

As promised SQL vs NoSQL:
{% youtube K8iyulkY3Fo %}

and the link: https://www.youtube.com/watch?v=K8iyulkY3Fo&feature=youtu.be

Thanks for reading and there are more posts to come.
Intro to my Professional Self Via The Differences Between SQL and NoSQL
Tags: sql, beginners
Published: 2020-08-30 23:29:49

# **Who am I?**

*Hello, and welcome to my first class assignment for IST 210 at Penn State University!*

As you could probably already tell I am a student attending Pennsylvania State University. I am currently a sophomore studying in IST. My plan is to graduate with a degree in Cybersecurity Analysis and Operations.

**Carrer plans**
 As of now, I have no clue what I want to do with my degree, but hey I have until 2023 to figure it out... I am however looking for ideas every single day!


## **My Brand**
*currently unknown*
At the time of writing this (my first blog post), I don't currently have a brand name/personality thought of. This is something that I may be seen as for the rest of my life, so I want to take my time and really decide how I want to portray myself as I continue my college career and pursue life. So, for now, I will go by Chris.


# **Differences Between SQL and NoSQL**
First off, we have to talk about what SQL and NoSQL are:

**SQL** :
The Structured Query Language, or SQL, is a domain-specific language, or DSL, used to interact with relational databases and relational data streams.
**NoSQL** :
NoSQL is a database that facilitates the storage and retrieval of data. Commonly used for applications that require horizontal scaling, like real-time web applications, it relies on a non-SQL low-level query language to store and retrieve data.


There are many differences, but to keep my first post not too long I will briefly mention just a couple of main differences.
- **Amounts of Adoption**

*SQL*: Widely adopted - basis for several popular procedural extensions. 

*NoSQL*: Less adopted - Has to do with the limitations NoSQL presents. 

- **ACID Transactions** *(atomicity, consistency, isolation, durability)*

*SQL*: SQL is ideal for situations where databases, regardless of where they sit, need ACID.

*NoSQL*: Not all NoSQL databases have true ACID transactions.


###### **Additional Links:**
###### [SQL vs NoSQL](https://www.xplenty.com/blog/the-sql-vs-nosql-difference/#:~:text=SQL%20databases%20are%20relational%2C%20NoSQL,dynamic%20schemas%20for%20unstructured%20data.&text=SQL%20databases%20are%20table%20based,graph%20or%20wide%2Dcolumn%20stores.)

###### [Youtube Video SQL vs NoSQL](https://www.youtube.com/watch?v=teTqVAZ1VMU)

###### [What is ACID?] (https://blog.yugabyte.com/a-primer-on-acid-transactions/)
Introduction, and SQL VS. NoSQL
Published: 2020-08-30 22:31:36

Hello everyone, my name is Paul Lanahan and I am a sophomore here at Penn State. I am from a small town in south-eastern Pennsylvania called West Grove, where we are known for growing mushrooms, which comes along with a wacky smell. I am currently studying Security Risk Analysis, and have so far loved everything about it. I was pretty clueless when I came here about picking a major, but now I have become passionate about it and plan to continue studying it. I was debating between SRA and finance when I got here, but I am glad I have chosen the path that I have.
	
When it comes to tech, I am interested in learning how to keep information out of the hands of hackers. I took SRA 221 last semester which was about how to use the linux operating system along with other programs such as wireshark which are great tools to use when it comes to securing information. It taught me how to perform SQL injections, along with many other introductory tactics for making sure data is safe. In this course, I am excited to learn about data structures and their architecture. This course will be very beneficial to me because knowing more about data structures and how they work will allow me to understand more of what I will be keeping safe. 

My first semester freshman year, I took a java programming class and learned that programming was not my favorite thing in the world. Instead of having a more programming-based path, I would like to have more of an analytics-based path that requires little to no programming. Before coming to Penn State, I knew very little about computers and data, and how it all works. After taking a few of the entrance to major classes, I soon learned how interesting and enjoyable it was to work with computers. 
	
After my four years here at Penn State, as of now my plan is to go on to work for a financial company or bank with a cybersecurity position. While in the cybersecurity position, I would like to learn finance and how the stock market works so that I can also be beneficial to the business side of the company as well. I love math, and I love to analyze so cybersecurity analytics along with finance would be the ideal environment for me. Although my plan is to work for a bank or financial company, I have also thought about going the government route. Working for the government in a three letter agency seems like it would be an exciting and eventful career path as well. 

Here is the link to my video about SQL vs NoSQL:
https://www.youtube.com/watch?v=GslDSUJXKLg


Short Summary of SQL vs NoSQL:
•	What is it?
o	SQL: Programming language that is designed to bring you specific data from an organized database
o	NoSQL: Programming language designed to retrieve data that is not structured

•	Difference in Query:
o	SQL: Used by specifying column and row
o	NoSQL: used by searching for an idea of what you are looking for and being given several pieces of data
Guide to Free/Cheap Deployment Options 2020
Published: 2020-08-30 22:27:30

## And the categories are...

So we are going to cover a lot of current options for deploying your website. The options on this list should all have a free tier and of course, upgrades as your site grows.

- Static Site/JAM Stack Friendly Hosts
- Full Stack Hosting
- VPS/Cloud Providers
- Other Free Options

### Static Site/JAM Stack Friendly Hosts
These are sites that allow you to quickly push a git repository or connect to a github/gitlab repository and deploy a frontend application. Many offer other cool features, I'll let you explore.

- Netlify (Netlify.com)
- Vercel (Vercel.com)
- Surge (Surge.sh)
- Github Pages (Github.com)
- Gitlab Pages (Gitlab.com)
- Aerobatic (Aerobatic.com)


### Full Stack Hosting

These are hosts that also allow you deploy backend applications with robust tools and often generous free tiers. Also included are hosts that focus on deploying docker containers like Fly.

- Heroku (Heroku.com)
- PythonAnywhere (PythonAnywhere.com)
- Glitch (Glitch.com)
- Fly (Fly.io)
- Octopus (octopus.com)
- Section (section.io)
- Arukas (arukas.io)
- Cloudflare Workers (workers.cloudflare.com/sites)


### VPS/Cloud Providers

These providers provide the ability to create VPS instances and other cloud services often with cheap or free tiers that allow you do anything you want.

- AWS (AWS Amplify is their Netlify like Service)
- Google Cloud (Firebase offers Netlify Like Services)
- Azure (Azure Static Sites offers Netlify like services)
- Linode (Linode.com)
- Digital Ocean (DigitalOcean.com)
- Vultr (Vultr.com)
- Buddy (buddy.works)
- Kamatera (Kamatera.com)
- Atlantic.net (Atlantic.net)
- Upcloud (upcloud.com/)

### Headless CMS

These aren't hosts, these take the place of your backend. Headless CMSs provides you a graphical dashboard to manage data that can be delivered to your frontend application via their API.

- Contentful (Contentful.com)
- ButterCMS (ButterCMS.com)
- GraphCMS (GraphCMS.com)
- CraftCMS (craftcms.com)
- AgilityCMS (agilitycms.com)
- Strapi (strapi.io - self-hosted)
- FlexType (flextype.org - self-hosted)
- ContentStack (contentstack.com)
- dotCMS (dotcms.com)
- cockpit (getcockpit.com - self-hosted)
- Zesty.io (www.zesty.io)
- DirectUs (directus.io - self-hosted)
- DatoCMS (datocms.com)
- CosmicJS (cosmicjs.com)
- Prismic (prismic.io)
- Sanity.io (sanity.io)
- CrafterCMS (craftersoftware.com - Self-hosted)

### Other Free Options

Other Hosting Options that offer a free tier. These are often more geared towards casual/consumer customers vs. developers like the other categories.

- Wordpress.com
- Wix.com
- Weebly.com
- Google Sites
Github Actions flow to deploy Gatsby Blog to Netlify
Tags: actionshackathon, gatsby, netlify, github
Published: 2020-08-30 22:19:27

## My Workflow
My workflow provides an automated pipeline to deploy a Gatsby blog from a Github repo to a Netlify website. I am using the workflow to deploy my Blog files and changes: https://amlanscloud.com/  
This flow uses the file upload deployment of Netlify so doesnt count towards the automated release quota of free Netlify accounts.

The Actions flow uses a custom Docker image which I created specifically to be used by this flow. The Docker image can be found here:  
https://hub.docker.com/repository/docker/awsacdev/netlifycustom

## Submission Category: 

### DIY Deployments  

# Yaml File or Link to Code
The YAML file can be found in the .github folder of my Github repo:  
https://github.com/amlana21/automated-blog-flow


### Additional Resources / Info

Full details of my flow can be found here on my blog post:  
https://amlanscloud.com/blogworkflow/
Help? .map .reduce
Published: 2020-08-30 22:05:23


I don't know if this is the right place to ask for help, but I've been trying to understand .map and .reduce for 2 days to try to organize my data to insert in my graph but I can't, could you help me?

I need to add the values ​​for each category, I've done it in several ways but I can't get the exact result

My api returns:
(4) [{…}, {…}, {…}, {…}]
0: {name: "test1", category: "Categoria1", price: 3}
1: {name: "test2", category: "Categoria1", price: 13.6}
2: {name: "test3", category: "Categoria2", price: 8}
3: {name: "test4", category: "Categoria2", price: 8}

I need the data as follows to insert in the chart:
[['Categoria1', 16.6],['Categoria2', 16]]
How to Convert a React App to a Mobile app and Persist session cookies using React-Native Webview or a PWA
Tags: react, android, pwa, reactnative
Published: 2020-08-30 21:57:45

In this post I am switching gears from my general cloud technology posts towards a bit of app development. Recently while I was working on one of my side projects, developing a React app, I faced an issue to persist the cookies on the app when opened on mobile. I wanted to convert the React app to an installable android app and provide a persistent login for the user. I didn’t want to develop a whole new app for mobile using React Native and just re-use the React web app which I built, as an app on mobile.

In this post I will be going through the process and steps which I followed to make it work for me. I figured this may help someone having similar issue. These are the parts I will be covering in this post:

Convert the React web app to a mobile app using React-Native and Webview (I will cover an Android app)

- Handle Cookies from Webview
Convert the React web app to an installable PWA(Progressive Web Application) via TWA(Trusted Web Activity)

- Handle cookies in the PWA/TWA  

More details can be found on my post here:  

https://amlanscloud.com/reactnativepwa/
Converting an iterable to an array in JavaScript?
Tags: javascript, object, array, string
Published: 2020-08-30 20:44:36

JavaScript ES6 introduced, among many other things, the spread operator (...)[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax], which allows an iterable to be expanded in places where zero or more arguments or elements are expected.

We can use the spread operator to convert iterables or, as they are sometimes referred to, array-likes. Let's take a look at some examples:

####String

When the spread operator is applied to a string, the result is an array of strings each one representing a character of the original string:
```
const name = 'Zelda';
const letters = [...name]; // 'Z', 'e', 'l', 'd', 'a'
```
####Set

A Set is a collection of unique values. When the spread operator is applied to it, the result is an array of the stored values:
```
const data = [1, 2, 3, 1, 2, 4]
const values = new Set(data);
const uniqueValues = [...values]; // [1, 2, 3, 4]
```
Note that the above example is the basis for the uniqueElements snippet[https://www.30secondsofcode.org/js/s/unique-elements].

####NodeList

A NodeList is a collection of nodes, returned by methods such as document.childNodes() or document.querySelectorAll(). While it implements some methods that help manipulate it as an array (e.g. NodeList.prototype.forEach()), it's oftentimes desirable to convert it to an array. When the spread operator is applied to it, the result is an array of the contained nodes:
```
const nodes = document.childNodes;
const nodeArray = [...nodes]; // [ <!DOCTYPE html>, html ]
```
Note that the above example is the basis for the nodeListToArray snippet[https://www.30secondsofcode.org/blog/s/js/s/node-list-to-array].
Observables, naïve implementation
Published: 2020-08-30 20:36:50

Following my previous post on streams, one can wonder what are streams fundamentaly ?

At the most basic, a stream is nothing more than an object that can be observed, they are in fact **obervables**.

Many objects can be observed, the particularity of streams is that they are **composable observables**.

Let's see if we can implement a very simple observable. 

Our requirements are:

1. use only function (no classes, no proxies...)
2. passed value must be stored
3. invocation must return the stored value
4. no globals

How can a function can store a value?, that seems a little strange. A stream seems not to be a basic function...

The following function does not store anything.
When you invoke it without argument, it simply returns nothing.

```js
function stream (value) {
    let storedvalue = value
    return storedvalue
}
```
What can we do then? We will use a particular feature of Javascript called **closure**. 

Using closures is simple, the explanation on how they works internally is beyond my knowledege. 

So here it is :

```js
function Stream (value) {
  let storedvalue = value
  function stream (newvalue) {
    if (arguments.length) {
      storedvalue = newvalue
    }
    return storedvalue
  }
  return stream
}

let s = Stream(5)

console.log(s())
```

You can test it here [stream](https://flems.io/#0=N4IgZglgNgpgziAXAbVAOwIYFsZJAOgAsAXLKEAGhAGMB7NYmBvEAXwvW10QICsEqdBk2J4wAVzTViEegAIAysQBOMbHIAUANwxRxMAJRzgAHTRy5sYnLjFaqgCY69MOQF45z-WYsSpM+VtVdQ00GAB3L0NjHws5CDBNDGUAc3EcBjh8WDQU4kIjU3M4i1t7GCddfXc5MMiqmFiLVia5VWJxZXMyxyjYluL2zu6VNSwzAbMrGxqlYKwNAFYDMzMhOFpYbNoUjTgNAxW0ShA4GFhpWTQEHgBGABZEAAY2DhBMHDx8ajgBGnpGMweGwALqsIA)


In Javascript, functions are **first class citizens**. They are treated like any other objects.
They can be passed as arguments to other functions, they can be returned from functions.

Closures allow returned functions to 'capture' a variable defined outer it, magic :-)

This function fullfill our requirements, in the next post, we will see how to "react" whenever a stream is "feeded" by a new value...

Thanks for reading