#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
/** | |
* PhantomJS script for importing collection dumps to Parse.com. | |
* | |
* Usage: phantomjs --ssl-protocol any import-parse-class.js <configFile> <dumpFile> <collectionName> | |
* | |
* Parameters: | |
* - configFile: path of a JSON file with contents: | |
* { | |
* "email": <Parse user email>, | |
* "password": <Parse user password>, |
#!/usr/bin/env bash | |
#################################################################### | |
# Usage: | |
# Save all docker images to tar files for copy to another machine | |
#################################################################### | |
images=$(docker images | awk 'NR>1 && $1 != "<none>" {printf("%s:%s\n", $1, $2)}') | |
for image in $images | |
do |
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
// dependencies | |
var async = require('async'); | |
var path = require('path'); | |
var AWS = require('aws-sdk'); | |
var gm = require('gm').subClass({ | |
imageMagick: true | |
}); | |
var util = require('util'); | |
// get reference to S3 client | |
var s3 = new AWS.S3(); |
- create s3 bucket, for example: react. | |
- create cloudfront distributions with these settings: | |
- Default Root Object: index.html | |
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com | |
- add custom error page with these settings: | |
- HTTP Error Code: 403: Forbidden | |
- Customize Error Response: Yes | |
- Response Page Path: /index.html | |
- HTTP Response Code: 200: OK | |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
FROM python:2.7-alpine | |
MAINTAINER Nick Janetakis <[email protected]> | |
ENV INSTALL_PATH /bsawf | |
RUN mkdir -p $INSTALL_PATH | |
WORKDIR $INSTALL_PATH | |
COPY requirements.txt requirements.txt | |
RUN apk add --no-cache --virtual .build-deps \ |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
#!/usr/bin/env python2 | |
import json | |
import random | |
import copy | |
import googlemaps | |
import math | |
import os.path | |
import datetime | |
def distanceFromLarAndLon(lon1, lat1, lon2, lat2): |