teleren/devto huggingface dataset:
Tips for choosing your favourite Rugs Online NZ
Tags: rugsnz, mats, carpets
Published: 2022-12-07 06:58:05

````Add a little bit of summer into your home with area rugs. They can be the perfect way to brighten up a room and bring a touch of summer into your living space.
The weather is warming up and summer is almost upon us. It’s time to change over your winter clothes for summer ones, rearrange the garage for summer belonging access, tidy up the outdoors for summer gatherings and a lot more!
One way to really accent the summer season in your home is to pick out a summer rug. Certain aspects of different rugs help capture the summer feel we all love.
• Bring the outdoors inside with a floral rug. Bonus – you will not need to water them! Patterns inspired by nature are always a summer winner.
• Ease of cleaning is important when picking a summer rug. With the warm weather bringing on more indoor-outdoor flow, picking a rug that is easy to clean is important.
• Layering is not just for winters. Use rugs to create boundaries and add a hint of playfulness in your home.
 LOOKING FOR CUSTOM SIZE RUGS? 

Custom size rugs can be the perfect way to define and differentiate space, especially in open-concept living.
Whether you’re framing a seating area, texturising a bedroom, or sectioning off a breakfast or work-from-home nook, custom area rugs can be just the element needed to bring everything in that space together.
In this blog we look at some styles to keep in mind as you head out to choose your perfect custom size rug.
Choosing the Right Rug for Your Child's Room - Decorating a child's room can be exciting, but the options can be daunting. We've put together a step-by-step guide to help you find the perfect rug for your child's bedroom so you don't get lost in the maze of the world of [kids rugs](https://www.rugdecor.co.nz/collections/kids-rugs). The first step is to ensure that the measurements are correct. Kids typically have little beds but a lot of other items in their rooms, so choose a somewhat larger rug to give them a larger space to play on.
Types of Data Storage
Tags: cybersecurity, tutorial
Published: 2022-12-07 06:49:40

Stored data refers to data at rest. Data at rest means that a type of storage device retains the data when no user or process is using it. A storage device can be local (on a computing device) or centralized (on the network). A number of options exist for storing data.

Direct-attached storage (DAS) is storage connected to a computer. A hard drive or USB flash drive is an example of direct-attached storage. By default, systems are not set up to share direct-attached storage.

Redundant array of independent disks (RAID) uses multiple hard drives in an array, which is a method of combining multiple disks so that the operating system sees them as a single disk. RAID provides improved performance and fault tolerance.

A network attached storage (NAS) device is a storage device connected to a network that allows storage and retrieval of data from a centralized location by authorized network users. NAS devices are flexible and scalable, meaning administrators can increase the capacity as needed.

A storage area network (SAN) architecture is a network based storage system. SAN systems connect to the network using high-speed interfaces allowing improved performance and the ability to connect multiple servers to a centralized disk storage repository.

Cloud storage is a remote storage option that uses space on a data center provider and is accessible from any computer with Internet access. Google Drive, iCloud, and Dropbox are all examples of cloud storage providers.
Integrity Checks in cyber security
Tags: cybersecurity, tutorial, security
Published: 2022-12-07 06:47:31

**Integrity Checks**

An integrity check is a way to measure the consistency of a collection of data (a file, a picture, or a record). The integrity check performs a process called a hash function to take a snapshot of data at an instant in time. The integrity check uses the snapshot to ensure data remains unchanged.

A checksum is one example of a hash function. A checksum verifies the integrity of files, or strings of characters, before and after they transfer from one device to another across a local network or the Internet. Checksums simply convert each piece of information to a value and sum the total. To test the data integrity, a receiving system just repeats the process. If the two sums are equal, the data is valid (Figure 1). If they are not equal, a change occurred somewhere along the line (Figure 2).

Common hash functions include MD5, SHA-1, SHA-256, and SHA-512. These hash functions use complex mathematical algorithms. The hashed value is simply there for comparison. For example, after downloading a file, the user can verify the integrity of the file by comparing the hash values from the source with the one generated by any hash calculator.

Organizations use version control to prevent accidental changes by authorized users. Two users cannot update the same object. Objects can be files, database records, or transactions. For example, the first user to open a document has the permission to change that document; the second person has a read-only version.

Accurate backups help to maintain data integrity if data becomes corrupted. An organization needs to verify its backup process to ensure the integrity of the backup before data loss occurs.

Authorization determines who has access to an organization’s resources based on their need to know. For example, file permissions and user access controls ensure that only certain users can modify data. An administrator can set permissions for a file to read-only. As a result, a user accessing that file cannot make any changes.
BIM geometries converter
Tags: javascript, react, node, docker
Published: 2022-12-07 06:43:44

I made a wrapper around Ifc Open shell, a library that allows you to convert IFC files to other formats (dae, obj, stl, etc) using different options: [github](https://github.com/jonlo/ifcConverter-web)

It's built on React, Nodejs, three.js and IfcOpenshell.
The backend can be deployed on his own, which can be very useful not only for the web (where there are very good solutions such as ifc.js) but also for unity or unreal applications where plugins for this type of task are quite expensive.
The front allows you to upload and preview your Ifc in a webgl canvas before downloading it.

It's fully dockerized(into three different containers) and can be deployed anywhere using pm2 to manage the nodejs process, allowing you to work in cluster mode for better perfomance.

I probably would have done better and faster with gpt3 but I wouldn't have enjoyed the process as much :D

Give it a try:
[ifc converter](http://ec2-34-249-56-129.eu-west-1.compute.amazonaws.com/ifcconverter)
How to add a favicon to a Next.js static site?
Published: 2022-12-07 06:41:27

## [**Join The JS Fam Discord Here**](https://calvintorra.com/l/discord)

A chill community where we pair-program, launch products and learn together

\=====

I was asked this on the website chat, but looking a bit closer I'm sure the problem was related to image paths.

The boilerplate Next.js comes with an example of the built-in Head module and they also have a favicon linked.

All we need to do is make sure we have our `Head` module from Next imported and placed our link tag inside.

```javascript
import Head from "next/head";

<Head>
    <title>Create Next App</title>
    <meta name="description" content="Generated by create next app" />
    <link rel="icon" href="/favicon.ico" /> // <- HERE
</Head>
```

You can grab a favicon icon-sized image from places like [https://favicon.io/](https://favicon.io/), they make it super easy to convert different types to favicon.

You can place the image in your `public` folder or make a new folder called images / icons etc and place it there.

From your code you don't need to add `public` to your path as Next gives you access directly to static assets in the `public` directory.
How to Download Facebook videos
Tags: javascript, beginners, html, css
Published: 2022-12-07 06:41:11


Want to know how to download videos from Facebook? You’re in the right place. Downloading videos from Facebook is useful for a range of reasons, namely so that you can watch them wherever you are — internet or not.
Luckily, there is a way to download videos from Facebook, and it works on desktop and mobile. You must ensure, however, that there aren’t any copyright restrictions on the video you’re downloading before you get started. Otherwise, you might land yourself in hot water.
[Facebook video Downloader](https://vusave.com/facebook-video-downloader
)
How to get query string parameters from the URL in Next.js
Tags: react, javascript, nextjs
Published: 2022-12-07 06:38:29

## [**Join The JS Fam Discord Here**](https://calvintorra.com/l/discord)

A chill community where we pair-program, launch products and learn together

\=====

Someone left a message on my site about How to get query string parameters from the URL in Next.js.

They were using `next/link` to build a button while passing a query to the new page, the only problem was that the new page wasn't picking up the query.

```js
import Link from "next/link";

export default () => (
  <>
    <Link
      href={{
        pathname: "about",
        query: { name: "TIM" }
      }}
    >
      <a>Read More</a>
    </Link>
    to read more
  </>
);
```

There are a number of ways to do this depending on how you're rendering the page but the first solution that comes to mind is the `useRouter()` hook that Next has built it.

If we recreate this dev's question by creating an about route in next js, then we'll have our default page as index.js.

We have a barebones set up here and we'll import `useRouter` from `next/router`.

From here we can destructure the param in the url using `router.query`. For this example our param will be `name`, so we'll strip `name` out.

We can then show what that is by placing it in our page code and we're good to go.

```js
import { useRouter } from "next/router";

const About = () => {
  const router = useRouter();
  const { name } = router.query;

  return (
    <>
      <h1>About Page </h1>
      <h2>Query = {name}</h2>
    </>
  );
};

export default About;
```

Now if we're using Server Side Rendering we can get the query param from the context object and pass that to our page as a prop.

The setup is a little different.

We use the ServerSideProps function and grab the query key from the context object using destructuring.

On that key, we can then grab the name key which contains the param we're looking for.

```js
export async function getServerSideProps({ query }) {
  const { name } = query;

  /* 
    Pass the name param to the page
  */
  return { props: { name } };
}
```

```js
/* 
    Simple example.
    The context object has a lot of info.
*/
context = {
  query: { name: "TIM" }
};
```

We can then pass this param to the page as a prop

```js
const About = ({ name }) => {
  return (
    <>
      <h1>About Page </h1>
      <h2>Query = {name}</h2>
    </>
  );
};

export default About;

export async function getServerSideProps({ query }) {
  const { name } = query;

  return { props: { name } };
}
```
Telescope - filtering feed URLs - progress
Published: 2022-12-07 06:38:17

I have been working on filtering feed URLS for telescope ([issue 3688](https://github.com/Seneca-CDOT/telescope/issues/3688)). I started by looking at the main blog hosts mentioned in the issue - `dev.to`, `medium.com`, `blogspot.com`, and `wordpress.com`. For most of them, I was able to find blog URLs to test and find the feed URLs returned by the feed discovery service. 

For `wordpress.com`, I had to create an account, and play around with the UI to find out how posts were created, and how you could visit the site. Basically, once you add a post and publish it, you can click Visit Site to get redirected to the site URL. I used this URL to get a list of the feed URLs for `wordpress.com`.

To find out the feed URLs that could be used for viewing posts, I simply viewed their contents in the browser. If this was unreadable, I downloaded the response into a file by navigating to the URL in a new tab in Firefox and used VS Code to open the file. Then, I used an XML formatter to make the contents of the file more readable and confirmed that the URL response had the posts for the blog.

Once I had collected a list of valid feed URLs for various hosts, I noticed that there were three patterns
- `https://.../feed/userName` (`dev.to` and `medium.com`)
- `https://blogName.blogspot.com/feeds/posts/default`
- `https://blogName.wordpress.com/feed`

I also found that there was an option to set up a custom domain for these blog hosts. Initially, my plan was to set some sort of a whitelist to only allow valid feed URLs. However, with custom domains, this could cause false positive or false negatives. So, I decided to use a blacklist filtering method instead. There were only a couple of feed URLs returned such as the wordpress comments feed: `https://blogName.wordpress.com/comments/feed`. 
I would simply add a function to filter out any feed URLs that matched the pattern for the URLs in the blacklist. For example, a feed URL which ends with `/comments/feed` should not be returned.

Thus, I added a function to filter the feed URLs before returning them. Next, I need to test the sign-up process with various blog hosts to confirm that the feed URLs are returned correctly, and posts can be pulled successfully. I would also need to write some tests for the new function.
Next.js Loads script tags but it doesn't execute them
Tags: nextjs, react, javascript
Published: 2022-12-07 06:33:06

## [**Join The JS Fam Discord Here**](https://calvintorra.com/l/discord)

A chill community where we pair-program, launch products and learn together

\=====

Had another question on my website today about Next.js and custom scripts. This one bothered me a while ago too and I had a similar hack to the dev reaching out.

I had placed an "Immediately Invoked Function" inside a `useEffect` on my `_app.js` page.

### Don't Do This

```javascript
  useEffect(() => {
    var Tawk_API = Tawk_API || {},
      Tawk_LoadStart = new Date();
    (function () {
      var s1 = document.createElement("script"),
        s0 = document.getElementsByTagName("script")[0];
      s1.async = true;
      s1.src = "https://embed.tawk.to/60...";
      s1.charset = "UTF-8";
      s1.setAttribute("crossorigin", "*");
      s0.parentNode.insertBefore(s1, s0);
    })();
  }, []);
```

This was to have a chatbox on my, on every page.

Placing the code inside the `Head` module that's built into Next now produces an error and provides a solution by using the `Script` module....which is also built-in.

This makes life a lot simpler. We can now create a separate file, paste our 3rd party script and link to it using the `Script` module.

### Do This

```bash
pages/
public/
├─ chatbot/
│  ├─ script.js
```

Then using this script across the entire app

```javascript
import Script from "next/script";

function MyApp({ Component, pageProps }) {
  return (
    <>
      <Script type="text/javascript" src="/chatbot/script.js" />
      <Component {...pageProps} />
    </>
  );
}

export default MyApp;
```
Abstracting spark modules using simple python functions
Tags: pyspark, bigdata, etl, spark
Published: 2022-12-07 06:32:19

I really enjoy working with apache spark, but if there is one thing that makes me tired is having to repeat the name of methods and commands, for me it is totally unproductive, and it is based on this complaint made by my person that I decided to create this post. But let's take it easy, this is just an experiment.

Requirements:  
- Python >= 3.9  
- Apache Spark >= 3.2  [download installer here](https://github.com/romermor/spark-setup)
- Vscode  

The first thing we do when working with spark is create a session.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3s35bpid3vxfigqjiu2.png)

That's it, and then we load any file. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2t4k9obt8mzmktern9oa.png)

nice, but, have you ever thought if we had to upload more files and every time we had to repeat the same command above? I know, "copy, paste and modify the code, blah, blah, blah". But we don't want that, because let's face it, this is pure kornojob, but, how can we improve this? In my project I created a folder called functions and inside it I created a file called core.py

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4kbzz1zy68zrk0ouzev1.png)

And a file called main.py which will be our main program, where we will import the methods from core.py, the coding looks like this

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r0i1ximnzqg46r4lbmhj.png)

And in main.py we implement it like this  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u21rd1poagp44al92a24.png)

Notice how everything became easier, with the read() method I can load innumerable files just by passing parameters

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6ipp4bfkhloevuporgl.png)

What if I need to create a view? Simple, in core.py write this

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mepshtht7jm8uw3ooigb.png)

