This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/* Here's how to add a coloured marker to a Google Map with a shadow in the | |
right place. | |
The pin itself is dynamically generated using the Google Charts API, | |
documented here: | |
https://developers.google.com/chart/image/docs/gallery/dynamic_icons | |
Note however that this API was marked as deprecated on April 20th 2012 | |
although it's not clear when or if it will be turned off. | |
*/ |
# 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; |
#!/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. |
# 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: |
This gist contains lists of modules available in
in AWS Lambda.
#!/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..." |
" 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 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) |
#!/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 |