Skip to content

Instantly share code, notes, and snippets.

sutlxwhx /
Last active September 1, 2021 15:23
How to backup your LAMP / LEMP installation the right way


This is the LAMP / LEMP environment backup guide in case you want or need to try my highload LEMP installation.

Basic usage

As a first thing we will setup a variable that will store current date and time. We will use year-month-day_hours-minutes-seconds format:

now=$(date +"%Y-%m-%d_%H-%M-%S")
sutlxwhx /
Last active November 30, 2023 22:03
How to install LAMP stack on Windows 7 / 8 / 10


This guide will help you install LAMP stack on your Windows machine. I made this to help people who want to use or try any of my projects on their local or remote computers under Windows OS.


The fastest way to install LAMP stack on your Windows machine is to use WAMP. It comes with a lot of preinstalled modules for Apache and PHP-FPM along with Nginx and MySQL.


sutlxwhx /
Last active March 13, 2024 14:44
Enable RDP and access to the virtual machines for your Proxmox installation


This tuturial will help you configure network for your fresh Proxmox istallation.
Be aware that Proxmox configuration was made using this tutorial.


Backup your current /etc/network/interfaces using this command:

cp /etc/network/interfaces /etc/network/interfaces.backup
sutlxwhx /
Last active March 13, 2024 14:43
Installation of Proxmox 5 on Debian 9


This tutorial will help you install Proxmox 5 on a freshly installed Debian 9.
It was tested on a dedicated server at hetzner.


Fisrt things first. Create a custom repository to pickup Proxmox related packages:

echo "deb stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
sutlxwhx /
Last active August 22, 2018 12:11
Use Nginx as a Reverse Proxy to another Nginx


This tutorial will show how you can setup Nginx as a Reverse Proxy to another Nginx server with a least amount of code.


Point your A DNS record to the first server that will accept the initial request and then redirect it to second server On that first server use the following setup fo default enabled site:

server {
	listen 80;
sutlxwhx /
Last active February 1, 2024 21:08
Backup all your MySQL / MariaDB databases with rclone
#!/usr/bin/env bash
# To run this script you need to install first
# Use current date and time for future backup folder name
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
# Declare the directory where the temporary backup files will be stored
# State the username for your MySQL / MariaDB instace that can access the neccessary databases
# Point this script to mysql executable file
sutlxwhx /
Last active February 22, 2024 01:43
Synchronize folders between two servers using rclone and ssh-agent with ssh based authorisation


This tutorial will help you transfer your folders / files between two server using rclone and ssh-agent.
It was tested between two Ubuntu 16.04 servers.


First things first. We need to install the neccessary packages:

apt-get update -y
sutlxwhx / Empt.php
Last active August 24, 2018 23:14
Delete empty lines in the file and save it
* @author
* @version 0.2
* @license Apache License 2.0
sutlxwhx /
Last active October 28, 2023 07:29
Comparison of different popular VPS providers
sutlxwhx / extract.js
Last active August 20, 2018 18:15
Copy to the clipborad list of all h1/h2/h3 elements on the page
# Declare tag name that you want to extract
var elements = document.getElementsByTagName("h2");
# Create a temporary element where all the data will be stored
var buffer = document.createElement("buffer");
# Declare the string var where all the data from the page will be stored
var names = '';
# Create a foor loop and append all new elements to the string
for(var i=0; i<elements.length; i++) {
names += elements[i].innerText + '\n';;