In the directory including Dockerfile
docker build -t image_name .
from kombu import Connection, Exchange, Queue | |
import logging | |
LOG = logging.getLogger(__name__) | |
cvworker_exchange = Exchange('cvworker', 'direct', durable=True) | |
queue = Queue('video', exchange=cvworker_exchange, routing_key='model1') | |
return_queue = Queue('return_queue') | |
{ | |
"Records": [ | |
{ | |
"EventSource":"aws:sns", | |
"EventVersion":"1.0", | |
"EventSubscriptionArn":"arn:aws:sns:us-west-2:xxxx:xxxx", | |
"Sns": { | |
"Type":"Notification", | |
"MessageId":"88B1B251-2E92-4FC3-BFAA-E3BBD0BAB10A", | |
"TopicArn":"arn:aws:sns:us-west-2:881222951025:survey-tool-ses-delivery", |
docker-machine create -d virtualbox etcd0 | |
docker-machine create -d virtualbox etcd1 | |
docker-machine create -d virtualbox etcd2 | |
eval $(docker-machine env etcd0) | |
docker $(docker-machine config etcd0) run -d \ | |
--restart="always" \ | |
-p 4001:4001 -p 2380:2380 -p 2379:2379 \ | |
--name etcd quay.io/coreos/etcd \ | |
-name etcd0 \ |
set nocompatible | |
set backspace=2 | |
filetype off | |
syntax on | |
set t_Co=256 | |
set foldmethod=marker | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
#!/bin/sh | |
## | |
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of | |
## the replacement of upstart with systemd | |
## | |
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com> | |
## - VERSION: 1.0 | |
## |
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: 'debug', | |
pageSettings: { | |
loadImages: false, // The WebPage instance used by Casper will | |
loadPlugins: false, // use these settings | |
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4' | |
} | |
}); |
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |