Sunday, February 26, 2023

Laravel 10 CRUD Example

In this tutorial, I'd like to share with you an example of a Laravel 10 CRUD operation. This will teach you how to build a simple CRUD application using Laravel 10 for beginners. By following these steps, you will learn how to create, read, update, and delete data in your application.

For those unfamiliar, CRUD stands for Create, Read, Update, and Delete. These are the four basic functions needed to implement persistent storage in an application.

In this example, we will create a product CRUD application using Laravel 10. We'll start by creating a products table with name and detail columns using Laravel 10 migration. From there, we'll create routes, controllers, views, and model files for the product module. To make our application look good, we will be using Bootstrap 5 for design. So, let's get started by following the below steps.

Step 1: Install Laravel 10 App

Let us begin the tutorial by installing a new laravel 10 application. if you have already created the project, then skip the following step.

composer create-project laravel/laravel example-app

Step 2: Database Configuration

In the second step, we will make a database configuration, we need to add the database name, MySQL username, and password. So let's open the .env file and fill in all details like as below:

.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=here your database name(blog)
DB_USERNAME=here database username(root)
DB_PASSWORD=here database password(root)

Step 3: Create Migration

Here, we will create a "products" table using laravel migration. so let's use the following command to create a migration file.

php artisan make:migration create_products_table --create=products
After this command you will find one file in the following path "database/migrations" and you have to put below code in your migration file for creating the products table.

id();
            $table->string('name');
            $table->text('detail');
            $table->timestamps();
        });
    }
  
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
};
Now you have to run this migration by the following command:

php artisan migrate

Step 4: Create Controller and Model

In this step, now we should create new resource controller as ProductController. So run bellow command and create new controller. bellow controller for create resource controller.

php artisan make:controller ProductController --resource --model=Product
After the bellow command, you will find a new file in this path "app/Http/Controllers/ProductController.php".

In this controller will create seven methods by default as bellow methods:

1)index()
2)create()
3)store()
4)show()
5)edit()
6)update()
7)destroy()
So, let's copy bellow code and put on ProductController.php file.

app/Http/Controllers/ProductController.php
paginate(5);
        
        return view('products.index',compact('products'))
                    ->with('i', (request()->input('page', 1) - 1) * 5);
    }
  
    /**
     * Show the form for creating a new resource.
     */
    public function create(): View
    {
        return view('products.create');
    }
  
    /**
     * Store a newly created resource in storage.
     */
    public function store(Request $request): RedirectResponse
    {
        $request->validate([
            'name' => 'required',
            'detail' => 'required',
        ]);
        
        Product::create($request->all());
         
        return redirect()->route('products.index')
                        ->with('success','Product created successfully.');
    }
  
    /**
     * Display the specified resource.
     */
    public function show(Product $product): View
    {
        return view('products.show',compact('product'));
    }
  
    /**
     * Show the form for editing the specified resource.
     */
    public function edit(Product $product): View
    {
        return view('products.edit',compact('product'));
    }
  
    /**
     * Update the specified resource in storage.
     */
    public function update(Request $request, Product $product): RedirectResponse
    {
        $request->validate([
            'name' => 'required',
            'detail' => 'required',
        ]);
        
        $product->update($request->all());
        
        return redirect()->route('products.index')
                        ->with('success','Product updated successfully');
    }
  
    /**
     * Remove the specified resource from storage.
     */
    public function destroy(Product $product): RedirectResponse
    {
        $product->delete();
         
        return redirect()->route('products.index')
                        ->with('success','Product deleted successfully');
    }
}

Step 5: Add Resource Route

Here, we need to add resource route for product crud application. so open your "routes/web.php" file and add following route.
routes/web.php

<!DOCTYPE html>
<html>
<head>
    <title>Laravel 10 CRUD Application</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    
<div class="container">
    @yield('content')
</div>
    
</body>
</html>

Step 6: Add Blade Files

