Skip to content

Instantly share code, notes, and snippets.

View hisplan's full-sized avatar
🎯
Focusing

Jaeyoung Chun hisplan

🎯
Focusing
  • Memorial Sloan Kettering Cancer Center
  • New York, NY
  • 14:44 (UTC -04:00)
View GitHub Profile
@hisplan
hisplan / read-from-stdin.sh
Last active March 3, 2017 16:07
Python: read from stdin
echo "hello" | python -c "import sys; sys.stdout.write( sys.stdin.read() )"
@hisplan
hisplan / install-oracle-jdk8.sh
Created December 13, 2015 05:46
Install Oracle JDK 8 on Ubuntu without prompt
sudo apt-get update
sudo apt-get install -y python-software-properties debconf-utils
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
@hisplan
hisplan / linux-io-redirect.md
Last active October 6, 2017 04:18
Linux I/O redirection

Redirect both stdout and stderr to a file

cmd &>out.txt

Redirect stderr to a file

cmd > out.txt 2>error.txt
tree | sed 's/├/\+/g; s/─/-/g; s/└/\+/g'
tree --charset ascii

Keybase proof

I hereby claim:

  • I am hisplan on github.
  • I am hisplan (https://keybase.io/hisplan) on keybase.
  • I have a public key ASCnl5x_S5t5h6syN6y3mf5b44YeY1T5AEUQpXrr-fHglQo

To claim this, I am signing this object:

@hisplan
hisplan / cwltoil-help.txt
Last active February 3, 2018 00:35
cwltoil --help
usage: cwltoil [-h] [--logOff] [--logCritical] [--logError] [--logWarning]
[--logInfo] [--logDebug] [--logLevel LOGLEVEL]
[--logFile LOGFILE] [--rotatingLogging] [--workDir WORKDIR]
[--stats] [--clean {always,onError,never,onSuccess}]
[--cleanWorkDir {always,never,onSuccess,onError}]
[--clusterStats [CLUSTERSTATS]] [--restart]
[--batchSystem BATCHSYSTEM] [--disableHotDeployment]
[--scale SCALE] [--mesosMaster MESOSMASTERADDRESS]
[--parasolCommand PARASOLCOMMAND]
[--parasolMaxBatches PARASOLMAXBATCHES] [--provisioner {aws}]
@hisplan
hisplan / git-commit-hash.sh
Last active September 28, 2018 19:27
git last commit hash
$ git ls-remote https://github.com/......... HEAD | cut -f1
0a033196ee92e75f94a8dd27c97d6b882210103e
$ git show -s --format=%H
0a033196ee92e75f94a8dd27c97d6b882210103e
$ git show -s --format=%h
0a03319
$ git rev-parse HEAD
@hisplan
hisplan / samtools.md
Created January 29, 2019 16:54
samtools
Flags:
	0x1	PAIRED        .. paired-end (or multiple-segment) sequencing technology
	0x2	PROPER_PAIR   .. each segment properly aligned according to the aligner
	0x4	UNMAP         .. segment unmapped
	0x8	MUNMAP        .. next segment in the template unmapped
	0x10	REVERSE       .. SEQ is reverse complemented
	0x20	MREVERSE      .. SEQ of the next segment in the template is reversed
	0x40	READ1         .. the first segment in the template
	0x80	READ2 .. the last segment in the template
sudo yum install git autoconf automake make gcc zlib-devel bzip2-devel xz-devel curl-devel openssl-devel
git clone https://github.com/samtools/htslib.git
cd htslib/
autoconf
autoheader
./configure
make
make test
sudo make install