Skip to content

Instantly share code, notes, and snippets.

View ipstone's full-sized avatar
🌐
studying cancer genomics

Isaac Pei ipstone

🌐
studying cancer genomics
View GitHub Profile
#!/usr/bin/ruby
`cat ~/.bash_aliases | egrep '^alias' | sed 's/alias//'`.split("\n").each do |line|
parts = line.strip.split(/=/)
name, cmd = parts[0], parts[1].gsub(/('|")/,'')
file = '/home/%s/.config/fish/functions/%s.fish' % [`whoami`.strip, name]
content = [ 'function %s' % name, ' %s $argv;' % cmd, 'end' ].join("\n")
File.open(file, 'w+'){|io| io.write(content) }
end
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@sachac
sachac / emacsconf2013-sacha.org
Created March 31, 2013 00:04
Source code for my Emacs conference talk

Comments? sacha@sachachua.com

  • Emacs learning curve?

Meta information

Assumptions

  • Mix of Emacs geeks skewed towards people who’ve been using this for a while (after all, takes a certain commitment to come all the way to an Emacs conference!)

Outcomes

@jacob-ogre
jacob-ogre / jacob-ogre_ST2.sublime-keymap
Created June 26, 2013 17:56
Sublime Text: Custom keybindings, mostly Vintage (Vim)
[
// Working in some additional Vim or Vim-like bindings; using 'g' as <leader>
// because it's homerow and unused for most commands:
{ "keys": ["g", "t"], "command": "next_view", "context": [{"key": "setting.command_mode"}] },
{ "keys": ["g", "r"], "command": "prev_view", "context": [{"key": "setting.command_mode"}] },
{ "keys": ["g", "n"], "command": "focus_side_bar", "context": [{"key": "setting.command_mode"}] },
{ "keys": ["g", "w"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["g", "m"], "command": "find_under_expand", "context": [{"key": "setting.command_mode"}] },
{ "keys": ["g", "s"], "command": "sftp_browse_server", "context": [{"key": "setting.command_mode"}] },
local function groupby(func, seq)
local t = {}
for _, val in ipairs(seq) do
local key = func(val)
t[key] = t[key] or {}
t[key][#t[key] + 1] = val
end
return t
end
@ianyfchang
ianyfchang / hg19.chrlen.bed
Created May 16, 2014 07:38
HG19 Chromosome length BED file
chr1 0 249250621
chr1_gl000191_random 0 106433
chr1_gl000192_random 0 547496
chr2 0 243199373
chr3 0 198022430
chr4 0 191154276
chr4_ctg9_hap1 0 590426
chr4_gl000193_random 0 189789
chr4_gl000194_random 0 191469
chr5 0 180915260
@lambdalisue
lambdalisue / install_gvim.sh
Created July 7, 2014 07:08
GVim compile and install script for CentOS
#!/usr/bin/env bash
#==============================================================================
# GVim compile and install script for CentOS
#
# Description: Install VIM with +python/+python3 via pyenv installed pythons
# Author: Alisue <lambdalisue@hashnote.net>
# License: MIT
# GistID: 01996ca7877f72b860b2
#==============================================================================
@elucify
elucify / README.md
Last active May 13, 2020 17:40
ClinVar sample README.md

ClinVar

This directory contains:

  • ClinVar (http://www.ncbi.nlm.nih.gov/clinvar/) dataset reports, and ClinVar development documents
  • documents related to the NCBI collaboration with ClinGen (http://www.clinicalgenome.org/)
  • ftp://ftp.ncbi.nih.gov/pub/clinvar/ClinGen/ExpertPanelRequestForm.docx - how to apply for expert panel status
  • data common to ClinVar and GTR
  • ftp://ftp.ncbi.nlm.nih.gov/pub/GTR/standard_terms - terminology used by both GTR and ClinVar.
@jennybc
jennybc / yaml_frontmatter_r_github_document.yaml
Last active February 9, 2022 21:36
YAML frontmatter for R Markdown to cause rmarkdown::render() to retain intermediate Markdown file for .R and .Rmd files, respectively
#' ---
#' title: "Something fascinating"
#' author: "Jenny Bryan"
#' date: "`r format(Sys.Date())`"
#' output: github_document
#' ---