Skip to content

Instantly share code, notes, and snippets.

@stuzart
stuzart / gist:603376877d3f7e3f1a284e314a0f171e
Created July 22, 2020 15:13
basic registering a workflow with workflow hub
import requests
import json
import string
import getpass
base_url = 'https://testing2.fair-dom.org'
containing_project_id = 1
token = ""
#!/cvmfs/main.galaxyproject.org/venv/bin/python
#
# Generate Galaxy Conda mulled hashes (NOT Biocontainers mulled hashes) from a list of requirements
#
import sys
sys.path.insert(0, '/cvmfs/main.galaxyproject.org/galaxy/lib')
from galaxy.tools.deps.conda_util import (
@hynek
hynek / gunicorn_callbacks_for_worker_id.py
Last active March 6, 2024 04:55
This is an attempt to emulate uWSGI’s uwsgi.worker_id() that ensures that I have worker IDs from 1…--workers which is useful in logging and instrumentation where changing PIDs are annoying.
import os
def on_starting(server):
"""
Attach a set of IDs that can be temporarily re-used.
Used on reloads when each worker exists twice.
"""
server._worker_id_overload = set()
@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