#STOP launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
#START launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
#STOP launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
#START launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
# pmid2bibtex.rb | |
# convert a PubMed PMID to BibTeX citation format | |
# updated version of http://chrisamiller.com/science/2010/12/13/using-bioruby-to-fetch-citations-from-pubmed/ | |
# works as of 2015-03-18 | |
require 'bio' | |
Bio::NCBI.default_email = "me@me.com" # required for EUtils | |
id = "18265351" | |
pm = Bio::PubMed::efetch(id) # array of MEDLINE-formatted string |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
# convert c("female", "Male") to c(0,1) | |
# magrittr is way nicer than nested function calls | |
convert_sexcodes <- | |
function(codes) | |
{ | |
require(magrittr) | |
tolower(codes) %>% |
#!/usr/bin/python | |
import sys, os, getopt, re, json | |
def main(argv): | |
inputpath = '' | |
outputfile = '' | |
verbose = False; | |
outputDictionary = {} | |
try: |
id name | |
1 11 rick | |
2 32 tom | |
3 37 joe | |
id letters | |
1 11 r | |
2 11 i | |
3 11 c |
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"