In last step. In this step we have to create just blade files. So mainly we have to create layout file and then create new folder "products" then create blade files of crud app. So finally you have to create following bellow blade file:

1) layout.blade.php 2) index.blade.php 3) create.blade.php 4) edit.blade.php 5) show.blade.php So let's just create following file and put bellow code.
resources/views/products/layout.blade.php resources/views/products/index.blade.php
@extends('products.layout')
 
@section('content')
    <div class="row">
        <div class="col-lg-12 margin-tb">
            <div class="pull-left">
                <h2>Laravel 10 CRUD Example from scratch</h2>
            </div>
            <div class="pull-right">
                <a class="btn btn-success" href="{{ route('products.create') }}"> Create New Product</a>
            </div>
        </div>
    </div>
   
    @if ($message = Session::get('success'))
        <div class="alert alert-success">
            <p>{{ $message }}</p>
        </div>
    @endif
   
    
        @foreach ($products as $product)
        
        @endforeach
    <table class="table table-bordered">
        <tbody><tr>
            <th>No</th>
            <th>Name</th>
            <th>Details</th>
            <th width="280px">Action</th>
        </tr><tr>
            <td>{{ ++$i }}</td>
            <td>{{ $product->name }}</td>
            <td>{{ $product->detail }}</td>
            <td>
                <form action="{{ route('products.destroy',$product->id) }}" method="POST">
   
                    <a class="btn btn-info" href="{{ route('products.show',$product->id) }}">Show</a>
    
                    <a class="btn btn-primary" href="{{ route('products.edit',$product->id) }}">Edit</a>
   
                    @csrf
                    @method('DELETE')
      
                    <button class="btn btn-danger" type="submit">Delete</button>
                </form>
            </td>
        </tr></tbody></table>
  
    {!! $products->links() !!}
      
@endsection
resources/views/products/create.blade.php @extends('products.layout')
@section('content')
<div class="row">
    <div class="col-lg-12 margin-tb">
        <div class="pull-left">
            <h2>Add New Product</h2>
        </div>
        <div class="pull-right">
            <a class="btn btn-primary" href="{{ route('products.index') }}"> Back</a>
        </div>
    </div>
</div>
   
@if ($errors->any())
    <div class="alert alert-danger">
        <strong>Whoops!</strong> There were some problems with your input.<br /><br />
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
   
<form action="{{ route('products.store') }}" method="POST">
    @csrf
  
     <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <div class="form-group">
                <strong>Name:</strong>
                <input class="form-control" name="name" type="text" />
            </div>
        </div>
        <div class="col-xs-12 col-sm-12 col-md-12">
            <div class="form-group">
                <strong>Detail:</strong>
                <textarea class="form-control" name="detail" style="height: 150px;"></textarea>
            </div>
        </div>
        <div class="col-xs-12 col-sm-12 col-md-12 text-center">
                <button class="btn btn-primary" type="submit">Submit</button>
        </div>
    </div>
   
</form>
@endsection
resources/views/products/edit.blade.php
@extends('products.layout')
   
@section('content')
    <div class="row">
        <div class="col-lg-12 margin-tb">
            <div class="pull-left">
                <h2>Edit Product</h2>
            </div>
            <div class="pull-right">
                <a class="btn btn-primary" href="{{ route('products.index') }}"> Back</a>
            </div>
        </div>
    </div>
   
    @if ($errors->any())
        <div class="alert alert-danger">
            <strong>Whoops!</strong> There were some problems with your input.<br /><br />
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
  
    <form action="{{ route('products.update',$product->id) }}" method="POST">
        @csrf
        @method('PUT')
   
         <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>Name:</strong>
                    <input class="form-control" name="name" type="text" value="{{ $product->name }}" />
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>Detail:</strong>
                    <textarea class="form-control" name="detail" style="height: 150px;">{{ $product->detail }}</textarea>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12 text-center">
              <button class="btn btn-primary" type="submit">Submit</button>
            </div>
        </div>
   
    </form>
@endsection
resources/views/products/show.blade.php
@extends('products.layout')
  