And in main.py

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/km2vy7n57l80sg3e57uo.png)

Simple, and in the case where we have schemas in .json files how do we load them?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bb3154ul2z372c4d3c3e.png)

main.py

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjucfx0s1pzm2yqeol2d.png)

And finally, we need to write the files somewhere, which is relatively simple too, see

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dhzt7xenv5kf22wxc0s2.png)


No main.py


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2xik6bz1j027sdeo9b5.png)

complete code for core.py 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ra7tuygdri01ka1pd07.png)

I hope you enjoyed the joke, I hope that in some way this example will help you. bYe
What is AWS VPC?
Tags: aws, vpc, network, secuirty
Published: 2022-12-07 06:02:29

Amazon Web Services (AWS) Virtual Private Cloud (VPC) is a service that allows users to create and manage their own virtual private network (VPN) in the AWS cloud. This allows users to have complete control over their own network environment, including the ability to select their own IP address range, create subnets, and configure route tables and network gateways.

One of the main benefits of using VPC is the ability to securely connect to the internet and to other AWS services. With VPC, users can create a public-facing subnet for their web servers, and a private-facing subnet for their databases. This allows for better security and isolation of sensitive data.

VPC also allows for greater control over network access. Users can use security groups and network ACLs to control inbound and outbound traffic at the subnet and network interface levels. This allows users to create granular rules to restrict access to specific IP addresses or ranges, ports, and protocols.

