This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick socket5 proxy | |
# set socket5 proxy to $SERVER:$PORT at the browser | |
ssh -D $PORT -f -C -q -N $SERVER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#USAGE: split_multi_fasta.sh *.fasta | |
cat $1 | awk -F'>' '/^>/ {match($2,/^(\S+)/,a); FN=a[1]".fa"; print > FN;next;} {print >> FN; close(FN)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup a single volume from a Docker container to a tar archive. | |
CONTAINER_NAME=$1 | |
VOLUME_NAME=$2 | |
BACKUPTAR=$3 | |
usage() { | |
echo "Usage: $0 [container name] [volume name] ([backup.tar])" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Restore a single volume from a tar archive to a Docker container | |
NEW_CONTAINER_NAME=$1 | |
BACKUPTAR=$2 | |
usage() { | |
echo "Usage: $0 [container name] ([backup.tar])" | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ExFAT support on CentOS7 | |
yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm | |
yum install exfat-utils fuse-exfat | |
# mount disk | |
# $sudo fdisk -l | |
# $sudo mount /dev/sda1 /media/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install and Docker on CentOS 7 | |
# Reference: | |
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7 | |
sudo yum check-update | |
# It will add the official Docker repository, download the latest version of Docker, and install it: | |
curl -fsSL https://get.docker.com/ | sh | |
# start the Docker daemon | |
sudo systemctl start docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
awk 'NR%4==1 {print substr($1,2)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
awk '$0~/^>/{print $0;next}; {gsub("U","T");print $0}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
$string=$ARGV[0]; | |
$cnt=0; | |
$found=1; | |
while(<STDIN>){ | |
if( $cnt%4==0){ | |
if( /$string/i ){ | |
$found=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -F ' ' '{ if(/^>/){F=sprintf("%s.fasta", substr($1,2)); print > F;next;} else {print >> F}}' |
OlderNewer