@section('content')
    <div class="row">
        <div class="col-lg-12 margin-tb">
            <div class="pull-left">
                <h2> Show Product</h2>
            </div>
            <div class="pull-right">
                <a class="btn btn-primary" href="{{ route('products.index') }}"> Back</a>
            </div>
        </div>
    </div>
   
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <div class="form-group">
                <strong>Name:</strong>
                {{ $product->name }}
            </div>
        </div>
        <div class="col-xs-12 col-sm-12 col-md-12">
            <div class="form-group">
                <strong>Details:</strong>
                {{ $product->detail }}
            </div>
        </div>
    </div>
@endsection
Run Laravel App:

All the required steps have been done, now you have to type the given below command and hit enter to run the Laravel app:

php artisan serve
Now, Go to your web browser, type the given URL and view the app output:

http://localhost:8000/products

Sunday, February 19, 2023

How to use Live Wallpaper on Android and set up video wallpaper with sound

In some Android devices such as Xiaomi, Oppo, Realme, Vivo, and Infinix, Live Wallpaper feature is already provided. This feature allows users to display animated images on the home screen as well as the lock screen.

Android is known for having more complete customization features compared to other operating systems. We can set images and videos as wallpaper. Some smartphone manufacturers have equipped their interface with various models of live wallpaper.

How to Change Xiaomi Emoji to iPhone Emoji on MIUI 14.6?

Every time we chat or update our status, there will be a row of emojis on the keyboard that we can use, ranging from laughing, crying, frowning, building emojis, food, etc. Emojis are usually used to describe our expressions when chatting or updating our status.

Emoji models differ for each company, such as Apple, Twitter, Facebook, Samsung, each having their own appearance and Apple's emojis are the most popular.

Even the iOS emojis look more elegant, so some Xiaomi users want to change the appearance of their emojis to look like those of the iPhone. This time cararoot.com will share how to change Xiaomi emojis to iPhone emojis of iOS 14.6.

Tutorial: How to Take a Screenshot on Samsung A12 Without Buttons or Apps

How to take a screenshot on Samsung A12 without buttons and applications? You can easily do it, as this phone has three built-in screenshot features that use gestures, button combinations, and assistant menu.

When it comes to taking pictures, Samsung A12 is reliable. The back of the phone is equipped with four lenses arranged vertically. The main lens is 48MP, 5MP ultrawide, 2MP macro, and a 2MP lens for depth sensing. Samsung also placed an 8MP selfie camera with various features.

This phone has a 6.5-inch screen design with HD+ resolution of 720 x 1600, the same as the recently launched Galaxy M12. The difference is that this smartphone still uses PLS IPS panel technology with a cinematic screen ratio of 20:9.

Friday, February 17, 2023

Cooling Solutions for the Raspberry Pi 4: Optimizing Performance and Temperature


The Raspberry Pi 4 is a powerful single-board computer, boasting a 1.5GHz Quad core Cortex-A72 processor that makes it the best-performing Raspberry Pi to date. However, with great power comes the great responsibility of managing its temperature.

During intensive applications, the Raspberry Pi 4 may get quite hot, with the CPU throttling at around 80 degrees to protect itself. To optimize the board's performance, it's best to keep its temperature as low as possible. Therefore, we conducted some stress tests to evaluate the performance of our new XL heatsinks with and without a fan case.

Wednesday, February 15, 2023

Laravel 10 is Released, Whats New in Laravel 10?

The latest version of Laravel, which is Laravel 10, has been launched. It comes with several new features, such as the minimum required PHP version being upgraded to v8.1, a new package called Laravel Pennant, invokable validation rules, and the addition of native type declarations, among other updates.

