teleren/devto huggingface dataset:
Effortless NAS Setup: Turn Linux into a High-Performance Server
Published: 2023-11-12 10:17:06

---
title: Effortless NAS Setup: Turn Linux into a High-Performance Server
published: true
date: 2023-12-25 00:00:00 UTC
tags: 
canonical_url: https://simeononsecurity.com/guides/turn-linux-into-nas-nfs-cifs/
---

 ![](https://simeononsecurity.com/img/cover/linux-nas-transformation.png)

**Turning any Linux System into a NAS (NFS, CIFS)**

In this comprehensive guide, we will explore how to transform your Linux system into a Network-Attached Storage (NAS) server, enabling you to efficiently share and manage files across your network. NAS servers are invaluable for home or office environments, facilitating seamless data storage and retrieval. We will focus on setting up two popular file-sharing protocols, NFS (Network File System) and CIFS (Common Internet F [Read More at https://simeononsecurity.com](https://simeononsecurity.com/guides/turn-linux-into-nas-nfs-cifs/)
About Bit, Bytes and Qubits
Tags: learning, webdev, codenewbie, web
Published: 2023-12-24 22:45:17

For some time now I have been interested in knowing a little more about how computers and the Internet work. One of the things I didn't understand was the difference between bits and bytes. The story behind all this is very interesting!

The bit (binary digit) corresponds to a digit of the binary numbering system and represents the minimum unit of information. The storage capacity of a digital memory is also measured in bits. That is, a bit can be 0 or 1.

Gottfried Wilhelm Leibniz invented the binary system at the end of the 17th century. The idea? Convert certain linguistic concepts to logic, that is, interpret them as “true” or “false”

This is how a bit can represent two values such as true/false, on/off, etc. Following this logic, 2 bits can have up to 4 different combinations: 0-0, 0-1, 1-0, 1-1. 8 bits make up one octet and are equivalent to 256 different values.

Does 8 bits sound familiar to you?

Currently we say that 1 byte (Binary Tuple) is equivalent to 8 bits, but a byte and an octet may not be the same. While an octet always has 8 bits, a byte contains a fixed number of bits, but they must not be 8. In older computers, the byte was made up of different numbers of bits.

Before, computers processed information through ‘words’. These had a specific number of bits, to be exact, 10 bits since decimal precision was prioritized academically.

But having 10 digits was a lot of 'waste of resources'. The German Werner Buchholz came to the conclusion that each character had to be addressed individually, with a fixed reference of 8 adjacent bits per unit. 

Therefore, 1 byte can be a number, a letter or a symbol and represents one letter of the character code in the binary system in all computing applications.

You can check this byte counter:
[Atatus]
(https://www.atatus.com/tools/byte-counter)

And this string to binary converter online tool where you can count the bytes as well:
[codebeautify]
(https://codebeautify.org/string-binary-converter)

But everything is constantly changing and evolving, which brings me to the next question.
Is there anything that could replace the bit in the future?

This is when we reach a more complex world, the quantum world.

A qubit (quantum bits) is based on quantum theory and is a very interesting topic, but to give a brief introduction, in the quantum world a simple action can have different possibilities at the same time and so a qubit is based on some basic principles of quantum physics, which are: superposition and entanglement.

A qubit is the bit of quantum computing, since it represents two base states, 0 and 1, but the big difference is that a bit can have the value of 0 or 1, and a qubit has both values at the same time, which saves a lot of time when performing parallel calculations. The surprising thing is that the qubit is not as new as it seems, but rather the first concepts were made known in 1968 thanks to Stephen Wiesner with his invention 'conjugate coding'.
Comandos de Git Basicos
Tags: git, github, programming
Published: 2023-12-24 22:39:51

**Estado de Git**
El primer comando de Git y el mas utilizado es el 

```
git status
```
Muestra el estado del árbol de trabajo (y del área de preparación; pronto hablaremos más sobre el área de preparación). Le permite ver qué cambios está rastreando actualmente Git, para que pueda decidir si desea pedirle a Git que tome otra instantánea.

**Agregar Git**
El comando es 

```
git add
```
Guarda su trabajo en un instante invocando el comando este tambien integra los datos que se guardan en una confirmación incluyen el nombre del autor y la dirección de correo electrónico, la fecha, comentarios sobre lo que hizo (y por qué), una firma digital opcional y el identificador único de la confirmación anterior.
**Git Comprometerse**
Despues de haber preparado algunos cambios para la configuración se comenta la acción de la terminal.

```
git commit
```
Explore the Best Motorhome Dealers in Hampshire for Your Ultimate Travel Companion
Published: 2023-12-24 21:37:48

If you're on the lookout for your dream motorhome in Hampshire, the journey begins here. Discovering the perfect travel companion for your adventures is now easier than ever, thanks to the top-notch motorhome dealers scattered across this picturesque county.

## Embrace Wanderlust with the Finest Motorhome Selection

In the heart of Hampshire, a haven for motorhome enthusiasts awaits. Navigate through a diverse range of motorhomes that cater to every taste and preference. From compact and efficient models to spacious and luxurious ones,**[ motorhome dealers in hampshire](https://autohaus.co.uk/find-a-dealership/)** have it all.

The Allure of Hampshire's Motorhome Showrooms
A. Cutting-Edge Designs: Elevate your travel experience with motorhomes boasting state-of-the-art designs. Our dealerships feature the latest innovations, ensuring your journey is not only comfortable but stylish.
B. Tailored to Your Needs: Hampshire's motorhome dealers understand that every traveller is unique. Hence, they offer a personalised approach, helping you find a motorhome that aligns perfectly with your specific requirements.
C. Top-Tier Brands: Choose from a curated selection of motorhomes crafted by renowned manufacturers. Quality and reliability are non-negotiable, as our dealerships showcase models from the most trusted brands in the industry.
Why Choose Hampshire for Your Motorhome Purchase?
1. Scenic Drives Await: Hampshire's diverse landscapes provide the perfect backdrop for your motorhome adventures. From rolling hills to coastal roads, every drive is a scenic masterpiece waiting to be explored.
2. Camping Nirvana: With an abundance of camping sites, Hampshire welcomes motorhome enthusiasts with open arms. Park your mobile haven amidst nature and create memories that last a lifetime.
3. Unparalleled Service: Our Hampshire motorhome dealers not only offer a wide selection but also provide exceptional service. Your satisfaction is their priority, ensuring a seamless purchasing process.
Conclusion
Embark on your motorhome journey with confidence, knowing that Hampshire's dealerships are dedicated to making your dreams a reality. The perfect motorhome for your adventures awaits – seize the opportunity and start your exploration of Hampshire's open roads today.
🌟 #DEVImpact2023 Reflections
Tags: devimpact2023
Published: 2023-12-24 21:35:14

<!-- ✨ This template is only meant to get your ideas going, so please feel free to modify it as you’d like, or write your own title, structure, and words! ✨ -->

## Proud Moments
I'm proud of my journey in learning Python, C, HTML, and CSS. I created my own [website](https://nightdev4l.web.app/) to showcase my skills, projects, and community interactions. Additionally, I developed a personal assistant that operates through voice commands.

## DEV Contributions
While I haven't made many contributions, one of my articles gained popularity on DEV: [Best way to learn a programming language](https://dev.to/nightdev/best-way-to-learn-a-programming-language-4223).

## Brilliant Fails
A notable failure includes my personal assistant named Eva and a project that underwent multiple revisions before finally achieving a breakthrough. The project involves a therapist running on a custom dataset that I created. You can find it [here](https://github.com/shviam-2018/Thea/tree/main).

## Celebrate the Numbers
{% embed https://devto-wrapped.sliplane.app/?username=nightdev %}

## Future Goals 
By the end of 2024, I aim to learn C++ and develop a game. I also plan to complete my three major projects: 
1. Website
2. Eva
3. Thea

## What Does DEV Mean to You?
DEV is the platform I rely on for information in the tech industry. It's where I learn, share my knowledge, document my journey, and connect with like-minded individuals.
MongoDB giving user permission to view only single collection.
Tags: devops, security, mongodb, webdev
Published: 2023-12-24 21:33:50

# Purpose
Here I will install mongo and set it up in a way where an user can only read and write a single collection or multiple collection but not all.

As a result it will increase security of the db.

# Steps

### Install mongodb
```
docker run -dit --name mongo -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=mongoAdmin33 mongo
```
### Go into the docker container's mongosh
```
docker exec -it mongo bash -c "mongosh mongodb://admin:mongoAdmin33@localhost:27017/?authSource=admin"
```

### Use this command and see that all the dbs are visible
```
show dbs;
```
It should show 3 collections like this -
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmwzk3cs9k37svl23c1r.png)


### Switch to a db using
```
use appleCollection;
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsd1uz7o4i82lqxb3m48.png)

### Insert some data
```
db.apples.insertMany([
    {
        title: "Green Apple"
    },
    {
        title: "Red Apple"
    },
    {
        title: "Black Apple"
    }
])
```


![after inserting data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frydgnylyp73ugbpclbo.png)

### Create an user and give him read write access for only this collection
```
db.createUser(
   {
     user: "apple_admin",
     pwd: "apple_admin_pass",
     roles: [ "readWrite", "dbAdmin" ]
   }
)
```
It should say

![after creating user](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4odfzmirsz9ynfdtlkwg.png)

### Exit from the current mongosh using
```
exit
```

### Login into mongosh using the new apple admin account
```
docker exec -it mongo bash -c "mongosh mongodb://apple_admin:apple_admin_pass@localhost:27017/?authSource=appleCollection"
```
Please notice that we are using `appleCollection` as the auth source.

### Now use the command to see dbs;
```
show dbs;
```
Only one db should be visible.

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


### Select data from this db.
```
db.apples.find({});
```
![find data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1bt83owwrui68n1bzuv.png)

### Switch to a different database
```
use randomDatabase;
```

### Query this database and it should show error.
```
show collections
```

![user don't have permission for this db](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rg5rhhb1azjlf10w48a.png)


# Reference

This was one of my projects that I tried out first here. Here you can also find how to give a user multiple database’s permission.
devops-notes/61. setup mongodb and give specific user permission to specific collection. I will update the github if I find something.

[[Github]Giving user permission to specific database](https://github.com/minhaz1217/devops-notes/tree/master/61.%20setup%20mongodb%20and%20give%20specific%20user%20permission%20to%20specific%20collection)


Enjoy and let me know if any problem occurs.
React table packages like Notion Table
Published: 2023-12-24 21:27:56

I am looking for a table package for react that has the modern small features of tables in Notion/Airtable like tools. These are: 
- sorting 
- sums and averages (calculations)
- drag of columns
- resize columns
- multi select cells
- editable cells on click

I am familiar with [React-table](https://github.com/tanstack/table) however it is still too raw to build all these capabilities. Anyone know of a better package that can speed things up?
Javascript Beginner's Guide
Tags: webdev, javascript, programming, beginners
Published: 2023-12-24 21:22:16

## Unlocking the Power of JavaScript: Your Guide to Getting Started

JavaScript is the language of the web, igniting interactive experiences and bringing websites to life. Whether you're aiming to build dynamic web pages, create engaging games, or dive into cutting-edge technologies, JavaScript is your key to unlocking endless possibilities. But where do you begin? Here's a roadmap to guide your journey into the world of JavaScript:

###1. <u>Laying the Foundation:</u>
Start with the Basics: Familiarize yourself with fundamental programming concepts like variables, data types, operators, and control flow. Online courses, tutorials, and interactive platforms like Codecademy and FreeCodeCamp offer excellent starting points.
Embrace the Console: Your browser's developer console is your playground. Experiment with code, test snippets, and visualize results instantly.

###2. <u>Embrace Resources:</u>
Online Courses: Explore structured learning paths through platforms like Coursera, Udemy, and Treehouse.
Interactive Tutorials: Engage with hands-on exercises on platforms like Codecademy and Mozilla Developer Network (MDN).
Books: Dive deeper with comprehensive guides like "Eloquent JavaScript" and "JavaScript: The Definitive Guide."

###3. <u>Practice with Purpose:</u>
Build Small Projects: Start with simple tasks like creating a calculator or a to-do list.
Join Coding Challenges: Test your skills and learn from others on platforms like Codewars and HackerRank.
Contribute to Open-Source Projects: Gain real-world experience and collaborate with developers on GitHub.

###4. <u>Consistency is Key:</u>
Set Realistic Goals: Dedicate regular time to practice, even if it's just 30 minutes a day.
Find a Support System: Join online communities or find a mentor to keep you motivated and provide guidance.
Don't Fear Mistakes: Embrace errors as learning opportunities and don't be afraid to experiment.

###5. <u>Expand Your Horizons:</u>
Explore Frameworks and Libraries: Discover tools like React, Angular, and Vue.js for building complex web applications.
Venture into Node.js: Utilize JavaScript for server-side development and create full-stack applications.
Stay Up-to-Date: Keep learning and evolving with JavaScript's continuous advancements.

<u>**_Remember:_**</u>
_Practice Patience:_ Learning takes time and effort. Embrace challenges and celebrate progress.
_Find Your Learning Style:_ Experiment with different resources and methods to discover what works best for you.
Have Fun: Enjoy the process of exploration and creation!
🔋 My Battery 🔋 | Real-Time Battery Info
Tags: codepen
Published: 2023-12-24 20:49:48

This shows your device's actual battery level and real-time charging status. It uses a JavaScript object called "navigator" to get battery information.

Key Features:

📊 Live Battery Level: Keep tabs on your battery's charge percentage with a dynamic and visually appealing battery level indicator.

⚡ Charging Status: Find out whether your device is currently charging or running on battery power. Stay in the know!

🌐 Web-Based Convenience: Access this handy tool from any device with a web browser. No installations or downloads are required!

🎨 Clean and Responsive Design: The interface is designed to be intuitive and responsive, and also minimalistic design.

If you like it, please give a like and share.

{% codepen https://codepen.io/lakshanrukantha/pen/ExMaVBP %}
I THINK WIZARD WEB RECOVERY IS THE BEST BITCOIN RECOVERY EXPERT
Published: 2023-12-24 20:30:01

WIZARD WEB RECOVERY is a valuable resource for individuals who have misplaced their crypto holdings. This top recovery company specializes in getting lost or unreachable cryptocurrency back. Their team of professionals uses their knowledge of the intricacies of the cryptocurrency industry to give hope to individuals who have given up on their priceless possessions. WIZARD WEB RECOVERY is an expert in the field of cryptocurrency retrieval, having gained years of expertise and a thorough understanding of blockchain technology. They have a brilliant name in the business after helping several clients successfully retrieve their misplaced cryptocurrency holdings. They are the go-to resource for anyone feeling hopeless about their lost digital fortunes because of their experience as well as the state-of-the-art technologies and strategies they employ. During the first consultation, the WIZARD WEB RECOVERY team analyzes the circumstances and determines the likelihood of a successful retrieval. They collaborate closely with clients to comprehend the circumstances underlying the cryptocurrency loss, and they compile all pertinent facts. Following the evaluation, WIZARD WEB RECOVERY  knowledgeable staff begins tracking down and looking into the misplaced cryptocurrency transactions. By carefully examining blockchain data and other accessible sources, they find vital information that gets them one step closer to getting their lost valuables back. To successfully navigate the complicated realm of blockchain technology, WIZARD WEB RECOVERY makes use of cutting-edge technologies and strategies. They have an advantage in the crypto recovery process thanks to their in-depth knowledge, which enables them to use cutting-edge software and exclusive techniques. Following a careful examination and applying their knowledge, WIZARD WEB RECOVERY, puts out great effort to retrieve the misplaced or stolen cryptocurrency assets. With their expertise and tenacity, they accomplish the seemingly unachievable, providing their clients with happiness and comfort as they reclaim their priceless digital assets. Truly WIZARD WEB RECOVERY is an outstanding team. To learn more about them, Go to WIZARDWEBRECOVERY. NET 

EMAIL ADD ; WIZARDWEBRECOVERY@)PROGRAMMER. NET
How to install PHP 8.2 and Laravel version 10 in Ubuntu
Tags: php, laravel, ubuntu, install
Published: 2023-12-24 20:15:38

**Install Ubuntu basic dependency:**

```
sudo apt install curl software-properties-common ca-certificates lsb-release apt-transport-https
```
 
**Add all PHP repositories:** 

```
LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php
```
 
**Update the system:**

```
sudo apt update
```
 
**Install PHP 8.2**

```
sudo apt install php8.2
```
 
**Now install all PHP dependencies for Laravel version 10:**

```
sudo apt install php8.2-curl openssl php8.2-bcmath php8.2-curl php8.2-mbstring php8.2-mysql php8.2-tokenizer php8.2-xml php8.2-zip php8.2-gd
```

**Now install composer:**

```
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
```

**Now create laravel project using composer:**

```
composer create-project laravel/laravel test_laravel
```
The only Docker cheatsheet you need 🐳
Tags: docker, cheatsheet, cli
Published: 2023-12-24 20:14:55

My reference of the most useful commands to know when you're building in Docker:

## Build and run

Build an image:
```
docker build -t myimage .
```

Build an image, deleting the old one:
```
docker rmi myimage && docker build -t myimage .
```

Build an image, and print all the steps:
```
docker build --progress=plain -t myimage .
```

Run container from image, with port forwarding:
```
docker run -p 80:80 myimage
```

Run container for debugging purposes, replacing the entrypoint with a shell:
```
docker run --rm -it --entrypoint bash myimage
```

## Inventory

List all images:
```
docker image ls
```
List all containers: (The -a flag is to show stopped containers as well)
```
docker container ls -a
```
List all docker images and containers and file sizes:
```
docker system df -v
```
Show the history of an image:
```
docker history myimage
```

## Clean up

***Dangling images** are untagged and not needed by any tagged images.*
***Unused image** are not needed by any existing containers.*

Delete stopped containers:
```
docker container prune
```
Remove dangling images:
```
docker image prune
```
Remove unused images:
```
docker image prune -a
```
Remove build cache:
```
docker builder prune
```
Ultimate Homebrew Cheatsheet 🍺
Tags: homebrew, macos, brew, install
Published: 2023-12-24 20:12:51

Below is my reference of useful commands for package management in Homebrew:

- [Quick Stats](#-quick-stats)
- [Manage Packages and Dependencies](#-manage-packages-and-dependencies)
  - [See Installed Packages](#see-installed-packages)
  - [See Dependency Tree](#see-dependency-tree)
  - [Remove Hanging Dependencies](#remove-hanging-dependencies)
  - [Remove All Packages](#remove-all-packages)
- [Manage Files](#-manage-files)
  - [Installation Paths](#installation-paths)
  - [See Installed Files](#see-installed-files)
  - [Remove Unneeded Files](#remove-unneeded-files)

## 👀 Quick stats

Show Homebrew state:
```
brew info
```

Show manually installed taps, kegs and packages in one list:
```
brew bundle dump --file=-
```

## 📦 Manage packages and dependencies

### See installed packages

List installed packages:
```
brew list # formulae and casks
brew list --formulae # just formulae
brew list --casks # just casks
```

List installed packages which are **not** dependencies of any others:
```
brew leaves
brew leaves -r # installed manually
brew leaves -p # installed as dependencies
```

List installed packages which are **not** dependencies of manually installed packages:
```
brew autoremove --dry-run
```

### See dependency tree

Show dependencies of the wget formula in a tree format:
```
brew deps --tree wget
```

Show all installed formulae in a dependency tree format:
```
brew deps --tree --installed
brew deps --tree $(brew leaves) # remove duplicate showing of same dependency
```

Show dependency tree for all casks:
```
brew deps --tree $(brew list --casks -1)
```

### Remove hanging dependencies

Uninstall hanging (no longer used) dependencies:
```
brew autoremove 
```

### Remove all packages

Remove all packages installed with Homebrew:
```
brew remove --force $(brew list) --ignore-dependencies
brew remove --force $(brew list --formulae) --ignore-dependencies # formulae only
brew remove --force $(brew list --casks) --ignore-dependencies # casks only
```

## 🗄️ Manage files

### Installation paths

Show key installation directories:
```
brew shellenv
brew --prefix
brew --repository
brew --cellar
brew --caskroom
```

### See installed files

Show files in the wget keg:
```
brew list wget # collapse directories
brew list wget --verbose # recurse directories
```

Show symlinks to the wget keg:
```
unlink wget --dry-run
unlink wget --dry-run | xargs ls -l # show link destinations
```

Show unneeded files:
```
brew cleanup --dry-run # old versions of packages
brew cleanup -s --dry-run # old versions of packages and cache files
```

### Remove unneeded files

Remove old versions of packages and cache files:
```
brew cleanup -s
```

Completely erase the Homebrew cache folder:
```
rm -rf $(brew --cache)
```