Skip to content

Instantly share code, notes, and snippets.

View pcmehrdad's full-sized avatar
🏠
Working from home

Mehrdad Amini pcmehrdad

🏠
Working from home
View GitHub Profile
@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active July 20, 2024 17:15
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
@parthibx24
parthibx24 / mfd
Last active July 14, 2023 18:17
Mediafire file downloader!
echo "Mediafire file downloader";
FILE_ID=$1
function download() {
GET_DLINK=`curl -s -L http://www.mediafire.com/file/$FILE_ID | grep -o '<div class="downloa
@silveraid
silveraid / CentOS-Docker
Created October 27, 2017 12:09
Creating minimal CentOS docker image from scratch
# Create a folder for our new root structure
$ export centos_root='/centos_image/rootfs'
$ mkdir -p $centos_root
# initialize rpm database
$ rpm --root $centos_root --initdb
# download and install the centos-release package, it contains our repository sources
$ yum reinstall --downloadonly --downloaddir . centos-release
$ rpm --root $centos_root -ivh centos-release*.rpm
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# install yum without docs and install only the english language files during the process
@ssh60
ssh60 / centos7_template
Created November 8, 2016 16:19 — forked from eye-scuzzy/centos7_template
CentOS 7.2 VMware vSphere 6 template with guest customization working
## Download latest CentOS 7 x86_64 minimal iso image
## Good readings
# https://labs.vmware.com/vmtj/methodology-for-performance-analysis-of-vmware-vsphere-under-tier-1-applications
# https://labs.vmware.com/vmtj/virtualizing-latency-sensitive-applications-where-does-the-overhead-come-from
## Create typical CentOS VM
# compatible with 'ESXi 6.0 and later'
# set 'Guest OS Family' to 'Linux'
# set 'Guest OS Version' to 'CentOS 4/5/6/7 (64 bit)'
@ethaizone
ethaizone / git_autocommit_all.bat
Created October 18, 2013 06:58
Commit git with bat file
@echo off
echo type "commit" or "update"
cd "curl"
set GIT_PATH="C:\Program Files (x86)\Git\bin\git.exe"
set BRANCH = "origin"
:P
set ACTION=
set /P ACTION=Action: %=%