Skip to content

Instantly share code, notes, and snippets.

View elipapa's full-sized avatar

Eliseo Papa elipapa

View GitHub Profile
@elipapa
elipapa / gene2ensembl.sh
Created April 16, 2016 02:55
Map human gene symbols to ensembl gene ids, using the ensembl REST api, curl and jq
#!/usr/bin/env bash
# USAGE:
# 0. install jq from https://stedolan.github.io/jq/ if not already present
# 1. make this script executable
# chmod u+x gene2ensembl.sh
# 2. then run it on a gene list with one gene ID per line
./gene2ensembl.sh genesymbollist.txt > ensembl_list.txt
# NOTE: this command does not run in parallel on purpose
@elipapa
elipapa / git-deploy-setup.sh
Last active May 22, 2016 22:49
Edit files locally and deploy the changes on a remote server using git - often better than playing with sshfs, rsync, scp, tramp, remote-edit, rmate
#!/usr/bin/env bash
# Installation with this script in your $PATH:
# $ git config --global alias.deploy '!git-deploy'
# When in the repo just go:
# $ git deploy ssh://user@server/a/path/to/repo
# which creates a bare repository bare.git in that remote directory
# and copies the working tree in the directory
@elipapa
elipapa / decomp.sh
Last active May 22, 2016 22:49
simple bash task queue to download, decompress and upload files to a S3 bucket
#!/bin/bash
while true; do
until [[ $usedspace -ge 60 ]]; do
for file_ready in queue/*.downloaded; do
filepath=${file_ready%.downloaded}
file=${filepath##*/}
srsid=${file/.*/}
if [ ! -e "queue/$srsid.decompressed" ]
then
echo "Decompressing $srsid ..."
@elipapa
elipapa / journey2dayone.py
Created November 24, 2015 17:42
converting journey android app entries to dayone entries using the the dayone-cli limited input options
#!/usr/bin/env python3
## converting journey android app entries to dayone entries using the the dayone-cli limited input options
# first download all single posts zip files and place them in the folder of the script. Then run
# unzip '*.zip'
# where quotes are important!
#
# Then run this script in the folder
@elipapa
elipapa / minimal-terminal-setup.md
Created October 22, 2015 10:07
Least amount of steps to get a decent command line in OSX/linux environments

The minimal set of steps to get a decent command line on a server

using homebrew, apt-get or whatever you have access to:

  • install git
  • install zsh

Directly from prezto install instructions

@elipapa
elipapa / _Setup_new_laptop.md
Last active February 26, 2024 04:27
Steps to set up a new osx laptop for data science and computational biology work

Set up a new os x laptop

Steps to setup a new OS X laptop with a data science & computational biology development environment.

Last updated: 7 Jan 2017 macOS: Yosemite => Sierra

Sure you could try to do this from dotfiles, but historically something has broken and required manual input anyway. So, inspired by the pragmatism of paul irish bash setup script and a few other gists written in markdown like this, I rolled my own.

Some design considerations:

@elipapa
elipapa / com.elipapa.keychains-backup.plist
Last active August 4, 2019 19:10
launchd job that i use to back up mac os x keychains to an encrypted disk image.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.elipapa.keychain-backup</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>