Prior to Laravel 9, major versions of the framework were launched twice a year or approximately every six months. However, the core team changed their approach and moved to an annual schedule, with Laravel 9 being released in February 2022 instead of September 2021 as originally planned. The Laravel framework uses a range of community-driven packages and nine Symfony components to provide various features. With the release of Symfony 6.0 slated for November, the Laravel team opted to delay the Laravel 9 release to 2022 to allow them to upgrade their underlying Symfony components to Symfony 6.0 earlier. This approach will enable them to align their releases with Symfony's and provide users with a better experience. Going forward, the Laravel team will follow a yearly release schedule, with Laravel 10 scheduled for February 14th, 2023, and Laravel 11 slated for Q1 2024. Laravel 9 will continue receiving bug fixes until August 8th, 2023, and security fixes until February 14th, 2024. Laravel 10, on the other hand, will receive bug fixes until August 6th, 2024, and security fixes until February 14th, 2025.

In essence, what is Podman?

Podman is a container engine that allows users to run and manage OCI containers on Linux, without the need for a daemon. It can also be used on other operating systems with some adaptations.

How does Podman compare to Docker?

Podman was created to offer an alternative to Docker, with some similarities but also some notable differences. Firstly, Podman doesn't require a daemon process to maintain the connection between the client and the server, which is a key feature of Docker. Instead, Podman is a single main process with containers as child processes. Additionally, Podman is rootless, while Docker needs root privileges due to its architecture. Lastly, Docker aims to be an all-in-one solution for container management, whereas Podman focuses on running containers and uses other specialized tools for building images and image management and distribution, such as Buildah and skopeo, respectively.

Can Podman be used on other operating systems?

Although Podman is a native Linux tool, it can be used on other operating systems, but with some adaptations. For instance, on Windows, it runs using the Windows Subsystem for Linux, and on macOS, it uses a Linux VM.

Podman Feature

Podman is a container engine that provides several features for running and managing containers on Linux. Here are some of its key features:

  • Daemonless architecture: Podman doesn't require a daemon to be running, which makes it a lightweight alternative to other container engines like Docker.
  • Rootless architecture: Podman can be run without requiring root privileges, which improves its security by reducing the attack surface.
  • Pod-based workflows: Podman supports the concept of "pods", which are groups of containers that can be managed together and share network and storage resources.
  • Compatibility with Docker: Podman can run Docker-formatted container images, and it provides a Docker-compatible command-line interface, which makes it easy to switch from Docker to Podman.
  • Flexible container management: Podman provides a range of tools for managing containers, including features like container creation, start/stop/restart, and image management.
  • Integration with Kubernetes: Podman can be used as a drop-in replacement for Docker in Kubernetes environments, which allows users to manage their containers and clusters more easily.

Overall, Podman offers a comprehensive set of features for running and managing containers on Linux, with a focus on flexibility, security, and ease of use.

Sunday, February 12, 2023

Why SEO is Important?

 SEO, or Search Engine Optimization, is a powerful tool for businesses looking to increase their online visibility and attract more customers. With 81% of all Google searchers clicking on the organic results, it's clear that ranking high in the search engine results can bring a significant boost to your business.

In fact, you can expect to receive 5 times more traffic from ranking in the organic search results than from paying for an ad, even if ads are at the top of the page. The results of a well-executed SEO strategy can be impressive, as seen with Amazon's 386 million organic visitors per month. This organic traffic saves Amazon over $1.8 million per month compared to the cost of acquiring the same amount of traffic through Google Ads.

What is Search Engine Optimization (SEO)?

 SEO, or Search Engine Optimization, is the practice of enhancing the quality, performance, and user experience of a website with the aim of increasing its visibility in search engines. By optimizing a website's ranking in the organic search results, it can reach a wider audience and attract more organic traffic.

Organic search results are not influenced by paid promotions and are instead based on the quality of a website and its relevance to the search query. By contrast, the paid ads section is where people pay to have their website displayed in the search results.

Nginx Architecture - A Short Explanation

Many web servers are built with a single-threaded mechanism, which has several drawbacks, including an inability to handle demanding CPU applications efficiently. When multiple threads are present in a single-threaded process, each code or command is processed one by one, in sequence. This method of processing threads consumes a large amount of memory and as a result, leads to decreased performance and slower page loading times.