Another benefit of VPC is the ability to use AWS PrivateLink. This allows users to securely access services over the AWS network, without the need for an internet gateway or a VPN connection. This can improve security and reduce data transfer costs.

VPC also allows for seamless integration with other AWS services. For example, users can use VPC to connect to Amazon Elastic Compute Cloud (EC2) instances, Amazon Relational Database Service (RDS) databases, and other AWS services. This allows for easy deployment and management of complex, multi-tier applications in the AWS cloud.

In addition to these benefits, VPC also offers several other features and capabilities. For example, users can use VPC Flow Logs to capture information about the IP traffic going to and from their network interfaces. This can be useful for monitoring and troubleshooting network issues.

VPC also allows for the creation of VPN connections to on-premises networks. This can be useful for organizations that have a hybrid cloud environment, or for those that want to connect their AWS resources to their existing IT infrastructure.

**Conclusion**

Overall, AWS VPC provides users with a highly customizable and secure network environment in the AWS cloud. With VPC, users can easily connect to the internet and other AWS services, control network access, and integrate with other AWS services. This allows for greater flexibility and control over their cloud environment, enabling them to build and deploy complex, multi-tier applications in the AWS cloud.
MongoDB Atlas Hackathon 2022 on DEV
Tags: atlashackathon22
Published: 2022-12-07 05:57:02


