Skip to content

Instantly share code, notes, and snippets.

@sschmeier
sschmeier / conda.yml
Last active February 9, 2021 07:40
Example: include a local /github package into a conda environment
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- pandas
- pyfaidx
- pysam==0.15.4
- pybedtools
- pip:
@sschmeier
sschmeier / tmux_conda_fix.md
Created February 8, 2020 21:59 — forked from ekreutz/tmux_conda_fix.md
Fix tmux messing with conda path

Fix tmux messing with conda

Problem: When running a conda environment and opening tmux on macOS, a utility called path_helper is run again. Essentially, the shell is initialized twice which messes up the ${PATH} so that the wrong Python version shows up within tmux.

Solution

If using bash, edit /etc/profile and add one line. (For zsh, edit /etc/zprofile)

...
@sschmeier
sschmeier / private-fork.md
Last active August 5, 2020 08:59 — forked from DavideMontersino/private-fork.md
How to fork to a private gitlab instance

Private fork on GitLab

Aim

Have a public repo on github for the world to see + have a the same repo private on gitlab for project specific branches/dev. Locally use github as upstream and gitlab as origin. We develop in gitlab and push general applicable changes to our upstream github repo.

In detail:

  1. one for our private repository on gitlab (will be the default one, called origin)
  2. one to be connected to a repo on github, to be able to publish new general changes (will be called upstream)
@sschmeier
sschmeier / check-server.py
Created February 18, 2017 19:08
Ping server and calc package loss. If loss, sent message to slack channel.
#!/usr/bin/env python
import sys, subprocess, requests
def msg2slack(msg, channel, user):
url = "<URL>" # your Slack incomming webhook url
payload = {"channel": '#%s' % channel,
"username": user,
"text": msg,
"icon_emoji": ":computer:"}
r = requests.post(url, json=payload)
@sschmeier
sschmeier / crontab
Last active February 17, 2017 04:31
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system