This gist contains lists of modules available in
in AWS Lambda.
| #!/bin/bash | |
| # Transfers a single file via script. | |
| # Note the optional --encrypt flag. | |
| set -e | |
| globus=`which globus` | |
| srce=c4d80096-7612-11e7-8b5e-22000b9923ef | |
| dest=c4d80096-7612-11e7-8b5e-22000b9923ed |
| #!/usr/bin/env python | |
| ##### USE ON YOUR OWN RISK - THIS IS GOING TO delete_snapshot OLDER THAN 30 DAYS | |
| import datetime | |
| import sys | |
| import boto3 | |
| age = 30 | |
| aws_profile_name = 'prod' | |
| def days_old(date): | |
| date_obj = date.replace(tzinfo=None) | |
| diff = datetime.datetime.now() - date_obj |
| #!/usr/bin/env python | |
| ##### USE ON YOUR OWN RISK - THIS IS GOING TO DEREGISTER AMI OLDER THAN 30 DAYS | |
| import boto3 | |
| from dateutil.parser import parse | |
| import datetime | |
| age = 30 | |
| aws_profile_name = 'prod' | |
| def days_old(date): | |
| get_date_obj = parse(date) |
| " Two env variables must be added to TravisCI settings: | |
| " AWS_SECRET_ACCESS_KEY | |
| " AWS_ACCESS_KEY_ID | |
| before_deploy: | |
| pip install --user awscli | |
| deploy: | |
| provider: script | |
| script: ~/.local/bin/aws s3 sync dist s3://MY_BUCKET_NAME --region=us-west-2 --delete | |
| skip_cleanup: true |
| #!/usr/bin/env bash | |
| stale_images=`docker images --no-trunc --quiet --filter "dangling=true"` | |
| stale_containers=`docker ps --no-trunc --quiet --filter "status=exited"` | |
| stale_volumes=`docker volume ls --quiet --filter "dangling=true"` | |
| stale_images_count=`echo "$stale_images" | sed '/^\s*$/d' | wc -l | xargs` | |
| stale_containers_count=`echo "$stale_containers" | sed '/^\s*$/d' | wc -l | xargs` | |
| stale_volumes_count=`echo "$stale_volumes" | sed '/^\s*$/d' | wc -l | xargs` | |
| echo "Removing stale containers..." |
This gist contains lists of modules available in
in AWS Lambda.
| # This code uses Biopython to retrieve lists of articles from pubmed | |
| # you need to install Biopython first. | |
| # If you use Anaconda: | |
| # conda install biopython | |
| # If you use pip/venv: | |
| # pip install biopython | |
| # Full discussion: |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: consul | |
| # Required-Start: $local_fs $remote_fs | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: S 0 1 6 | |
| # Short-Description: Consul service discovery framework | |
| # Description: Healthchecks local services and registers | |
| # them in a central consul database. |
| # Varnish 4.0 file for our Craft CMS projects | |
| # Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl | |
| # | |
| # This is still work in progress, comments appreciated. | |
| vcl 4.0; | |
| import std; | |
| import directors; |