Skip to content

Instantly share code, notes, and snippets.

@fo40225
fo40225 / ubuntu1804cuda10.sh
Last active August 22, 2023 19:18
install cuda 10 on ubuntu 18.04
# echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null
# echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null
# sudo update-initramfs -u
sudo apt update
sudo apt -y install build-essential
sudo apt update
sudo apt -y install linux-headers-$(uname -r)
@fo40225
fo40225 / ubuntu1604cuda9.sh
Created March 30, 2019 02:05
install cuda 9 on ubuntu 16.04
sudo apt update
sudo apt -y install build-essential
sudo apt update
sudo apt -y install linux-headers-$(uname -r)
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
sudo apt update
@fo40225
fo40225 / annovar.sh
Last active February 27, 2025 06:18
annovar + intervar
wget http://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz
tar axvf annovar.latest.tar.gz
cd annovar
# downadad additional script
wget http://www.openbioinformatics.org/annovar/download/prepare_annovar_user.pl
chmod a+x prepare_annovar_user.pl
wget -O index_annovar.pl https://github.com/WGLab/doc-ANNOVAR/files/6670482/index_annovar.txt
chmod a+x index_annovar.pl
@fo40225
fo40225 / bwa.sh
Created March 18, 2019 12:48
run bwa
git clone https://github.com/lh3/bwa.git -b v0.7.17
cd bwa
make -j $(nproc)
wget ftp://[email protected]/bundle/b37/human_g1k_v37_decoy.*
ls *.gz | parallel gzip -dk
bwa index human_g1k_v37_decoy.fasta
bwa mem -t $(nproc) human_g1k_v37_decoy.fasta sample_R1.fastq sample_R2.fastq > sample.sam
@fo40225
fo40225 / timezone.sh
Created March 18, 2019 12:42
ubuntu台灣時區+BIOS本地時間
#!/bin/sh
sudo timedatectl set-timezone Asia/Taipei
sudo timedatectl set-local-rtc 1 --adjust-system-clock
@fo40225
fo40225 / disk.sh
Last active October 23, 2019 12:00
mdadm, gpt parted, ext4 format
sudo mdadm --create --raid-devices=8 --level=0 /dev/md127 /dev/nvme{1,2,3,4,5,6,7,8}n1
sudo mkfs.ext4 -E lazy_itable_init=1,lazy_journal_init=1,nodiscard /dev/md127
sudo mkdir /raid
sudo mount /dev/md127 /raid
sudo chmod 777 /raid
# new disk
sudo parted
select /dev/nvme0n1
@fo40225
fo40225 / release_swap.sh
Created March 18, 2019 12:36
linux clean swap
#!/bin/sh
sudo swapoff -a
sudo swapon -a
@fo40225
fo40225 / lustre.log
Created March 18, 2019 12:33
twgc lustre test
lustre
SeqQ32T1read: (groupid=0, jobs=1): err= 0: pid=262: Wed Jan 9 22:44:57 2019
read: IOPS=1044, BW=131MiB/s (137MB/s)(5120MiB/39232msec)
clat (usec): min=413, max=326768, avg=955.13, stdev=4388.08
lat (usec): min=413, max=326768, avg=955.40, stdev=4388.09
clat percentiles (usec):
| 1.00th=[ 482], 5.00th=[ 506], 10.00th=[ 519], 20.00th=[ 537],
| 30.00th=[ 553], 40.00th=[ 578], 50.00th=[ 611], 60.00th=[ 652],
| 70.00th=[ 717], 80.00th=[ 889], 90.00th=[ 1139], 95.00th=[ 1336],
| 99.00th=[ 9110], 99.50th=[ 14091], 99.90th=[ 31065], 99.95th=[ 41157],
@fo40225
fo40225 / 4xP1-1tb.log
Created March 18, 2019 12:31
4x Micron Crucial P1 1TB mdadm raid0 test
4x P1 1TB
SeqQ32T1read: (groupid=0, jobs=1): err= 0: pid=29929: Tue Jan 8 06:20:35 2019
read: IOPS=10.5k, BW=1313MiB/s (1377MB/s)(5120MiB/3900msec)
clat (usec): min=58, max=2411, avg=94.64, stdev=52.07
lat (usec): min=58, max=2411, avg=94.70, stdev=52.07
clat percentiles (usec):
| 1.00th=[ 60], 5.00th=[ 60], 10.00th=[ 60], 20.00th=[ 60],
| 30.00th=[ 61], 40.00th=[ 63], 50.00th=[ 77], 60.00th=[ 93],
| 70.00th=[ 110], 80.00th=[ 120], 90.00th=[ 139], 95.00th=[ 182],
| 99.00th=[ 310], 99.50th=[ 343], 99.90th=[ 351], 99.95th=[ 351],
@fo40225
fo40225 / 8x970pro1tb.log
Created March 18, 2019 12:30
8x Samsung 970 PRO 1TB mdadm raid0 test
8x 970pro 1tb
SeqQ32T1read: (groupid=0, jobs=1): err= 0: pid=69405: Sat Mar 2 10:16:09 2019
read: IOPS=17.5k, BW=2186MiB/s (2292MB/s)(5120MiB/2342msec)
clat (usec): min=53, max=2750, avg=56.51, stdev=37.14
lat (usec): min=53, max=2750, avg=56.60, stdev=37.14
clat percentiles (usec):
| 1.00th=[ 55], 5.00th=[ 55], 10.00th=[ 55], 20.00th=[ 55],
| 30.00th=[ 55], 40.00th=[ 55], 50.00th=[ 55], 60.00th=[ 55],
| 70.00th=[ 56], 80.00th=[ 57], 90.00th=[ 59], 95.00th=[ 60],
| 99.00th=[ 109], 99.50th=[ 127], 99.90th=[ 161], 99.95th=[ 180],