Skip to content

Instantly share code, notes, and snippets.

View Udara-Dananjaya's full-sized avatar
🏠
Working from home

Udara Dananjaya Udara-Dananjaya

🏠
Working from home
View GitHub Profile
@Udara-Dananjaya
Udara-Dananjaya / MacOS-Xampp-Instalation-Guide.md
Last active June 27, 2024 17:18
macOS XAMPP Installation and Composer Setup Guide

Step-by-step instructions for installing XAMPP, configuring paths, and installing Composer on macOS:

Install XAMPP:

  1. Go to XAMPP download page and download the DMG file.
  2. Open the downloaded DMG file.
  3. Press F4 and search for "Privacy and Security."
  4. In the "Security" section, you'll find the blocked app. Click "Open Anyway" to continue with the installation.
  5. Start the XAMPP services.
@Udara-Dananjaya
Udara-Dananjaya / OpenSSH_Server.md
Created October 11, 2023 17:25
Configuring OpenSSH Server on Windows using PowerShell

OpenSSH is a popular open-source tool that allows secure remote administration of your Windows system. This guide demonstrates how to install and configure the OpenSSH Server on a Windows machine using PowerShell commands.

  1. Check if OpenSSH is already installed:

    • where ssh is used in Command Prompt (CMD) to check if OpenSSH is already installed. This command will search for the SSH executable.
  2. Check and Install OpenSSH in PowerShell:

    • In PowerShell, you can use the following commands to check if OpenSSH is available and install it if not.
    • Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' lists the available OpenSSH capabilities.
  • Add-WindowsCapability -Online -Name OpenSSH.Server* installs the OpenSSH Server feature.
@Udara-Dananjaya
Udara-Dananjaya / Google Colab RDP Connection.ipynb
Last active August 15, 2023 09:24
Automate Colab setup: create users, install RDP, mount Google Drive, set up SSH. Utilize GPU and resources efficiently.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Udara-Dananjaya
Udara-Dananjaya / RDP Connection.sh
Last active September 20, 2023 09:45
Ubuntu RDP Setup: Configure swap, SSH, remote desktop, tools installation for a comprehensive remote computing environment.
# This script automates the setup and configuration of various applications on Ubuntu.
# Ensure superuser privileges
sudo -i
# Create a swap area to improve system performance
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
@Udara-Dananjaya
Udara-Dananjaya / Gnome RDP Connection.sh
Created August 15, 2023 07:27
Install Ubuntu Gnome RDP: Configure swap, SSH, user access, and Chrome Remote Desktop for remote connections with Gnome environment.
# Install Ubuntu Gnome RDP Connection
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
@Udara-Dananjaya
Udara-Dananjaya / Setup Database.sh
Last active August 15, 2023 13:06
Automate MySQL installation on Ubuntu: Update, clear rules, install MySQL Server, configure, and create a user with privileges.
# Install MySQL Server on Ubuntu
# Gain superuser privileges
sudo -i
# Define firewall rule for specified port
# Subnet > Ingress Rule > Source CIDR > 0.0.0.0/0
# TCP PORTS :3306
# Update the list of available software packages
@Udara-Dananjaya
Udara-Dananjaya / VScode-remote setup.sh
Created August 15, 2023 07:17
Configure VSCode-remote SSH: Set up user access, VS Code, GIT, and OpenSSH for Ubuntu and Windows. Seamlessly edit remote files!
# Configure VSCode-remote SSH for Ubuntu and Windows
# Setup user account with SSH access on Ubuntu
sudo -s
adduser username
sudo usermod -aG sudo username
sudo ufw app list
sudo ufw allow OpenSSH
sudo ufw enable # Confirm with 'y'
sudo ufw status
@Udara-Dananjaya
Udara-Dananjaya / Install KASM Workspace.sh
Last active September 15, 2023 05:09
Build Kasm Workspace on Ubuntu: Setup swap, firewall, hostname & Kasm installation with SSL. Simplify secure virtual workspaces!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install Virtualmin.sh
Created August 15, 2023 07:01
Install Virtualmin on Ubuntu: Setup swap, firewall, hostname & Virtualmin with comprehensive port configurations. Simplify web hosting!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install CyberPanel.sh
Created August 15, 2023 06:59
Install CyberPanel on Ubuntu: Setup swap, firewall, hostname & CyberPanel with OpenLiteSpeed, Memcached, and Redis. Streamline web management!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab