Instructions:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
OS images can be found at:
https://cdn.amazonlinux.com/os-images/2.0.20220912.1/
Generate seed iso
| #!/usr/bin/env bash | |
| npm list --global --parseable --depth=0 | perl -lane 'if ( $_=~/node_modules\/(\S+)/ ) { print $1; }' >"$HOME/.config/npm.backup" | |
| pip freeze >"$HOME/.config/requirements.backup" | |
| cargo install --list | perl -lane 'if ( $_=~/^(\S+)/ ) { print $1; }' >"$HOME/.config/cargo.backup" |
| #!/usr/bin/env python | |
| import sys | |
| import json | |
| if len(sys.argv) != 2: | |
| exit() | |
| print("{\"docs\": [") | |
| with open(sys.argv[1]) as infile: |
Instructions:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
OS images can be found at:
https://cdn.amazonlinux.com/os-images/2.0.20220912.1/
Generate seed iso
| #!/usr/bin/env bash | |
| CONFILE=${1:-nextflow.config} | |
| OUTDIR=${2:-./singularity} | |
| if [ ! -e $CONFILE ]; then | |
| echo "$CONFILE does not exist" | |
| exit | |
| fi |
| echo "scale=2; $(fd --full-path -t f --regex '\.fa+$|\.fasta$' /nfs/db/ensembl -x du {}|datamash sum 1) / (1024^3)" | bc |
| #!/usr/bin/env bash | |
| # Placed in a different machine than production with a cron | |
| # Server | |
| URL="https://example.com" | |
| HTTP=$(curl --silent --insecure -m 30 -I GET "${URL}"|perl -lane 'if ($_=~/HTTP/) {$_=~/HTTP\S+\s+(\d+)\s+/; print $1;} ') | |
| # Normal situation codes | |
| CODES=(200) | |
| MSG="Something is wrong with ${URL}. CODE: ${HTTP}" |
| [INCLUDES] | |
| before = common.conf | |
| [Definition] | |
| _auth_worker = (?:dovecot: )?auth(?:-worker)? | |
| _daemon = (?:dovecot(?:-auth)?|auth) | |
| prefregex = ^%(__prefix_line)s(?:%(_auth_worker)s(?:\([^\)]+\))?: )?(?:%(__pam_auth)s(?:\(dovecot:auth\))?: |(?:pop3|imap)-login: )?(?:Error: )?<F-CONTENT>.+</F-CONTENT>$ |
| on: | |
| push: | |
| branches: | |
| # Default branches below | |
| - main | |
| - master | |
| name: renderbook |
| # -*- coding: utf-8 -*- | |
| """ | |
| Pergola webservice client | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| More details at: https://pergola.crg.eu | |
| Usage: python pergola-webservice.py myconfig.json myoutput.zip | |
| """ | |
| import requests | |
| import json | |
| import sys |
| #!/usr/bin/env perl | |
| # List of IDs - one per line | |
| my $list = shift; | |
| # File with potential IDs, it can be GFF but also othersH | |
| my $gff = shift; | |
| my @ids; | |
| open( LIST, $list ) || die "Cannot open $list"; |