Top 5 Android App Store Alternatives for Developers

If you're an Android app developer, the question of which store will generate the most revenue may be on your mind. While many developers opt for the safe route of the Google Play Store, there are several other options available. Here are five Android app store alternatives that have shown promising results.

1. Aptoide

Aptoide is one of the most well-known alternatives to Google Play. With over 300 million users, 7 billion downloads, and 1 million apps, it provides a solid option for app developers. One of its biggest advantages is the lack of geo-restrictions, meaning users from any part of the world can access content that may be restricted in their country. Other benefits include a large number of active users, legal options for developers, and a higher payout rate compared to Google Play (19%). The only drawbacks are attempts by Google Play to hide Aptoide on its platform and some concerns about app safety, as the platform only flags potentially harmful apps instead of banning them.

Top Programming Languages for Blockchain Development: An Overview

The world of technology has been greatly impacted by Blockchain, and many businesses are eager to be a part of it. To make a Blockchain project successful, developers need to be proficient in the programming languages used in Blockchain development. In this article, we'll discuss the 5 most in-demand programming languages for Blockchain development, along with a brief overview and their pros and cons.

1. C++

C++, an extended version of the C language, is a widely used programming language in general and is also suitable for Blockchain development. There are two key features that make C++ one of the best programming languages for Blockchain.

How to Change WordPress Theme Using phpMyAdmin or Directly from the Database

In some cases, new changes to your WordPress site, such as plugins or updates, may cause compatibility issues with your current theme. This can result in an inability to access the admin area and switch to a different theme. In such scenarios, you can change the theme directly from the database or phpMyAdmin.

Here's how to change the theme using phpMyAdmin:

Log into phpMyAdmin (through cPanel, Plesk, Web Hosting, or Managed WordPress).

Select the database you want to manage.

Step-by-Step Guide to Deleting WHM Backups using PuTTY

Deleting backup files from the /backup directory on a VPS server through the WHM Control Panel is a simple process when using an SSH client such as PuTTY. This task is often necessary when utilizing a VPS server. To successfully delete the server backups in WHM or cPanel, it is important to use the appropriate commands. In this article, we will delve into the process of deleting the WHM Weekly/Monthly backups.

Recently, I was searching for information on how to delete the /backup folder backups from a WHM server or cPanel. Despite searching for 30 minutes, I was unable to find a satisfactory solution for my issue of limited server space. Upon examining my WHM Control Panel, I realized that I had only 10% of my 400 GB SSD space remaining.

Saturday, February 11, 2023

All Devices, Tools and Software You Need to Start your Phone Farm

Phone farming is a term used to describe the practice of using multiple smartphones or mobile devices to passively earn money, rewards, or cryptocurrency. 



Devices & Tools

Here is a list of devices and tools commonly used in phone farming:

  1. Smartphones: The most common device used in phone farming is a smartphone. Phone farmers use multiple smartphones to run apps and games in the background, earning rewards such as cryptocurrency or cash.
  2. Tablets: Some phone farmers also use tablets in addition to or instead of smartphones, as tablets often have larger screens and longer battery life than smartphones.
  3. Power Banks: Phone farming can be taxing on a device's battery, so power banks can be a useful tool for phone farmers to keep their devices charged and running for longer periods of time.
  4. Multiple SIM Card Adapter: Phone farmers who use multiple devices may use a multiple SIM card adapter to make it easier to switch between different SIM cards and data plans.
  5. Phone Farming Apps: There are many apps specifically designed for phone farming, such as CashPirate, SlideJoy, and Perk, that pay users for installing and running them in the background. These apps are often available through phone farming platforms like Atomp.io.
  6. Remote Administration Tools: Phone farmers who use multiple devices may use remote administration tools such as AirDroid or TeamViewer to remotely manage and control their devices from a single computer.
  7. Automation Tools: To maximize their earnings, some phone farmers use automation tools such as Tasker or MacroDroid to automate repetitive tasks, such as installing and uninstalling apps, or switching between different apps and games.

