Skip to content

Instantly share code, notes, and snippets.

View vsoch's full-sized avatar
💭
rawr

Vanessasaurus vsoch

💭
rawr
View GitHub Profile
@vsoch
vsoch / gls.py
Last active September 2, 2020 18:50
Testing Google Life Sciences updated download / upload script (will be put into version control)
#!/usr/bin/env python
# This is a helper script for the Google Life Sciences instance to be able to:
# 1. download a blob from storage, which is required at the onset of the Snakemake
# gls.py download <bucket> <source> <destination>
# workflow step to obtain the working directory.
# 2. Upload logs back to storage (or some specified directory of files)
# gls.py save <bucket> <source-dir> <destination-dir>
# gls.py save <bucket> /google/logs/output source/logs
@vsoch
vsoch / Dockerfile
Last active August 25, 2020 22:14
Dolmades Files
FROM ubuntu:16.04
LABEL version="1.0"
ENTRYPOINT [ "/singularity" ]
RUN mkdir -p /APPS /PROFILES
RUN chmod 0777 /APPS /PROFILES
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get -y install wget less vim software-properties-common python3-software-properties apt-transport-https winbind
RUN wget https://dl.winehq.org/wine-builds/Release.key
@vsoch
vsoch / AIRFLOW_FEEDBACK.md
Last active January 22, 2020 19:01
Apache Airflow Feedback 1/22/2020

Airflow Feedback

This is feedback about contribution to Apache Airflow.

Background

I first opened up a pull request in early March 2019 to add a Singularity operator to airflow. I am fairly experienced with Singularity (but not Airflow) so largely my strategy was to use an existing operator (Docker) as an example, and go from there. The interaction felt more controlled than usual because I was required to open a JIRA issue, but this wasn't terrible and is understandable for a larger community. A reviewer was very quick

@vsoch
vsoch / pull_request.sh
Last active November 20, 2019 17:02
A supporting script for a GitHub action to open a pull request
#!/bin/bash
# Suggested by Github actions to be strict
# Taken from https://www.github.com/vsoch/pull-request-action
set -e
set -o pipefail
################################################################################
# Global Variables (we can't use GITHUB_ prefix)
################################################################################
@vsoch
vsoch / run.sh
Last active November 4, 2019 14:25
Testing run.sh script for Snakemake
#!/bin/bash
BUCKET="${1}"
BLOB="${2}"
JOBSCRIPT="${3}"
mkdir -p /workdir
cd /workdir
echo "bucket: $BUCKET"
echo "blob: $BLOB"
@vsoch
vsoch / download.py
Created November 2, 2019 17:07
Provides a wrapper script to download a Snakemake Blob, and then extract to a location. This should be moved to be packaged alongside snakemake
#!/usr/bin/env python
import argparse
import datetime
from google.cloud import storage
def download_blob(bucket_name, source_blob_name, destination_file_name):
"""Downloads a blob from the bucket."""
storage_client = storage.Client()
@vsoch
vsoch / backup.sh
Created October 21, 2019 20:59
An example of using rsync to backup three folders in Documents to an external drive, checking that it's mounted first
#!/bin/bash
output=/media/$USER/My\ Passport/vubuntu/
if [ ! -d "$output" ]; then
echo "$output not found, is drive connected to computer?"
exit 1
fi
for folder in "Personal" "Transcripts" "Resume"; do
rsync -avzh /home/$USER/Documents/$folder $output
@vsoch
vsoch / cargo-debstatus-nu-0.3.0_10-17-2019.txt
Last active December 7, 2019 17:18
nu 0.3.0 dependency output from running cargo-debstatus in the root of the repository, and commenting out #default-run = "nu" in Cargo.toml. Do a find for (outdated) to highlight all the packages that were highlighted in yellow on the terminal (that I cannot show here)
nu v0.3.0 (/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0)
├── ansi_term v0.12.1 (in debian)
├── app_dirs v1.2.1
│ ├── ole32-sys v0.2.0
│ │ ├── winapi v0.2.8 (outdated)
│ │ └── winapi-build v0.1.1 (in debian)
│ ├── shell32-sys v0.1.2
│ │ ├── winapi v0.2.8 (outdated)
│ │ └── winapi-build v0.1.1 (in debian)
│ ├── winapi v0.2.8 (outdated)
@vsoch
vsoch / Dockerfile
Created July 19, 2019 18:35
An example Dockerfile using MicroSecurity scanner from AquaSec. You need to first get a token, and replace variables in the file.
FROM YOURCONTAINERHERE
# docker run --rm -it aquasec/microscanner --register <email address>
# docker build -t dirty-container .
RUN apk add --no-cache ca-certificates && update-ca-certificates
ADD https://get.aquasec.com/microscanner .
RUN chmod +x microscanner
RUN ./microscanner YOURTOKENHERE
@vsoch
vsoch / README.md
Created July 11, 2019 18:55
Apache with Singularity and without sudo

Apache with Singularity

Start with this recipe

Bootstrap: docker
From:httpd:2.4.37
%startscript
httpd-foreground