Skip to content

Instantly share code, notes, and snippets.

View hexylena's full-sized avatar
🏳️‍⚧️
Generally Unavailable

Helena hexylena

🏳️‍⚧️
Generally Unavailable
View GitHub Profile
@hexylena
hexylena / phacts-galaxy.patch
Created July 23, 2014 18:23
Patch for phacts use in galaxy
241c241
< my $command = "$fasta_path -b 1 -H -q \"".$swd."/proteins/$prot\" \"$swd/$file_path\"";
---
> my $command = "$fasta_path -b 1 -H -q \"".$swd."/proteins/$prot\" \"$file_path\"";
@hexylena
hexylena / Shell Log.md
Last active September 7, 2016 15:34
tool_dependencies generator

Shell script to make producing tool_dependencies easier. It's simple to use, behaves a lot like a venv, and then produces a tool_dependencies.xml in the directory where you started when you deactivate at the end.

Pretty to activate:

. activate.sh

Example of use:

@hexylena
hexylena / dojo.js.patch
Created December 31, 2015 16:45
JBrowse analytics patch
--- a/src/dojo/dojo.js 2015-12-30 17:07:30.735832912 -0600
+++ b/src/dojo/dojo.js 2015-12-31 09:27:19.348605487 -0600
@@ -77,7 +77,7 @@
"https";if("undefined"!=typeof this.config.clientReport&&"undefined"!=typeof this.config.clientReport.protocol)b=this.config.clientReport.protocol;a=b+"://jbrowse.org/analytics/clientReport?"+dojo.objectToQuery(a);dojo.create("img",{style:{display:"none"},src:a},document.body)},getStore:function(a,b){if(!b)throw"invalid arguments";var c=this._storeCache||{};this._storeCache=c;if(c=c[a])c.refCount++,b(c.store);else{var f=this.config.stores[a];f?(c=f.type)?require([c],dojo.hitch(this,function(c){var d=
{};dojo.mixin(d,f);dojo.mixin(d,{config:f,browser:this,refSeq:this.refSeq});c=new c(d);this._storeCache[a]={refCount:1,store:c};b(c);b=void 0})):(console.warn("store "+a+" has no type defined"),b(null)):(console.warn("store '"+a+"' not found"),b(null))}},uniqCounter:0,addStoreConfig:function(a,b){a=a||"addStore"+this.uniqCounter++;if(!this.config.stores)this.config.stores={};if
@hexylena
hexylena / BaseSpaceFastQDownloader.py
Created May 6, 2016 17:10
BaseSpace Batch Downloader in Python
from urllib2 import Request, urlopen, URLError
from os.path import expanduser
import re
import hashlib
import json
import sys
import os
import logging
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger()

Keybase proof

I hereby claim:

  • I am erasche on github.
  • I am hxr (https://keybase.io/hxr) on keybase.
  • I have a public key whose fingerprint is 0C0E 0EA0 EBB8 E7D1 39B3 4551 149E 5F52 736B 9013

To claim this, I am signing this object:

#!/bin/bash
VIRTUAL_ENV=$1
if [ -z $VIRTUAL_ENV ]; then
echo "usage: $0 </path/to/virtualenv> <cmd>"
exit 1
fi
. $VIRTUAL_ENV/bin/activate
shift 1
@hexylena
hexylena / dump-attrs.xml
Last active May 16, 2019 13:39
Galaxy tool to dump available attributes
<tool id="debugger" name="Debug available vars" version="0.0.1">
<macros>
<token name="@DUMMPER@">
<![CDATA[
<html><body>
<h1>$myobjname</h1>
<div style="display: flex">
<div style="width: 300px; min-width: 300px; height: 900px; overflow-y: scroll; overflow-x: hidden;">
@hexylena
hexylena / data.json
Last active March 5, 2020 14:22
PEV demo data from `query queue-overview`
[
{
"Plan": {
"Node Type": "Aggregate",
"Strategy": "Hashed",
"Partial Mode": "Simple",
"Parallel Aware": false,
"Startup Cost": 5.43,
"Total Cost": 5.44,
WITH
sent
AS (
SELECT
job.id AS job,
date_trunc('month', job.create_time)::DATE AS month,
job.job_runner_name AS runner,
ds_in.total_size AS size
FROM
job
@hexylena
hexylena / tn.sh
Created August 6, 2021 18:18
Make spawning tmux sessions fun again
hash_string256() {
hash_value=$(printf "%s" "$1" | md5sum |tr -d " -"| tr "a-f" "A-F")
printf "ibase=16; (%s + %X) %% 100 \n" $hash_value "$2" | bc
}
declare -a light
light=(2 3 4 6 7 10 11 12 13 14 15 33 39 41 42 43 44 45 46 47 48 49 50 51 68 69 70 71 72 73 74 5 76 77 78 79 80 81 82 83 84 85 86 87 101 102 103 104 105 106 107 108 109 110 111 12 113 114 115 116 117 118 119 120 121 122 123 134 135 136 137 138 139 140 141 142 143 144 145 46 147 148 149 150 151 152 153 154 155 156 157 158 159 167 168 169 170 171 172 173 174 175 176 77 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 201 202 203 204 205 206 07 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 31 245 246 247 248 249 250 251 252 253 254 255)
if [[ "$1" != "" ]]; then