This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from applicationinsights import TelemetryClient | |
| import subprocess | |
| import sys | |
| import socket | |
| hostname = socket.gethostname() | |
| telemetry_id = sys.argv[1] | |
| tc = TelemetryClient(telemetry_id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| set backspace=2 | |
| filetype off | |
| syntax on | |
| set t_Co=256 | |
| set foldmethod=marker | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 | |
| ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 file partSizeInMb"; | |
| exit 0; | |
| fi | |
| file=$1 | |
| if [ ! -f "$file" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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; |