## What I built
We live in a hostel, and we need to split almost all our expenses on a daily basis. We started to realise that this lack of structure led to unpredictable spending that was hard to keep track of as a result of the infinite costs, we incurred each month and the inability to keep track of who was paying for what and when. So we came up with FinSPlit to make things easier to manage and save time.

## How it work?
* Create a Group for the weekend plan.
* You paid for the anything. Keep a track of it.
* How much has the group spent in total?
* Find out how much you owe/are owed.
* Looks like you have to pay multiple people. Is there a way to combine payments in the group? Settle up in the group

⚒️ Technologies
* Node.js (Typescript)
* React.js (Typescript)
* MongoDB
* AWS S3 Bucket

### Category Submission:
About Real-time

### App Link
https://github.com/rajmahadev8/Fin-Split

### Screenshots

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9yzkf8w89jesqmatzdjz.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9i4j76jiauvduzsbw07.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w21o1wfew9i4ild3ysap.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5sbh4o0optqnob6x0ux.jpg)



### Description
* It was challenging for us to put up security measures to safeguard user information from unauthorized users, as well as CORS policies to let authorized users access to our API endpoints.
* Using a json web token for authorization was a bit typical for us as we were trying out this method for the first time.
* Working with complicated data structures in MongoDB was quite challenging, but the "mongoose" package made the work simple.
* We found solutions to issues that actually exist in the world and affect us in our daily lives.
* We learned how we can encrypt and validate users' personal data with the help of crypto package provided by Node.js
 

### Link to Source Code
https://github.com/rajmahadev8/Fin-Split

## Background
* This was the first time our team ever dealt with Mongo technology, so we had to learn it from scratch. It was an awesome experience to work with such emerging technology, and there were many resources provided by [](https://www.mongodb.com/docs/) and other creators that guided us through the integration process of the API.
* We found solutions to issues that actually exist in the world and affect us in our daily lives. 


### How I built it
* The technologies we used included the MERN (MongoDB, Express.js, React.js, Node.js) stack, as well as DeSo API, Auth0 for authentication
* we store our user data in MongoDB and interact with it through a REST API running over an ngrok tunnel.

### Additional Info
[](https://www.mongodb.com/developer/products/atlas/tutorials/)

TeamMate - @ishu21