In conclusion, these are some of the common devices and tools used in phone farming. The specific devices and tools that you use will depend on your specific needs and goals, as well as the type of phone farming you plan to do.

Software

Here is a list of software commonly used in phone farming:

  1. CashPirate: An app that pays users for downloading and trying out new apps, as well as for watching videos and completing surveys.
  2. SlideJoy: An app that pays users for unlocking their phone, as well as for completing surveys and watching videos.
  3. Perk: A platform that offers a variety of different ways to earn rewards, including phone farming, completing surveys, watching videos, and shopping online.
  4. Atomp.io: A phone farming platform that provides access to a variety of apps and games that pay rewards, as well as a marketplace for users to sell and trade their rewards with each other.
  5. Remote Administration Tools: Tools such as AirDroid or TeamViewer that allow phone farmers to remotely manage and control their devices from a single computer.
  6. Automation Tools: Tools such as Tasker or MacroDroid that can automate repetitive tasks, such as installing and uninstalling apps, or switching between different apps and games.
  7. Task killers: Apps such as Greenify or Clean Master that help optimize device performance by killing background tasks and freeing up memory.


These are some of the commonly used software in phone farming. The specific software you use will depend on your specific needs and goals, as well as the type of phone farming you plan to do. Some phone farming platforms like Atomp.io provide access to a variety of apps and games that pay rewards, which can simplify the process of phone farming and make it easier for users to get started.

Use this 3 Awesome Rust Libraries!


Rust is a modern, fast, and efficient systems programming language that has gained popularity among developers for its focus on safety and performance. One of the key benefits of Rust is its robust library ecosystem, which provides developers with a wealth of libraries and tools to help build their applications. Whether you're building a backend service, a command-line tool, or a complex system, Rust's libraries offer a wide range of capabilities and functionalities to help you achieve your goals. In this article, we will introduce some of the best Rust libraries that are worth considering for your next project. These libraries have been chosen based on factors such as popularity, stability, and ease of use, and they are a great starting point for anyone looking to dive into the world of Rust development.

Phone Farming & Tools to Remotely Manage and Monitor You Phone Farm

Phone farming is a term used to describe the practice of using multiple smartphones or mobile devices to passively earn money, rewards, or cryptocurrency. The basic idea behind phone farming is to utilize the idle time of your device to earn rewards, such as through installing apps that pay users for running them in the background.

Atomp.io is a platform that allows users to participate in phone farming by providing them with access to a variety of different apps and games that pay rewards. The platform offers a simple, user-friendly interface that makes it easy for users to find and install apps that pay rewards, as well as to track their earnings and manage their devices.

Rust for Backend Application? Pros and Cons? What do you think?


Rust is a systems programming language that was developed by Mozilla Research. It was designed to be a safe, concurrent, and practical language for system-level programming. Rust aims to improve upon the performance and security of C and C++, two of the most widely used systems programming languages.

Rust has a strong focus on memory safety and control over low-level operations. It provides a syntax that is similar to C++ but with more modern features such as garbage collection and optional and nullable types. Rust also provides built-in concurrency support, making it well-suited for building large, scalable systems.

What Is Fdisk?

Fdisk is a program that lets you manage your disk partitions.

When you get a new disk, you need to create partitions on it so you can start using it. Fdisk lets you manage the entire life cycle of a partition, from naming it, to creating it, to resizing it, to deleting it.

To see if the fdisk is already installed on your computer, try running one of the following commands.

$ fdisk --version

fdisk from util-linux 2.32.1

$ which fdisk

/usr/sbin/fdisk

$ whereis fdisk

fdisk: /usr/sbin/fdisk /usr/share/man/man8/fdisk.8.gz

What is Linux Container (LXC) ?

LXC is a way to run multiple applications on the same computer without them interfering with each other.

A container consists of one or more processes that are running with reduced privileges and share access to a shared set of kernel objects and host resources.

