Skip to content

Instantly share code, notes, and snippets.

View rvidal's full-sized avatar

Ricardo Vidal rvidal

View GitHub Profile
@martyglaubitz
martyglaubitz / gist:9d258a1ac3dd701b1c35
Created June 10, 2015 11:45
PostgreSQL start/stop under mac

#STOP launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

#START launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

@neilfws
neilfws / pmid2bibtex.rb
Last active July 5, 2017 14:32
BioRuby: convert a PubMed PMID to BibTeX citation format
# 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
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

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.

Install Software

# convert c("female", "Male") to c(0,1)
# magrittr is way nicer than nested function calls
convert_sexcodes <-
function(codes)
{
require(magrittr)
tolower(codes) %>%
@asciimike
asciimike / fireimport.py
Last active September 17, 2015 18:53
Multiple JSON files to single JSON file, with key sanitization, for data import into Firebase
#!/usr/bin/python
import sys, os, getopt, re, json
def main(argv):
inputpath = ''
outputfile = ''
verbose = False;
outputDictionary = {}
try:
anonymous
anonymous / gist:9238018
Created February 26, 2014 20:38
Easy way to split strings and keep id or row number in R?
id name
1 11 rick
2 32 tom
3 37 joe
id letters
1 11 r
2 11 i
3 11 c
@durden
durden / references.md
Last active September 11, 2017 18:17
References for Python Science apps talk from Pycon 2013, PyTexas 2013, and PyArkansas 2012
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@kbond
kbond / post.md
Last active October 6, 2022 12:18
Ubuntu LAMP Development Environment Setup

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"

@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active July 10, 2024 14:36
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User