Skip to content

Instantly share code, notes, and snippets.

View Niknafs's full-sized avatar

Noushin Niknafs Niknafs

  • Johns Hopkins University
  • Baltimore, MD
View GitHub Profile
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Niknafs
Niknafs / 0_reuse_code.js
Created July 3, 2014 18:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# if get recieve.denyCurrentBranch error try to pull from
# the repository instead of pushing. Alternatively just
# switch to a tmp branch.
# Permanently going back to previous commit
git reset --hard 123abc
# Checkout a previous commit into a separate branch
# without a branch name it will be in a headless state
git checkout -b old-state 123abc
@Niknafs
Niknafs / igraph-installation
Last active August 29, 2015 14:16
python-igraph installation
This document will cover the steps involved in installation of `python-igraph` package for python 2.7. For python 3.x, the steps will likely be similar, but possibly not identical.
The python-igraph package requires `cairo` library, and `py2cairo` python package. `cairo` is a

Overview

This document will cover the steps involved in installation of python-igraph package for python 2.7. For python 3.x, the steps will likely be similar, but possibly not identical.

The python-igraph package requires cairo library, and Pycairo python package, and igraph C core. cairo is a 2D graphics library with support for multiple output devices and Pycairo is a set of python bindings for cairo graphics library.

In this document, it is assumed that the user does not have root access and thus uses --prefix to indicate a local directory where /lib and /bin can be located, for which the user has write privilage.

Cairo

1. Install the required linux library

apt-get install libxmu-dev

2. Install matlab component runtime

From the directory ([MCR dir]) with instal script run:

@Niknafs
Niknafs / Expands-Installation.md
Last active April 6, 2017 19:12
Installing rJava in ubuntu (docker)

Start a docker with correct working directory mounted

docker run -d --name expands -i -t -v xxx:xxx ubuntu:14.04 bash

Install the requirements in the container

docker attach expands
# apt-get update
# apt-get install emacs
addGrp:
java -Xmx${heap}m -Djava.io.tmpdir\=${temp_folder}/${patient} \
-jar ${picard}/AddOrReplaceReadGroups.jar \
RGLB\=${sample}.fastq \
RGPL\=Illumina \
RGPU\=${sample} \
RGSM\=${sample} \
I\=${SCRATCH}/${sample}/${sample}.rmdup.bam \
O\=${SCRATCH}/${sample}/${sample}.rmdup.grp.bam \
SORT_ORDER\=coordinate \

Problem:

Often, after restarting my machine (OS X Yosemite, version 10.10.5) I encounter the following error the first time I run docker quick start terminal. The problem is discussed in great length here, but none of the proposed solutions seemed to fix it on my machine.

Specs

OS X Yosemite version 10.10.5
Docker version  1.9.1