Namespaces are a way to keep different processes from interfering with each other. This helps keep everything running smoothly.

What is dnf-automatic and the difference with DNF?

The dnf-automatic is an alternative to dnf upgrade command which can be executed automatically and regularly via systemd timers, cron jobs and similar.

And then DNF or Dandified YUM is the next-generation version of the Yellowdog Updater, Modified (yum), a package manager for .rpm-based Linux distributions. DNF was introduced in Fedora 18 in 2013, it has been the default package manager since Fedora 22 in 2015, Red Hat Enterprise Linux 8, and OpenMandriva; and also an alternative package manager for Mageia.

Perceived deficiencies of yum (which DNF is intended to address) include poor performance, high memory usage, and the slowness of its iterative dependency resolution. DNF uses libsolv, an external dependency resolver.

DNF performs package management tasks on top of RPM, and supporting libraries.

DNF was originally written in Python, but as of 2016 efforts are under way to port it to C and move most functionality from Python code into the new libdnf library. libdnf is already used by PackageKit, a Linux distribution-agnostic package system abstraction library, even though the library does not have most of DNF's features.

DNF-Automatic

It synchronizes the package metadata as needed and then checks for updates available for your RHEL-based systems. Depending upon the configuration file settings, dnf-automatic command either downloads the package updates, or downloads and installs the packages, or simply exits.

The function of dnf-automatic is usually controlled by the configuration file (dnf-automatic.timer) or function-specific timer units as listed below.

  • dnf-automatic-notifyonly - Only notifies when the updates available,
  • dnf-automatic-download - Only downloads the updates, but not install them,
  • dnf-automatic-install - Downloads and install package updates automatically.

You can choose any one that suits your requirements.

Please note that the function-specific timer units will override the settings of the default configuration file i.e. dnf-automatic.timer.

To install dnf-automatic in RHEL, Fedora, CentOS Stream, AlmaLinux and Rocky Linux, run:

$ sudo dnf install dnf-automatic

to use dnf-automatic, Edit dnf-automatic default configuration file using your favorite editor:

$ sudo nano /etc/dnf/automatic.conf

And adjust the settings as per your requirements. The three important settings that you should adjust here are given below:

upgrade_type = default
[...]
download_updates = yes
[...]
apply_updates = no
[...]

How to Create Internet Wayback Machine with ArchiveBox Software

ArchiveBox can be used to archive URLs either from commandline or via its WebUI.

To archive a single URL from command line, simply pass the as an argument like below:

archivebox add https://example.com/some/page

Or,

Friday, February 10, 2023

How to Install ArchiveBox Software using Docker



After installing Docker, create a directory for ArchiveBox and download the docker-compose.yml file in it:

$ mkdir ~/archivebox && cd ~/archivebox
$ docker run -v $PWD:/data -it archivebox/archivebox init --setup

Run the initial setup and create an admin user by running the following command:

What is ArchiveBox Software?

ArchiveBox is a free, open source and powerful Internet archiving solution to collect, save your favorite websites and view or read them offline.

You can feed it a single URL or schedule imports from your browser bookmarks, browser history, plain text, HTML, markdown, feeds like RSS, bookmark services like Pocket/Pinboard and more!

ArchiveBox saves the snapshot of the given URLs in several output formats such as HTML, JSON, PDF, PNG screenshots, WARC, and more!

What is Archive.org Internet Archive’s Wayback Machine website?

The Internet Archive’s Wayback Machine (IAWM) is the largest and oldest public Web archive.

As of writing this, Internet Archive Wayback Machine (archive.org) has captured more than 778 billion web pages and has roughly stored petabyte of data.

What is Go Language?



Go, also known as GoLang, is an open source programming language developed at Google by Robert Griesemer, Rob Pike, and Ken Thompson in 2007.

The Go language became a public open source project on November 10, 2009. Go language is being actively used in some Google's production servers, as well as by other companies such as Dropbox, CoreOS, CloudFlare, Docker, Soundcloud, Uber and many.