Skip to content

Instantly share code, notes, and snippets.

View settinghead's full-sized avatar

Xiyang Chen settinghead

View GitHub Profile
@settinghead
settinghead / ubuntu-raid.sh
Last active December 29, 2018 05:39 — forked from umpirsky/ubuntu-raid.sh
Install Ubuntu on RAID 0 and UEFI/GPT system
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
# modified for NVME drives
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/nvme0n1
sgdisk -z /dev/nvme1n1
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/nvme0n1
@settinghead
settinghead / dual_daemon.sh
Created June 30, 2017 16:49
Xfce automatic dual monitor detection and and configuration
#!/bin/bash
let "target = 2"
swon=false
function nscreens {
curr=$(xrandr | grep " connected" | wc -l)
}
function setup_scr {