Skip to content

Instantly share code, notes, and snippets.

@a1is3n
a1is3n / benchmark-base.md
Last active November 28, 2024 19:53 — forked from superboum/benchmark-base.md
Benchmark your disk with FIO

Install FIO on Ubuntu/Debian:

sudo apt update
sudo apt install -y fio lshw

Install FIO on Fedora:

@a1is3n
a1is3n / mount_qcow2.md
Created October 10, 2024 06:34 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@a1is3n
a1is3n / debianvmvirtinst.md
Created September 30, 2024 08:05 — forked from plembo/debianvmvirtinst.md
Install a Debian VM using virt-install

Installing a Debian VM with virt-install on KVM (libvirtd)

This turned out to be easier than I thought it would, especially after struggling with Ubuntu.

Both procedures use a common debian.env file to hold environment variables applied in the script.

When installing Debian always be sure to select an apt mirror when prompted, if you don't you'll regret it.

Environment variables

In a file, debian.env:

@a1is3n
a1is3n / trial.md
Created September 27, 2024 12:06 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@a1is3n
a1is3n / shmsetup.sh
Created September 13, 2024 08:16 — forked from jodell/shmsetup.sh
kernel shared memory calculator
#!/bin/bash
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf
@a1is3n
a1is3n / PVE-Multipath.md
Created August 1, 2024 12:27 — forked from mrpeardotnet/PVE-Multipath.md
PVE-Multipath

Installing multipath tools on PVE Cluster with shared storage

This cheatsheet shows how to install and configure multipath tools on Proxmox PVE Cluster where multiple nodes share single storage with multipath configuration, for example SAN storage connected to each of the nodes by two independent paths.

Proxmox PVE version

This cheatsheet has been tested on Proxmox 5.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.

@a1is3n
a1is3n / Remove_VMwareTools.ps1
Created July 25, 2024 08:41 — forked from broestls/Remove_VMwareTools.ps1
Force removal of VMware Tools, Program Files, and Windows Services
# This script will manually rip out all VMware Tools registry entries and files for Windows 2008-2019
# Tested for 2019, 2016, and probably works on 2012 R2 after the 2016 fixes.
# This function pulls out the common ID used for most of the VMware registry entries along with the ID
# associated with the MSI for VMware Tools.
function Get-VMwareToolsInstallerID {
foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) {
If ($item.GetValue('ProductName') -eq 'VMware Tools') {
return @{
reg_id = $item.PSChildName;
@a1is3n
a1is3n / oracle-11g-docker.sh
Created July 2, 2024 09:03 — forked from rponte/oracle-11g-docker.sh
Docker: Building and running Oracle Database 11gR2 Express Edition in a Docker container
# based on
# https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance
# more infos:
# https://docs.docker.com/v17.09/edge/engine/reference/commandline/run/
# building it
cd ~/docker-images/OracleDatabase/SingleInstance/dockerfiles/11.2.0.2
docker build --force-rm=true --no-cache=true --shm-size=1G --build-arg DB_EDITION=xe -t "oracle/database:11.2.0.2-xe" -f Dockerfile.xe .
@a1is3n
a1is3n / asnvpn.rsc
Created June 7, 2024 15:12 — forked from hazarkarabay/asnvpn.rsc
Mikrotik'te ASN bilgisinden IP range bulan ve address list'e ekleyen script.
# ASN bazinda VPN scripti
# 2018 Hazar
:local VPNAddrList "vpnize-auto";
:local ASNlist {
202196="booking";
43996="booking";
14907="wiki";
11820="wiki";
@a1is3n
a1is3n / RemoveZeroTier.ps1
Created April 22, 2024 13:14 — forked from wise-io/RemoveZeroTier.ps1
PowerShell script to uninstall ZeroTier One silently
# Removes ZeroTier One
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$ZeroTierOne = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'ZeroTier One' } | Select-Object
$VirtualNetworkPort = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'ZeroTier One Virtual Network Port' } | Select-Object
if ($ZeroTierOne) {
Write-Output 'Uninstalling ZeroTier One...'
foreach ($Ver in $ZeroTierOne) {
$Uninst = $Ver.UninstallString
cmd /c $Uninst /qn