Skip to content

Instantly share code, notes, and snippets.

View natefoo's full-sized avatar

Nate Coraor natefoo

View GitHub Profile
@natefoo
natefoo / gist:3082c8f6321438e28936
Created May 1, 2014 22:02
The rollercoaster of APT!
Fetched 1,586 MB in 1min 40s (15.8 MB/s)
texlive-base:amd64 conflicts with texlive-binaries:amd64
texlive-base:amd64 conflicts with texlive-binaries:amd64
texlive-base:amd64 conflicts with texlive-extra-utils:amd64
texlive-base:amd64 conflicts with texlive-font-utils:amd64
texlive-base:amd64 conflicts with texlive-binaries:amd64
texlive-base:amd64 conflicts with texlive-extra-utils:amd64
texlive-base:amd64 conflicts with texlive-font-utils:amd64
texlive-base:amd64 conflicts with texlive-fonts-extra:amd64
texlive-base:amd64 conflicts with texlive-binaries:amd64
@natefoo
natefoo / job_conf.xml
Last active August 29, 2015 14:02
A fake job runner for testing the walltime resubmission feature committed in https://bitbucket.org/galaxy/galaxy-central/commits/7b209e06ddb944e953d340754439f4e3e5dc339d
<?xml version="1.0"?>
<job_conf>
<plugins>
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="8"/>
<plugin id="walltime" type="runner" load="galaxy.jobs.runners.walltime:WalltimeJobRunner" workers="4"/>
</plugins>
<handlers default="main">
<handler id="main"/>
</handlers>
<destinations default="short">
---
- hosts: localhost
connection: local
vars:
build_id: gcc2014
work_dir: /home/galaxy/nginx-build
nginx_version: 1.4.7
nginx_sha256: 23b8ff4a76817090678f91b0efbfcef59a93492f6612dc8370c44c1f1ce1b626
nginx_upload_module_repo: https://github.com/vkholodkov/nginx-upload-module.git
nginx_upload_module_branch: 2.2
---
# vars
my_config:
- section: foo
options:
- foo: bar
- baz: quux
---
@natefoo
natefoo / play.yml
Created August 20, 2014 20:39
Automagic Galaxy Config generation
---
- hosts: localhost
connection: local
vars:
galaxy_config:
"server:web0":
host: 0.0.0.0
port: 8080
"server:web1":
host: 0.0.0.0
galaxy_mutable_configs:
- src: "{{ galaxy_server_dir }}/migrated_tools_conf.xml.sample"
dest: "{{ galaxy_config['app:main']['migrated_tools_config'] if galaxy_config is defined and 'app:main' in galaxy_config and 'migrated_tools_config' in galaxy_config['app:main'] else galaxy_config_default['app:main']['migrated_tools_config'] }}"
(ansible)[nate@galaxy usegalaxy-playbook]$ pass ansible/vault/usegalaxy | ansible-playbook -i stage/inventory galaxy.yml --vault-password-file=/dev/stdin
Traceback (most recent call last):
File "/home/ndc/ansible/bin/ansible-playbook", line 309, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/ndc/ansible/bin/ansible-playbook", line 125, in main
vault_pass = utils.read_vault_file(options.vault_password_file)
File "/home/ndc/ansible/lib/python2.6/site-packages/ansible/utils/__init__.py", line 170, in read_vault_file
if is_executable(this_path):
File "/home/ndc/ansible/lib/python2.6/site-packages/ansible/utils/__init__.py", line 280, in is_executable
return (stat.S_IXUSR & os.stat(path)[stat.ST_MODE]
---
- hosts: all
roles:
- packages
- role: nginx
when: inventory_hostname in groups['webservers']
- role: moin
when: inventory_hostname in groups['wikiservers']
---
@natefoo
natefoo / gist:ac47dc0f8bc1291fe331
Last active August 29, 2015 14:08
over mem jobs
% sacct -u g2main -L -s CA -S 2014-10-01 -E now -o 'jobname%-128' -X -n | cut -d_ -f1 | tr -d '^g' | (echo -n "select tool_id,count(tool_id) ct from job where id in("; while read jobid; do [[ $jobid =~ ^-?[0-9]+$ ]] && echo -n "$c$jobid"; c=','; done; echo ") and state='error' group by tool_id order by ct") | psql galaxy_main
tool_id | ct
---------------------------------------------------------------------------------------------------+----
toolshed.g2.bx.psu.edu/repos/devteam/fastq_to_tabular/fastq_to_tabular/1.1.0 | 1
toolshed.g2.bx.psu.edu/repos/devteam/intersect/gops_intersect_1/1.0.0 | 1
toolshed.g2.bx.psu.edu/repos/devteam/flanking_features/flanking_features_1/4.0.1 | 1
Extract genomic DNA 1 | 1
gff2bed1
diff -r 3eda7cc3555c hmm/tool_dependencies.xml
--- a/hmm/tool_dependencies.xml Mon Nov 12 14:52:05 2012 -0500
+++ b/hmm/tool_dependencies.xml Wed Dec 03 15:47:48 2014 -0500
@@ -4,18 +4,6 @@
<environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
</set_environment>
<package name="R" version="2.15.0">
- <install version="1.0">
- <actions>
- <action type="download_by_url">http://CRAN.R-project.org/src/base/R-2/R-2.15.0.tar.gz</action>