Script to change string in all files in directory
Posted on
25-05-25 5:58
#!/bin/bash
# Function to display colored diff
show_diff() {
local old=$1
local new=$2
local file=$3
echo -e "\nChanges in $file:"
grep -n "$old" "$file" | while read -r line; do
lineno=$(echo "$line" | cut -d: -f1)
original=$(echo "$line" | cut -d: -f2-)...
Package static website to application on Windows
Posted on
20-05-25 12:41
Packaging a website with NW.js
Step 1: Prepare your website folder
Put all your HTML, JS, CSS, assets into one folder, e.g., mywebsite/.
Your main HTML file should be named something like index.html.
Step 2: Create a package.json for NW.js
Inside your mywebsite/ folder, create a file named pa...
Automate provision of Debian 12 container for LAMP stack application
Posted on
10-04-25 12:33
script.sh
#!/bin/bash
# Run as root check
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root."
exit 1
fi
# Update system
echo "Updating the system..."
apt update && apt upgrade -y
# Install base packages
echo "Installing required packages: sudo, expect, openssh-server,...
Create Apache Virtual Host Configuration add Certbot and Forward the Traffic to Remote Server
Posted on
09-04-25 13:24
#!/bin/bash
# Step 1: Prompt for domain name
read -p "Enter the domain name: " domain_name
read -p "Enter the proxy server IP: " proxy_ip
read -p "Enter the proxy server port: " proxy_port
# Step 2: Create the initial virtual host file
echo "
ServerName $domain_name
Serve...
Script to automate creating of new user and installing sudo on Debian 12
Posted on
09-04-25 10:28
# Update APT cache
echo "Updating APT cache..."
apt update
# Install sudo
echo "Installing sudo..."
apt install -y sudo
# Prompt for new user
read -p "Enter the new username: " NEW_USER
# Check if user already exists
if id "$NEW_USER" &>/dev/null; then
echo "User $NEW_USER already exists. Ex...
Mount EXT4 with WSL2 on Windows
Posted on
05-04-25 12:49
Steps to Mount an ext4 Partition in WSL2
1. Open PowerShell
Press Win + X and select Windows PowerShell or Windows Terminal.
2. List Disks
Run the following command to list all disks:
Get-Disk
3. Identify the Partition
List the partitions on your disks:
Get-Partition
This...
Properly uninstalling xbox gamebar and resolve ms-gaming-overlay-link popup on windows 11
Posted on
22-02-25 9:01
To uninstall it open a powershell as administrator and uninstall it with the following command:
Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage
However this left me with a nagging popup upon game start:
you'll need a new app to open this ms-gamingoverlay-link
To resolve...
Download audio or video with yt-dlp
Posted on
16-01-25 7:40
Download and extract this download_videos.zip.
In videos.txt file add the links to video or audio clips you want to download.
execute download_audio_file_list.bat or download_videos_file_list.bat
Install LAMP Stack on Ubuntu 24.04/Debian 12
Posted on
15-01-25 13:21
#!/bin/bash
# Update the system
echo "Updating the system..."
sudo apt update && sudo apt upgrade -y
# Install Apache
echo "Installing Apache..."
sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2
echo "Apache installed and started."
# Install MariaDB
echo "Ins...
Add subtitles to an MKV file
Posted on
06-01-25 13:27
You can use MKVToolNix to add subtitles to an MKV file. Follow these steps:
📥 1. Download MKVToolNix
Download it from the official website: MKVToolNix. or here mkvtoolnix.zip
🛠️ 2. Install and Open MKVToolNix GUI
Install the software and launch the GUI tool.
🎥 3. Add Your M...
Switch Debian to Testing and install Trinity Desktop
Posted on
01-01-25 19:32
#!/bin/bash
# Script to switch Debian to Testing repositories and install Trinity Desktop Environment (TDE)
# Author: ITArea Ltd.
# Run as root: sudo ./install_tde_testing.sh
# Exit on error
set -e
# Step 1: Switch to Debian Testing Repositories
echo "🔄 Switching to Debian Testing repositories......
Fix L.A. Noire 0xc000007b Error
Posted on
27-12-24 9:54
If you are seeing this thread is mainly because you are having the 0xc000007b error in the game you are trying to play. It's a big pain in the ass I know but here is the ultimate fix for that problem. I literally spended 7 hours of my day searching for a fix and I finally found the way to fix it, it...
Script to remove AppArmor from Ubuntu 22.04
Posted on
14-12-24 9:07
#!/bin/bash
# Stop AppArmor service
echo "Stopping AppArmor service..."
sudo systemctl stop apparmor
sudo systemctl disable apparmor
# Remove AppArmor profiles
echo "Removing AppArmor profiles..."
sudo rm -rf /etc/apparmor.d/
# Uninstall AppArmor packages
echo "Uninstalling AppArmor..."
sudo apt...
Remove snap from Ubuntu 24.04 and enable Mozilla PPA
Posted on
03-12-24 13:22
#!/bin/bash
# Check if the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Use sudo." 1>&2
exit 1
fi
echo "Starting Snap removal and Mozilla PPA configuration..."
# Stop and disable snapd service
echo "Stopping and disabling Snap services..."
systemctl...
Install LAMP Stack on Endeavour OS
Posted on
03-12-24 8:33
#!/bin/bash
# Update the system
echo "Updating the system..."
sudo pacman -Syu --noconfirm
# Install Apache
echo "Installing Apache..."
sudo pacman -S apache --noconfirm
sudo systemctl start httpd
sudo systemctl enable httpd
echo "Apache installed and started."
# Install MariaDB
echo "Installing...
Download whole webstite with wget
Posted on
02-12-24 11:39
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off https://example.com
How to turn your OpenWRT router into a PXE server for hardware installations with netboot.xyz
Posted on
16-01-24 14:02
USB Stick preparation
I used a spare USB-Stick that I formated with ext4 and lableing the partition tftp.
mkfs.ext4 -L tftp /dev/sdXX
Replace /dev/sdXX with your partition path. ie /dev/sdc1
OpenWRT preparation
This was done on OpenWRT Version 19.07
opkg update
opkg install usbutils kmod-u...
Cannot install mariadb-server on Debian 12 with KDE
Posted on
14-01-24 6:18
Debian bookworm KDE (and maybe other distributions like Ubuntu KDE etc.) there is this executable called akonadi that runs as default with the package akonadi-backend-mysql that requires its own MariaDB that - in theory - is completely separated from mariadb-server but in practice it's not.
This b...
apt --fix-broken install not working
Posted on
14-01-24 6:11
Solution 1
As HVNSweeting says in their answer, they fixed it by following the below:
First, run:
dpkg -l | grep ^iU | awk '{print $2}' | xargs sudo dpkg --purge
If the output is:
dpkg: error: --purge needs at least one package name argument
Type dpkg --help for help about installing and...
Add All .exe and .dll files in directory to Windows Firewall
Posted on
11-10-23 6:06
Script
Find Windows Spotlight Images on Your Computer
Posted on
04-10-23 20:03
Open Windows Explorer and navigate to:
%systemroot%\Users\[your username]\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\
These are a mix of Windows Spotlight photos and other miscellaneous files. The names are random codes and seemingly meaningl...
Edit Woocommerce Attributes: "You need a higher level of permission" error
Posted on
04-10-23 19:43
If you're trying to edit Categories/Custom taxonomies and you get this error, you should be doing the following.
Check the wp_term_taxonomy table for Term IDs that are associated with more than one Taxonomy ID. These records are the root cause for the error. The following query should help you...
Repair BCD - Win7,8,10,11
Posted on
04-10-23 19:39
Boot from a Windows 7 Bootable Media.
Click on “Troubleshoot”, click “Advanced Options”
Then click “Command Prompt”
Type these following commands and hit enter after each line of command:
bootrec /scanos
bootrec /rebuildbcd
bootrec /fixmbr
bootrec /fixboot
Restart the compu...