Skip to content

Instantly share code, notes, and snippets.

@jfear
jfear / .tmux
Created January 17, 2018 16:26
Example of .tmux
#!/bin/sh
set -e
SESSION_NAME=$(basename "$(pwd)")
if tmux has-session -t $SESSION_NAME 2> /dev/null; then
tmux attach -t $SESSION_NAME
fi
@jfear
jfear / tmux_function
Created January 17, 2018 16:25
Tmux function to look for .tmux file
# Tmux
function tmux() {
# Make sure even pre-existing tmux sessions use the latest SSH_AUTH_SOCK.
# (Inspired by: https://gist.github.com/lann/6771001)
local SOCK_SYMLINK=~/.ssh/ssh_auth_sock
if [ -r "$SSH_AUTH_SOCK" -a ! -L "$SSH_AUTH_SOCK" ]; then
ln -sf "$SSH_AUTH_SOCK" $SOCK_SYMLINK
fi
# If provided with args, pass them through.
# Copied from:
# https://raw.githubusercontent.com/thisisarray/GitHub-Issues-Process/master/set-github-labels.sh
echo ''
echo 'This script will remove the GitHub default labels and create the 80|20 process labels for your repo. A personal access token is required to access private repos.'
echo ''
echo -n 'GitHub Personal Access Token: '
read -s TOKEN
@jfear
jfear / gist:746b9e9201230f8e50eb27abffee60f8
Created May 25, 2017 14:21 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
@jfear
jfear / Vagrantfile
Last active May 16, 2017 21:54
A vagrant file for building a VM for running isoseq v4.0 workflow.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# for issue at https://github.com/PacificBiosciences/Bioinformatics-Training/issues/15
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "forwarded_port", guest:8080, host:8080
config.vm.synced_folder "/Volumes/Promise_Pegasus/fearjm/pacbio_prelim", "/home/ubuntu/pacbio_prelim", :mount_options => ["dmode=755", "fmode=644"] config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "20048"]
channels:
- jfear
dependencies:
- sratoolkit==2.8.1
@jfear
jfear / test_minimal.snake
Last active February 21, 2017 22:44
Minimal test file for conda error
#/usr/bin/env python
import os
from lcdblib.snakemake import helpers
from lcdblib.utils import utils
URI = '../lcdb-wrapper-tests'
TMPDIR='/mnt/threeTB/centos_scratch'
references = {
'dmel': {
# vim: set ft=snakemake:
shell.prefix("""set -euo pipefail;
if [ -e /lscratch/$SLURM_JOBID ]; then
export TMPDIR=/lscratch/$SLURM_JOBID
else
export TMPDIR=/tmp
fi;
""")
workdir: '.'
@jfear
jfear / workflowy.css
Created January 26, 2017 22:36
workflowy dark simple
@namespace url(http://www.w3.org/1999/xhtml);
/* minimal page background */
#pageContainer {
margin-top: 24px;
}
.page {
max-width: 100% !important;
border: none !important;
margin-bottom: 0 !important;
/* fix for dynamic positioning of the .page div */